diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_locl.h | 299 |
1 files changed, 120 insertions, 179 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index b29517081b..0bfd57db32 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
| @@ -63,17 +63,19 @@ | |||
| 63 | #include <string.h> | 63 | #include <string.h> |
| 64 | #include <errno.h> | 64 | #include <errno.h> |
| 65 | 65 | ||
| 66 | #include "e_os.h" | 66 | #include "openssl/e_os.h" |
| 67 | 67 | ||
| 68 | #include "buffer.h" | 68 | #include <openssl/buffer.h> |
| 69 | #include "bio.h" | 69 | #include <openssl/comp.h> |
| 70 | #include "crypto.h" | 70 | #include <openssl/bio.h> |
| 71 | #include "evp.h" | 71 | #include <openssl/crypto.h> |
| 72 | #include "stack.h" | 72 | #include <openssl/evp.h> |
| 73 | #include "x509.h" | 73 | #include <openssl/stack.h> |
| 74 | #include "err.h" | 74 | #include <openssl/x509.h> |
| 75 | #include "ssl.h" | 75 | #include <openssl/err.h> |
| 76 | #include <openssl/ssl.h> | ||
| 76 | 77 | ||
| 78 | #define PKCS1_CHECK | ||
| 77 | 79 | ||
| 78 | #define c2l(c,l) (l = ((unsigned long)(*((c)++))) , \ | 80 | #define c2l(c,l) (l = ((unsigned long)(*((c)++))) , \ |
| 79 | l|=(((unsigned long)(*((c)++)))<< 8), \ | 81 | l|=(((unsigned long)(*((c)++)))<< 8), \ |
| @@ -126,18 +128,18 @@ | |||
| 126 | } \ | 128 | } \ |
| 127 | } | 129 | } |
| 128 | 130 | ||
| 129 | #define n2s(c,s) (s =((unsigned int)(*((c)++)))<< 8, \ | 131 | #define n2s(c,s) ((s=(((unsigned int)(c[0]))<< 8)| \ |
| 130 | s|=((unsigned int)(*((c)++)))) | 132 | (((unsigned int)(c[1])) )),c+=2) |
| 131 | #define s2n(s,c) (*((c)++)=(unsigned char)(((s)>> 8)&0xff), \ | 133 | #define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \ |
| 132 | *((c)++)=(unsigned char)(((s) )&0xff)) | 134 | c[1]=(unsigned char)(((s) )&0xff)),c+=2) |
| 133 | 135 | ||
| 134 | #define n2l3(c,l) (l =((unsigned long)(*((c)++)))<<16, \ | 136 | #define n2l3(c,l) ((l =(((unsigned long)(c[0]))<<16)| \ |
| 135 | l|=((unsigned long)(*((c)++)))<< 8, \ | 137 | (((unsigned long)(c[1]))<< 8)| \ |
| 136 | l|=((unsigned long)(*((c)++)))) | 138 | (((unsigned long)(c[2])) )),c+=3) |
| 137 | 139 | ||
| 138 | #define l2n3(l,c) (*((c)++)=(unsigned char)(((l)>>16)&0xff), \ | 140 | #define l2n3(l,c) ((c[0]=(unsigned char)(((l)>>16)&0xff), \ |
| 139 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ | 141 | c[1]=(unsigned char)(((l)>> 8)&0xff), \ |
| 140 | *((c)++)=(unsigned char)(((l) )&0xff)) | 142 | c[2]=(unsigned char)(((l) )&0xff)),c+=3) |
| 141 | 143 | ||
| 142 | /* LOCAL STUFF */ | 144 | /* LOCAL STUFF */ |
| 143 | 145 | ||
| @@ -190,13 +192,25 @@ | |||
| 190 | #define SSL_SHA (SSL_SHA1) | 192 | #define SSL_SHA (SSL_SHA1) |
| 191 | 193 | ||
| 192 | #define SSL_EXP_MASK 0x00300000L | 194 | #define SSL_EXP_MASK 0x00300000L |
| 193 | #define SSL_EXP 0x00100000L | 195 | #define SSL_EXP40 0x00100000L |
| 194 | #define SSL_NOT_EXP 0x00200000L | 196 | #define SSL_NOT_EXP 0x00200000L |
| 195 | #define SSL_EXPORT SSL_EXP | 197 | #define SSL_EXP56 0x00300000L |
| 198 | #define SSL_IS_EXPORT(a) ((a)&SSL_EXP40) | ||
| 199 | #define SSL_IS_EXPORT56(a) (((a)&SSL_EXP_MASK) == SSL_EXP56) | ||
| 200 | #define SSL_IS_EXPORT40(a) (((a)&SSL_EXP_MASK) == SSL_EXP40) | ||
| 201 | #define SSL_C_IS_EXPORT(c) SSL_IS_EXPORT((c)->algorithms) | ||
| 202 | #define SSL_C_IS_EXPORT56(c) SSL_IS_EXPORT56((c)->algorithms) | ||
| 203 | #define SSL_C_IS_EXPORT40(c) SSL_IS_EXPORT40((c)->algorithms) | ||
| 204 | #define SSL_EXPORT_KEYLENGTH(a) (SSL_IS_EXPORT40(a) ? 5 : \ | ||
| 205 | ((a)&SSL_ENC_MASK) == SSL_DES ? 8 : 7) | ||
| 206 | #define SSL_EXPORT_PKEYLENGTH(a) (SSL_IS_EXPORT40(a) ? 512 : 1024) | ||
| 207 | #define SSL_C_EXPORT_KEYLENGTH(c) SSL_EXPORT_KEYLENGTH((c)->algorithms) | ||
| 208 | #define SSL_C_EXPORT_PKEYLENGTH(c) SSL_EXPORT_PKEYLENGTH((c)->algorithms) | ||
| 196 | 209 | ||
| 197 | #define SSL_SSL_MASK 0x00c00000L | 210 | #define SSL_SSL_MASK 0x00c00000L |
| 198 | #define SSL_SSLV2 0x00400000L | 211 | #define SSL_SSLV2 0x00400000L |
| 199 | #define SSL_SSLV3 0x00800000L | 212 | #define SSL_SSLV3 0x00800000L |
| 213 | #define SSL_TLSV1 SSL_SSLV3 /* for now */ | ||
| 200 | 214 | ||
| 201 | #define SSL_STRONG_MASK 0x07000000L | 215 | #define SSL_STRONG_MASK 0x07000000L |
| 202 | #define SSL_LOW 0x01000000L | 216 | #define SSL_LOW 0x01000000L |
| @@ -233,44 +247,59 @@ | |||
| 233 | typedef struct cert_pkey_st | 247 | typedef struct cert_pkey_st |
| 234 | { | 248 | { |
| 235 | X509 *x509; | 249 | X509 *x509; |
| 236 | /* EVP_PKEY *publickey; *//* when extracted */ | ||
| 237 | EVP_PKEY *privatekey; | 250 | EVP_PKEY *privatekey; |
| 238 | } CERT_PKEY; | 251 | } CERT_PKEY; |
| 239 | 252 | ||
| 240 | typedef struct cert_st | 253 | typedef struct cert_st |
| 241 | { | 254 | { |
| 242 | int cert_type; | ||
| 243 | |||
| 244 | #ifdef undef | ||
| 245 | X509 *x509; | ||
| 246 | EVP_PKEY *publickey; /* when extracted */ | ||
| 247 | EVP_PKEY *privatekey; | ||
| 248 | |||
| 249 | pkeys[SSL_PKEY_RSA_ENC].x509 | ||
| 250 | /* pkeys[SSL_PKEY_RSA_ENC].publickey */ | ||
| 251 | pkeys[SSL_PKEY_RSA_ENC].privatekey | ||
| 252 | #endif | ||
| 253 | |||
| 254 | /* Current active set */ | 255 | /* Current active set */ |
| 255 | CERT_PKEY *key; | 256 | CERT_PKEY *key; /* ALWAYS points to an element of the pkeys array |
| 257 | * Probably it would make more sense to store | ||
| 258 | * an index, not a pointer. */ | ||
| 256 | 259 | ||
| 257 | /* The following masks are for the key and auth | 260 | /* The following masks are for the key and auth |
| 258 | * algorithms that are supported by the certs below */ | 261 | * algorithms that are supported by the certs below */ |
| 259 | int valid; | 262 | int valid; |
| 260 | unsigned long mask; | 263 | unsigned long mask; |
| 261 | unsigned long export_mask; | 264 | unsigned long export_mask; |
| 262 | 265 | #ifndef NO_RSA | |
| 263 | RSA *rsa_tmp; | 266 | RSA *rsa_tmp; |
| 267 | RSA *(*rsa_tmp_cb)(SSL *ssl,int is_export,int keysize); | ||
| 268 | #endif | ||
| 269 | #ifndef NO_DH | ||
| 264 | DH *dh_tmp; | 270 | DH *dh_tmp; |
| 265 | RSA *(*rsa_tmp_cb)(); | 271 | DH *(*dh_tmp_cb)(SSL *ssl,int is_export,int keysize); |
| 266 | DH *(*dh_tmp_cb)(); | 272 | #endif |
| 267 | CERT_PKEY pkeys[SSL_PKEY_NUM]; | ||
| 268 | 273 | ||
| 269 | STACK *cert_chain; | 274 | CERT_PKEY pkeys[SSL_PKEY_NUM]; |
| 270 | 275 | ||
| 271 | int references; | 276 | int references; /* >1 only if SSL_copy_session_id is used */ |
| 272 | } CERT; | 277 | } CERT; |
| 273 | 278 | ||
| 279 | |||
| 280 | typedef struct sess_cert_st | ||
| 281 | { | ||
| 282 | STACK_OF(X509) *cert_chain; /* as received from peer (not for SSL2) */ | ||
| 283 | |||
| 284 | /* The 'peer_...' members are used only by clients. */ | ||
| 285 | int peer_cert_type; | ||
| 286 | |||
| 287 | CERT_PKEY *peer_key; /* points to an element of peer_pkeys (never NULL!) */ | ||
| 288 | CERT_PKEY peer_pkeys[SSL_PKEY_NUM]; | ||
| 289 | /* Obviously we don't have the private keys of these, | ||
| 290 | * so maybe we shouldn't even use the CERT_PKEY type here. */ | ||
| 291 | |||
| 292 | #ifndef NO_RSA | ||
| 293 | RSA *peer_rsa_tmp; /* not used for SSL 2 */ | ||
| 294 | #endif | ||
| 295 | #ifndef NO_DH | ||
| 296 | DH *peer_dh_tmp; /* not used for SSL 2 */ | ||
| 297 | #endif | ||
| 298 | |||
| 299 | int references; /* actually always 1 at the moment */ | ||
| 300 | } SESS_CERT; | ||
| 301 | |||
| 302 | |||
| 274 | /*#define MAC_DEBUG */ | 303 | /*#define MAC_DEBUG */ |
| 275 | 304 | ||
| 276 | /*#define ERR_DEBUG */ | 305 | /*#define ERR_DEBUG */ |
| @@ -282,12 +311,7 @@ typedef struct cert_st | |||
| 282 | /*#define RSA_DEBUG */ | 311 | /*#define RSA_DEBUG */ |
| 283 | /*#define IDEA_DEBUG */ | 312 | /*#define IDEA_DEBUG */ |
| 284 | 313 | ||
| 285 | #ifndef NOPROTO | ||
| 286 | #define FP_ICC (int (*)(const void *,const void *)) | 314 | #define FP_ICC (int (*)(const void *,const void *)) |
| 287 | #else | ||
| 288 | #define FP_ICC | ||
| 289 | #endif | ||
| 290 | |||
| 291 | #define ssl_put_cipher_by_char(ssl,ciph,ptr) \ | 315 | #define ssl_put_cipher_by_char(ssl,ciph,ptr) \ |
| 292 | ((ssl)->method->put_cipher_by_char((ciph),(ptr))) | 316 | ((ssl)->method->put_cipher_by_char((ciph),(ptr))) |
| 293 | #define ssl_get_cipher_by_char(ssl,ptr) \ | 317 | #define ssl_get_cipher_by_char(ssl,ptr) \ |
| @@ -313,11 +337,23 @@ typedef struct ssl3_enc_method | |||
| 313 | int (*alert_value)(); | 337 | int (*alert_value)(); |
| 314 | } SSL3_ENC_METHOD; | 338 | } SSL3_ENC_METHOD; |
| 315 | 339 | ||
| 316 | extern SSL3_ENC_METHOD ssl3_undef_enc_method; | 340 | /* Used for holding the relevant compression methods loaded into SSL_CTX */ |
| 317 | extern SSL_CIPHER ssl2_ciphers[]; | 341 | typedef struct ssl3_comp_st |
| 318 | extern SSL_CIPHER ssl3_ciphers[]; | 342 | { |
| 343 | int comp_id; /* The identifer byte for this compression type */ | ||
| 344 | char *name; /* Text name used for the compression type */ | ||
| 345 | COMP_METHOD *method; /* The method :-) */ | ||
| 346 | } SSL3_COMP; | ||
| 347 | |||
| 348 | OPENSSL_EXTERN SSL3_ENC_METHOD ssl3_undef_enc_method; | ||
| 349 | OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[]; | ||
| 350 | OPENSSL_EXTERN SSL_CIPHER ssl3_ciphers[]; | ||
| 351 | |||
| 352 | #ifdef VMS | ||
| 353 | #undef SSL_COMP_get_compression_methods | ||
| 354 | #define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods | ||
| 355 | #endif | ||
| 319 | 356 | ||
| 320 | #ifndef NOPROTO | ||
| 321 | 357 | ||
| 322 | SSL_METHOD *ssl_bad_method(int ver); | 358 | SSL_METHOD *ssl_bad_method(int ver); |
| 323 | SSL_METHOD *sslv2_base_method(void); | 359 | SSL_METHOD *sslv2_base_method(void); |
| @@ -327,33 +363,41 @@ SSL_METHOD *sslv3_base_method(void); | |||
| 327 | void ssl_clear_cipher_ctx(SSL *s); | 363 | void ssl_clear_cipher_ctx(SSL *s); |
| 328 | int ssl_clear_bad_session(SSL *s); | 364 | int ssl_clear_bad_session(SSL *s); |
| 329 | CERT *ssl_cert_new(void); | 365 | CERT *ssl_cert_new(void); |
| 366 | CERT *ssl_cert_dup(CERT *cert); | ||
| 367 | int ssl_cert_inst(CERT **o); | ||
| 330 | void ssl_cert_free(CERT *c); | 368 | void ssl_cert_free(CERT *c); |
| 331 | int ssl_set_cert_type(CERT *c, int type); | 369 | SESS_CERT *ssl_sess_cert_new(void); |
| 370 | void ssl_sess_cert_free(SESS_CERT *sc); | ||
| 371 | int ssl_set_peer_cert_type(SESS_CERT *c, int type); | ||
| 332 | int ssl_get_new_session(SSL *s, int session); | 372 | int ssl_get_new_session(SSL *s, int session); |
| 333 | int ssl_get_prev_session(SSL *s, unsigned char *session,int len); | 373 | int ssl_get_prev_session(SSL *s, unsigned char *session,int len); |
| 334 | int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b); | 374 | int ssl_cipher_id_cmp(SSL_CIPHER *a,SSL_CIPHER *b); |
| 335 | int ssl_cipher_ptr_id_cmp(SSL_CIPHER **ap,SSL_CIPHER **bp); | 375 | int ssl_cipher_ptr_id_cmp(SSL_CIPHER **ap,SSL_CIPHER **bp); |
| 336 | STACK *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,STACK **skp); | 376 | STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, |
| 337 | int ssl_cipher_list_to_bytes(SSL *s,STACK *sk,unsigned char *p); | 377 | STACK_OF(SSL_CIPHER) **skp); |
| 338 | STACK *ssl_create_cipher_list(SSL_METHOD *meth,STACK **pref, | 378 | int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p); |
| 339 | STACK **sorted,char *str); | 379 | STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(SSL_METHOD *meth, |
| 380 | STACK_OF(SSL_CIPHER) **pref, | ||
| 381 | STACK_OF(SSL_CIPHER) **sorted, | ||
| 382 | char *str); | ||
| 340 | void ssl_update_cache(SSL *s, int mode); | 383 | void ssl_update_cache(SSL *s, int mode); |
| 341 | int ssl_cipher_get_evp(SSL_CIPHER *c, EVP_CIPHER **enc, EVP_MD **md); | 384 | int ssl_cipher_get_evp(SSL_SESSION *s,const EVP_CIPHER **enc,const EVP_MD **md, |
| 342 | int ssl_verify_cert_chain(SSL *s,STACK *sk); | 385 | SSL_COMP **comp); |
| 386 | int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk); | ||
| 343 | int ssl_undefined_function(SSL *s); | 387 | int ssl_undefined_function(SSL *s); |
| 344 | X509 *ssl_get_server_send_cert(SSL *); | 388 | X509 *ssl_get_server_send_cert(SSL *); |
| 345 | EVP_PKEY *ssl_get_sign_pkey(SSL *,SSL_CIPHER *); | 389 | EVP_PKEY *ssl_get_sign_pkey(SSL *,SSL_CIPHER *); |
| 346 | int ssl_cert_type(X509 *x,EVP_PKEY *pkey); | 390 | int ssl_cert_type(X509 *x,EVP_PKEY *pkey); |
| 347 | void ssl_set_cert_masks(CERT *c); | 391 | void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher); |
| 348 | STACK *ssl_get_ciphers_by_id(SSL *s); | 392 | STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s); |
| 349 | int ssl_verify_alarm_type(long type); | 393 | int ssl_verify_alarm_type(long type); |
| 350 | 394 | ||
| 351 | int ssl2_enc_init(SSL *s, int client); | 395 | int ssl2_enc_init(SSL *s, int client); |
| 352 | void ssl2_generate_key_material(SSL *s); | 396 | void ssl2_generate_key_material(SSL *s); |
| 353 | void ssl2_enc(SSL *s,int send_data); | 397 | void ssl2_enc(SSL *s,int send_data); |
| 354 | void ssl2_mac(SSL *s,unsigned char *mac,int send_data); | 398 | void ssl2_mac(SSL *s,unsigned char *mac,int send_data); |
| 355 | SSL_CIPHER *ssl2_get_cipher_by_char(unsigned char *p); | 399 | SSL_CIPHER *ssl2_get_cipher_by_char(const unsigned char *p); |
| 356 | int ssl2_put_cipher_by_char(SSL_CIPHER *c,unsigned char *p); | 400 | int ssl2_put_cipher_by_char(const SSL_CIPHER *c,unsigned char *p); |
| 357 | int ssl2_part_read(SSL *s, unsigned long f, int i); | 401 | int ssl2_part_read(SSL *s, unsigned long f, int i); |
| 358 | int ssl2_do_write(SSL *s); | 402 | int ssl2_do_write(SSL *s); |
| 359 | int ssl2_set_certificate(SSL *s, int type, int len, unsigned char *data); | 403 | int ssl2_set_certificate(SSL *s, int type, int len, unsigned char *data); |
| @@ -365,17 +409,17 @@ int ssl2_new(SSL *s); | |||
| 365 | void ssl2_free(SSL *s); | 409 | void ssl2_free(SSL *s); |
| 366 | int ssl2_accept(SSL *s); | 410 | int ssl2_accept(SSL *s); |
| 367 | int ssl2_connect(SSL *s); | 411 | int ssl2_connect(SSL *s); |
| 368 | int ssl2_read(SSL *s, char *buf, int len); | 412 | int ssl2_read(SSL *s, void *buf, int len); |
| 369 | int ssl2_peek(SSL *s, char *buf, int len); | 413 | int ssl2_peek(SSL *s, char *buf, int len); |
| 370 | int ssl2_write(SSL *s, char *buf, int len); | 414 | int ssl2_write(SSL *s, const void *buf, int len); |
| 371 | int ssl2_shutdown(SSL *s); | 415 | int ssl2_shutdown(SSL *s); |
| 372 | void ssl2_clear(SSL *s); | 416 | void ssl2_clear(SSL *s); |
| 373 | long ssl2_ctrl(SSL *s,int cmd, long larg, char *parg); | 417 | long ssl2_ctrl(SSL *s,int cmd, long larg, char *parg); |
| 374 | long ssl2_ctx_ctrl(SSL_CTX *s,int cmd, long larg, char *parg); | 418 | long ssl2_ctx_ctrl(SSL_CTX *s,int cmd, long larg, char *parg); |
| 375 | int ssl2_pending(SSL *s); | 419 | int ssl2_pending(SSL *s); |
| 376 | 420 | ||
| 377 | SSL_CIPHER *ssl3_get_cipher_by_char(unsigned char *p); | 421 | SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p); |
| 378 | int ssl3_put_cipher_by_char(SSL_CIPHER *c,unsigned char *p); | 422 | int ssl3_put_cipher_by_char(const SSL_CIPHER *c,unsigned char *p); |
| 379 | void ssl3_init_finished_mac(SSL *s); | 423 | void ssl3_init_finished_mac(SSL *s); |
| 380 | int ssl3_send_server_certificate(SSL *s); | 424 | int ssl3_send_server_certificate(SSL *s); |
| 381 | int ssl3_get_finished(SSL *s,int state_a,int state_b); | 425 | int ssl3_get_finished(SSL *s,int state_a,int state_b); |
| @@ -395,25 +439,26 @@ SSL_CIPHER *ssl3_get_cipher(unsigned int u); | |||
| 395 | int ssl3_renegotiate(SSL *ssl); | 439 | int ssl3_renegotiate(SSL *ssl); |
| 396 | int ssl3_renegotiate_check(SSL *ssl); | 440 | int ssl3_renegotiate_check(SSL *ssl); |
| 397 | int ssl3_dispatch_alert(SSL *s); | 441 | int ssl3_dispatch_alert(SSL *s); |
| 398 | int ssl3_read_bytes(SSL *s, int type, char *buf, int len); | 442 | int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len); |
| 399 | int ssl3_part_read(SSL *s, int i); | 443 | int ssl3_part_read(SSL *s, int i); |
| 400 | int ssl3_write_bytes(SSL *s, int type, char *buf, int len); | 444 | int ssl3_write_bytes(SSL *s, int type, const void *buf, int len); |
| 401 | int ssl3_final_finish_mac(SSL *s, EVP_MD_CTX *ctx1,EVP_MD_CTX *ctx2, | 445 | int ssl3_final_finish_mac(SSL *s, EVP_MD_CTX *ctx1,EVP_MD_CTX *ctx2, |
| 402 | unsigned char *sender, int slen,unsigned char *p); | 446 | unsigned char *sender, int slen,unsigned char *p); |
| 403 | int ssl3_cert_verify_mac(SSL *s, EVP_MD_CTX *in, unsigned char *p); | 447 | int ssl3_cert_verify_mac(SSL *s, EVP_MD_CTX *in, unsigned char *p); |
| 404 | void ssl3_finish_mac(SSL *s, unsigned char *buf, int len); | 448 | void ssl3_finish_mac(SSL *s, const unsigned char *buf, int len); |
| 405 | int ssl3_enc(SSL *s, int send_data); | 449 | int ssl3_enc(SSL *s, int send_data); |
| 406 | int ssl3_mac(SSL *ssl, unsigned char *md, int send_data); | 450 | int ssl3_mac(SSL *ssl, unsigned char *md, int send_data); |
| 407 | unsigned long ssl3_output_cert_chain(SSL *s, X509 *x); | 451 | unsigned long ssl3_output_cert_chain(SSL *s, X509 *x); |
| 408 | SSL_CIPHER *ssl3_choose_cipher(SSL *ssl,STACK *have,STACK *pref); | 452 | SSL_CIPHER *ssl3_choose_cipher(SSL *ssl,STACK_OF(SSL_CIPHER) *have, |
| 453 | STACK_OF(SSL_CIPHER) *pref); | ||
| 409 | int ssl3_setup_buffers(SSL *s); | 454 | int ssl3_setup_buffers(SSL *s); |
| 410 | int ssl3_new(SSL *s); | 455 | int ssl3_new(SSL *s); |
| 411 | void ssl3_free(SSL *s); | 456 | void ssl3_free(SSL *s); |
| 412 | int ssl3_accept(SSL *s); | 457 | int ssl3_accept(SSL *s); |
| 413 | int ssl3_connect(SSL *s); | 458 | int ssl3_connect(SSL *s); |
| 414 | int ssl3_read(SSL *s, char *buf, int len); | 459 | int ssl3_read(SSL *s, void *buf, int len); |
| 415 | int ssl3_peek(SSL *s,char *buf, int len); | 460 | int ssl3_peek(SSL *s,char *buf, int len); |
| 416 | int ssl3_write(SSL *s, char *buf, int len); | 461 | int ssl3_write(SSL *s, const void *buf, int len); |
| 417 | int ssl3_shutdown(SSL *s); | 462 | int ssl3_shutdown(SSL *s); |
| 418 | void ssl3_clear(SSL *s); | 463 | void ssl3_clear(SSL *s); |
| 419 | long ssl3_ctrl(SSL *s,int cmd, long larg, char *parg); | 464 | long ssl3_ctrl(SSL *s,int cmd, long larg, char *parg); |
| @@ -431,8 +476,8 @@ void tls1_clear(SSL *s); | |||
| 431 | long tls1_ctrl(SSL *s,int cmd, long larg, char *parg); | 476 | long tls1_ctrl(SSL *s,int cmd, long larg, char *parg); |
| 432 | SSL_METHOD *tlsv1_base_method(void ); | 477 | SSL_METHOD *tlsv1_base_method(void ); |
| 433 | 478 | ||
| 434 | |||
| 435 | int ssl_init_wbio_buffer(SSL *s, int push); | 479 | int ssl_init_wbio_buffer(SSL *s, int push); |
| 480 | void ssl_free_wbio_buffer(SSL *s); | ||
| 436 | 481 | ||
| 437 | int tls1_change_cipher_state(SSL *s, int which); | 482 | int tls1_change_cipher_state(SSL *s, int which); |
| 438 | int tls1_setup_key_block(SSL *s); | 483 | int tls1_setup_key_block(SSL *s); |
| @@ -445,114 +490,10 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, | |||
| 445 | unsigned char *p, int len); | 490 | unsigned char *p, int len); |
| 446 | int tls1_alert_code(int code); | 491 | int tls1_alert_code(int code); |
| 447 | int ssl3_alert_code(int code); | 492 | int ssl3_alert_code(int code); |
| 493 | int ssl_ok(SSL *s); | ||
| 448 | 494 | ||
| 495 | SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n); | ||
| 496 | STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); | ||
| 449 | 497 | ||
| 450 | #else | ||
| 451 | |||
| 452 | SSL_METHOD *ssl_bad_method(); | ||
| 453 | SSL_METHOD *sslv2_base_method(); | ||
| 454 | SSL_METHOD *sslv23_base_method(); | ||
| 455 | SSL_METHOD *sslv3_base_method(); | ||
| 456 | |||
| 457 | void ssl_clear_cipher_ctx(); | ||
| 458 | int ssl_clear_bad_session(); | ||
| 459 | CERT *ssl_cert_new(); | ||
| 460 | void ssl_cert_free(); | ||
| 461 | int ssl_set_cert_type(); | ||
| 462 | int ssl_get_new_session(); | ||
| 463 | int ssl_get_prev_session(); | ||
| 464 | int ssl_cipher_id_cmp(); | ||
| 465 | int ssl_cipher_ptr_id_cmp(); | ||
| 466 | STACK *ssl_bytes_to_cipher_list(); | ||
| 467 | int ssl_cipher_list_to_bytes(); | ||
| 468 | STACK *ssl_create_cipher_list(); | ||
| 469 | void ssl_update_cache(); | ||
| 470 | int ssl_session_get_ciphers(); | ||
| 471 | int ssl_verify_cert_chain(); | ||
| 472 | int ssl_undefined_function(); | ||
| 473 | X509 *ssl_get_server_send_cert(); | ||
| 474 | EVP_PKEY *ssl_get_sign_pkey(); | ||
| 475 | int ssl_cert_type(); | ||
| 476 | void ssl_set_cert_masks(); | ||
| 477 | STACK *ssl_get_ciphers_by_id(); | ||
| 478 | int ssl_verify_alarm_type(); | ||
| 479 | |||
| 480 | int ssl2_enc_init(); | ||
| 481 | void ssl2_generate_key_material(); | ||
| 482 | void ssl2_enc(); | ||
| 483 | void ssl2_mac(); | ||
| 484 | SSL_CIPHER *ssl2_get_cipher_by_char(); | ||
| 485 | int ssl2_put_cipher_by_char(); | ||
| 486 | int ssl2_part_read(); | ||
| 487 | int ssl2_do_write(); | ||
| 488 | int ssl2_set_certificate(); | ||
| 489 | void ssl2_return_error(); | ||
| 490 | void ssl2_write_error(); | ||
| 491 | int ssl2_num_ciphers(); | ||
| 492 | SSL_CIPHER *ssl2_get_cipher(); | ||
| 493 | int ssl2_new(); | ||
| 494 | void ssl2_free(); | ||
| 495 | int ssl2_accept(); | ||
| 496 | int ssl2_connect(); | ||
| 497 | int ssl2_read(); | ||
| 498 | int ssl2_peek(); | ||
| 499 | int ssl2_write(); | ||
| 500 | int ssl2_shutdown(); | ||
| 501 | void ssl2_clear(); | ||
| 502 | long ssl2_ctrl(); | ||
| 503 | long ssl2_ctx_ctrl(); | ||
| 504 | int ssl2_pending(); | ||
| 505 | |||
| 506 | SSL_CIPHER *ssl3_get_cipher_by_char(); | ||
| 507 | int ssl3_put_cipher_by_char(); | ||
| 508 | void ssl3_init_finished_mac(); | ||
| 509 | int ssl3_send_server_certificate(); | ||
| 510 | int ssl3_get_finished(); | ||
| 511 | int ssl3_setup_key_block(); | ||
| 512 | int ssl3_send_change_cipher_spec(); | ||
| 513 | int ssl3_change_cipher_state(); | ||
| 514 | void ssl3_cleanup_key_block(); | ||
| 515 | int ssl3_do_write(); | ||
| 516 | void ssl3_send_alert(); | ||
| 517 | int ssl3_generate_master_secret(); | ||
| 518 | int ssl3_get_req_cert_type(); | ||
| 519 | long ssl3_get_message(); | ||
| 520 | int ssl3_send_finished(); | ||
| 521 | int ssl3_num_ciphers(); | ||
| 522 | SSL_CIPHER *ssl3_get_cipher(); | ||
| 523 | int ssl3_renegotiate(); | ||
| 524 | int ssl3_renegotiate_check(); | ||
| 525 | int ssl3_dispatch_alert(); | ||
| 526 | int ssl3_read_bytes(); | ||
| 527 | int ssl3_part_read(); | ||
| 528 | int ssl3_write_bytes(); | ||
| 529 | int ssl3_final_finish_mac(); | ||
| 530 | void ssl3_finish_mac(); | ||
| 531 | int ssl3_enc(); | ||
| 532 | int ssl3_mac(); | ||
| 533 | unsigned long ssl3_output_cert_chain(); | ||
| 534 | SSL_CIPHER *ssl3_choose_cipher(); | ||
| 535 | int ssl3_setup_buffers(); | ||
| 536 | int ssl3_new(); | ||
| 537 | void ssl3_free(); | ||
| 538 | int ssl3_accept(); | ||
| 539 | int ssl3_connect(); | ||
| 540 | int ssl3_read(); | ||
| 541 | int ssl3_peek(); | ||
| 542 | int ssl3_write(); | ||
| 543 | int ssl3_shutdown(); | ||
| 544 | void ssl3_clear(); | ||
| 545 | long ssl3_ctrl(); | ||
| 546 | long ssl3_ctx_ctrl(); | ||
| 547 | int ssl3_pending(); | ||
| 548 | |||
| 549 | int ssl23_accept(); | ||
| 550 | int ssl23_connect(); | ||
| 551 | int ssl23_read_bytes(); | ||
| 552 | int ssl23_write_bytes(); | ||
| 553 | |||
| 554 | int ssl_init_wbio_buffer(); | ||
| 555 | |||
| 556 | #endif | ||
| 557 | 498 | ||
| 558 | #endif | 499 | #endif |
