---
name: "ssl"
section: "3ssl"
platform: "linux"
package: "libssl-doc"
version: "1.0.1t-1+deb8u8"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/ssl/3ssl"
---

# ssl(3ssl)

OpenSSL SSL/TLS library

## NAME

SSL - OpenSSL SSL/TLS library

## SYNOPSIS

## DESCRIPTION

The OpenSSL **ssl** library implements the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols. It provides a rich API which is documented here.

At first the library must be initialized; see *SSL\_library\_init*(3).

Then an **SSL\_CTX** object is created as a framework to establish TLS/SSL enabled connections (see *SSL\_CTX\_new*(3)). Various options regarding certificates, algorithms etc. can be set in this object.

When a network connection has been created, it can be assigned to an **SSL** object. After the **SSL** object has been created using *SSL\_new*(3), *SSL\_set\_fd*(3) or *SSL\_set\_bio*(3) can be used to associate the network connection with the object.

Then the TLS/SSL handshake is performed using *SSL\_accept*(3) or *SSL\_connect*(3) respectively. *SSL\_read*(3) and *SSL\_write*(3) are used to read and write data on the TLS/SSL connection. *SSL\_shutdown*(3) can be used to shut down the TLS/SSL connection.

## DATA STRUCTURES

Currently the OpenSSL **ssl** library functions deals with the following data structures:

- **SSL\_METHOD** (SSL Method)

  That's a dispatch structure describing the internal **ssl** library methods/functions which implement the various protocol versions (SSLv1, SSLv2 and TLSv1). It's needed to create an **SSL\_CTX**.

- **SSL\_CIPHER** (SSL Cipher)

  This structure holds the algorithm information for a particular cipher which are a core part of the SSL/TLS protocol. The available ciphers are configured on a **SSL\_CTX** basis and the actually used ones are then part of the **SSL\_SESSION**.

- **SSL\_CTX** (SSL Context)

  That's the global context structure which is created by a server or client once per program life-time and which holds mainly default values for the **SSL** structures which are later created for the connections.

- **SSL\_SESSION** (SSL Session)

  This is a structure containing the current TLS/SSL session details for a connection: **SSL\_CIPHER**s, client and server certificates, keys, etc.

- **SSL** (SSL Connection)

  That's the main SSL/TLS structure which is created by a server or client per established connection. This actually is the core structure in the SSL API. Under run-time the application usually deals with this structure which has links to mostly all other structures.

## HEADER FILES

Currently the OpenSSL **ssl** library provides the following C header files containing the prototypes for the data structures and and functions:

- **ssl.h**

  That's the common header file for the SSL/TLS API.  Include it into your program to make the API of the **ssl** library available. It internally includes both more private SSL headers and headers from the **crypto** library. Whenever you need hard-core details on the internals of the SSL API, look inside this header file.

- **ssl2.h**

  That's the sub header file dealing with the SSLv2 protocol only. *Usually you don't have to include it explicitly because* *it's already included by ssl.h*.

- **ssl3.h**

  That's the sub header file dealing with the SSLv3 protocol only. *Usually you don't have to include it explicitly because* *it's already included by ssl.h*.

- **ssl23.h**

  That's the sub header file dealing with the combined use of the SSLv2 and SSLv3 protocols. *Usually you don't have to include it explicitly because* *it's already included by ssl.h*.

- **tls1.h**

  That's the sub header file dealing with the TLSv1 protocol only. *Usually you don't have to include it explicitly because* *it's already included by ssl.h*.

## API FUNCTIONS

Currently the OpenSSL **ssl** library exports 214 API functions. They are documented in the following:

### DEALING WITH PROTOCOL METHODS

Here we document the various API functions which deal with the SSL/TLS protocol methods defined in **SSL\_METHOD** structures.

- const SSL\_METHOD \***SSLv23\_method**(void);

  Constructor for the *version-flexible* SSL\_METHOD structure for clients, servers or both. See *SSL\_CTX\_new*(3) for details.

- const SSL\_METHOD \***SSLv23\_client\_method**(void);

  Constructor for the *version-flexible* SSL\_METHOD structure for clients.

- const SSL\_METHOD \***SSLv23\_client\_method**(void);

  Constructor for the *version-flexible* SSL\_METHOD structure for servers.

- const SSL\_METHOD \***TLSv1\_2\_method**(void);

  Constructor for the TLSv1.2 SSL\_METHOD structure for clients, servers or both.

