diff options
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 103 |
1 files changed, 43 insertions, 60 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 631229558f..ee9a82d586 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -121,7 +121,6 @@ | |||
| 121 | #include <openssl/objects.h> | 121 | #include <openssl/objects.h> |
| 122 | #include <openssl/lhash.h> | 122 | #include <openssl/lhash.h> |
| 123 | #include <openssl/x509v3.h> | 123 | #include <openssl/x509v3.h> |
| 124 | #include <openssl/fips.h> | ||
| 125 | 124 | ||
| 126 | const char *SSL_version_str=OPENSSL_VERSION_TEXT; | 125 | const char *SSL_version_str=OPENSSL_VERSION_TEXT; |
| 127 | 126 | ||
| @@ -501,18 +500,18 @@ void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio) | |||
| 501 | s->wbio=wbio; | 500 | s->wbio=wbio; |
| 502 | } | 501 | } |
| 503 | 502 | ||
| 504 | BIO *SSL_get_rbio(const SSL *s) | 503 | BIO *SSL_get_rbio(SSL *s) |
| 505 | { return(s->rbio); } | 504 | { return(s->rbio); } |
| 506 | 505 | ||
| 507 | BIO *SSL_get_wbio(const SSL *s) | 506 | BIO *SSL_get_wbio(SSL *s) |
| 508 | { return(s->wbio); } | 507 | { return(s->wbio); } |
| 509 | 508 | ||
| 510 | int SSL_get_fd(const SSL *s) | 509 | int SSL_get_fd(SSL *s) |
| 511 | { | 510 | { |
| 512 | return(SSL_get_rfd(s)); | 511 | return(SSL_get_rfd(s)); |
| 513 | } | 512 | } |
| 514 | 513 | ||
| 515 | int SSL_get_rfd(const SSL *s) | 514 | int SSL_get_rfd(SSL *s) |
| 516 | { | 515 | { |
| 517 | int ret= -1; | 516 | int ret= -1; |
| 518 | BIO *b,*r; | 517 | BIO *b,*r; |
| @@ -524,7 +523,7 @@ int SSL_get_rfd(const SSL *s) | |||
| 524 | return(ret); | 523 | return(ret); |
| 525 | } | 524 | } |
| 526 | 525 | ||
| 527 | int SSL_get_wfd(const SSL *s) | 526 | int SSL_get_wfd(SSL *s) |
| 528 | { | 527 | { |
| 529 | int ret= -1; | 528 | int ret= -1; |
| 530 | BIO *b,*r; | 529 | BIO *b,*r; |
| @@ -606,7 +605,7 @@ err: | |||
| 606 | 605 | ||
| 607 | 606 | ||
| 608 | /* return length of latest Finished message we sent, copy to 'buf' */ | 607 | /* return length of latest Finished message we sent, copy to 'buf' */ |
| 609 | size_t SSL_get_finished(const SSL *s, void *buf, size_t count) | 608 | size_t SSL_get_finished(SSL *s, void *buf, size_t count) |
| 610 | { | 609 | { |
| 611 | size_t ret = 0; | 610 | size_t ret = 0; |
| 612 | 611 | ||
| @@ -621,7 +620,7 @@ size_t SSL_get_finished(const SSL *s, void *buf, size_t count) | |||
| 621 | } | 620 | } |
| 622 | 621 | ||
| 623 | /* return length of latest Finished message we expected, copy to 'buf' */ | 622 | /* return length of latest Finished message we expected, copy to 'buf' */ |
| 624 | size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count) | 623 | size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count) |
| 625 | { | 624 | { |
| 626 | size_t ret = 0; | 625 | size_t ret = 0; |
| 627 | 626 | ||
| @@ -636,32 +635,32 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count) | |||
| 636 | } | 635 | } |
| 637 | 636 | ||
| 638 | 637 | ||
| 639 | int SSL_get_verify_mode(const SSL *s) | 638 | int SSL_get_verify_mode(SSL *s) |
| 640 | { | 639 | { |
| 641 | return(s->verify_mode); | 640 | return(s->verify_mode); |
| 642 | } | 641 | } |
| 643 | 642 | ||
| 644 | int SSL_get_verify_depth(const SSL *s) | 643 | int SSL_get_verify_depth(SSL *s) |
| 645 | { | 644 | { |
| 646 | return(s->verify_depth); | 645 | return(s->verify_depth); |
| 647 | } | 646 | } |
| 648 | 647 | ||
| 649 | int (*SSL_get_verify_callback(const SSL *s))(int,X509_STORE_CTX *) | 648 | int (*SSL_get_verify_callback(SSL *s))(int,X509_STORE_CTX *) |
| 650 | { | 649 | { |
| 651 | return(s->verify_callback); | 650 | return(s->verify_callback); |
| 652 | } | 651 | } |
| 653 | 652 | ||
| 654 | int SSL_CTX_get_verify_mode(const SSL_CTX *ctx) | 653 | int SSL_CTX_get_verify_mode(SSL_CTX *ctx) |
| 655 | { | 654 | { |
| 656 | return(ctx->verify_mode); | 655 | return(ctx->verify_mode); |
| 657 | } | 656 | } |
| 658 | 657 | ||
| 659 | int SSL_CTX_get_verify_depth(const SSL_CTX *ctx) | 658 | int SSL_CTX_get_verify_depth(SSL_CTX *ctx) |
| 660 | { | 659 | { |
| 661 | return(ctx->verify_depth); | 660 | return(ctx->verify_depth); |
| 662 | } | 661 | } |
| 663 | 662 | ||
| 664 | int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int,X509_STORE_CTX *) | 663 | int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int,X509_STORE_CTX *) |
| 665 | { | 664 | { |
| 666 | return(ctx->default_verify_callback); | 665 | return(ctx->default_verify_callback); |
| 667 | } | 666 | } |
| @@ -684,12 +683,12 @@ void SSL_set_read_ahead(SSL *s,int yes) | |||
| 684 | s->read_ahead=yes; | 683 | s->read_ahead=yes; |
| 685 | } | 684 | } |
| 686 | 685 | ||
| 687 | int SSL_get_read_ahead(const SSL *s) | 686 | int SSL_get_read_ahead(SSL *s) |
| 688 | { | 687 | { |
| 689 | return(s->read_ahead); | 688 | return(s->read_ahead); |
| 690 | } | 689 | } |
| 691 | 690 | ||
| 692 | int SSL_pending(const SSL *s) | 691 | int SSL_pending(SSL *s) |
| 693 | { | 692 | { |
| 694 | /* SSL_pending cannot work properly if read-ahead is enabled | 693 | /* SSL_pending cannot work properly if read-ahead is enabled |
| 695 | * (SSL_[CTX_]ctrl(..., SSL_CTRL_SET_READ_AHEAD, 1, NULL)), | 694 | * (SSL_[CTX_]ctrl(..., SSL_CTRL_SET_READ_AHEAD, 1, NULL)), |
| @@ -701,7 +700,7 @@ int SSL_pending(const SSL *s) | |||
| 701 | return(s->method->ssl_pending(s)); | 700 | return(s->method->ssl_pending(s)); |
| 702 | } | 701 | } |
| 703 | 702 | ||
| 704 | X509 *SSL_get_peer_certificate(const SSL *s) | 703 | X509 *SSL_get_peer_certificate(SSL *s) |
| 705 | { | 704 | { |
| 706 | X509 *r; | 705 | X509 *r; |
| 707 | 706 | ||
| @@ -717,7 +716,7 @@ X509 *SSL_get_peer_certificate(const SSL *s) | |||
| 717 | return(r); | 716 | return(r); |
| 718 | } | 717 | } |
| 719 | 718 | ||
| 720 | STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s) | 719 | STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s) |
| 721 | { | 720 | { |
| 722 | STACK_OF(X509) *r; | 721 | STACK_OF(X509) *r; |
| 723 | 722 | ||
| @@ -734,7 +733,7 @@ STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s) | |||
| 734 | 733 | ||
| 735 | /* Now in theory, since the calling process own 't' it should be safe to | 734 | /* Now in theory, since the calling process own 't' it should be safe to |
| 736 | * modify. We need to be able to read f without being hassled */ | 735 | * modify. We need to be able to read f without being hassled */ |
| 737 | void SSL_copy_session_id(SSL *t,const SSL *f) | 736 | void SSL_copy_session_id(SSL *t,SSL *f) |
| 738 | { | 737 | { |
| 739 | CERT *tmp; | 738 | CERT *tmp; |
| 740 | 739 | ||
| @@ -763,7 +762,7 @@ void SSL_copy_session_id(SSL *t,const SSL *f) | |||
| 763 | } | 762 | } |
| 764 | 763 | ||
| 765 | /* Fix this so it checks all the valid key/cert options */ | 764 | /* Fix this so it checks all the valid key/cert options */ |
| 766 | int SSL_CTX_check_private_key(const SSL_CTX *ctx) | 765 | int SSL_CTX_check_private_key(SSL_CTX *ctx) |
| 767 | { | 766 | { |
| 768 | if ( (ctx == NULL) || | 767 | if ( (ctx == NULL) || |
| 769 | (ctx->cert == NULL) || | 768 | (ctx->cert == NULL) || |
| @@ -781,7 +780,7 @@ int SSL_CTX_check_private_key(const SSL_CTX *ctx) | |||
| 781 | } | 780 | } |
| 782 | 781 | ||
| 783 | /* Fix this function so that it takes an optional type parameter */ | 782 | /* Fix this function so that it takes an optional type parameter */ |
| 784 | int SSL_check_private_key(const SSL *ssl) | 783 | int SSL_check_private_key(SSL *ssl) |
| 785 | { | 784 | { |
| 786 | if (ssl == NULL) | 785 | if (ssl == NULL) |
| 787 | { | 786 | { |
| @@ -825,7 +824,7 @@ int SSL_connect(SSL *s) | |||
| 825 | return(s->method->ssl_connect(s)); | 824 | return(s->method->ssl_connect(s)); |
| 826 | } | 825 | } |
| 827 | 826 | ||
| 828 | long SSL_get_default_timeout(const SSL *s) | 827 | long SSL_get_default_timeout(SSL *s) |
| 829 | { | 828 | { |
| 830 | return(s->method->get_timeout()); | 829 | return(s->method->get_timeout()); |
| 831 | } | 830 | } |
| @@ -1072,7 +1071,7 @@ int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, | |||
| 1072 | 1071 | ||
| 1073 | /** return a STACK of the ciphers available for the SSL and in order of | 1072 | /** return a STACK of the ciphers available for the SSL and in order of |
| 1074 | * preference */ | 1073 | * preference */ |
| 1075 | STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s) | 1074 | STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s) |
| 1076 | { | 1075 | { |
| 1077 | if (s != NULL) | 1076 | if (s != NULL) |
| 1078 | { | 1077 | { |
| @@ -1109,7 +1108,7 @@ STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s) | |||
| 1109 | } | 1108 | } |
| 1110 | 1109 | ||
| 1111 | /** The old interface to get the same thing as SSL_get_ciphers() */ | 1110 | /** The old interface to get the same thing as SSL_get_ciphers() */ |
| 1112 | const char *SSL_get_cipher_list(const SSL *s,int n) | 1111 | const char *SSL_get_cipher_list(SSL *s,int n) |
| 1113 | { | 1112 | { |
| 1114 | SSL_CIPHER *c; | 1113 | SSL_CIPHER *c; |
| 1115 | STACK_OF(SSL_CIPHER) *sk; | 1114 | STACK_OF(SSL_CIPHER) *sk; |
| @@ -1146,7 +1145,7 @@ int SSL_set_cipher_list(SSL *s,const char *str) | |||
| 1146 | } | 1145 | } |
| 1147 | 1146 | ||
| 1148 | /* works well for SSLv2, not so good for SSLv3 */ | 1147 | /* works well for SSLv2, not so good for SSLv3 */ |
| 1149 | char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) | 1148 | char *SSL_get_shared_ciphers(SSL *s,char *buf,int len) |
| 1150 | { | 1149 | { |
| 1151 | char *p; | 1150 | char *p; |
| 1152 | const char *cp; | 1151 | const char *cp; |
| @@ -1250,7 +1249,7 @@ err: | |||
| 1250 | return(NULL); | 1249 | return(NULL); |
| 1251 | } | 1250 | } |
| 1252 | 1251 | ||
| 1253 | unsigned long SSL_SESSION_hash(const SSL_SESSION *a) | 1252 | unsigned long SSL_SESSION_hash(SSL_SESSION *a) |
| 1254 | { | 1253 | { |
| 1255 | unsigned long l; | 1254 | unsigned long l; |
| 1256 | 1255 | ||
| @@ -1267,7 +1266,7 @@ unsigned long SSL_SESSION_hash(const SSL_SESSION *a) | |||
| 1267 | * SSL_CTX_has_matching_session_id() is checked accordingly. It relies on being | 1266 | * SSL_CTX_has_matching_session_id() is checked accordingly. It relies on being |
| 1268 | * able to construct an SSL_SESSION that will collide with any existing session | 1267 | * able to construct an SSL_SESSION that will collide with any existing session |
| 1269 | * with a matching session ID. */ | 1268 | * with a matching session ID. */ |
| 1270 | int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b) | 1269 | int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b) |
| 1271 | { | 1270 | { |
| 1272 | if (a->ssl_version != b->ssl_version) | 1271 | if (a->ssl_version != b->ssl_version) |
| 1273 | return(1); | 1272 | return(1); |
| @@ -1293,14 +1292,6 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) | |||
| 1293 | return(NULL); | 1292 | return(NULL); |
| 1294 | } | 1293 | } |
| 1295 | 1294 | ||
| 1296 | #ifdef OPENSSL_FIPS | ||
| 1297 | if (FIPS_mode() && (meth->version < TLS1_VERSION)) | ||
| 1298 | { | ||
| 1299 | SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); | ||
| 1300 | return NULL; | ||
| 1301 | } | ||
| 1302 | #endif | ||
| 1303 | |||
| 1304 | if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) | 1295 | if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) |
| 1305 | { | 1296 | { |
| 1306 | SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS); | 1297 | SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS); |
| @@ -1731,7 +1722,7 @@ int SSL_set_ssl_method(SSL *s,SSL_METHOD *meth) | |||
| 1731 | return(ret); | 1722 | return(ret); |
| 1732 | } | 1723 | } |
| 1733 | 1724 | ||
| 1734 | int SSL_get_error(const SSL *s,int i) | 1725 | int SSL_get_error(SSL *s,int i) |
| 1735 | { | 1726 | { |
| 1736 | int reason; | 1727 | int reason; |
| 1737 | unsigned long l; | 1728 | unsigned long l; |
| @@ -1865,19 +1856,13 @@ int ssl_undefined_function(SSL *s) | |||
| 1865 | return(0); | 1856 | return(0); |
| 1866 | } | 1857 | } |
| 1867 | 1858 | ||
| 1868 | int ssl_undefined_const_function(const SSL *s) | ||
| 1869 | { | ||
| 1870 | SSLerr(SSL_F_SSL_UNDEFINED_CONST_FUNCTION,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | ||
| 1871 | return(0); | ||
| 1872 | } | ||
| 1873 | |||
| 1874 | SSL_METHOD *ssl_bad_method(int ver) | 1859 | SSL_METHOD *ssl_bad_method(int ver) |
| 1875 | { | 1860 | { |
| 1876 | SSLerr(SSL_F_SSL_BAD_METHOD,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | 1861 | SSLerr(SSL_F_SSL_BAD_METHOD,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |
| 1877 | return(NULL); | 1862 | return(NULL); |
| 1878 | } | 1863 | } |
| 1879 | 1864 | ||
| 1880 | const char *SSL_get_version(const SSL *s) | 1865 | const char *SSL_get_version(SSL *s) |
| 1881 | { | 1866 | { |
| 1882 | if (s->version == TLS1_VERSION) | 1867 | if (s->version == TLS1_VERSION) |
| 1883 | return("TLSv1"); | 1868 | return("TLSv1"); |
| @@ -2046,7 +2031,7 @@ void ssl_clear_cipher_ctx(SSL *s) | |||
| 2046 | } | 2031 | } |
| 2047 | 2032 | ||
| 2048 | /* Fix this function so that it takes an optional type parameter */ | 2033 | /* Fix this function so that it takes an optional type parameter */ |
| 2049 | X509 *SSL_get_certificate(const SSL *s) | 2034 | X509 *SSL_get_certificate(SSL *s) |
| 2050 | { | 2035 | { |
| 2051 | if (s->cert != NULL) | 2036 | if (s->cert != NULL) |
| 2052 | return(s->cert->key->x509); | 2037 | return(s->cert->key->x509); |
| @@ -2063,7 +2048,7 @@ EVP_PKEY *SSL_get_privatekey(SSL *s) | |||
| 2063 | return(NULL); | 2048 | return(NULL); |
| 2064 | } | 2049 | } |
| 2065 | 2050 | ||
| 2066 | SSL_CIPHER *SSL_get_current_cipher(const SSL *s) | 2051 | SSL_CIPHER *SSL_get_current_cipher(SSL *s) |
| 2067 | { | 2052 | { |
| 2068 | if ((s->session != NULL) && (s->session->cipher != NULL)) | 2053 | if ((s->session != NULL) && (s->session->cipher != NULL)) |
| 2069 | return(s->session->cipher); | 2054 | return(s->session->cipher); |
| @@ -2127,7 +2112,7 @@ void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode) | |||
| 2127 | ctx->quiet_shutdown=mode; | 2112 | ctx->quiet_shutdown=mode; |
| 2128 | } | 2113 | } |
| 2129 | 2114 | ||
| 2130 | int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx) | 2115 | int SSL_CTX_get_quiet_shutdown(SSL_CTX *ctx) |
| 2131 | { | 2116 | { |
| 2132 | return(ctx->quiet_shutdown); | 2117 | return(ctx->quiet_shutdown); |
| 2133 | } | 2118 | } |
| @@ -2137,7 +2122,7 @@ void SSL_set_quiet_shutdown(SSL *s,int mode) | |||
| 2137 | s->quiet_shutdown=mode; | 2122 | s->quiet_shutdown=mode; |
| 2138 | } | 2123 | } |
| 2139 | 2124 | ||
| 2140 | int SSL_get_quiet_shutdown(const SSL *s) | 2125 | int SSL_get_quiet_shutdown(SSL *s) |
| 2141 | { | 2126 | { |
| 2142 | return(s->quiet_shutdown); | 2127 | return(s->quiet_shutdown); |
| 2143 | } | 2128 | } |
| @@ -2147,17 +2132,17 @@ void SSL_set_shutdown(SSL *s,int mode) | |||
| 2147 | s->shutdown=mode; | 2132 | s->shutdown=mode; |
| 2148 | } | 2133 | } |
| 2149 | 2134 | ||
| 2150 | int SSL_get_shutdown(const SSL *s) | 2135 | int SSL_get_shutdown(SSL *s) |
| 2151 | { | 2136 | { |
| 2152 | return(s->shutdown); | 2137 | return(s->shutdown); |
| 2153 | } | 2138 | } |
| 2154 | 2139 | ||
| 2155 | int SSL_version(const SSL *s) | 2140 | int SSL_version(SSL *s) |
| 2156 | { | 2141 | { |
| 2157 | return(s->version); | 2142 | return(s->version); |
| 2158 | } | 2143 | } |
| 2159 | 2144 | ||
| 2160 | SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl) | 2145 | SSL_CTX *SSL_get_SSL_CTX(SSL *ssl) |
| 2161 | { | 2146 | { |
| 2162 | return(ssl->ctx); | 2147 | return(ssl->ctx); |
| 2163 | } | 2148 | } |
| @@ -2171,9 +2156,7 @@ int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx) | |||
| 2171 | int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, | 2156 | int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, |
| 2172 | const char *CApath) | 2157 | const char *CApath) |
| 2173 | { | 2158 | { |
| 2174 | int r; | 2159 | return(X509_STORE_load_locations(ctx->cert_store,CAfile,CApath)); |
| 2175 | r=X509_STORE_load_locations(ctx->cert_store,CAfile,CApath); | ||
| 2176 | return r; | ||
| 2177 | } | 2160 | } |
| 2178 | #endif | 2161 | #endif |
| 2179 | 2162 | ||
| @@ -2183,12 +2166,12 @@ void SSL_set_info_callback(SSL *ssl, | |||
| 2183 | ssl->info_callback=cb; | 2166 | ssl->info_callback=cb; |
| 2184 | } | 2167 | } |
| 2185 | 2168 | ||
| 2186 | void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val) | 2169 | void (*SSL_get_info_callback(SSL *ssl))(const SSL *ssl,int type,int val) |
| 2187 | { | 2170 | { |
| 2188 | return ssl->info_callback; | 2171 | return ssl->info_callback; |
| 2189 | } | 2172 | } |
| 2190 | 2173 | ||
| 2191 | int SSL_state(const SSL *ssl) | 2174 | int SSL_state(SSL *ssl) |
| 2192 | { | 2175 | { |
| 2193 | return(ssl->state); | 2176 | return(ssl->state); |
| 2194 | } | 2177 | } |
| @@ -2198,7 +2181,7 @@ void SSL_set_verify_result(SSL *ssl,long arg) | |||
| 2198 | ssl->verify_result=arg; | 2181 | ssl->verify_result=arg; |
| 2199 | } | 2182 | } |
| 2200 | 2183 | ||
| 2201 | long SSL_get_verify_result(const SSL *ssl) | 2184 | long SSL_get_verify_result(SSL *ssl) |
| 2202 | { | 2185 | { |
| 2203 | return(ssl->verify_result); | 2186 | return(ssl->verify_result); |
| 2204 | } | 2187 | } |
| @@ -2215,7 +2198,7 @@ int SSL_set_ex_data(SSL *s,int idx,void *arg) | |||
| 2215 | return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); | 2198 | return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); |
| 2216 | } | 2199 | } |
| 2217 | 2200 | ||
| 2218 | void *SSL_get_ex_data(const SSL *s,int idx) | 2201 | void *SSL_get_ex_data(SSL *s,int idx) |
| 2219 | { | 2202 | { |
| 2220 | return(CRYPTO_get_ex_data(&s->ex_data,idx)); | 2203 | return(CRYPTO_get_ex_data(&s->ex_data,idx)); |
| 2221 | } | 2204 | } |
| @@ -2232,7 +2215,7 @@ int SSL_CTX_set_ex_data(SSL_CTX *s,int idx,void *arg) | |||
| 2232 | return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); | 2215 | return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); |
| 2233 | } | 2216 | } |
| 2234 | 2217 | ||
| 2235 | void *SSL_CTX_get_ex_data(const SSL_CTX *s,int idx) | 2218 | void *SSL_CTX_get_ex_data(SSL_CTX *s,int idx) |
| 2236 | { | 2219 | { |
| 2237 | return(CRYPTO_get_ex_data(&s->ex_data,idx)); | 2220 | return(CRYPTO_get_ex_data(&s->ex_data,idx)); |
| 2238 | } | 2221 | } |
| @@ -2242,7 +2225,7 @@ int ssl_ok(SSL *s) | |||
| 2242 | return(1); | 2225 | return(1); |
| 2243 | } | 2226 | } |
| 2244 | 2227 | ||
| 2245 | X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx) | 2228 | X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *ctx) |
| 2246 | { | 2229 | { |
| 2247 | return(ctx->cert_store); | 2230 | return(ctx->cert_store); |
| 2248 | } | 2231 | } |
| @@ -2254,7 +2237,7 @@ void SSL_CTX_set_cert_store(SSL_CTX *ctx,X509_STORE *store) | |||
| 2254 | ctx->cert_store=store; | 2237 | ctx->cert_store=store; |
| 2255 | } | 2238 | } |
| 2256 | 2239 | ||
| 2257 | int SSL_want(const SSL *s) | 2240 | int SSL_want(SSL *s) |
| 2258 | { | 2241 | { |
| 2259 | return(s->rwstate); | 2242 | return(s->rwstate); |
| 2260 | } | 2243 | } |
