ssl.pod 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. =pod
  2. =head1 NAME
  3. SSL - OpenSSL SSL/TLS library
  4. =head1 SYNOPSIS
  5. =head1 DESCRIPTION
  6. The OpenSSL B<ssl> library implements the Secure Sockets Layer (SSL v2/v3) and
  7. Transport Layer Security (TLS v1) protocols. It provides a rich API which is
  8. documented here.
  9. At first the library must be initialized; see
  10. L<SSL_library_init(3)|SSL_library_init(3)>.
  11. Then an B<SSL_CTX> object is created as a framework to establish
  12. TLS/SSL enabled connections (see L<SSL_CTX_new(3)|SSL_CTX_new(3)>).
  13. Various options regarding certificates, algorithms etc. can be set
  14. in this object.
  15. When a network connection has been created, it can be assigned to an
  16. B<SSL> object. After the B<SSL> object has been created using
  17. L<SSL_new(3)|SSL_new(3)>, L<SSL_set_fd(3)|SSL_set_fd(3)> or
  18. L<SSL_set_bio(3)|SSL_set_bio(3)> can be used to associate the network
  19. connection with the object.
  20. Then the TLS/SSL handshake is performed using
  21. L<SSL_accept(3)|SSL_accept(3)> or L<SSL_connect(3)|SSL_connect(3)>
  22. respectively.
  23. L<SSL_read(3)|SSL_read(3)> and L<SSL_write(3)|SSL_write(3)> are used
  24. to read and write data on the TLS/SSL connection.
  25. L<SSL_shutdown(3)|SSL_shutdown(3)> can be used to shut down the
  26. TLS/SSL connection.
  27. =head1 DATA STRUCTURES
  28. Currently the OpenSSL B<ssl> library functions deals with the following data
  29. structures:
  30. =over 4
  31. =item B<SSL_METHOD> (SSL Method)
  32. That's a dispatch structure describing the internal B<ssl> library
  33. methods/functions which implement the various protocol versions (SSLv1, SSLv2
  34. and TLSv1). It's needed to create an B<SSL_CTX>.
  35. =item B<SSL_CIPHER> (SSL Cipher)
  36. This structure holds the algorithm information for a particular cipher which
  37. are a core part of the SSL/TLS protocol. The available ciphers are configured
  38. on a B<SSL_CTX> basis and the actually used ones are then part of the
  39. B<SSL_SESSION>.
  40. =item B<SSL_CTX> (SSL Context)
  41. That's the global context structure which is created by a server or client
  42. once per program life-time and which holds mainly default values for the
  43. B<SSL> structures which are later created for the connections.
  44. =item B<SSL_SESSION> (SSL Session)
  45. This is a structure containing the current TLS/SSL session details for a
  46. connection: B<SSL_CIPHER>s, client and server certificates, keys, etc.
  47. =item B<SSL> (SSL Connection)
  48. That's the main SSL/TLS structure which is created by a server or client per
  49. established connection. This actually is the core structure in the SSL API.
  50. Under run-time the application usually deals with this structure which has
  51. links to mostly all other structures.
  52. =back
  53. =head1 HEADER FILES
  54. Currently the OpenSSL B<ssl> library provides the following C header files
  55. containing the prototypes for the data structures and and functions:
  56. =over 4
  57. =item B<ssl.h>
  58. That's the common header file for the SSL/TLS API. Include it into your
  59. program to make the API of the B<ssl> library available. It internally
  60. includes both more private SSL headers and headers from the B<crypto> library.
  61. Whenever you need hard-core details on the internals of the SSL API, look
  62. inside this header file.
  63. =item B<ssl2.h>
  64. That's the sub header file dealing with the SSLv2 protocol only.
  65. I<Usually you don't have to include it explicitly because
  66. it's already included by ssl.h>.
  67. =item B<ssl3.h>
  68. That's the sub header file dealing with the SSLv3 protocol only.
  69. I<Usually you don't have to include it explicitly because
  70. it's already included by ssl.h>.
  71. =item B<ssl23.h>
  72. That's the sub header file dealing with the combined use of the SSLv2 and
  73. SSLv3 protocols.
  74. I<Usually you don't have to include it explicitly because
  75. it's already included by ssl.h>.
  76. =item B<tls1.h>
  77. That's the sub header file dealing with the TLSv1 protocol only.
  78. I<Usually you don't have to include it explicitly because
  79. it's already included by ssl.h>.
  80. =back
  81. =head1 API FUNCTIONS
  82. Currently the OpenSSL B<ssl> library exports 214 API functions.
  83. They are documented in the following:
  84. =head2 DEALING WITH PROTOCOL METHODS
  85. Here we document the various API functions which deal with the SSL/TLS
  86. protocol methods defined in B<SSL_METHOD> structures.
  87. =over 4
  88. =item SSL_METHOD *B<SSLv2_client_method>(void);
  89. Constructor for the SSLv2 SSL_METHOD structure for a dedicated client.
  90. =item SSL_METHOD *B<SSLv2_server_method>(void);
  91. Constructor for the SSLv2 SSL_METHOD structure for a dedicated server.
  92. =item SSL_METHOD *B<SSLv2_method>(void);
  93. Constructor for the SSLv2 SSL_METHOD structure for combined client and server.
  94. =item SSL_METHOD *B<SSLv3_client_method>(void);
  95. Constructor for the SSLv3 SSL_METHOD structure for a dedicated client.
  96. =item SSL_METHOD *B<SSLv3_server_method>(void);
  97. Constructor for the SSLv3 SSL_METHOD structure for a dedicated server.
  98. =item SSL_METHOD *B<SSLv3_method>(void);
  99. Constructor for the SSLv3 SSL_METHOD structure for combined client and server.
  100. =item SSL_METHOD *B<TLSv1_client_method>(void);
  101. Constructor for the TLSv1 SSL_METHOD structure for a dedicated client.
  102. =item SSL_METHOD *B<TLSv1_server_method>(void);
  103. Constructor for the TLSv1 SSL_METHOD structure for a dedicated server.
  104. =item SSL_METHOD *B<TLSv1_method>(void);
  105. Constructor for the TLSv1 SSL_METHOD structure for combined client and server.
  106. =back
  107. =head2 DEALING WITH CIPHERS
  108. Here we document the various API functions which deal with the SSL/TLS
  109. ciphers defined in B<SSL_CIPHER> structures.
  110. =over 4
  111. =item char *B<SSL_CIPHER_description>(SSL_CIPHER *cipher, char *buf, int len);
  112. Write a string to I<buf> (with a maximum size of I<len>) containing a human
  113. readable description of I<cipher>. Returns I<buf>.
  114. =item int B<SSL_CIPHER_get_bits>(SSL_CIPHER *cipher, int *alg_bits);
  115. Determine the number of bits in I<cipher>. Because of export crippled ciphers
  116. there are two bits: The bits the algorithm supports in general (stored to
  117. I<alg_bits>) and the bits which are actually used (the return value).
  118. =item const char *B<SSL_CIPHER_get_name>(SSL_CIPHER *cipher);
  119. Return the internal name of I<cipher> as a string. These are the various
  120. strings defined by the I<SSL2_TXT_xxx>, I<SSL3_TXT_xxx> and I<TLS1_TXT_xxx>
  121. definitions in the header files.
  122. =item char *B<SSL_CIPHER_get_version>(SSL_CIPHER *cipher);
  123. Returns a string like "C<TLSv1/SSLv3>" or "C<SSLv2>" which indicates the
  124. SSL/TLS protocol version to which I<cipher> belongs (i.e. where it was defined
  125. in the specification the first time).
  126. =back
  127. =head2 DEALING WITH PROTOCOL CONTEXTS
  128. Here we document the various API functions which deal with the SSL/TLS
  129. protocol context defined in the B<SSL_CTX> structure.
  130. =over 4
  131. =item int B<SSL_CTX_add_client_CA>(SSL_CTX *ctx, X509 *x);
  132. =item long B<SSL_CTX_add_extra_chain_cert>(SSL_CTX *ctx, X509 *x509);
  133. =item int B<SSL_CTX_add_session>(SSL_CTX *ctx, SSL_SESSION *c);
  134. =item int B<SSL_CTX_check_private_key>(const SSL_CTX *ctx);
  135. =item long B<SSL_CTX_ctrl>(SSL_CTX *ctx, int cmd, long larg, char *parg);
  136. =item void B<SSL_CTX_flush_sessions>(SSL_CTX *s, long t);
  137. =item void B<SSL_CTX_free>(SSL_CTX *a);
  138. =item char *B<SSL_CTX_get_app_data>(SSL_CTX *ctx);
  139. =item X509_STORE *B<SSL_CTX_get_cert_store>(SSL_CTX *ctx);
  140. =item STACK *B<SSL_CTX_get_client_CA_list>(const SSL_CTX *ctx);
  141. =item int (*B<SSL_CTX_get_client_cert_cb>(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
  142. =item char *B<SSL_CTX_get_ex_data>(const SSL_CTX *s, int idx);
  143. =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))
  144. =item void (*B<SSL_CTX_get_info_callback>(SSL_CTX *ctx))(SSL *ssl, int cb, int ret);
  145. =item int B<SSL_CTX_get_quiet_shutdown>(const SSL_CTX *ctx);
  146. =item int B<SSL_CTX_get_session_cache_mode>(SSL_CTX *ctx);
  147. =item long B<SSL_CTX_get_timeout>(const SSL_CTX *ctx);
  148. =item int (*B<SSL_CTX_get_verify_callback>(const SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx);
  149. =item int B<SSL_CTX_get_verify_mode>(SSL_CTX *ctx);
  150. =item int B<SSL_CTX_load_verify_locations>(SSL_CTX *ctx, char *CAfile, char *CApath);
  151. =item long B<SSL_CTX_need_tmp_RSA>(SSL_CTX *ctx);
  152. =item SSL_CTX *B<SSL_CTX_new>(SSL_METHOD *meth);
  153. =item int B<SSL_CTX_remove_session>(SSL_CTX *ctx, SSL_SESSION *c);
  154. =item int B<SSL_CTX_sess_accept>(SSL_CTX *ctx);
  155. =item int B<SSL_CTX_sess_accept_good>(SSL_CTX *ctx);
  156. =item int B<SSL_CTX_sess_accept_renegotiate>(SSL_CTX *ctx);
  157. =item int B<SSL_CTX_sess_cache_full>(SSL_CTX *ctx);
  158. =item int B<SSL_CTX_sess_cb_hits>(SSL_CTX *ctx);
  159. =item int B<SSL_CTX_sess_connect>(SSL_CTX *ctx);
  160. =item int B<SSL_CTX_sess_connect_good>(SSL_CTX *ctx);
  161. =item int B<SSL_CTX_sess_connect_renegotiate>(SSL_CTX *ctx);
  162. =item int B<SSL_CTX_sess_get_cache_size>(SSL_CTX *ctx);
  163. =item SSL_SESSION *(*B<SSL_CTX_sess_get_get_cb>(SSL_CTX *ctx))(SSL *ssl, unsigned char *data, int len, int *copy);
  164. =item int (*B<SSL_CTX_sess_get_new_cb>(SSL_CTX *ctx)(SSL *ssl, SSL_SESSION *sess);
  165. =item void (*B<SSL_CTX_sess_get_remove_cb>(SSL_CTX *ctx)(SSL_CTX *ctx, SSL_SESSION *sess);
  166. =item int B<SSL_CTX_sess_hits>(SSL_CTX *ctx);
  167. =item int B<SSL_CTX_sess_misses>(SSL_CTX *ctx);
  168. =item int B<SSL_CTX_sess_number>(SSL_CTX *ctx);
  169. =item void B<SSL_CTX_sess_set_cache_size>(SSL_CTX *ctx,t);
  170. =item void B<SSL_CTX_sess_set_get_cb>(SSL_CTX *ctx, SSL_SESSION *(*cb)(SSL *ssl, unsigned char *data, int len, int *copy));
  171. =item void B<SSL_CTX_sess_set_new_cb>(SSL_CTX *ctx, int (*cb)(SSL *ssl, SSL_SESSION *sess));
  172. =item void B<SSL_CTX_sess_set_remove_cb>(SSL_CTX *ctx, void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess));
  173. =item int B<SSL_CTX_sess_timeouts>(SSL_CTX *ctx);
  174. =item LHASH *B<SSL_CTX_sessions>(SSL_CTX *ctx);
  175. =item void B<SSL_CTX_set_app_data>(SSL_CTX *ctx, void *arg);
  176. =item void B<SSL_CTX_set_cert_store>(SSL_CTX *ctx, X509_STORE *cs);
  177. =item void B<SSL_CTX_set_cert_verify_cb>(SSL_CTX *ctx, int (*cb)(), char *arg)
  178. =item int B<SSL_CTX_set_cipher_list>(SSL_CTX *ctx, char *str);
  179. =item void B<SSL_CTX_set_client_CA_list>(SSL_CTX *ctx, STACK *list);
  180. =item void B<SSL_CTX_set_client_cert_cb>(SSL_CTX *ctx, int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));
  181. =item void B<SSL_CTX_set_default_passwd_cb>(SSL_CTX *ctx, int (*cb);(void))
  182. =item void B<SSL_CTX_set_default_read_ahead>(SSL_CTX *ctx, int m);
  183. =item int B<SSL_CTX_set_default_verify_paths>(SSL_CTX *ctx);
  184. =item int B<SSL_CTX_set_ex_data>(SSL_CTX *s, int idx, char *arg);
  185. =item void B<SSL_CTX_set_info_callback>(SSL_CTX *ctx, void (*cb)(SSL *ssl, int cb, int ret));
  186. =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));
  187. =item void B<SSL_CTX_set_msg_callback_arg>(SSL_CTX *ctx, void *arg);
  188. =item void B<SSL_CTX_set_options>(SSL_CTX *ctx, unsigned long op);
  189. =item void B<SSL_CTX_set_quiet_shutdown>(SSL_CTX *ctx, int mode);
  190. =item void B<SSL_CTX_set_session_cache_mode>(SSL_CTX *ctx, int mode);
  191. =item int B<SSL_CTX_set_ssl_version>(SSL_CTX *ctx, SSL_METHOD *meth);
  192. =item void B<SSL_CTX_set_timeout>(SSL_CTX *ctx, long t);
  193. =item long B<SSL_CTX_set_tmp_dh>(SSL_CTX* ctx, DH *dh);
  194. =item long B<SSL_CTX_set_tmp_dh_callback>(SSL_CTX *ctx, DH *(*cb)(void));
  195. =item long B<SSL_CTX_set_tmp_rsa>(SSL_CTX *ctx, RSA *rsa);
  196. =item SSL_CTX_set_tmp_rsa_callback
  197. C<long B<SSL_CTX_set_tmp_rsa_callback>(SSL_CTX *B<ctx>, RSA *(*B<cb>)(SSL *B<ssl>, int B<export>, int B<keylength>));>
  198. Sets the callback which will be called when a temporary private key is
  199. required. The B<C<export>> flag will be set if the reason for needing
  200. a temp key is that an export ciphersuite is in use, in which case,
  201. B<C<keylength>> will contain the required keylength in bits. Generate a key of
  202. appropriate size (using ???) and return it.
  203. =item SSL_set_tmp_rsa_callback
  204. long B<SSL_set_tmp_rsa_callback>(SSL *ssl, RSA *(*cb)(SSL *ssl, int export, int keylength));
  205. The same as B<SSL_CTX_set_tmp_rsa_callback>, except it operates on an SSL
  206. session instead of a context.
  207. =item void B<SSL_CTX_set_verify>(SSL_CTX *ctx, int mode, int (*cb);(void))
  208. =item int B<SSL_CTX_use_PrivateKey>(SSL_CTX *ctx, EVP_PKEY *pkey);
  209. =item int B<SSL_CTX_use_PrivateKey_ASN1>(int type, SSL_CTX *ctx, unsigned char *d, long len);
  210. =item int B<SSL_CTX_use_PrivateKey_file>(SSL_CTX *ctx, char *file, int type);
  211. =item int B<SSL_CTX_use_RSAPrivateKey>(SSL_CTX *ctx, RSA *rsa);
  212. =item int B<SSL_CTX_use_RSAPrivateKey_ASN1>(SSL_CTX *ctx, unsigned char *d, long len);
  213. =item int B<SSL_CTX_use_RSAPrivateKey_file>(SSL_CTX *ctx, char *file, int type);
  214. =item int B<SSL_CTX_use_certificate>(SSL_CTX *ctx, X509 *x);
  215. =item int B<SSL_CTX_use_certificate_ASN1>(SSL_CTX *ctx, int len, unsigned char *d);
  216. =item int B<SSL_CTX_use_certificate_file>(SSL_CTX *ctx, char *file, int type);
  217. =back
  218. =head2 DEALING WITH SESSIONS
  219. Here we document the various API functions which deal with the SSL/TLS
  220. sessions defined in the B<SSL_SESSION> structures.
  221. =over 4
  222. =item int B<SSL_SESSION_cmp>(const SSL_SESSION *a, const SSL_SESSION *b);
  223. =item void B<SSL_SESSION_free>(SSL_SESSION *ss);
  224. =item char *B<SSL_SESSION_get_app_data>(SSL_SESSION *s);
  225. =item char *B<SSL_SESSION_get_ex_data>(const SSL_SESSION *s, int idx);
  226. =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))
  227. =item long B<SSL_SESSION_get_time>(const SSL_SESSION *s);
  228. =item long B<SSL_SESSION_get_timeout>(const SSL_SESSION *s);
  229. =item unsigned long B<SSL_SESSION_hash>(const SSL_SESSION *a);
  230. =item SSL_SESSION *B<SSL_SESSION_new>(void);
  231. =item int B<SSL_SESSION_print>(BIO *bp, const SSL_SESSION *x);
  232. =item int B<SSL_SESSION_print_fp>(FILE *fp, const SSL_SESSION *x);
  233. =item void B<SSL_SESSION_set_app_data>(SSL_SESSION *s, char *a);
  234. =item int B<SSL_SESSION_set_ex_data>(SSL_SESSION *s, int idx, char *arg);
  235. =item long B<SSL_SESSION_set_time>(SSL_SESSION *s, long t);
  236. =item long B<SSL_SESSION_set_timeout>(SSL_SESSION *s, long t);
  237. =back
  238. =head2 DEALING WITH CONNECTIONS
  239. Here we document the various API functions which deal with the SSL/TLS
  240. connection defined in the B<SSL> structure.
  241. =over 4
  242. =item int B<SSL_accept>(SSL *ssl);
  243. =item int B<SSL_add_dir_cert_subjects_to_stack>(STACK *stack, const char *dir);
  244. =item int B<SSL_add_file_cert_subjects_to_stack>(STACK *stack, const char *file);
  245. =item int B<SSL_add_client_CA>(SSL *ssl, X509 *x);
  246. =item char *B<SSL_alert_desc_string>(int value);
  247. =item char *B<SSL_alert_desc_string_long>(int value);
  248. =item char *B<SSL_alert_type_string>(int value);
  249. =item char *B<SSL_alert_type_string_long>(int value);
  250. =item int B<SSL_check_private_key>(const SSL *ssl);
  251. =item void B<SSL_clear>(SSL *ssl);
  252. =item long B<SSL_clear_num_renegotiations>(SSL *ssl);
  253. =item int B<SSL_connect>(SSL *ssl);
  254. =item void B<SSL_copy_session_id>(SSL *t, const SSL *f);
  255. =item long B<SSL_ctrl>(SSL *ssl, int cmd, long larg, char *parg);
  256. =item int B<SSL_do_handshake>(SSL *ssl);
  257. =item SSL *B<SSL_dup>(SSL *ssl);
  258. =item STACK *B<SSL_dup_CA_list>(STACK *sk);
  259. =item void B<SSL_free>(SSL *ssl);
  260. =item SSL_CTX *B<SSL_get_SSL_CTX>(const SSL *ssl);
  261. =item char *B<SSL_get_app_data>(SSL *ssl);
  262. =item X509 *B<SSL_get_certificate>(const SSL *ssl);
  263. =item const char *B<SSL_get_cipher>(const SSL *ssl);
  264. =item int B<SSL_get_cipher_bits>(const SSL *ssl, int *alg_bits);
  265. =item char *B<SSL_get_cipher_list>(const SSL *ssl, int n);
  266. =item char *B<SSL_get_cipher_name>(const SSL *ssl);
  267. =item char *B<SSL_get_cipher_version>(const SSL *ssl);
  268. =item STACK *B<SSL_get_ciphers>(const SSL *ssl);
  269. =item STACK *B<SSL_get_client_CA_list>(const SSL *ssl);
  270. =item SSL_CIPHER *B<SSL_get_current_cipher>(SSL *ssl);
  271. =item long B<SSL_get_default_timeout>(const SSL *ssl);
  272. =item int B<SSL_get_error>(const SSL *ssl, int i);
  273. =item char *B<SSL_get_ex_data>(const SSL *ssl, int idx);
  274. =item int B<SSL_get_ex_data_X509_STORE_CTX_idx>(void);
  275. =item int B<SSL_get_ex_new_index>(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))
  276. =item int B<SSL_get_fd>(const SSL *ssl);
  277. =item void (*B<SSL_get_info_callback>(const SSL *ssl);)()
  278. =item STACK *B<SSL_get_peer_cert_chain>(const SSL *ssl);
  279. =item X509 *B<SSL_get_peer_certificate>(const SSL *ssl);
  280. =item EVP_PKEY *B<SSL_get_privatekey>(SSL *ssl);
  281. =item int B<SSL_get_quiet_shutdown>(const SSL *ssl);
  282. =item BIO *B<SSL_get_rbio>(const SSL *ssl);
  283. =item int B<SSL_get_read_ahead>(const SSL *ssl);
  284. =item SSL_SESSION *B<SSL_get_session>(const SSL *ssl);
  285. =item char *B<SSL_get_shared_ciphers>(const SSL *ssl, char *buf, int len);
  286. =item int B<SSL_get_shutdown>(const SSL *ssl);
  287. =item SSL_METHOD *B<SSL_get_ssl_method>(SSL *ssl);
  288. =item int B<SSL_get_state>(const SSL *ssl);
  289. =item long B<SSL_get_time>(const SSL *ssl);
  290. =item long B<SSL_get_timeout>(const SSL *ssl);
  291. =item int (*B<SSL_get_verify_callback>(const SSL *ssl))(int,X509_STORE_CTX *)
  292. =item int B<SSL_get_verify_mode>(const SSL *ssl);
  293. =item long B<SSL_get_verify_result>(const SSL *ssl);
  294. =item char *B<SSL_get_version>(const SSL *ssl);
  295. =item BIO *B<SSL_get_wbio>(const SSL *ssl);
  296. =item int B<SSL_in_accept_init>(SSL *ssl);
  297. =item int B<SSL_in_before>(SSL *ssl);
  298. =item int B<SSL_in_connect_init>(SSL *ssl);
  299. =item int B<SSL_in_init>(SSL *ssl);
  300. =item int B<SSL_is_init_finished>(SSL *ssl);
  301. =item STACK *B<SSL_load_client_CA_file>(char *file);
  302. =item void B<SSL_load_error_strings>(void);
  303. =item SSL *B<SSL_new>(SSL_CTX *ctx);
  304. =item long B<SSL_num_renegotiations>(SSL *ssl);
  305. =item int B<SSL_peek>(SSL *ssl, void *buf, int num);
  306. =item int B<SSL_pending>(const SSL *ssl);
  307. =item int B<SSL_read>(SSL *ssl, void *buf, int num);
  308. =item int B<SSL_renegotiate>(SSL *ssl);
  309. =item char *B<SSL_rstate_string>(SSL *ssl);
  310. =item char *B<SSL_rstate_string_long>(SSL *ssl);
  311. =item long B<SSL_session_reused>(SSL *ssl);
  312. =item void B<SSL_set_accept_state>(SSL *ssl);
  313. =item void B<SSL_set_app_data>(SSL *ssl, char *arg);
  314. =item void B<SSL_set_bio>(SSL *ssl, BIO *rbio, BIO *wbio);
  315. =item int B<SSL_set_cipher_list>(SSL *ssl, char *str);
  316. =item void B<SSL_set_client_CA_list>(SSL *ssl, STACK *list);
  317. =item void B<SSL_set_connect_state>(SSL *ssl);
  318. =item int B<SSL_set_ex_data>(SSL *ssl, int idx, char *arg);
  319. =item int B<SSL_set_fd>(SSL *ssl, int fd);
  320. =item void B<SSL_set_info_callback>(SSL *ssl, void (*cb);(void))
  321. =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));
  322. =item void B<SSL_set_msg_callback_arg>(SSL *ctx, void *arg);
  323. =item void B<SSL_set_options>(SSL *ssl, unsigned long op);
  324. =item void B<SSL_set_quiet_shutdown>(SSL *ssl, int mode);
  325. =item void B<SSL_set_read_ahead>(SSL *ssl, int yes);
  326. =item int B<SSL_set_rfd>(SSL *ssl, int fd);
  327. =item int B<SSL_set_session>(SSL *ssl, SSL_SESSION *session);
  328. =item void B<SSL_set_shutdown>(SSL *ssl, int mode);
  329. =item int B<SSL_set_ssl_method>(SSL *ssl, SSL_METHOD *meth);
  330. =item void B<SSL_set_time>(SSL *ssl, long t);
  331. =item void B<SSL_set_timeout>(SSL *ssl, long t);
  332. =item void B<SSL_set_verify>(SSL *ssl, int mode, int (*callback);(void))
  333. =item void B<SSL_set_verify_result>(SSL *ssl, long arg);
  334. =item int B<SSL_set_wfd>(SSL *ssl, int fd);
  335. =item int B<SSL_shutdown>(SSL *ssl);
  336. =item int B<SSL_state>(const SSL *ssl);
  337. =item char *B<SSL_state_string>(const SSL *ssl);
  338. =item char *B<SSL_state_string_long>(const SSL *ssl);
  339. =item long B<SSL_total_renegotiations>(SSL *ssl);
  340. =item int B<SSL_use_PrivateKey>(SSL *ssl, EVP_PKEY *pkey);
  341. =item int B<SSL_use_PrivateKey_ASN1>(int type, SSL *ssl, unsigned char *d, long len);
  342. =item int B<SSL_use_PrivateKey_file>(SSL *ssl, char *file, int type);
  343. =item int B<SSL_use_RSAPrivateKey>(SSL *ssl, RSA *rsa);
  344. =item int B<SSL_use_RSAPrivateKey_ASN1>(SSL *ssl, unsigned char *d, long len);
  345. =item int B<SSL_use_RSAPrivateKey_file>(SSL *ssl, char *file, int type);
  346. =item int B<SSL_use_certificate>(SSL *ssl, X509 *x);
  347. =item int B<SSL_use_certificate_ASN1>(SSL *ssl, int len, unsigned char *d);
  348. =item int B<SSL_use_certificate_file>(SSL *ssl, char *file, int type);
  349. =item int B<SSL_version>(const SSL *ssl);
  350. =item int B<SSL_want>(const SSL *ssl);
  351. =item int B<SSL_want_nothing>(const SSL *ssl);
  352. =item int B<SSL_want_read>(const SSL *ssl);
  353. =item int B<SSL_want_write>(const SSL *ssl);
  354. =item int B<SSL_want_x509_lookup>(const SSL *ssl);
  355. =item int B<SSL_write>(SSL *ssl, const void *buf, int num);
  356. =back
  357. =head1 SEE ALSO
  358. L<openssl(1)|openssl(1)>, L<crypto(3)|crypto(3)>,
  359. L<SSL_accept(3)|SSL_accept(3)>, L<SSL_clear(3)|SSL_clear(3)>,
  360. L<SSL_connect(3)|SSL_connect(3)>,
  361. L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)>,
  362. L<SSL_COMP_add_compression_method(3)|SSL_COMP_add_compression_method(3)>,
  363. L<SSL_CTX_add_extra_chain_cert(3)|SSL_CTX_add_extra_chain_cert(3)>,
  364. L<SSL_CTX_add_session(3)|SSL_CTX_add_session(3)>,
  365. L<SSL_CTX_ctrl(3)|SSL_CTX_ctrl(3)>,
  366. L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>,
  367. L<SSL_CTX_get_ex_new_index(3)|SSL_CTX_get_ex_new_index(3)>,
  368. L<SSL_CTX_get_verify_mode(3)|SSL_CTX_get_verify_mode(3)>,
  369. L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
  370. L<SSL_CTX_new(3)|SSL_CTX_new(3)>,
  371. L<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>,
  372. L<SSL_CTX_sess_set_cache_size(3)|SSL_CTX_sess_set_cache_size(3)>,
  373. L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>,
  374. L<SSL_CTX_sessions(3)|SSL_CTX_sessions(3)>,
  375. L<SSL_CTX_set_cert_store(3)|SSL_CTX_set_cert_store(3)>,
  376. L<SSL_CTX_set_cert_verify_callback(3)|SSL_CTX_set_cert_verify_callback(3)>,
  377. L<SSL_CTX_set_cipher_list(3)|SSL_CTX_set_cipher_list(3)>,
  378. L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
  379. L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>,
  380. L<SSL_CTX_set_default_passwd_cb(3)|SSL_CTX_set_default_passwd_cb(3)>,
  381. L<SSL_CTX_set_generate_session_id(3)|SSL_CTX_set_generate_session_id(3)>,
  382. L<SSL_CTX_set_info_callback(3)|SSL_CTX_set_info_callback(3)>,
  383. L<SSL_CTX_set_max_cert_list(3)|SSL_CTX_set_max_cert_list(3)>,
  384. L<SSL_CTX_set_mode(3)|SSL_CTX_set_mode(3)>,
  385. L<SSL_CTX_set_msg_callback(3)|SSL_CTX_set_msg_callback(3)>,
  386. L<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>,
  387. L<SSL_CTX_set_quiet_shutdown(3)|SSL_CTX_set_quiet_shutdown(3)>,
  388. L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
  389. L<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>,
  390. L<SSL_CTX_set_ssl_version(3)|SSL_CTX_set_ssl_version(3)>,
  391. L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
  392. L<SSL_CTX_set_tmp_rsa_callback(3)|SSL_CTX_set_tmp_rsa_callback(3)>,
  393. L<SSL_CTX_set_tmp_dh_callback(3)|SSL_CTX_set_tmp_dh_callback(3)>,
  394. L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>,
  395. L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>,
  396. L<SSL_alert_type_string(3)|SSL_alert_type_string(3)>,
  397. L<SSL_do_handshake(3)|SSL_do_handshake(3)>,
  398. L<SSL_get_SSL_CTX(3)|SSL_get_SSL_CTX(3)>,
  399. L<SSL_get_ciphers(3)|SSL_get_ciphers(3)>,
  400. L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)>,
  401. L<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>,
  402. L<SSL_get_error(3)|SSL_get_error(3)>,
  403. L<SSL_get_ex_data_X509_STORE_CTX_idx(3)|SSL_get_ex_data_X509_STORE_CTX_idx(3)>,
  404. L<SSL_get_ex_new_index(3)|SSL_get_ex_new_index(3)>,
  405. L<SSL_get_fd(3)|SSL_get_fd(3)>,
  406. L<SSL_get_peer_cert_chain(3)|SSL_get_peer_cert_chain(3)>,
  407. L<SSL_get_rbio(3)|SSL_get_rbio(3)>,
  408. L<SSL_get_session(3)|SSL_get_session(3)>,
  409. L<SSL_get_verify_result(3)|SSL_get_verify_result(3)>,
  410. L<SSL_get_version(3)|SSL_get_version(3)>,
  411. L<SSL_library_init(3)|SSL_library_init(3)>,
  412. L<SSL_load_client_CA_file(3)|SSL_load_client_CA_file(3)>,
  413. L<SSL_new(3)|SSL_new(3)>,
  414. L<SSL_pending(3)|SSL_pending(3)>,
  415. L<SSL_read(3)|SSL_read(3)>,
  416. L<SSL_rstate_string(3)|SSL_rstate_string(3)>,
  417. L<SSL_session_reused(3)|SSL_session_reused(3)>,
  418. L<SSL_set_bio(3)|SSL_set_bio(3)>,
  419. L<SSL_set_connect_state(3)|SSL_set_connect_state(3)>,
  420. L<SSL_set_fd(3)|SSL_set_fd(3)>,
  421. L<SSL_set_session(3)|SSL_set_session(3)>,
  422. L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>,
  423. L<SSL_shutdown(3)|SSL_shutdown(3)>,
  424. L<SSL_state_string(3)|SSL_state_string(3)>,
  425. L<SSL_want(3)|SSL_want(3)>,
  426. L<SSL_write(3)|SSL_write(3)>,
  427. L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>,
  428. L<SSL_SESSION_get_ex_new_index(3)|SSL_SESSION_get_ex_new_index(3)>,
  429. L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)>,
  430. L<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)>
  431. =head1 HISTORY
  432. The L<ssl(3)|ssl(3)> document appeared in OpenSSL 0.9.2
  433. =cut