- const SSL\_METHOD \***TLSv1\_2\_client\_method**(void);

  Constructor for the TLSv1.2 SSL\_METHOD structure for clients.

- const SSL\_METHOD \***TLSv1\_2\_server\_method**(void);

  Constructor for the TLSv1.2 SSL\_METHOD structure for servers.

- const SSL\_METHOD \***TLSv1\_1\_method**(void);

  Constructor for the TLSv1.1 SSL\_METHOD structure for clients, servers or both.

- const SSL\_METHOD \***TLSv1\_1\_client\_method**(void);

  Constructor for the TLSv1.1 SSL\_METHOD structure for clients.

- const SSL\_METHOD \***TLSv1\_1\_server\_method**(void);

  Constructor for the TLSv1.1 SSL\_METHOD structure for servers.

- const SSL\_METHOD \***TLSv1\_method**(void);

  Constructor for the TLSv1 SSL\_METHOD structure for clients, servers or both.

- const SSL\_METHOD \***TLSv1\_client\_method**(void);

  Constructor for the TLSv1 SSL\_METHOD structure for clients.

- const SSL\_METHOD \***TLSv1\_server\_method**(void);

  Constructor for the TLSv1 SSL\_METHOD structure for servers.

- const SSL\_METHOD \***SSLv3\_method**(void);

  Constructor for the SSLv3 SSL\_METHOD structure for clients, servers or both.

- const SSL\_METHOD \***SSLv3\_client\_method**(void);

  Constructor for the SSLv3 SSL\_METHOD structure for clients.

- const SSL\_METHOD \***SSLv3\_server\_method**(void);

  Constructor for the SSLv3 SSL\_METHOD structure for servers.

- const SSL\_METHOD \***SSLv2\_method**(void);

  Constructor for the SSLv2 SSL\_METHOD structure for clients, servers or both.

- const SSL\_METHOD \***SSLv2\_client\_method**(void);

  Constructor for the SSLv2 SSL\_METHOD structure for clients.

- const SSL\_METHOD \***SSLv2\_server\_method**(void);

  Constructor for the SSLv2 SSL\_METHOD structure for servers.

### DEALING WITH CIPHERS

Here we document the various API functions which deal with the SSL/TLS ciphers defined in **SSL\_CIPHER** structures.

- char \***SSL\_CIPHER\_description**(SSL\_CIPHER \*cipher, char \*buf, int len);

  Write a string to *buf* (with a maximum size of *len*) containing a human readable description of *cipher*. Returns *buf*.

- int **SSL\_CIPHER\_get\_bits**(SSL\_CIPHER \*cipher, int \*alg\_bits);

  Determine the number of bits in *cipher*. Because of export crippled ciphers there are two bits: The bits the algorithm supports in general (stored to *alg\_bits*) and the bits which are actually used (the return value).

- const char \***SSL\_CIPHER\_get\_name**(SSL\_CIPHER \*cipher);

  Return the internal name of *cipher* as a string. These are the various strings defined by the *SSL2\_TXT\_xxx*, *SSL3\_TXT\_xxx* and *TLS1\_TXT\_xxx* definitions in the header files.

- char \***SSL\_CIPHER\_get\_version**(SSL\_CIPHER \*cipher);

  Returns a string like "`"TLSv1/SSLv3"`" or "`"SSLv2"`" which indicates the SSL/TLS protocol version to which *cipher* belongs (i.e. where it was defined in the specification the first time).

### DEALING WITH PROTOCOL CONTEXTS

Here we document the various API functions which deal with the SSL/TLS protocol context defined in the **SSL\_CTX** structure.

