1*ebfedea0SLionel Sambuc 2*ebfedea0SLionel Sambuc=pod 3*ebfedea0SLionel Sambuc 4*ebfedea0SLionel Sambuc=head1 NAME 5*ebfedea0SLionel Sambuc 6*ebfedea0SLionel SambucSSL - OpenSSL SSL/TLS library 7*ebfedea0SLionel Sambuc 8*ebfedea0SLionel Sambuc=head1 SYNOPSIS 9*ebfedea0SLionel Sambuc 10*ebfedea0SLionel Sambuc=head1 DESCRIPTION 11*ebfedea0SLionel Sambuc 12*ebfedea0SLionel SambucThe OpenSSL B<ssl> library implements the Secure Sockets Layer (SSL v2/v3) and 13*ebfedea0SLionel SambucTransport Layer Security (TLS v1) protocols. It provides a rich API which is 14*ebfedea0SLionel Sambucdocumented here. 15*ebfedea0SLionel Sambuc 16*ebfedea0SLionel SambucAt first the library must be initialized; see 17*ebfedea0SLionel SambucL<SSL_library_init(3)|SSL_library_init(3)>. 18*ebfedea0SLionel Sambuc 19*ebfedea0SLionel SambucThen an B<SSL_CTX> object is created as a framework to establish 20*ebfedea0SLionel SambucTLS/SSL enabled connections (see L<SSL_CTX_new(3)|SSL_CTX_new(3)>). 21*ebfedea0SLionel SambucVarious options regarding certificates, algorithms etc. can be set 22*ebfedea0SLionel Sambucin this object. 23*ebfedea0SLionel Sambuc 24*ebfedea0SLionel SambucWhen a network connection has been created, it can be assigned to an 25*ebfedea0SLionel SambucB<SSL> object. After the B<SSL> object has been created using 26*ebfedea0SLionel SambucL<SSL_new(3)|SSL_new(3)>, L<SSL_set_fd(3)|SSL_set_fd(3)> or 27*ebfedea0SLionel SambucL<SSL_set_bio(3)|SSL_set_bio(3)> can be used to associate the network 28*ebfedea0SLionel Sambucconnection with the object. 29*ebfedea0SLionel Sambuc 30*ebfedea0SLionel SambucThen the TLS/SSL handshake is performed using 31*ebfedea0SLionel SambucL<SSL_accept(3)|SSL_accept(3)> or L<SSL_connect(3)|SSL_connect(3)> 32*ebfedea0SLionel Sambucrespectively. 33*ebfedea0SLionel SambucL<SSL_read(3)|SSL_read(3)> and L<SSL_write(3)|SSL_write(3)> are used 34*ebfedea0SLionel Sambucto read and write data on the TLS/SSL connection. 35*ebfedea0SLionel SambucL<SSL_shutdown(3)|SSL_shutdown(3)> can be used to shut down the 36*ebfedea0SLionel SambucTLS/SSL connection. 37*ebfedea0SLionel Sambuc 38*ebfedea0SLionel Sambuc=head1 DATA STRUCTURES 39*ebfedea0SLionel Sambuc 40*ebfedea0SLionel SambucCurrently the OpenSSL B<ssl> library functions deals with the following data 41*ebfedea0SLionel Sambucstructures: 42*ebfedea0SLionel Sambuc 43*ebfedea0SLionel Sambuc=over 4 44*ebfedea0SLionel Sambuc 45*ebfedea0SLionel Sambuc=item B<SSL_METHOD> (SSL Method) 46*ebfedea0SLionel Sambuc 47*ebfedea0SLionel SambucThat's a dispatch structure describing the internal B<ssl> library 48*ebfedea0SLionel Sambucmethods/functions which implement the various protocol versions (SSLv1, SSLv2 49*ebfedea0SLionel Sambucand TLSv1). It's needed to create an B<SSL_CTX>. 50*ebfedea0SLionel Sambuc 51*ebfedea0SLionel Sambuc=item B<SSL_CIPHER> (SSL Cipher) 52*ebfedea0SLionel Sambuc 53*ebfedea0SLionel SambucThis structure holds the algorithm information for a particular cipher which 54*ebfedea0SLionel Sambucare a core part of the SSL/TLS protocol. The available ciphers are configured 55*ebfedea0SLionel Sambucon a B<SSL_CTX> basis and the actually used ones are then part of the 56*ebfedea0SLionel SambucB<SSL_SESSION>. 57*ebfedea0SLionel Sambuc 58*ebfedea0SLionel Sambuc=item B<SSL_CTX> (SSL Context) 59*ebfedea0SLionel Sambuc 60*ebfedea0SLionel SambucThat's the global context structure which is created by a server or client 61*ebfedea0SLionel Sambuconce per program life-time and which holds mainly default values for the 62*ebfedea0SLionel SambucB<SSL> structures which are later created for the connections. 63*ebfedea0SLionel Sambuc 64*ebfedea0SLionel Sambuc=item B<SSL_SESSION> (SSL Session) 65*ebfedea0SLionel Sambuc 66*ebfedea0SLionel SambucThis is a structure containing the current TLS/SSL session details for a 67*ebfedea0SLionel Sambucconnection: B<SSL_CIPHER>s, client and server certificates, keys, etc. 68*ebfedea0SLionel Sambuc 69*ebfedea0SLionel Sambuc=item B<SSL> (SSL Connection) 70*ebfedea0SLionel Sambuc 71*ebfedea0SLionel SambucThat's the main SSL/TLS structure which is created by a server or client per 72*ebfedea0SLionel Sambucestablished connection. This actually is the core structure in the SSL API. 73*ebfedea0SLionel SambucUnder run-time the application usually deals with this structure which has 74*ebfedea0SLionel Sambuclinks to mostly all other structures. 75*ebfedea0SLionel Sambuc 76*ebfedea0SLionel Sambuc=back 77*ebfedea0SLionel Sambuc 78*ebfedea0SLionel Sambuc 79*ebfedea0SLionel Sambuc=head1 HEADER FILES 80*ebfedea0SLionel Sambuc 81*ebfedea0SLionel SambucCurrently the OpenSSL B<ssl> library provides the following C header files 82*ebfedea0SLionel Sambuccontaining the prototypes for the data structures and and functions: 83*ebfedea0SLionel Sambuc 84*ebfedea0SLionel Sambuc=over 4 85*ebfedea0SLionel Sambuc 86*ebfedea0SLionel Sambuc=item B<ssl.h> 87*ebfedea0SLionel Sambuc 88*ebfedea0SLionel SambucThat's the common header file for the SSL/TLS API. Include it into your 89*ebfedea0SLionel Sambucprogram to make the API of the B<ssl> library available. It internally 90*ebfedea0SLionel Sambucincludes both more private SSL headers and headers from the B<crypto> library. 91*ebfedea0SLionel SambucWhenever you need hard-core details on the internals of the SSL API, look 92*ebfedea0SLionel Sambucinside this header file. 93*ebfedea0SLionel Sambuc 94*ebfedea0SLionel Sambuc=item B<ssl2.h> 95*ebfedea0SLionel Sambuc 96*ebfedea0SLionel SambucThat's the sub header file dealing with the SSLv2 protocol only. 97*ebfedea0SLionel SambucI<Usually you don't have to include it explicitly because 98*ebfedea0SLionel Sambucit's already included by ssl.h>. 99*ebfedea0SLionel Sambuc 100*ebfedea0SLionel Sambuc=item B<ssl3.h> 101*ebfedea0SLionel Sambuc 102*ebfedea0SLionel SambucThat's the sub header file dealing with the SSLv3 protocol only. 103*ebfedea0SLionel SambucI<Usually you don't have to include it explicitly because 104*ebfedea0SLionel Sambucit's already included by ssl.h>. 105*ebfedea0SLionel Sambuc 106*ebfedea0SLionel Sambuc=item B<ssl23.h> 107*ebfedea0SLionel Sambuc 108*ebfedea0SLionel SambucThat's the sub header file dealing with the combined use of the SSLv2 and 109*ebfedea0SLionel SambucSSLv3 protocols. 110*ebfedea0SLionel SambucI<Usually you don't have to include it explicitly because 111*ebfedea0SLionel Sambucit's already included by ssl.h>. 112*ebfedea0SLionel Sambuc 113*ebfedea0SLionel Sambuc=item B<tls1.h> 114*ebfedea0SLionel Sambuc 115*ebfedea0SLionel SambucThat's the sub header file dealing with the TLSv1 protocol only. 116*ebfedea0SLionel SambucI<Usually you don't have to include it explicitly because 117*ebfedea0SLionel Sambucit's already included by ssl.h>. 118*ebfedea0SLionel Sambuc 119*ebfedea0SLionel Sambuc=back 120*ebfedea0SLionel Sambuc 121*ebfedea0SLionel Sambuc=head1 API FUNCTIONS 122*ebfedea0SLionel Sambuc 123*ebfedea0SLionel SambucCurrently the OpenSSL B<ssl> library exports 214 API functions. 124*ebfedea0SLionel SambucThey are documented in the following: 125*ebfedea0SLionel Sambuc 126*ebfedea0SLionel Sambuc=head2 DEALING WITH PROTOCOL METHODS 127*ebfedea0SLionel Sambuc 128*ebfedea0SLionel SambucHere we document the various API functions which deal with the SSL/TLS 129*ebfedea0SLionel Sambucprotocol methods defined in B<SSL_METHOD> structures. 130*ebfedea0SLionel Sambuc 131*ebfedea0SLionel Sambuc=over 4 132*ebfedea0SLionel Sambuc 133*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<SSLv2_client_method>(void); 134*ebfedea0SLionel Sambuc 135*ebfedea0SLionel SambucConstructor for the SSLv2 SSL_METHOD structure for a dedicated client. 136*ebfedea0SLionel Sambuc 137*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<SSLv2_server_method>(void); 138*ebfedea0SLionel Sambuc 139*ebfedea0SLionel SambucConstructor for the SSLv2 SSL_METHOD structure for a dedicated server. 140*ebfedea0SLionel Sambuc 141*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<SSLv2_method>(void); 142*ebfedea0SLionel Sambuc 143*ebfedea0SLionel SambucConstructor for the SSLv2 SSL_METHOD structure for combined client and server. 144*ebfedea0SLionel Sambuc 145*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<SSLv3_client_method>(void); 146*ebfedea0SLionel Sambuc 147*ebfedea0SLionel SambucConstructor for the SSLv3 SSL_METHOD structure for a dedicated client. 148*ebfedea0SLionel Sambuc 149*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<SSLv3_server_method>(void); 150*ebfedea0SLionel Sambuc 151*ebfedea0SLionel SambucConstructor for the SSLv3 SSL_METHOD structure for a dedicated server. 152*ebfedea0SLionel Sambuc 153*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<SSLv3_method>(void); 154*ebfedea0SLionel Sambuc 155*ebfedea0SLionel SambucConstructor for the SSLv3 SSL_METHOD structure for combined client and server. 156*ebfedea0SLionel Sambuc 157*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<TLSv1_client_method>(void); 158*ebfedea0SLionel Sambuc 159*ebfedea0SLionel SambucConstructor for the TLSv1 SSL_METHOD structure for a dedicated client. 160*ebfedea0SLionel Sambuc 161*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<TLSv1_server_method>(void); 162*ebfedea0SLionel Sambuc 163*ebfedea0SLionel SambucConstructor for the TLSv1 SSL_METHOD structure for a dedicated server. 164*ebfedea0SLionel Sambuc 165*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<TLSv1_method>(void); 166*ebfedea0SLionel Sambuc 167*ebfedea0SLionel SambucConstructor for the TLSv1 SSL_METHOD structure for combined client and server. 168*ebfedea0SLionel Sambuc 169*ebfedea0SLionel Sambuc=back 170*ebfedea0SLionel Sambuc 171*ebfedea0SLionel Sambuc=head2 DEALING WITH CIPHERS 172*ebfedea0SLionel Sambuc 173*ebfedea0SLionel SambucHere we document the various API functions which deal with the SSL/TLS 174*ebfedea0SLionel Sambucciphers defined in B<SSL_CIPHER> structures. 175*ebfedea0SLionel Sambuc 176*ebfedea0SLionel Sambuc=over 4 177*ebfedea0SLionel Sambuc 178*ebfedea0SLionel Sambuc=item char *B<SSL_CIPHER_description>(SSL_CIPHER *cipher, char *buf, int len); 179*ebfedea0SLionel Sambuc 180*ebfedea0SLionel SambucWrite a string to I<buf> (with a maximum size of I<len>) containing a human 181*ebfedea0SLionel Sambucreadable description of I<cipher>. Returns I<buf>. 182*ebfedea0SLionel Sambuc 183*ebfedea0SLionel Sambuc=item int B<SSL_CIPHER_get_bits>(SSL_CIPHER *cipher, int *alg_bits); 184*ebfedea0SLionel Sambuc 185*ebfedea0SLionel SambucDetermine the number of bits in I<cipher>. Because of export crippled ciphers 186*ebfedea0SLionel Sambucthere are two bits: The bits the algorithm supports in general (stored to 187*ebfedea0SLionel SambucI<alg_bits>) and the bits which are actually used (the return value). 188*ebfedea0SLionel Sambuc 189*ebfedea0SLionel Sambuc=item const char *B<SSL_CIPHER_get_name>(SSL_CIPHER *cipher); 190*ebfedea0SLionel Sambuc 191*ebfedea0SLionel SambucReturn the internal name of I<cipher> as a string. These are the various 192*ebfedea0SLionel Sambucstrings defined by the I<SSL2_TXT_xxx>, I<SSL3_TXT_xxx> and I<TLS1_TXT_xxx> 193*ebfedea0SLionel Sambucdefinitions in the header files. 194*ebfedea0SLionel Sambuc 195*ebfedea0SLionel Sambuc=item char *B<SSL_CIPHER_get_version>(SSL_CIPHER *cipher); 196*ebfedea0SLionel Sambuc 197*ebfedea0SLionel SambucReturns a string like "C<TLSv1/SSLv3>" or "C<SSLv2>" which indicates the 198*ebfedea0SLionel SambucSSL/TLS protocol version to which I<cipher> belongs (i.e. where it was defined 199*ebfedea0SLionel Sambucin the specification the first time). 200*ebfedea0SLionel Sambuc 201*ebfedea0SLionel Sambuc=back 202*ebfedea0SLionel Sambuc 203*ebfedea0SLionel Sambuc=head2 DEALING WITH PROTOCOL CONTEXTS 204*ebfedea0SLionel Sambuc 205*ebfedea0SLionel SambucHere we document the various API functions which deal with the SSL/TLS 206*ebfedea0SLionel Sambucprotocol context defined in the B<SSL_CTX> structure. 207*ebfedea0SLionel Sambuc 208*ebfedea0SLionel Sambuc=over 4 209*ebfedea0SLionel Sambuc 210*ebfedea0SLionel Sambuc=item int B<SSL_CTX_add_client_CA>(SSL_CTX *ctx, X509 *x); 211*ebfedea0SLionel Sambuc 212*ebfedea0SLionel Sambuc=item long B<SSL_CTX_add_extra_chain_cert>(SSL_CTX *ctx, X509 *x509); 213*ebfedea0SLionel Sambuc 214*ebfedea0SLionel Sambuc=item int B<SSL_CTX_add_session>(SSL_CTX *ctx, SSL_SESSION *c); 215*ebfedea0SLionel Sambuc 216*ebfedea0SLionel Sambuc=item int B<SSL_CTX_check_private_key>(const SSL_CTX *ctx); 217*ebfedea0SLionel Sambuc 218*ebfedea0SLionel Sambuc=item long B<SSL_CTX_ctrl>(SSL_CTX *ctx, int cmd, long larg, char *parg); 219*ebfedea0SLionel Sambuc 220*ebfedea0SLionel Sambuc=item void B<SSL_CTX_flush_sessions>(SSL_CTX *s, long t); 221*ebfedea0SLionel Sambuc 222*ebfedea0SLionel Sambuc=item void B<SSL_CTX_free>(SSL_CTX *a); 223*ebfedea0SLionel Sambuc 224*ebfedea0SLionel Sambuc=item char *B<SSL_CTX_get_app_data>(SSL_CTX *ctx); 225*ebfedea0SLionel Sambuc 226*ebfedea0SLionel Sambuc=item X509_STORE *B<SSL_CTX_get_cert_store>(SSL_CTX *ctx); 227*ebfedea0SLionel Sambuc 228*ebfedea0SLionel Sambuc=item STACK *B<SSL_CTX_get_client_CA_list>(const SSL_CTX *ctx); 229*ebfedea0SLionel Sambuc 230*ebfedea0SLionel Sambuc=item int (*B<SSL_CTX_get_client_cert_cb>(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey); 231*ebfedea0SLionel Sambuc 232*ebfedea0SLionel Sambuc=item char *B<SSL_CTX_get_ex_data>(const SSL_CTX *s, int idx); 233*ebfedea0SLionel Sambuc 234*ebfedea0SLionel Sambuc=item int B<SSL_CTX_get_ex_new_index>(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) 235*ebfedea0SLionel Sambuc 236*ebfedea0SLionel Sambuc=item void (*B<SSL_CTX_get_info_callback>(SSL_CTX *ctx))(SSL *ssl, int cb, int ret); 237*ebfedea0SLionel Sambuc 238*ebfedea0SLionel Sambuc=item int B<SSL_CTX_get_quiet_shutdown>(const SSL_CTX *ctx); 239*ebfedea0SLionel Sambuc 240*ebfedea0SLionel Sambuc=item int B<SSL_CTX_get_session_cache_mode>(SSL_CTX *ctx); 241*ebfedea0SLionel Sambuc 242*ebfedea0SLionel Sambuc=item long B<SSL_CTX_get_timeout>(const SSL_CTX *ctx); 243*ebfedea0SLionel Sambuc 244*ebfedea0SLionel Sambuc=item int (*B<SSL_CTX_get_verify_callback>(const SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx); 245*ebfedea0SLionel Sambuc 246*ebfedea0SLionel Sambuc=item int B<SSL_CTX_get_verify_mode>(SSL_CTX *ctx); 247*ebfedea0SLionel Sambuc 248*ebfedea0SLionel Sambuc=item int B<SSL_CTX_load_verify_locations>(SSL_CTX *ctx, char *CAfile, char *CApath); 249*ebfedea0SLionel Sambuc 250*ebfedea0SLionel Sambuc=item long B<SSL_CTX_need_tmp_RSA>(SSL_CTX *ctx); 251*ebfedea0SLionel Sambuc 252*ebfedea0SLionel Sambuc=item SSL_CTX *B<SSL_CTX_new>(const SSL_METHOD *meth); 253*ebfedea0SLionel Sambuc 254*ebfedea0SLionel Sambuc=item int B<SSL_CTX_remove_session>(SSL_CTX *ctx, SSL_SESSION *c); 255*ebfedea0SLionel Sambuc 256*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_accept>(SSL_CTX *ctx); 257*ebfedea0SLionel Sambuc 258*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_accept_good>(SSL_CTX *ctx); 259*ebfedea0SLionel Sambuc 260*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_accept_renegotiate>(SSL_CTX *ctx); 261*ebfedea0SLionel Sambuc 262*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_cache_full>(SSL_CTX *ctx); 263*ebfedea0SLionel Sambuc 264*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_cb_hits>(SSL_CTX *ctx); 265*ebfedea0SLionel Sambuc 266*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_connect>(SSL_CTX *ctx); 267*ebfedea0SLionel Sambuc 268*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_connect_good>(SSL_CTX *ctx); 269*ebfedea0SLionel Sambuc 270*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_connect_renegotiate>(SSL_CTX *ctx); 271*ebfedea0SLionel Sambuc 272*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_get_cache_size>(SSL_CTX *ctx); 273*ebfedea0SLionel Sambuc 274*ebfedea0SLionel Sambuc=item SSL_SESSION *(*B<SSL_CTX_sess_get_get_cb>(SSL_CTX *ctx))(SSL *ssl, unsigned char *data, int len, int *copy); 275*ebfedea0SLionel Sambuc 276*ebfedea0SLionel Sambuc=item int (*B<SSL_CTX_sess_get_new_cb>(SSL_CTX *ctx)(SSL *ssl, SSL_SESSION *sess); 277*ebfedea0SLionel Sambuc 278*ebfedea0SLionel Sambuc=item void (*B<SSL_CTX_sess_get_remove_cb>(SSL_CTX *ctx)(SSL_CTX *ctx, SSL_SESSION *sess); 279*ebfedea0SLionel Sambuc 280*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_hits>(SSL_CTX *ctx); 281*ebfedea0SLionel Sambuc 282*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_misses>(SSL_CTX *ctx); 283*ebfedea0SLionel Sambuc 284*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_number>(SSL_CTX *ctx); 285*ebfedea0SLionel Sambuc 286*ebfedea0SLionel Sambuc=item void B<SSL_CTX_sess_set_cache_size>(SSL_CTX *ctx,t); 287*ebfedea0SLionel Sambuc 288*ebfedea0SLionel Sambuc=item void B<SSL_CTX_sess_set_get_cb>(SSL_CTX *ctx, SSL_SESSION *(*cb)(SSL *ssl, unsigned char *data, int len, int *copy)); 289*ebfedea0SLionel Sambuc 290*ebfedea0SLionel Sambuc=item void B<SSL_CTX_sess_set_new_cb>(SSL_CTX *ctx, int (*cb)(SSL *ssl, SSL_SESSION *sess)); 291*ebfedea0SLionel Sambuc 292*ebfedea0SLionel Sambuc=item void B<SSL_CTX_sess_set_remove_cb>(SSL_CTX *ctx, void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess)); 293*ebfedea0SLionel Sambuc 294*ebfedea0SLionel Sambuc=item int B<SSL_CTX_sess_timeouts>(SSL_CTX *ctx); 295*ebfedea0SLionel Sambuc 296*ebfedea0SLionel Sambuc=item LHASH *B<SSL_CTX_sessions>(SSL_CTX *ctx); 297*ebfedea0SLionel Sambuc 298*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_app_data>(SSL_CTX *ctx, void *arg); 299*ebfedea0SLionel Sambuc 300*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_cert_store>(SSL_CTX *ctx, X509_STORE *cs); 301*ebfedea0SLionel Sambuc 302*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_cert_verify_cb>(SSL_CTX *ctx, int (*cb)(), char *arg) 303*ebfedea0SLionel Sambuc 304*ebfedea0SLionel Sambuc=item int B<SSL_CTX_set_cipher_list>(SSL_CTX *ctx, char *str); 305*ebfedea0SLionel Sambuc 306*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_client_CA_list>(SSL_CTX *ctx, STACK *list); 307*ebfedea0SLionel Sambuc 308*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_client_cert_cb>(SSL_CTX *ctx, int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey)); 309*ebfedea0SLionel Sambuc 310*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_default_passwd_cb>(SSL_CTX *ctx, int (*cb);(void)) 311*ebfedea0SLionel Sambuc 312*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_default_read_ahead>(SSL_CTX *ctx, int m); 313*ebfedea0SLionel Sambuc 314*ebfedea0SLionel Sambuc=item int B<SSL_CTX_set_default_verify_paths>(SSL_CTX *ctx); 315*ebfedea0SLionel Sambuc 316*ebfedea0SLionel Sambuc=item int B<SSL_CTX_set_ex_data>(SSL_CTX *s, int idx, char *arg); 317*ebfedea0SLionel Sambuc 318*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_info_callback>(SSL_CTX *ctx, void (*cb)(SSL *ssl, int cb, int ret)); 319*ebfedea0SLionel Sambuc 320*ebfedea0SLionel Sambuc=item void B<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)); 321*ebfedea0SLionel Sambuc 322*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_msg_callback_arg>(SSL_CTX *ctx, void *arg); 323*ebfedea0SLionel Sambuc 324*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_options>(SSL_CTX *ctx, unsigned long op); 325*ebfedea0SLionel Sambuc 326*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_quiet_shutdown>(SSL_CTX *ctx, int mode); 327*ebfedea0SLionel Sambuc 328*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_session_cache_mode>(SSL_CTX *ctx, int mode); 329*ebfedea0SLionel Sambuc 330*ebfedea0SLionel Sambuc=item int B<SSL_CTX_set_ssl_version>(SSL_CTX *ctx, const SSL_METHOD *meth); 331*ebfedea0SLionel Sambuc 332*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_timeout>(SSL_CTX *ctx, long t); 333*ebfedea0SLionel Sambuc 334*ebfedea0SLionel Sambuc=item long B<SSL_CTX_set_tmp_dh>(SSL_CTX* ctx, DH *dh); 335*ebfedea0SLionel Sambuc 336*ebfedea0SLionel Sambuc=item long B<SSL_CTX_set_tmp_dh_callback>(SSL_CTX *ctx, DH *(*cb)(void)); 337*ebfedea0SLionel Sambuc 338*ebfedea0SLionel Sambuc=item long B<SSL_CTX_set_tmp_rsa>(SSL_CTX *ctx, RSA *rsa); 339*ebfedea0SLionel Sambuc 340*ebfedea0SLionel Sambuc=item SSL_CTX_set_tmp_rsa_callback 341*ebfedea0SLionel Sambuc 342*ebfedea0SLionel SambucC<long B<SSL_CTX_set_tmp_rsa_callback>(SSL_CTX *B<ctx>, RSA *(*B<cb>)(SSL *B<ssl>, int B<export>, int B<keylength>));> 343*ebfedea0SLionel Sambuc 344*ebfedea0SLionel SambucSets the callback which will be called when a temporary private key is 345*ebfedea0SLionel Sambucrequired. The B<C<export>> flag will be set if the reason for needing 346*ebfedea0SLionel Sambuca temp key is that an export ciphersuite is in use, in which case, 347*ebfedea0SLionel SambucB<C<keylength>> will contain the required keylength in bits. Generate a key of 348*ebfedea0SLionel Sambucappropriate size (using ???) and return it. 349*ebfedea0SLionel Sambuc 350*ebfedea0SLionel Sambuc=item SSL_set_tmp_rsa_callback 351*ebfedea0SLionel Sambuc 352*ebfedea0SLionel Sambuclong B<SSL_set_tmp_rsa_callback>(SSL *ssl, RSA *(*cb)(SSL *ssl, int export, int keylength)); 353*ebfedea0SLionel Sambuc 354*ebfedea0SLionel SambucThe same as B<SSL_CTX_set_tmp_rsa_callback>, except it operates on an SSL 355*ebfedea0SLionel Sambucsession instead of a context. 356*ebfedea0SLionel Sambuc 357*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_verify>(SSL_CTX *ctx, int mode, int (*cb);(void)) 358*ebfedea0SLionel Sambuc 359*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_PrivateKey>(SSL_CTX *ctx, EVP_PKEY *pkey); 360*ebfedea0SLionel Sambuc 361*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_PrivateKey_ASN1>(int type, SSL_CTX *ctx, unsigned char *d, long len); 362*ebfedea0SLionel Sambuc 363*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_PrivateKey_file>(SSL_CTX *ctx, char *file, int type); 364*ebfedea0SLionel Sambuc 365*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_RSAPrivateKey>(SSL_CTX *ctx, RSA *rsa); 366*ebfedea0SLionel Sambuc 367*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_RSAPrivateKey_ASN1>(SSL_CTX *ctx, unsigned char *d, long len); 368*ebfedea0SLionel Sambuc 369*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_RSAPrivateKey_file>(SSL_CTX *ctx, char *file, int type); 370*ebfedea0SLionel Sambuc 371*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_certificate>(SSL_CTX *ctx, X509 *x); 372*ebfedea0SLionel Sambuc 373*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_certificate_ASN1>(SSL_CTX *ctx, int len, unsigned char *d); 374*ebfedea0SLionel Sambuc 375*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_certificate_file>(SSL_CTX *ctx, char *file, int type); 376*ebfedea0SLionel Sambuc 377*ebfedea0SLionel Sambuc=item void B<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)); 378*ebfedea0SLionel Sambuc 379*ebfedea0SLionel Sambuc=item int B<SSL_CTX_use_psk_identity_hint>(SSL_CTX *ctx, const char *hint); 380*ebfedea0SLionel Sambuc 381*ebfedea0SLionel Sambuc=item void B<SSL_CTX_set_psk_server_callback>(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)); 382*ebfedea0SLionel Sambuc 383*ebfedea0SLionel Sambuc 384*ebfedea0SLionel Sambuc 385*ebfedea0SLionel Sambuc 386*ebfedea0SLionel Sambuc=back 387*ebfedea0SLionel Sambuc 388*ebfedea0SLionel Sambuc=head2 DEALING WITH SESSIONS 389*ebfedea0SLionel Sambuc 390*ebfedea0SLionel SambucHere we document the various API functions which deal with the SSL/TLS 391*ebfedea0SLionel Sambucsessions defined in the B<SSL_SESSION> structures. 392*ebfedea0SLionel Sambuc 393*ebfedea0SLionel Sambuc=over 4 394*ebfedea0SLionel Sambuc 395*ebfedea0SLionel Sambuc=item int B<SSL_SESSION_cmp>(const SSL_SESSION *a, const SSL_SESSION *b); 396*ebfedea0SLionel Sambuc 397*ebfedea0SLionel Sambuc=item void B<SSL_SESSION_free>(SSL_SESSION *ss); 398*ebfedea0SLionel Sambuc 399*ebfedea0SLionel Sambuc=item char *B<SSL_SESSION_get_app_data>(SSL_SESSION *s); 400*ebfedea0SLionel Sambuc 401*ebfedea0SLionel Sambuc=item char *B<SSL_SESSION_get_ex_data>(const SSL_SESSION *s, int idx); 402*ebfedea0SLionel Sambuc 403*ebfedea0SLionel Sambuc=item int B<SSL_SESSION_get_ex_new_index>(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) 404*ebfedea0SLionel Sambuc 405*ebfedea0SLionel Sambuc=item long B<SSL_SESSION_get_time>(const SSL_SESSION *s); 406*ebfedea0SLionel Sambuc 407*ebfedea0SLionel Sambuc=item long B<SSL_SESSION_get_timeout>(const SSL_SESSION *s); 408*ebfedea0SLionel Sambuc 409*ebfedea0SLionel Sambuc=item unsigned long B<SSL_SESSION_hash>(const SSL_SESSION *a); 410*ebfedea0SLionel Sambuc 411*ebfedea0SLionel Sambuc=item SSL_SESSION *B<SSL_SESSION_new>(void); 412*ebfedea0SLionel Sambuc 413*ebfedea0SLionel Sambuc=item int B<SSL_SESSION_print>(BIO *bp, const SSL_SESSION *x); 414*ebfedea0SLionel Sambuc 415*ebfedea0SLionel Sambuc=item int B<SSL_SESSION_print_fp>(FILE *fp, const SSL_SESSION *x); 416*ebfedea0SLionel Sambuc 417*ebfedea0SLionel Sambuc=item void B<SSL_SESSION_set_app_data>(SSL_SESSION *s, char *a); 418*ebfedea0SLionel Sambuc 419*ebfedea0SLionel Sambuc=item int B<SSL_SESSION_set_ex_data>(SSL_SESSION *s, int idx, char *arg); 420*ebfedea0SLionel Sambuc 421*ebfedea0SLionel Sambuc=item long B<SSL_SESSION_set_time>(SSL_SESSION *s, long t); 422*ebfedea0SLionel Sambuc 423*ebfedea0SLionel Sambuc=item long B<SSL_SESSION_set_timeout>(SSL_SESSION *s, long t); 424*ebfedea0SLionel Sambuc 425*ebfedea0SLionel Sambuc=back 426*ebfedea0SLionel Sambuc 427*ebfedea0SLionel Sambuc=head2 DEALING WITH CONNECTIONS 428*ebfedea0SLionel Sambuc 429*ebfedea0SLionel SambucHere we document the various API functions which deal with the SSL/TLS 430*ebfedea0SLionel Sambucconnection defined in the B<SSL> structure. 431*ebfedea0SLionel Sambuc 432*ebfedea0SLionel Sambuc=over 4 433*ebfedea0SLionel Sambuc 434*ebfedea0SLionel Sambuc=item int B<SSL_accept>(SSL *ssl); 435*ebfedea0SLionel Sambuc 436*ebfedea0SLionel Sambuc=item int B<SSL_add_dir_cert_subjects_to_stack>(STACK *stack, const char *dir); 437*ebfedea0SLionel Sambuc 438*ebfedea0SLionel Sambuc=item int B<SSL_add_file_cert_subjects_to_stack>(STACK *stack, const char *file); 439*ebfedea0SLionel Sambuc 440*ebfedea0SLionel Sambuc=item int B<SSL_add_client_CA>(SSL *ssl, X509 *x); 441*ebfedea0SLionel Sambuc 442*ebfedea0SLionel Sambuc=item char *B<SSL_alert_desc_string>(int value); 443*ebfedea0SLionel Sambuc 444*ebfedea0SLionel Sambuc=item char *B<SSL_alert_desc_string_long>(int value); 445*ebfedea0SLionel Sambuc 446*ebfedea0SLionel Sambuc=item char *B<SSL_alert_type_string>(int value); 447*ebfedea0SLionel Sambuc 448*ebfedea0SLionel Sambuc=item char *B<SSL_alert_type_string_long>(int value); 449*ebfedea0SLionel Sambuc 450*ebfedea0SLionel Sambuc=item int B<SSL_check_private_key>(const SSL *ssl); 451*ebfedea0SLionel Sambuc 452*ebfedea0SLionel Sambuc=item void B<SSL_clear>(SSL *ssl); 453*ebfedea0SLionel Sambuc 454*ebfedea0SLionel Sambuc=item long B<SSL_clear_num_renegotiations>(SSL *ssl); 455*ebfedea0SLionel Sambuc 456*ebfedea0SLionel Sambuc=item int B<SSL_connect>(SSL *ssl); 457*ebfedea0SLionel Sambuc 458*ebfedea0SLionel Sambuc=item void B<SSL_copy_session_id>(SSL *t, const SSL *f); 459*ebfedea0SLionel Sambuc 460*ebfedea0SLionel Sambuc=item long B<SSL_ctrl>(SSL *ssl, int cmd, long larg, char *parg); 461*ebfedea0SLionel Sambuc 462*ebfedea0SLionel Sambuc=item int B<SSL_do_handshake>(SSL *ssl); 463*ebfedea0SLionel Sambuc 464*ebfedea0SLionel Sambuc=item SSL *B<SSL_dup>(SSL *ssl); 465*ebfedea0SLionel Sambuc 466*ebfedea0SLionel Sambuc=item STACK *B<SSL_dup_CA_list>(STACK *sk); 467*ebfedea0SLionel Sambuc 468*ebfedea0SLionel Sambuc=item void B<SSL_free>(SSL *ssl); 469*ebfedea0SLionel Sambuc 470*ebfedea0SLionel Sambuc=item SSL_CTX *B<SSL_get_SSL_CTX>(const SSL *ssl); 471*ebfedea0SLionel Sambuc 472*ebfedea0SLionel Sambuc=item char *B<SSL_get_app_data>(SSL *ssl); 473*ebfedea0SLionel Sambuc 474*ebfedea0SLionel Sambuc=item X509 *B<SSL_get_certificate>(const SSL *ssl); 475*ebfedea0SLionel Sambuc 476*ebfedea0SLionel Sambuc=item const char *B<SSL_get_cipher>(const SSL *ssl); 477*ebfedea0SLionel Sambuc 478*ebfedea0SLionel Sambuc=item int B<SSL_get_cipher_bits>(const SSL *ssl, int *alg_bits); 479*ebfedea0SLionel Sambuc 480*ebfedea0SLionel Sambuc=item char *B<SSL_get_cipher_list>(const SSL *ssl, int n); 481*ebfedea0SLionel Sambuc 482*ebfedea0SLionel Sambuc=item char *B<SSL_get_cipher_name>(const SSL *ssl); 483*ebfedea0SLionel Sambuc 484*ebfedea0SLionel Sambuc=item char *B<SSL_get_cipher_version>(const SSL *ssl); 485*ebfedea0SLionel Sambuc 486*ebfedea0SLionel Sambuc=item STACK *B<SSL_get_ciphers>(const SSL *ssl); 487*ebfedea0SLionel Sambuc 488*ebfedea0SLionel Sambuc=item STACK *B<SSL_get_client_CA_list>(const SSL *ssl); 489*ebfedea0SLionel Sambuc 490*ebfedea0SLionel Sambuc=item SSL_CIPHER *B<SSL_get_current_cipher>(SSL *ssl); 491*ebfedea0SLionel Sambuc 492*ebfedea0SLionel Sambuc=item long B<SSL_get_default_timeout>(const SSL *ssl); 493*ebfedea0SLionel Sambuc 494*ebfedea0SLionel Sambuc=item int B<SSL_get_error>(const SSL *ssl, int i); 495*ebfedea0SLionel Sambuc 496*ebfedea0SLionel Sambuc=item char *B<SSL_get_ex_data>(const SSL *ssl, int idx); 497*ebfedea0SLionel Sambuc 498*ebfedea0SLionel Sambuc=item int B<SSL_get_ex_data_X509_STORE_CTX_idx>(void); 499*ebfedea0SLionel Sambuc 500*ebfedea0SLionel Sambuc=item int B<SSL_get_ex_new_index>(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) 501*ebfedea0SLionel Sambuc 502*ebfedea0SLionel Sambuc=item int B<SSL_get_fd>(const SSL *ssl); 503*ebfedea0SLionel Sambuc 504*ebfedea0SLionel Sambuc=item void (*B<SSL_get_info_callback>(const SSL *ssl);)() 505*ebfedea0SLionel Sambuc 506*ebfedea0SLionel Sambuc=item STACK *B<SSL_get_peer_cert_chain>(const SSL *ssl); 507*ebfedea0SLionel Sambuc 508*ebfedea0SLionel Sambuc=item X509 *B<SSL_get_peer_certificate>(const SSL *ssl); 509*ebfedea0SLionel Sambuc 510*ebfedea0SLionel Sambuc=item EVP_PKEY *B<SSL_get_privatekey>(SSL *ssl); 511*ebfedea0SLionel Sambuc 512*ebfedea0SLionel Sambuc=item int B<SSL_get_quiet_shutdown>(const SSL *ssl); 513*ebfedea0SLionel Sambuc 514*ebfedea0SLionel Sambuc=item BIO *B<SSL_get_rbio>(const SSL *ssl); 515*ebfedea0SLionel Sambuc 516*ebfedea0SLionel Sambuc=item int B<SSL_get_read_ahead>(const SSL *ssl); 517*ebfedea0SLionel Sambuc 518*ebfedea0SLionel Sambuc=item SSL_SESSION *B<SSL_get_session>(const SSL *ssl); 519*ebfedea0SLionel Sambuc 520*ebfedea0SLionel Sambuc=item char *B<SSL_get_shared_ciphers>(const SSL *ssl, char *buf, int len); 521*ebfedea0SLionel Sambuc 522*ebfedea0SLionel Sambuc=item int B<SSL_get_shutdown>(const SSL *ssl); 523*ebfedea0SLionel Sambuc 524*ebfedea0SLionel Sambuc=item const SSL_METHOD *B<SSL_get_ssl_method>(SSL *ssl); 525*ebfedea0SLionel Sambuc 526*ebfedea0SLionel Sambuc=item int B<SSL_get_state>(const SSL *ssl); 527*ebfedea0SLionel Sambuc 528*ebfedea0SLionel Sambuc=item long B<SSL_get_time>(const SSL *ssl); 529*ebfedea0SLionel Sambuc 530*ebfedea0SLionel Sambuc=item long B<SSL_get_timeout>(const SSL *ssl); 531*ebfedea0SLionel Sambuc 532*ebfedea0SLionel Sambuc=item int (*B<SSL_get_verify_callback>(const SSL *ssl))(int,X509_STORE_CTX *) 533*ebfedea0SLionel Sambuc 534*ebfedea0SLionel Sambuc=item int B<SSL_get_verify_mode>(const SSL *ssl); 535*ebfedea0SLionel Sambuc 536*ebfedea0SLionel Sambuc=item long B<SSL_get_verify_result>(const SSL *ssl); 537*ebfedea0SLionel Sambuc 538*ebfedea0SLionel Sambuc=item char *B<SSL_get_version>(const SSL *ssl); 539*ebfedea0SLionel Sambuc 540*ebfedea0SLionel Sambuc=item BIO *B<SSL_get_wbio>(const SSL *ssl); 541*ebfedea0SLionel Sambuc 542*ebfedea0SLionel Sambuc=item int B<SSL_in_accept_init>(SSL *ssl); 543*ebfedea0SLionel Sambuc 544*ebfedea0SLionel Sambuc=item int B<SSL_in_before>(SSL *ssl); 545*ebfedea0SLionel Sambuc 546*ebfedea0SLionel Sambuc=item int B<SSL_in_connect_init>(SSL *ssl); 547*ebfedea0SLionel Sambuc 548*ebfedea0SLionel Sambuc=item int B<SSL_in_init>(SSL *ssl); 549*ebfedea0SLionel Sambuc 550*ebfedea0SLionel Sambuc=item int B<SSL_is_init_finished>(SSL *ssl); 551*ebfedea0SLionel Sambuc 552*ebfedea0SLionel Sambuc=item STACK *B<SSL_load_client_CA_file>(char *file); 553*ebfedea0SLionel Sambuc 554*ebfedea0SLionel Sambuc=item void B<SSL_load_error_strings>(void); 555*ebfedea0SLionel Sambuc 556*ebfedea0SLionel Sambuc=item SSL *B<SSL_new>(SSL_CTX *ctx); 557*ebfedea0SLionel Sambuc 558*ebfedea0SLionel Sambuc=item long B<SSL_num_renegotiations>(SSL *ssl); 559*ebfedea0SLionel Sambuc 560*ebfedea0SLionel Sambuc=item int B<SSL_peek>(SSL *ssl, void *buf, int num); 561*ebfedea0SLionel Sambuc 562*ebfedea0SLionel Sambuc=item int B<SSL_pending>(const SSL *ssl); 563*ebfedea0SLionel Sambuc 564*ebfedea0SLionel Sambuc=item int B<SSL_read>(SSL *ssl, void *buf, int num); 565*ebfedea0SLionel Sambuc 566*ebfedea0SLionel Sambuc=item int B<SSL_renegotiate>(SSL *ssl); 567*ebfedea0SLionel Sambuc 568*ebfedea0SLionel Sambuc=item char *B<SSL_rstate_string>(SSL *ssl); 569*ebfedea0SLionel Sambuc 570*ebfedea0SLionel Sambuc=item char *B<SSL_rstate_string_long>(SSL *ssl); 571*ebfedea0SLionel Sambuc 572*ebfedea0SLionel Sambuc=item long B<SSL_session_reused>(SSL *ssl); 573*ebfedea0SLionel Sambuc 574*ebfedea0SLionel Sambuc=item void B<SSL_set_accept_state>(SSL *ssl); 575*ebfedea0SLionel Sambuc 576*ebfedea0SLionel Sambuc=item void B<SSL_set_app_data>(SSL *ssl, char *arg); 577*ebfedea0SLionel Sambuc 578*ebfedea0SLionel Sambuc=item void B<SSL_set_bio>(SSL *ssl, BIO *rbio, BIO *wbio); 579*ebfedea0SLionel Sambuc 580*ebfedea0SLionel Sambuc=item int B<SSL_set_cipher_list>(SSL *ssl, char *str); 581*ebfedea0SLionel Sambuc 582*ebfedea0SLionel Sambuc=item void B<SSL_set_client_CA_list>(SSL *ssl, STACK *list); 583*ebfedea0SLionel Sambuc 584*ebfedea0SLionel Sambuc=item void B<SSL_set_connect_state>(SSL *ssl); 585*ebfedea0SLionel Sambuc 586*ebfedea0SLionel Sambuc=item int B<SSL_set_ex_data>(SSL *ssl, int idx, char *arg); 587*ebfedea0SLionel Sambuc 588*ebfedea0SLionel Sambuc=item int B<SSL_set_fd>(SSL *ssl, int fd); 589*ebfedea0SLionel Sambuc 590*ebfedea0SLionel Sambuc=item void B<SSL_set_info_callback>(SSL *ssl, void (*cb);(void)) 591*ebfedea0SLionel Sambuc 592*ebfedea0SLionel Sambuc=item void B<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)); 593*ebfedea0SLionel Sambuc 594*ebfedea0SLionel Sambuc=item void B<SSL_set_msg_callback_arg>(SSL *ctx, void *arg); 595*ebfedea0SLionel Sambuc 596*ebfedea0SLionel Sambuc=item void B<SSL_set_options>(SSL *ssl, unsigned long op); 597*ebfedea0SLionel Sambuc 598*ebfedea0SLionel Sambuc=item void B<SSL_set_quiet_shutdown>(SSL *ssl, int mode); 599*ebfedea0SLionel Sambuc 600*ebfedea0SLionel Sambuc=item void B<SSL_set_read_ahead>(SSL *ssl, int yes); 601*ebfedea0SLionel Sambuc 602*ebfedea0SLionel Sambuc=item int B<SSL_set_rfd>(SSL *ssl, int fd); 603*ebfedea0SLionel Sambuc 604*ebfedea0SLionel Sambuc=item int B<SSL_set_session>(SSL *ssl, SSL_SESSION *session); 605*ebfedea0SLionel Sambuc 606*ebfedea0SLionel Sambuc=item void B<SSL_set_shutdown>(SSL *ssl, int mode); 607*ebfedea0SLionel Sambuc 608*ebfedea0SLionel Sambuc=item int B<SSL_set_ssl_method>(SSL *ssl, const SSL_METHOD *meth); 609*ebfedea0SLionel Sambuc 610*ebfedea0SLionel Sambuc=item void B<SSL_set_time>(SSL *ssl, long t); 611*ebfedea0SLionel Sambuc 612*ebfedea0SLionel Sambuc=item void B<SSL_set_timeout>(SSL *ssl, long t); 613*ebfedea0SLionel Sambuc 614*ebfedea0SLionel Sambuc=item void B<SSL_set_verify>(SSL *ssl, int mode, int (*callback);(void)) 615*ebfedea0SLionel Sambuc 616*ebfedea0SLionel Sambuc=item void B<SSL_set_verify_result>(SSL *ssl, long arg); 617*ebfedea0SLionel Sambuc 618*ebfedea0SLionel Sambuc=item int B<SSL_set_wfd>(SSL *ssl, int fd); 619*ebfedea0SLionel Sambuc 620*ebfedea0SLionel Sambuc=item int B<SSL_shutdown>(SSL *ssl); 621*ebfedea0SLionel Sambuc 622*ebfedea0SLionel Sambuc=item int B<SSL_state>(const SSL *ssl); 623*ebfedea0SLionel Sambuc 624*ebfedea0SLionel Sambuc=item char *B<SSL_state_string>(const SSL *ssl); 625*ebfedea0SLionel Sambuc 626*ebfedea0SLionel Sambuc=item char *B<SSL_state_string_long>(const SSL *ssl); 627*ebfedea0SLionel Sambuc 628*ebfedea0SLionel Sambuc=item long B<SSL_total_renegotiations>(SSL *ssl); 629*ebfedea0SLionel Sambuc 630*ebfedea0SLionel Sambuc=item int B<SSL_use_PrivateKey>(SSL *ssl, EVP_PKEY *pkey); 631*ebfedea0SLionel Sambuc 632*ebfedea0SLionel Sambuc=item int B<SSL_use_PrivateKey_ASN1>(int type, SSL *ssl, unsigned char *d, long len); 633*ebfedea0SLionel Sambuc 634*ebfedea0SLionel Sambuc=item int B<SSL_use_PrivateKey_file>(SSL *ssl, char *file, int type); 635*ebfedea0SLionel Sambuc 636*ebfedea0SLionel Sambuc=item int B<SSL_use_RSAPrivateKey>(SSL *ssl, RSA *rsa); 637*ebfedea0SLionel Sambuc 638*ebfedea0SLionel Sambuc=item int B<SSL_use_RSAPrivateKey_ASN1>(SSL *ssl, unsigned char *d, long len); 639*ebfedea0SLionel Sambuc 640*ebfedea0SLionel Sambuc=item int B<SSL_use_RSAPrivateKey_file>(SSL *ssl, char *file, int type); 641*ebfedea0SLionel Sambuc 642*ebfedea0SLionel Sambuc=item int B<SSL_use_certificate>(SSL *ssl, X509 *x); 643*ebfedea0SLionel Sambuc 644*ebfedea0SLionel Sambuc=item int B<SSL_use_certificate_ASN1>(SSL *ssl, int len, unsigned char *d); 645*ebfedea0SLionel Sambuc 646*ebfedea0SLionel Sambuc=item int B<SSL_use_certificate_file>(SSL *ssl, char *file, int type); 647*ebfedea0SLionel Sambuc 648*ebfedea0SLionel Sambuc=item int B<SSL_version>(const SSL *ssl); 649*ebfedea0SLionel Sambuc 650*ebfedea0SLionel Sambuc=item int B<SSL_want>(const SSL *ssl); 651*ebfedea0SLionel Sambuc 652*ebfedea0SLionel Sambuc=item int B<SSL_want_nothing>(const SSL *ssl); 653*ebfedea0SLionel Sambuc 654*ebfedea0SLionel Sambuc=item int B<SSL_want_read>(const SSL *ssl); 655*ebfedea0SLionel Sambuc 656*ebfedea0SLionel Sambuc=item int B<SSL_want_write>(const SSL *ssl); 657*ebfedea0SLionel Sambuc 658*ebfedea0SLionel Sambuc=item int B<SSL_want_x509_lookup>(const SSL *ssl); 659*ebfedea0SLionel Sambuc 660*ebfedea0SLionel Sambuc=item int B<SSL_write>(SSL *ssl, const void *buf, int num); 661*ebfedea0SLionel Sambuc 662*ebfedea0SLionel Sambuc=item void B<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)); 663*ebfedea0SLionel Sambuc 664*ebfedea0SLionel Sambuc=item int B<SSL_use_psk_identity_hint>(SSL *ssl, const char *hint); 665*ebfedea0SLionel Sambuc 666*ebfedea0SLionel Sambuc=item void B<SSL_set_psk_server_callback>(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)); 667*ebfedea0SLionel Sambuc 668*ebfedea0SLionel Sambuc=item const char *B<SSL_get_psk_identity_hint>(SSL *ssl); 669*ebfedea0SLionel Sambuc 670*ebfedea0SLionel Sambuc=item const char *B<SSL_get_psk_identity>(SSL *ssl); 671*ebfedea0SLionel Sambuc 672*ebfedea0SLionel Sambuc=back 673*ebfedea0SLionel Sambuc 674*ebfedea0SLionel Sambuc=head1 SEE ALSO 675*ebfedea0SLionel Sambuc 676*ebfedea0SLionel SambucL<openssl(1)|openssl(1)>, L<crypto(3)|crypto(3)>, 677*ebfedea0SLionel SambucL<SSL_accept(3)|SSL_accept(3)>, L<SSL_clear(3)|SSL_clear(3)>, 678*ebfedea0SLionel SambucL<SSL_connect(3)|SSL_connect(3)>, 679*ebfedea0SLionel SambucL<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)>, 680*ebfedea0SLionel SambucL<SSL_COMP_add_compression_method(3)|SSL_COMP_add_compression_method(3)>, 681*ebfedea0SLionel SambucL<SSL_CTX_add_extra_chain_cert(3)|SSL_CTX_add_extra_chain_cert(3)>, 682*ebfedea0SLionel SambucL<SSL_CTX_add_session(3)|SSL_CTX_add_session(3)>, 683*ebfedea0SLionel SambucL<SSL_CTX_ctrl(3)|SSL_CTX_ctrl(3)>, 684*ebfedea0SLionel SambucL<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>, 685*ebfedea0SLionel SambucL<SSL_CTX_get_ex_new_index(3)|SSL_CTX_get_ex_new_index(3)>, 686*ebfedea0SLionel SambucL<SSL_CTX_get_verify_mode(3)|SSL_CTX_get_verify_mode(3)>, 687*ebfedea0SLionel SambucL<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)> 688*ebfedea0SLionel SambucL<SSL_CTX_new(3)|SSL_CTX_new(3)>, 689*ebfedea0SLionel SambucL<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>, 690*ebfedea0SLionel SambucL<SSL_CTX_sess_set_cache_size(3)|SSL_CTX_sess_set_cache_size(3)>, 691*ebfedea0SLionel SambucL<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>, 692*ebfedea0SLionel SambucL<SSL_CTX_sessions(3)|SSL_CTX_sessions(3)>, 693*ebfedea0SLionel SambucL<SSL_CTX_set_cert_store(3)|SSL_CTX_set_cert_store(3)>, 694*ebfedea0SLionel SambucL<SSL_CTX_set_cert_verify_callback(3)|SSL_CTX_set_cert_verify_callback(3)>, 695*ebfedea0SLionel SambucL<SSL_CTX_set_cipher_list(3)|SSL_CTX_set_cipher_list(3)>, 696*ebfedea0SLionel SambucL<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>, 697*ebfedea0SLionel SambucL<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>, 698*ebfedea0SLionel SambucL<SSL_CTX_set_default_passwd_cb(3)|SSL_CTX_set_default_passwd_cb(3)>, 699*ebfedea0SLionel SambucL<SSL_CTX_set_generate_session_id(3)|SSL_CTX_set_generate_session_id(3)>, 700*ebfedea0SLionel SambucL<SSL_CTX_set_info_callback(3)|SSL_CTX_set_info_callback(3)>, 701*ebfedea0SLionel SambucL<SSL_CTX_set_max_cert_list(3)|SSL_CTX_set_max_cert_list(3)>, 702*ebfedea0SLionel SambucL<SSL_CTX_set_mode(3)|SSL_CTX_set_mode(3)>, 703*ebfedea0SLionel SambucL<SSL_CTX_set_msg_callback(3)|SSL_CTX_set_msg_callback(3)>, 704*ebfedea0SLionel SambucL<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>, 705*ebfedea0SLionel SambucL<SSL_CTX_set_quiet_shutdown(3)|SSL_CTX_set_quiet_shutdown(3)>, 706*ebfedea0SLionel SambucL<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>, 707*ebfedea0SLionel SambucL<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>, 708*ebfedea0SLionel SambucL<SSL_CTX_set_ssl_version(3)|SSL_CTX_set_ssl_version(3)>, 709*ebfedea0SLionel SambucL<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>, 710*ebfedea0SLionel SambucL<SSL_CTX_set_tmp_rsa_callback(3)|SSL_CTX_set_tmp_rsa_callback(3)>, 711*ebfedea0SLionel SambucL<SSL_CTX_set_tmp_dh_callback(3)|SSL_CTX_set_tmp_dh_callback(3)>, 712*ebfedea0SLionel SambucL<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>, 713*ebfedea0SLionel SambucL<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>, 714*ebfedea0SLionel SambucL<SSL_alert_type_string(3)|SSL_alert_type_string(3)>, 715*ebfedea0SLionel SambucL<SSL_do_handshake(3)|SSL_do_handshake(3)>, 716*ebfedea0SLionel SambucL<SSL_get_SSL_CTX(3)|SSL_get_SSL_CTX(3)>, 717*ebfedea0SLionel SambucL<SSL_get_ciphers(3)|SSL_get_ciphers(3)>, 718*ebfedea0SLionel SambucL<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)>, 719*ebfedea0SLionel SambucL<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>, 720*ebfedea0SLionel SambucL<SSL_get_error(3)|SSL_get_error(3)>, 721*ebfedea0SLionel SambucL<SSL_get_ex_data_X509_STORE_CTX_idx(3)|SSL_get_ex_data_X509_STORE_CTX_idx(3)>, 722*ebfedea0SLionel SambucL<SSL_get_ex_new_index(3)|SSL_get_ex_new_index(3)>, 723*ebfedea0SLionel SambucL<SSL_get_fd(3)|SSL_get_fd(3)>, 724*ebfedea0SLionel SambucL<SSL_get_peer_cert_chain(3)|SSL_get_peer_cert_chain(3)>, 725*ebfedea0SLionel SambucL<SSL_get_rbio(3)|SSL_get_rbio(3)>, 726*ebfedea0SLionel SambucL<SSL_get_session(3)|SSL_get_session(3)>, 727*ebfedea0SLionel SambucL<SSL_get_verify_result(3)|SSL_get_verify_result(3)>, 728*ebfedea0SLionel SambucL<SSL_get_version(3)|SSL_get_version(3)>, 729*ebfedea0SLionel SambucL<SSL_library_init(3)|SSL_library_init(3)>, 730*ebfedea0SLionel SambucL<SSL_load_client_CA_file(3)|SSL_load_client_CA_file(3)>, 731*ebfedea0SLionel SambucL<SSL_new(3)|SSL_new(3)>, 732*ebfedea0SLionel SambucL<SSL_pending(3)|SSL_pending(3)>, 733*ebfedea0SLionel SambucL<SSL_read(3)|SSL_read(3)>, 734*ebfedea0SLionel SambucL<SSL_rstate_string(3)|SSL_rstate_string(3)>, 735*ebfedea0SLionel SambucL<SSL_session_reused(3)|SSL_session_reused(3)>, 736*ebfedea0SLionel SambucL<SSL_set_bio(3)|SSL_set_bio(3)>, 737*ebfedea0SLionel SambucL<SSL_set_connect_state(3)|SSL_set_connect_state(3)>, 738*ebfedea0SLionel SambucL<SSL_set_fd(3)|SSL_set_fd(3)>, 739*ebfedea0SLionel SambucL<SSL_set_session(3)|SSL_set_session(3)>, 740*ebfedea0SLionel SambucL<SSL_set_shutdown(3)|SSL_set_shutdown(3)>, 741*ebfedea0SLionel SambucL<SSL_shutdown(3)|SSL_shutdown(3)>, 742*ebfedea0SLionel SambucL<SSL_state_string(3)|SSL_state_string(3)>, 743*ebfedea0SLionel SambucL<SSL_want(3)|SSL_want(3)>, 744*ebfedea0SLionel SambucL<SSL_write(3)|SSL_write(3)>, 745*ebfedea0SLionel SambucL<SSL_SESSION_free(3)|SSL_SESSION_free(3)>, 746*ebfedea0SLionel SambucL<SSL_SESSION_get_ex_new_index(3)|SSL_SESSION_get_ex_new_index(3)>, 747*ebfedea0SLionel SambucL<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)>, 748*ebfedea0SLionel SambucL<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)>, 749*ebfedea0SLionel SambucL<SSL_CTX_set_psk_client_callback(3)|SSL_CTX_set_psk_client_callback(3)>, 750*ebfedea0SLionel SambucL<SSL_CTX_use_psk_identity_hint(3)|SSL_CTX_use_psk_identity_hint(3)>, 751*ebfedea0SLionel SambucL<SSL_get_psk_identity(3)|SSL_get_psk_identity(3)> 752*ebfedea0SLionel Sambuc 753*ebfedea0SLionel Sambuc=head1 HISTORY 754*ebfedea0SLionel Sambuc 755*ebfedea0SLionel SambucThe L<ssl(3)|ssl(3)> document appeared in OpenSSL 0.9.2 756*ebfedea0SLionel Sambuc 757*ebfedea0SLionel Sambuc=cut 758*ebfedea0SLionel Sambuc 759