| OLD | NEW |
| 1 /* ssl/ssl.h */ | 1 /* ssl/ssl.h */ |
| 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
| 6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
| 7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
| 8 * | 8 * |
| 9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
| 10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsign
ed char *Data, int len, int *copy); | 872 SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsign
ed char *Data, int len, int *copy); |
| 873 void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,int type,
int val)); | 873 void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,int type,
int val)); |
| 874 void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val)
; | 874 void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val)
; |
| 875 void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X5
09 **x509, EVP_PKEY **pkey)); | 875 void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X5
09 **x509, EVP_PKEY **pkey)); |
| 876 int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY
**pkey); | 876 int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY
**pkey); |
| 877 #ifndef OPENSSL_NO_ENGINE | 877 #ifndef OPENSSL_NO_ENGINE |
| 878 int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); | 878 int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); |
| 879 #endif | 879 #endif |
| 880 void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb)(SSL *
ssl, unsigned char *cookie, unsigned int *cookie_len)); | 880 void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb)(SSL *
ssl, unsigned char *cookie, unsigned int *cookie_len)); |
| 881 void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL
*ssl, unsigned char *cookie, unsigned int cookie_len)); | 881 void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL
*ssl, unsigned char *cookie, unsigned int cookie_len)); |
| 882 #ifndef OPENSSL_NO_TLSEXT |
| 882 void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s, int (*cb) (SSL *ssl, cons
t unsigned char **out, unsigned int *outlen, void *arg), void *arg); | 883 void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s, int (*cb) (SSL *ssl, cons
t unsigned char **out, unsigned int *outlen, void *arg), void *arg); |
| 883 void SSL_CTX_set_next_proto_select_cb(SSL_CTX *s, int (*cb) (SSL *ssl, unsigned
char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen,
void *arg), void *arg); | 884 void SSL_CTX_set_next_proto_select_cb(SSL_CTX *s, int (*cb) (SSL *ssl, unsigned
char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen,
void *arg), void *arg); |
| 885 void SSL_set_next_proto_select_cb(SSL *s, int (*cb) (SSL *ssl, unsigned char **o
ut, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *ar
g), void *arg); |
| 884 void SSL_CTX_set_snap_start_orbit(SSL_CTX *s, const unsigned char orbit[8]); | 886 void SSL_CTX_set_snap_start_orbit(SSL_CTX *s, const unsigned char orbit[8]); |
| 885 | 887 |
| 886 int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, const unsi
gned char *in, unsigned int inlen, const unsigned char *client, unsigned int cli
ent_len); | 888 int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, const unsi
gned char *in, unsigned int inlen, const unsigned char *client, unsigned int cli
ent_len); |
| 887 void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, un
signed *len); | 889 void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, un
signed *len); |
| 888 | 890 |
| 889 void SSL_get0_suggested_server_random(const SSL *s, const unsigned char **data,
unsigned *len); | 891 void SSL_get0_suggested_server_random(const SSL *s, const unsigned char **data,
unsigned *len); |
| 890 void SSL_set_suggested_server_random_validity(SSL *s, char is_valid); | 892 void SSL_set_suggested_server_random_validity(SSL *s, char is_valid); |
| 891 | 893 |
| 892 #define OPENSSL_NPN_UNSUPPORTED 0 | 894 #define OPENSSL_NPN_UNSUPPORTED 0 |
| 893 #define OPENSSL_NPN_NEGOTIATED 1 | 895 #define OPENSSL_NPN_NEGOTIATED 1 |
| 894 #define OPENSSL_NPN_NO_OVERLAP 2 | 896 #define OPENSSL_NPN_NO_OVERLAP 2 |
| 897 #endif |
| 895 | 898 |
| 896 #define SSL_NOTHING 1 | 899 #define SSL_NOTHING 1 |
| 897 #define SSL_WRITING 2 | 900 #define SSL_WRITING 2 |
| 898 #define SSL_READING 3 | 901 #define SSL_READING 3 |
| 899 #define SSL_X509_LOOKUP 4 | 902 #define SSL_X509_LOOKUP 4 |
| 900 #define SSL_SERVER_RANDOM_VALIDATE 6 | 903 #define SSL_SERVER_RANDOM_VALIDATE 6 |
| 901 | 904 |
| 902 /* These will only be used when doing non-blocking IO */ | 905 /* These will only be used when doing non-blocking IO */ |
| 903 #define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) | 906 #define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) |
| 904 #define SSL_want_read(s) (SSL_want(s) == SSL_READING) | 907 #define SSL_want_read(s) (SSL_want(s) == SSL_READING) |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 | 1097 |
| 1095 /* Next protocol negotiation. For the client, this is the protocol that | 1098 /* Next protocol negotiation. For the client, this is the protocol that |
| 1096 * we sent in NextProtocol and is set when handling ServerHello | 1099 * we sent in NextProtocol and is set when handling ServerHello |
| 1097 * extensions. | 1100 * extensions. |
| 1098 * | 1101 * |
| 1099 * For a server, this is the client's selected_protocol from | 1102 * For a server, this is the client's selected_protocol from |
| 1100 * NextProtocol and is set when handling the NextProtocol message, | 1103 * NextProtocol and is set when handling the NextProtocol message, |
| 1101 * before the Finished message. */ | 1104 * before the Finished message. */ |
| 1102 unsigned char *next_proto_negotiated; | 1105 unsigned char *next_proto_negotiated; |
| 1103 unsigned char next_proto_negotiated_len; | 1106 unsigned char next_proto_negotiated_len; |
| 1107 /* For a client, this contains a callback function that selects the |
| 1108 * next protocol from the list provided by the server. */ |
| 1109 int (*next_proto_select_cb)(SSL *s, unsigned char **out, |
| 1110 unsigned char *outlen, |
| 1111 const unsigned char *in, |
| 1112 unsigned int inlen, |
| 1113 void *arg); |
| 1114 void *next_proto_select_cb_arg; |
| 1104 #define session_ctx initial_ctx | 1115 #define session_ctx initial_ctx |
| 1105 #else | 1116 #else |
| 1106 #define session_ctx ctx | 1117 #define session_ctx ctx |
| 1107 #endif | 1118 #endif |
| 1108 }; | 1119 }; |
| 1109 | 1120 |
| 1110 #ifdef __cplusplus | 1121 #ifdef __cplusplus |
| 1111 } | 1122 } |
| 1112 #endif | 1123 #endif |
| 1113 | 1124 |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2173 #define SSL_R_WRONG_SSL_VERSION 266 | 2184 #define SSL_R_WRONG_SSL_VERSION 266 |
| 2174 #define SSL_R_WRONG_VERSION_NUMBER 267 | 2185 #define SSL_R_WRONG_VERSION_NUMBER 267 |
| 2175 #define SSL_R_X509_LIB 268 | 2186 #define SSL_R_X509_LIB 268 |
| 2176 #define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 | 2187 #define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 |
| 2177 /* Next entry: 335 or 1115 */ | 2188 /* Next entry: 335 or 1115 */ |
| 2178 | 2189 |
| 2179 #ifdef __cplusplus | 2190 #ifdef __cplusplus |
| 2180 } | 2191 } |
| 2181 #endif | 2192 #endif |
| 2182 #endif | 2193 #endif |
| OLD | NEW |