- int **SSL\_CTX\_add\_client\_CA**(SSL\_CTX \*ctx, X509 \*x);

  - long **SSL\_CTX\_add\_extra\_chain\_cert**(SSL\_CTX \*ctx, X509 \*x509);

  - int **SSL\_CTX\_add\_session**(SSL\_CTX \*ctx, SSL\_SESSION \*c);

  - int **SSL\_CTX\_check\_private\_key**(const SSL\_CTX \*ctx);

  - long **SSL\_CTX\_ctrl**(SSL\_CTX \*ctx, int cmd, long larg, char \*parg);

  - void **SSL\_CTX\_flush\_sessions**(SSL\_CTX \*s, long t);

  - void **SSL\_CTX\_free**(SSL\_CTX \*a);

  - char \***SSL\_CTX\_get\_app\_data**(SSL\_CTX \*ctx);

  - X509\_STORE \***SSL\_CTX\_get\_cert\_store**(SSL\_CTX \*ctx);

  - STACK \***SSL\_CTX\_get\_client\_CA\_list**(const SSL\_CTX \*ctx);

  - int (\***SSL\_CTX\_get\_client\_cert\_cb**(SSL\_CTX \*ctx))(SSL \*ssl, X509 \*\*x509, EVP\_PKEY \*\*pkey);

  - void **SSL\_CTX\_get\_default\_read\_ahead**(SSL\_CTX \*ctx);

  - char \***SSL\_CTX\_get\_ex\_data**(const SSL\_CTX \*s, int idx);

  - int **SSL\_CTX\_get\_ex\_new\_index**(long argl, char \*argp, int (\*new\_func);(void), int (\*dup\_func)(void), void (\*free\_func)(void))

  - void (\***SSL\_CTX\_get\_info\_callback**(SSL\_CTX \*ctx))(SSL \*ssl, int cb, int ret);

  - int **SSL\_CTX\_get\_quiet\_shutdown**(const SSL\_CTX \*ctx);

  - void **SSL\_CTX\_get\_read\_ahead**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_get\_session\_cache\_mode**(SSL\_CTX \*ctx);

  - long **SSL\_CTX\_get\_timeout**(const SSL\_CTX \*ctx);

  - int (\***SSL\_CTX\_get\_verify\_callback**(const SSL\_CTX \*ctx))(int ok, X509\_STORE\_CTX \*ctx);

  - int **SSL\_CTX\_get\_verify\_mode**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_load\_verify\_locations**(SSL\_CTX \*ctx, char \*CAfile, char \*CApath);

  - long **SSL\_CTX\_need\_tmp\_RSA**(SSL\_CTX \*ctx);

  - SSL\_CTX \***SSL\_CTX\_new**(const SSL\_METHOD \*meth);

  - int **SSL\_CTX\_remove\_session**(SSL\_CTX \*ctx, SSL\_SESSION \*c);

  - int **SSL\_CTX\_sess\_accept**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_accept\_good**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_accept\_renegotiate**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_cache\_full**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_cb\_hits**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_connect**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_connect\_good**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_connect\_renegotiate**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_get\_cache\_size**(SSL\_CTX \*ctx);

  - SSL\_SESSION \*(\***SSL\_CTX\_sess\_get\_get\_cb**(SSL\_CTX \*ctx))(SSL \*ssl, unsigned char \*data, int len, int \*copy);

  - int (\***SSL\_CTX\_sess\_get\_new\_cb**(SSL\_CTX \*ctx)(SSL \*ssl, SSL\_SESSION \*sess);

  - void (\***SSL\_CTX\_sess\_get\_remove\_cb**(SSL\_CTX \*ctx)(SSL\_CTX \*ctx, SSL\_SESSION \*sess);

  - int **SSL\_CTX\_sess\_hits**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_misses**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_sess\_number**(SSL\_CTX \*ctx);

  - void **SSL\_CTX\_sess\_set\_cache\_size**(SSL\_CTX \*ctx,t);

  - void **SSL\_CTX\_sess\_set\_get\_cb**(SSL\_CTX \*ctx, SSL\_SESSION \*(\*cb)(SSL \*ssl, unsigned char \*data, int len, int \*copy));

  - void **SSL\_CTX\_sess\_set\_new\_cb**(SSL\_CTX \*ctx, int (\*cb)(SSL \*ssl, SSL\_SESSION \*sess));

  - void **SSL\_CTX\_sess\_set\_remove\_cb**(SSL\_CTX \*ctx, void (\*cb)(SSL\_CTX \*ctx, SSL\_SESSION \*sess));

  - int **SSL\_CTX\_sess\_timeouts**(SSL\_CTX \*ctx);

  - LHASH \***SSL\_CTX\_sessions**(SSL\_CTX \*ctx);

  - void **SSL\_CTX\_set\_app\_data**(SSL\_CTX \*ctx, void \*arg);

  - void **SSL\_CTX\_set\_cert\_store**(SSL\_CTX \*ctx, X509\_STORE \*cs);

  - void **SSL\_CTX\_set\_cert\_verify\_cb**(SSL\_CTX \*ctx, int (\*cb)(), char \*arg)

  - int **SSL\_CTX\_set\_cipher\_list**(SSL\_CTX \*ctx, char \*str);

  - void **SSL\_CTX\_set\_client\_CA\_list**(SSL\_CTX \*ctx, STACK \*list);

  - void **SSL\_CTX\_set\_client\_cert\_cb**(SSL\_CTX \*ctx, int (\*cb)(SSL \*ssl, X509 \*\*x509, EVP\_PKEY \*\*pkey));

  - void **SSL\_CTX\_set\_default\_passwd\_cb**(SSL\_CTX \*ctx, int (\*cb);(void))

  - void **SSL\_CTX\_set\_default\_read\_ahead**(SSL\_CTX \*ctx, int m);

  - int **SSL\_CTX\_set\_default\_verify\_paths**(SSL\_CTX \*ctx);

  - int **SSL\_CTX\_set\_ex\_data**(SSL\_CTX \*s, int idx, char \*arg);

  - void **SSL\_CTX\_set\_info\_callback**(SSL\_CTX \*ctx, void (\*cb)(SSL \*ssl, int cb, int ret));

  - void **SSL\_CTX\_set\_msg\_callback**(SSL\_CTX \*ctx, void (\*cb)(int write\_p, int version, int content\_type, const void \*buf, size\_t len, SSL \*ssl, void \*arg));

  - void **SSL\_CTX\_set\_msg\_callback\_arg**(SSL\_CTX \*ctx, void \*arg);

  - void **SSL\_CTX\_set\_options**(SSL\_CTX \*ctx, unsigned long op);

  - void **SSL\_CTX\_set\_quiet\_shutdown**(SSL\_CTX \*ctx, int mode);

  - void **SSL\_CTX\_set\_read\_ahead**(SSL\_CTX \*ctx, int m);

  - void **SSL\_CTX\_set\_session\_cache\_mode**(SSL\_CTX \*ctx, int mode);

  - int **SSL\_CTX\_set\_ssl\_version**(SSL\_CTX \*ctx, const SSL\_METHOD \*meth);

  - void **SSL\_CTX\_set\_timeout**(SSL\_CTX \*ctx, long t);

  - long **SSL\_CTX\_set\_tmp\_dh**(SSL\_CTX\* ctx, DH \*dh);

  - long **SSL\_CTX\_set\_tmp\_dh\_callback**(SSL\_CTX \*ctx, DH \*(\*cb)(void));

  - long **SSL\_CTX\_set\_tmp\_rsa**(SSL\_CTX \*ctx, RSA \*rsa);

  - SSL\_CTX\_set\_tmp\_rsa\_callback

  `"long `**SSL\_CTX\_set\_tmp\_rsa\_callback**`(SSL_CTX *`**ctx**`, RSA *(*`**cb**`)(SSL *`**ssl**`, int `**export**`, int `**keylength**`));"`

  Sets the callback which will be called when a temporary private key is required. The **"export"** flag will be set if the reason for needing a temp key is that an export ciphersuite is in use, in which case, **"keylength"** will contain the required keylength in bits. Generate a key of appropriate size (using ???) and return it.

- SSL\_set\_tmp\_rsa\_callback

  long **SSL\_set\_tmp\_rsa\_callback**(SSL \*ssl, RSA \*(\*cb)(SSL \*ssl, int export, int keylength));

  The same as **SSL\_CTX\_set\_tmp\_rsa\_callback**, except it operates on an SSL session instead of a context.

- void **SSL\_CTX\_set\_verify**(SSL\_CTX \*ctx, int mode, int (\*cb);(void))

  - int **SSL\_CTX\_use\_PrivateKey**(SSL\_CTX \*ctx, EVP\_PKEY \*pkey);

  - int **SSL\_CTX\_use\_PrivateKey\_ASN1**(int type, SSL\_CTX \*ctx, unsigned char \*d, long len);

  - int **SSL\_CTX\_use\_PrivateKey\_file**(SSL\_CTX \*ctx, char \*file, int type);

  - int **SSL\_CTX\_use\_RSAPrivateKey**(SSL\_CTX \*ctx, RSA \*rsa);

  - int **SSL\_CTX\_use\_RSAPrivateKey\_ASN1**(SSL\_CTX \*ctx, unsigned char \*d, long len);

  - int **SSL\_CTX\_use\_RSAPrivateKey\_file**(SSL\_CTX \*ctx, char \*file, int type);

  - int **SSL\_CTX\_use\_certificate**(SSL\_CTX \*ctx, X509 \*x);

  - int **SSL\_CTX\_use\_certificate\_ASN1**(SSL\_CTX \*ctx, int len, unsigned char \*d);

  - int **SSL\_CTX\_use\_certificate\_file**(SSL\_CTX \*ctx, char \*file, int type);

  - void **SSL\_CTX\_set\_psk\_client\_callback**(SSL\_CTX \*ctx, unsigned int (\*callback)(SSL \*ssl, const char \*hint, char \*identity, unsigned int max\_identity\_len, unsigned char \*psk, unsigned int max\_psk\_len));

  - int **SSL\_CTX\_use\_psk\_identity\_hint**(SSL\_CTX \*ctx, const char \*hint);

  - void **SSL\_CTX\_set\_psk\_server\_callback**(SSL\_CTX \*ctx, unsigned int (\*callback)(SSL \*ssl, const char \*identity, unsigned char \*psk, int max\_psk\_len));

  ### DEALING WITH SESSIONS

Here we document the various API functions which deal with the SSL/TLS sessions defined in the **SSL\_SESSION** structures.

- int **SSL\_SESSION\_cmp**(const SSL\_SESSION \*a, const SSL\_SESSION \*b);

  - void **SSL\_SESSION\_free**(SSL\_SESSION \*ss);

  - char \***SSL\_SESSION\_get\_app\_data**(SSL\_SESSION \*s);

  - char \***SSL\_SESSION\_get\_ex\_data**(const SSL\_SESSION \*s, int idx);

  - int **SSL\_SESSION\_get\_ex\_new\_index**(long argl, char \*argp, int (\*new\_func);(void), int (\*dup\_func)(void), void (\*free\_func)(void))

  - long **SSL\_SESSION\_get\_time**(const SSL\_SESSION \*s);

  - long **SSL\_SESSION\_get\_timeout**(const SSL\_SESSION \*s);

  - unsigned long **SSL\_SESSION\_hash**(const SSL\_SESSION \*a);

  - SSL\_SESSION \***SSL\_SESSION\_new**(void);

  - int **SSL\_SESSION\_print**(BIO \*bp, const SSL\_SESSION \*x);

  - int **SSL\_SESSION\_print\_fp**(FILE \*fp, const SSL\_SESSION \*x);

  - void **SSL\_SESSION\_set\_app\_data**(SSL\_SESSION \*s, char \*a);

  - int **SSL\_SESSION\_set\_ex\_data**(SSL\_SESSION \*s, int idx, char \*arg);

  - long **SSL\_SESSION\_set\_time**(SSL\_SESSION \*s, long t);

  - long **SSL\_SESSION\_set\_timeout**(SSL\_SESSION \*s, long t);

  ### DEALING WITH CONNECTIONS

Here we document the various API functions which deal with the SSL/TLS connection defined in the **SSL** structure.

- int **SSL\_accept**(SSL \*ssl);

  - int **SSL\_add\_dir\_cert\_subjects\_to\_stack**(STACK \*stack, const char \*dir);

  - int **SSL\_add\_file\_cert\_subjects\_to\_stack**(STACK \*stack, const char \*file);

  - int **SSL\_add\_client\_CA**(SSL \*ssl, X509 \*x);

  - char \***SSL\_alert\_desc\_string**(int value);

  - char \***SSL\_alert\_desc\_string\_long**(int value);

  - char \***SSL\_alert\_type\_string**(int value);

  - char \***SSL\_alert\_type\_string\_long**(int value);

  - int **SSL\_check\_private\_key**(const SSL \*ssl);

  - void **SSL\_clear**(SSL \*ssl);

  - long **SSL\_clear\_num\_renegotiations**(SSL \*ssl);

  - int **SSL\_connect**(SSL \*ssl);

  - void **SSL\_copy\_session\_id**(SSL \*t, const SSL \*f);

  - long **SSL\_ctrl**(SSL \*ssl, int cmd, long larg, char \*parg);

  - int **SSL\_do\_handshake**(SSL \*ssl);

  - SSL \***SSL\_dup**(SSL \*ssl);

  - STACK \***SSL\_dup\_CA\_list**(STACK \*sk);

  - void **SSL\_free**(SSL \*ssl);

  - SSL\_CTX \***SSL\_get\_SSL\_CTX**(const SSL \*ssl);

  - char \***SSL\_get\_app\_data**(SSL \*ssl);

  - X509 \***SSL\_get\_certificate**(const SSL \*ssl);

  - const char \***SSL\_get\_cipher**(const SSL \*ssl);

  - int **SSL\_get\_cipher\_bits**(const SSL \*ssl, int \*alg\_bits);

  - char \***SSL\_get\_cipher\_list**(const SSL \*ssl, int n);

  - char \***SSL\_get\_cipher\_name**(const SSL \*ssl);

  - char \***SSL\_get\_cipher\_version**(const SSL \*ssl);

  - STACK \***SSL\_get\_ciphers**(const SSL \*ssl);

  - STACK \***SSL\_get\_client\_CA\_list**(const SSL \*ssl);

  - SSL\_CIPHER \***SSL\_get\_current\_cipher**(SSL \*ssl);

  - long **SSL\_get\_default\_timeout**(const SSL \*ssl);

  - int **SSL\_get\_error**(const SSL \*ssl, int i);

  - char \***SSL\_get\_ex\_data**(const SSL \*ssl, int idx);

  - int **SSL\_get\_ex\_data\_X509\_STORE\_CTX\_idx**(void);

  - int **SSL\_get\_ex\_new\_index**(long argl, char \*argp, int (\*new\_func);(void), int (\*dup\_func)(void), void (\*free\_func)(void))

  - int **SSL\_get\_fd**(const SSL \*ssl);

  - void (\***SSL\_get\_info\_callback**(const SSL \*ssl);)()

  - STACK \***SSL\_get\_peer\_cert\_chain**(const SSL \*ssl);

  - X509 \***SSL\_get\_peer\_certificate**(const SSL \*ssl);

  - EVP\_PKEY \***SSL\_get\_privatekey**(SSL \*ssl);

  - int **SSL\_get\_quiet\_shutdown**(const SSL \*ssl);

  - BIO \***SSL\_get\_rbio**(const SSL \*ssl);

  - int **SSL\_get\_read\_ahead**(const SSL \*ssl);

  - SSL\_SESSION \***SSL\_get\_session**(const SSL \*ssl);

  - char \***SSL\_get\_shared\_ciphers**(const SSL \*ssl, char \*buf, int len);

  - int **SSL\_get\_shutdown**(const SSL \*ssl);

  - const SSL\_METHOD \***SSL\_get\_ssl\_method**(SSL \*ssl);

  - int **SSL\_get\_state**(const SSL \*ssl);

  - long **SSL\_get\_time**(const SSL \*ssl);

  - long **SSL\_get\_timeout**(const SSL \*ssl);

  - int (\***SSL\_get\_verify\_callback**(const SSL \*ssl))(int,X509\_STORE\_CTX \*)

  - int **SSL\_get\_verify\_mode**(const SSL \*ssl);

  - long **SSL\_get\_verify\_result**(const SSL \*ssl);

  - char \***SSL\_get\_version**(const SSL \*ssl);

  - BIO \***SSL\_get\_wbio**(const SSL \*ssl);

  - int **SSL\_in\_accept\_init**(SSL \*ssl);

  - int **SSL\_in\_before**(SSL \*ssl);

  - int **SSL\_in\_connect\_init**(SSL \*ssl);

  - int **SSL\_in\_init**(SSL \*ssl);

  - int **SSL\_is\_init\_finished**(SSL \*ssl);

  - STACK \***SSL\_load\_client\_CA\_file**(char \*file);

  - void **SSL\_load\_error\_strings**(void);

  - SSL \***SSL\_new**(SSL\_CTX \*ctx);

  - long **SSL\_num\_renegotiations**(SSL \*ssl);

  - int **SSL\_peek**(SSL \*ssl, void \*buf, int num);

  - int **SSL\_pending**(const SSL \*ssl);

  - int **SSL\_read**(SSL \*ssl, void \*buf, int num);

  - int **SSL\_renegotiate**(SSL \*ssl);

  - char \***SSL\_rstate\_string**(SSL \*ssl);

  - char \***SSL\_rstate\_string\_long**(SSL \*ssl);

  - long **SSL\_session\_reused**(SSL \*ssl);

  - void **SSL\_set\_accept\_state**(SSL \*ssl);

  - void **SSL\_set\_app\_data**(SSL \*ssl, char \*arg);

  - void **SSL\_set\_bio**(SSL \*ssl, BIO \*rbio, BIO \*wbio);

  - int **SSL\_set\_cipher\_list**(SSL \*ssl, char \*str);

  - void **SSL\_set\_client\_CA\_list**(SSL \*ssl, STACK \*list);

  - void **SSL\_set\_connect\_state**(SSL \*ssl);

  - int **SSL\_set\_ex\_data**(SSL \*ssl, int idx, char \*arg);

  - int **SSL\_set\_fd**(SSL \*ssl, int fd);

  - void **SSL\_set\_info\_callback**(SSL \*ssl, void (\*cb);(void))

  - void **SSL\_set\_msg\_callback**(SSL \*ctx, void (\*cb)(int write\_p, int version, int content\_type, const void \*buf, size\_t len, SSL \*ssl, void \*arg));

  - void **SSL\_set\_msg\_callback\_arg**(SSL \*ctx, void \*arg);

  - void **SSL\_set\_options**(SSL \*ssl, unsigned long op);

  - void **SSL\_set\_quiet\_shutdown**(SSL \*ssl, int mode);

  - void **SSL\_set\_read\_ahead**(SSL \*ssl, int yes);

  - int **SSL\_set\_rfd**(SSL \*ssl, int fd);

  - int **SSL\_set\_session**(SSL \*ssl, SSL\_SESSION \*session);

  - void **SSL\_set\_shutdown**(SSL \*ssl, int mode);

  - int **SSL\_set\_ssl\_method**(SSL \*ssl, const SSL\_METHOD \*meth);

  - void **SSL\_set\_time**(SSL \*ssl, long t);

  - void **SSL\_set\_timeout**(SSL \*ssl, long t);

  - void **SSL\_set\_verify**(SSL \*ssl, int mode, int (\*callback);(void))

  - void **SSL\_set\_verify\_result**(SSL \*ssl, long arg);

  - int **SSL\_set\_wfd**(SSL \*ssl, int fd);

  - int **SSL\_shutdown**(SSL \*ssl);

  - int **SSL\_state**(const SSL \*ssl);

  - char \***SSL\_state\_string**(const SSL \*ssl);

  - char \***SSL\_state\_string\_long**(const SSL \*ssl);

  - long **SSL\_total\_renegotiations**(SSL \*ssl);

  - int **SSL\_use\_PrivateKey**(SSL \*ssl, EVP\_PKEY \*pkey);

  - int **SSL\_use\_PrivateKey\_ASN1**(int type, SSL \*ssl, unsigned char \*d, long len);

  - int **SSL\_use\_PrivateKey\_file**(SSL \*ssl, char \*file, int type);

  - int **SSL\_use\_RSAPrivateKey**(SSL \*ssl, RSA \*rsa);

  - int **SSL\_use\_RSAPrivateKey\_ASN1**(SSL \*ssl, unsigned char \*d, long len);

  - int **SSL\_use\_RSAPrivateKey\_file**(SSL \*ssl, char \*file, int type);

  - int **SSL\_use\_certificate**(SSL \*ssl, X509 \*x);

  - int **SSL\_use\_certificate\_ASN1**(SSL \*ssl, int len, unsigned char \*d);

  - int **SSL\_use\_certificate\_file**(SSL \*ssl, char \*file, int type);

  - int **SSL\_version**(const SSL \*ssl);

  - int **SSL\_want**(const SSL \*ssl);

  - int **SSL\_want\_nothing**(const SSL \*ssl);

  - int **SSL\_want\_read**(const SSL \*ssl);

  - int **SSL\_want\_write**(const SSL \*ssl);

  - int **SSL\_want\_x509\_lookup**(const SSL \*ssl);

  - int **SSL\_write**(SSL \*ssl, const void \*buf, int num);

  - void **SSL\_set\_psk\_client\_callback**(SSL \*ssl, unsigned int (\*callback)(SSL \*ssl, const char \*hint, char \*identity, unsigned int max\_identity\_len, unsigned char \*psk, unsigned int max\_psk\_len));

  - int **SSL\_use\_psk\_identity\_hint**(SSL \*ssl, const char \*hint);

  - void **SSL\_set\_psk\_server\_callback**(SSL \*ssl, unsigned int (\*callback)(SSL \*ssl, const char \*identity, unsigned char \*psk, int max\_psk\_len));

  - const char \***SSL\_get\_psk\_identity\_hint**(SSL \*ssl);

  - const char \***SSL\_get\_psk\_identity**(SSL \*ssl);

  ## SEE ALSO

[*openssl*(1)](/openssl/1.md), [*crypto*(3)](/crypto/3.md), *SSL\_accept*(3), *SSL\_clear*(3), *SSL\_connect*(3), *SSL\_CIPHER\_get\_name*(3), *SSL\_COMP\_add\_compression\_method*(3), *SSL\_CTX\_add\_extra\_chain\_cert*(3), *SSL\_CTX\_add\_session*(3), *SSL\_CTX\_ctrl*(3), *SSL\_CTX\_flush\_sessions*(3), *SSL\_CTX\_get\_ex\_new\_index*(3), *SSL\_CTX\_get\_verify\_mode*(3), *SSL\_CTX\_load\_verify\_locations*(3) *SSL\_CTX\_new*(3), *SSL\_CTX\_sess\_number*(3), *SSL\_CTX\_sess\_set\_cache\_size*(3), *SSL\_CTX\_sess\_set\_get\_cb*(3), *SSL\_CTX\_sessions*(3), *SSL\_CTX\_set\_cert\_store*(3), *SSL\_CTX\_set\_cert\_verify\_callback*(3), *SSL\_CTX\_set\_cipher\_list*(3), *SSL\_CTX\_set\_client\_CA\_list*(3), *SSL\_CTX\_set\_client\_cert\_cb*(3), *SSL\_CTX\_set\_default\_passwd\_cb*(3), *SSL\_CTX\_set\_generate\_session\_id*(3), *SSL\_CTX\_set\_info\_callback*(3), *SSL\_CTX\_set\_max\_cert\_list*(3), *SSL\_CTX\_set\_mode*(3), *SSL\_CTX\_set\_msg\_callback*(3), *SSL\_CTX\_set\_options*(3), *SSL\_CTX\_set\_quiet\_shutdown*(3), *SSL\_CTX\_set\_read\_ahead*(3), *SSL\_CTX\_set\_session\_cache\_mode*(3), *SSL\_CTX\_set\_session\_id\_context*(3), *SSL\_CTX\_set\_ssl\_version*(3), *SSL\_CTX\_set\_timeout*(3), *SSL\_CTX\_set\_tmp\_rsa\_callback*(3), *SSL\_CTX\_set\_tmp\_dh\_callback*(3), *SSL\_CTX\_set\_verify*(3), *SSL\_CTX\_use\_certificate*(3), *SSL\_alert\_type\_string*(3), *SSL\_do\_handshake*(3), *SSL\_get\_SSL\_CTX*(3), *SSL\_get\_ciphers*(3), *SSL\_get\_client\_CA\_list*(3), *SSL\_get\_default\_timeout*(3), *SSL\_get\_error*(3), *SSL\_get\_ex\_data\_X509\_STORE\_CTX\_idx*(3), *SSL\_get\_ex\_new\_index*(3), *SSL\_get\_fd*(3), *SSL\_get\_peer\_cert\_chain*(3), *SSL\_get\_rbio*(3), *SSL\_get\_session*(3), *SSL\_get\_verify\_result*(3), *SSL\_get\_version*(3), *SSL\_library\_init*(3), *SSL\_load\_client\_CA\_file*(3), *SSL\_new*(3), *SSL\_pending*(3), *SSL\_read*(3), *SSL\_rstate\_string*(3), *SSL\_session\_reused*(3), *SSL\_set\_bio*(3), *SSL\_set\_connect\_state*(3), *SSL\_set\_fd*(3), *SSL\_set\_session*(3), *SSL\_set\_shutdown*(3), *SSL\_shutdown*(3), *SSL\_state\_string*(3), *SSL\_want*(3), *SSL\_write*(3), *SSL\_SESSION\_free*(3), *SSL\_SESSION\_get\_ex\_new\_index*(3), *SSL\_SESSION\_get\_time*(3), *d2i\_SSL\_SESSION*(3), *SSL\_CTX\_set\_psk\_client\_callback*(3), *SSL\_CTX\_use\_psk\_identity\_hint*(3), *SSL\_get\_psk\_identity*(3)

## HISTORY

The [*ssl*(3)](/ssl/3.md) document appeared in OpenSSL 0.9.2
