summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl.h')
-rw-r--r--src/lib/libssl/ssl.h330
1 files changed, 59 insertions, 271 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index 6df921f3c1..99e188086b 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -109,7 +109,7 @@
109 * 109 *
110 */ 110 */
111/* ==================================================================== 111/* ====================================================================
112 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 112 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
113 * 113 *
114 * Redistribution and use in source and binary forms, with or without 114 * Redistribution and use in source and binary forms, with or without
115 * modification, are permitted provided that the following conditions 115 * modification, are permitted provided that the following conditions
@@ -161,11 +161,6 @@
161 * Hudson (tjh@cryptsoft.com). 161 * Hudson (tjh@cryptsoft.com).
162 * 162 *
163 */ 163 */
164/* ====================================================================
165 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
166 * ECC cipher suite support in OpenSSL originally developed by
167 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
168 */
169 164
170#ifndef HEADER_SSL_H 165#ifndef HEADER_SSL_H
171#define HEADER_SSL_H 166#define HEADER_SSL_H
@@ -178,17 +173,9 @@
178#ifndef OPENSSL_NO_BIO 173#ifndef OPENSSL_NO_BIO
179#include <openssl/bio.h> 174#include <openssl/bio.h>
180#endif 175#endif
181#ifndef OPENSSL_NO_DEPRECATED
182#ifndef OPENSSL_NO_X509 176#ifndef OPENSSL_NO_X509
183#include <openssl/x509.h> 177#include <openssl/x509.h>
184#endif 178#endif
185#include <openssl/crypto.h>
186#include <openssl/lhash.h>
187#include <openssl/buffer.h>
188#endif
189#include <openssl/pem.h>
190#include <openssl/hmac.h>
191
192#include <openssl/kssl.h> 179#include <openssl/kssl.h>
193#include <openssl/safestack.h> 180#include <openssl/safestack.h>
194#include <openssl/symhacks.h> 181#include <openssl/symhacks.h>
@@ -252,6 +239,7 @@ extern "C" {
252#define SSL_TXT_LOW "LOW" 239#define SSL_TXT_LOW "LOW"
253#define SSL_TXT_MEDIUM "MEDIUM" 240#define SSL_TXT_MEDIUM "MEDIUM"
254#define SSL_TXT_HIGH "HIGH" 241#define SSL_TXT_HIGH "HIGH"
242#define SSL_TXT_FIPS "FIPS"
255#define SSL_TXT_kFZA "kFZA" 243#define SSL_TXT_kFZA "kFZA"
256#define SSL_TXT_aFZA "aFZA" 244#define SSL_TXT_aFZA "aFZA"
257#define SSL_TXT_eFZA "eFZA" 245#define SSL_TXT_eFZA "eFZA"
@@ -282,9 +270,7 @@ extern "C" {
282#define SSL_TXT_RC4 "RC4" 270#define SSL_TXT_RC4 "RC4"
283#define SSL_TXT_RC2 "RC2" 271#define SSL_TXT_RC2 "RC2"
284#define SSL_TXT_IDEA "IDEA" 272#define SSL_TXT_IDEA "IDEA"
285#define SSL_TXT_SEED "SEED"
286#define SSL_TXT_AES "AES" 273#define SSL_TXT_AES "AES"
287#define SSL_TXT_CAMELLIA "CAMELLIA"
288#define SSL_TXT_MD5 "MD5" 274#define SSL_TXT_MD5 "MD5"
289#define SSL_TXT_SHA1 "SHA1" 275#define SSL_TXT_SHA1 "SHA1"
290#define SSL_TXT_SHA "SHA" 276#define SSL_TXT_SHA "SHA"
@@ -296,7 +282,6 @@ extern "C" {
296#define SSL_TXT_SSLV3 "SSLv3" 282#define SSL_TXT_SSLV3 "SSLv3"
297#define SSL_TXT_TLSV1 "TLSv1" 283#define SSL_TXT_TLSV1 "TLSv1"
298#define SSL_TXT_ALL "ALL" 284#define SSL_TXT_ALL "ALL"
299#define SSL_TXT_ECC "ECCdraft" /* ECC ciphersuites are not yet official */
300 285
301/* 286/*
302 * COMPLEMENTOF* definitions. These identifiers are used to (de-select) 287 * COMPLEMENTOF* definitions. These identifiers are used to (de-select)
@@ -318,7 +303,7 @@ extern "C" {
318/* The following cipher list is used by default. 303/* The following cipher list is used by default.
319 * It also is substituted when an application-defined cipher list string 304 * It also is substituted when an application-defined cipher list string
320 * starts with 'DEFAULT'. */ 305 * starts with 'DEFAULT'. */
321#define SSL_DEFAULT_CIPHER_LIST "AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH" /* low priority for RC4 */ 306#define SSL_DEFAULT_CIPHER_LIST "ALL:!ADH:+RC4:@STRENGTH" /* low priority for RC4 */
322 307
323/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */ 308/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */
324#define SSL_SENT_SHUTDOWN 1 309#define SSL_SENT_SHUTDOWN 1
@@ -328,6 +313,11 @@ extern "C" {
328} 313}
329#endif 314#endif
330 315
316#include <openssl/crypto.h>
317#include <openssl/lhash.h>
318#include <openssl/buffer.h>
319#include <openssl/pem.h>
320
331#ifdef __cplusplus 321#ifdef __cplusplus
332extern "C" { 322extern "C" {
333#endif 323#endif
@@ -379,12 +369,6 @@ typedef struct ssl_method_st
379 int (*ssl_shutdown)(SSL *s); 369 int (*ssl_shutdown)(SSL *s);
380 int (*ssl_renegotiate)(SSL *s); 370 int (*ssl_renegotiate)(SSL *s);
381 int (*ssl_renegotiate_check)(SSL *s); 371 int (*ssl_renegotiate_check)(SSL *s);
382 long (*ssl_get_message)(SSL *s, int st1, int stn, int mt, long
383 max, int *ok);
384 int (*ssl_read_bytes)(SSL *s, int type, unsigned char *buf, int len,
385 int peek);
386 int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len);
387 int (*ssl_dispatch_alert)(SSL *s);
388 long (*ssl_ctrl)(SSL *s,int cmd,long larg,void *parg); 372 long (*ssl_ctrl)(SSL *s,int cmd,long larg,void *parg);
389 long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg); 373 long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg);
390 SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr); 374 SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
@@ -395,9 +379,9 @@ typedef struct ssl_method_st
395 struct ssl_method_st *(*get_ssl_method)(int version); 379 struct ssl_method_st *(*get_ssl_method)(int version);
396 long (*get_timeout)(void); 380 long (*get_timeout)(void);
397 struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */ 381 struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */
398 int (*ssl_version)(void); 382 int (*ssl_version)();
399 long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)(void)); 383 long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)());
400 long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)(void)); 384 long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)());
401 } SSL_METHOD; 385 } SSL_METHOD;
402 386
403/* Lets make this into an ASN.1 type structure as follows 387/* Lets make this into an ASN.1 type structure as follows
@@ -475,13 +459,6 @@ typedef struct ssl_session_st
475 /* These are used to make removal of session-ids more 459 /* These are used to make removal of session-ids more
476 * efficient and to implement a maximum cache size. */ 460 * efficient and to implement a maximum cache size. */
477 struct ssl_session_st *prev,*next; 461 struct ssl_session_st *prev,*next;
478#ifndef OPENSSL_NO_TLSEXT
479 char *tlsext_hostname;
480 /* RFC4507 info */
481 unsigned char *tlsext_tick; /* Session ticket */
482 size_t tlsext_ticklen; /* Session ticket length */
483 long tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */
484#endif
485 } SSL_SESSION; 462 } SSL_SESSION;
486 463
487 464
@@ -506,17 +483,8 @@ typedef struct ssl_session_st
506 * This used to be 0x000FFFFFL before 0.9.7. */ 483 * This used to be 0x000FFFFFL before 0.9.7. */
507#define SSL_OP_ALL 0x00000FFFL 484#define SSL_OP_ALL 0x00000FFFL
508 485
509/* DTLS options */
510#define SSL_OP_NO_QUERY_MTU 0x00001000L
511/* Turn on Cookie Exchange (on relevant for servers) */
512#define SSL_OP_COOKIE_EXCHANGE 0x00002000L
513/* Don't use RFC4507 ticket extension */
514#define SSL_OP_NO_TICKET 0x00004000L
515
516/* As server, disallow session resumption on renegotiation */ 486/* As server, disallow session resumption on renegotiation */
517#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L 487#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L
518/* If set, always create a new key when using tmp_ecdh parameters */
519#define SSL_OP_SINGLE_ECDH_USE 0x00080000L
520/* If set, always create a new key when using tmp_dh parameters */ 488/* If set, always create a new key when using tmp_dh parameters */
521#define SSL_OP_SINGLE_DH_USE 0x00100000L 489#define SSL_OP_SINGLE_DH_USE 0x00100000L
522/* Set to always use the tmp_rsa key when doing RSA operations, 490/* Set to always use the tmp_rsa key when doing RSA operations,
@@ -578,8 +546,6 @@ typedef struct ssl_session_st
578 SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL) 546 SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL)
579#define SSL_get_mode(ssl) \ 547#define SSL_get_mode(ssl) \
580 SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL) 548 SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL)
581#define SSL_set_mtu(ssl, mtu) \
582 SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL)
583 549
584 550
585void 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)); 551void 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));
@@ -616,7 +582,7 @@ typedef int (*GEN_SESSION_CB)(const SSL *ssl, unsigned char *id,
616typedef struct ssl_comp_st 582typedef struct ssl_comp_st
617 { 583 {
618 int id; 584 int id;
619 const char *name; 585 char *name;
620#ifndef OPENSSL_NO_COMP 586#ifndef OPENSSL_NO_COMP
621 COMP_METHOD *method; 587 COMP_METHOD *method;
622#else 588#else
@@ -704,14 +670,6 @@ struct ssl_ctx_st
704 /* get client cert callback */ 670 /* get client cert callback */
705 int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey); 671 int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
706 672
707 /* cookie generate callback */
708 int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie,
709 unsigned int *cookie_len);
710
711 /* verify cookie callback */
712 int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie,
713 unsigned int cookie_len);
714
715 CRYPTO_EX_DATA ex_data; 673 CRYPTO_EX_DATA ex_data;
716 674
717 const EVP_MD *rsa_md5;/* For SSLv2 - name is 'ssl2-md5' */ 675 const EVP_MD *rsa_md5;/* For SSLv2 - name is 'ssl2-md5' */
@@ -744,6 +702,7 @@ struct ssl_ctx_st
744 void *msg_callback_arg; 702 void *msg_callback_arg;
745 703
746 int verify_mode; 704 int verify_mode;
705 int verify_depth;
747 unsigned int sid_ctx_length; 706 unsigned int sid_ctx_length;
748 unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH]; 707 unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
749 int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */ 708 int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */
@@ -751,35 +710,10 @@ struct ssl_ctx_st
751 /* Default generate session ID callback. */ 710 /* Default generate session ID callback. */
752 GEN_SESSION_CB generate_session_id; 711 GEN_SESSION_CB generate_session_id;
753 712
754 X509_VERIFY_PARAM *param;
755
756#if 0
757 int purpose; /* Purpose setting */ 713 int purpose; /* Purpose setting */
758 int trust; /* Trust setting */ 714 int trust; /* Trust setting */
759#endif
760 715
761 int quiet_shutdown; 716 int quiet_shutdown;
762
763#ifndef OPENSSL_NO_TLSEXT
764 /* TLS extensions servername callback */
765 int (*tlsext_servername_callback)(SSL*, int *, void *);
766 void *tlsext_servername_arg;
767 /* RFC 4507 session ticket keys */
768 unsigned char tlsext_tick_key_name[16];
769 unsigned char tlsext_tick_hmac_key[16];
770 unsigned char tlsext_tick_aes_key[16];
771 /* Callback to support customisation of ticket key setting */
772 int (*tlsext_ticket_key_cb)(SSL *ssl,
773 unsigned char *name, unsigned char *iv,
774 EVP_CIPHER_CTX *ectx,
775 HMAC_CTX *hctx, int enc);
776
777 /* certificate status request info */
778 /* Callback for status request */
779 int (*tlsext_status_cb)(SSL *ssl, void *arg);
780 void *tlsext_status_arg;
781#endif
782
783 }; 717 };
784 718
785#define SSL_SESS_CACHE_OFF 0x0000 719#define SSL_SESS_CACHE_OFF 0x0000
@@ -819,18 +753,16 @@ struct ssl_ctx_st
819#define SSL_CTX_sess_cache_full(ctx) \ 753#define SSL_CTX_sess_cache_full(ctx) \
820 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL) 754 SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL)
821 755
822void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess)); 756#define SSL_CTX_sess_set_new_cb(ctx,cb) ((ctx)->new_session_cb=(cb))
823int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl, SSL_SESSION *sess); 757#define SSL_CTX_sess_get_new_cb(ctx) ((ctx)->new_session_cb)
824void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess)); 758#define SSL_CTX_sess_set_remove_cb(ctx,cb) ((ctx)->remove_session_cb=(cb))
825void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx, SSL_SESSION *sess); 759#define SSL_CTX_sess_get_remove_cb(ctx) ((ctx)->remove_session_cb)
826void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, unsigned char *data,int len,int *copy)); 760#define SSL_CTX_sess_set_get_cb(ctx,cb) ((ctx)->get_session_cb=(cb))
827SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsigned char *Data, int len, int *copy); 761#define SSL_CTX_sess_get_get_cb(ctx) ((ctx)->get_session_cb)
828void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,int type,int val)); 762#define SSL_CTX_set_info_callback(ctx,cb) ((ctx)->info_callback=(cb))
829void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val); 763#define SSL_CTX_get_info_callback(ctx) ((ctx)->info_callback)
830void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey)); 764#define SSL_CTX_set_client_cert_cb(ctx,cb) ((ctx)->client_cert_cb=(cb))
831int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey); 765#define SSL_CTX_get_client_cert_cb(ctx) ((ctx)->client_cert_cb)
832void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len));
833void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int cookie_len));
834 766
835#define SSL_NOTHING 1 767#define SSL_NOTHING 1
836#define SSL_WRITING 2 768#define SSL_WRITING 2
@@ -846,7 +778,7 @@ void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL
846struct ssl_st 778struct ssl_st
847 { 779 {
848 /* protocol version 780 /* protocol version
849 * (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION, DTLS1_VERSION) 781 * (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION)
850 */ 782 */
851 int version; 783 int version;
852 int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */ 784 int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */
@@ -875,7 +807,7 @@ struct ssl_st
875 807
876 /* true when we are actually in SSL_accept() or SSL_connect() */ 808 /* true when we are actually in SSL_accept() or SSL_connect() */
877 int in_handshake; 809 int in_handshake;
878 int (*handshake_func)(SSL *); 810 int (*handshake_func)();
879 811
880 /* Imagine that here's a boolean member "init" that is 812 /* Imagine that here's a boolean member "init" that is
881 * switched as soon as SSL_set_{accept/connect}_state 813 * switched as soon as SSL_set_{accept/connect}_state
@@ -910,7 +842,6 @@ struct ssl_st
910 842
911 struct ssl2_state_st *s2; /* SSLv2 variables */ 843 struct ssl2_state_st *s2; /* SSLv2 variables */
912 struct ssl3_state_st *s3; /* SSLv3 variables */ 844 struct ssl3_state_st *s3; /* SSLv3 variables */
913 struct dtls1_state_st *d1; /* DTLSv1 variables */
914 845
915 int read_ahead; /* Read as many input bytes as possible 846 int read_ahead; /* Read as many input bytes as possible
916 * (for non-blocking reads) */ 847 * (for non-blocking reads) */
@@ -921,12 +852,8 @@ struct ssl_st
921 852
922 int hit; /* reusing a previous session */ 853 int hit; /* reusing a previous session */
923 854
924 X509_VERIFY_PARAM *param;
925
926#if 0
927 int purpose; /* Purpose setting */ 855 int purpose; /* Purpose setting */
928 int trust; /* Trust setting */ 856 int trust; /* Trust setting */
929#endif
930 857
931 /* crypto */ 858 /* crypto */
932 STACK_OF(SSL_CIPHER) *cipher_list; 859 STACK_OF(SSL_CIPHER) *cipher_list;
@@ -971,6 +898,7 @@ struct ssl_st
971 /* Used in SSL2 and SSL3 */ 898 /* Used in SSL2 and SSL3 */
972 int verify_mode; /* 0 don't care about verify failure. 899 int verify_mode; /* 0 don't care about verify failure.
973 * 1 fail if verify fails */ 900 * 1 fail if verify fails */
901 int verify_depth;
974 int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */ 902 int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */
975 903
976 void (*info_callback)(const SSL *ssl,int type,int val); /* optional informational callback */ 904 void (*info_callback)(const SSL *ssl,int type,int val); /* optional informational callback */
@@ -1001,37 +929,6 @@ struct ssl_st
1001 int first_packet; 929 int first_packet;
1002 int client_version; /* what was passed, used for 930 int client_version; /* what was passed, used for
1003 * SSLv3/TLS rollback check */ 931 * SSLv3/TLS rollback check */
1004#ifndef OPENSSL_NO_TLSEXT
1005 /* TLS extension debug callback */
1006 void (*tlsext_debug_cb)(SSL *s, int client_server, int type,
1007 unsigned char *data, int len,
1008 void *arg);
1009 void *tlsext_debug_arg;
1010 char *tlsext_hostname;
1011 int servername_done; /* no further mod of servername
1012 0 : call the servername extension callback.
1013 1 : prepare 2, allow last ack just after in server callback.
1014 2 : don't call servername callback, no ack in server hello
1015 */
1016 /* certificate status request info */
1017 /* Status type or -1 if no status type */
1018 int tlsext_status_type;
1019 /* Expect OCSP CertificateStatus message */
1020 int tlsext_status_expected;
1021 /* OCSP status request only */
1022 STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids;
1023 X509_EXTENSIONS *tlsext_ocsp_exts;
1024 /* OCSP response received or to be sent */
1025 unsigned char *tlsext_ocsp_resp;
1026 int tlsext_ocsp_resplen;
1027
1028 /* RFC4507 session ticket expected to be received or sent */
1029 int tlsext_ticket_expected;
1030 SSL_CTX * initial_ctx; /* initial ctx, used to store sessions */
1031#define session_ctx initial_ctx
1032#else
1033#define session_ctx ctx
1034#endif
1035 }; 932 };
1036 933
1037#ifdef __cplusplus 934#ifdef __cplusplus
@@ -1041,7 +938,6 @@ struct ssl_st
1041#include <openssl/ssl2.h> 938#include <openssl/ssl2.h>
1042#include <openssl/ssl3.h> 939#include <openssl/ssl3.h>
1043#include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */ 940#include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */
1044#include <openssl/dtls1.h> /* Datagram TLS */
1045#include <openssl/ssl23.h> 941#include <openssl/ssl23.h>
1046 942
1047#ifdef __cplusplus 943#ifdef __cplusplus
@@ -1139,16 +1035,21 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
1139#define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b)) 1035#define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b))
1140 1036
1141#if 1 /*SSLEAY_MACROS*/ 1037#if 1 /*SSLEAY_MACROS*/
1142#define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id) 1038#define d2i_SSL_SESSION_bio(bp,s_id) (SSL_SESSION *)ASN1_d2i_bio( \
1143#define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id) 1039 (char *(*)())SSL_SESSION_new,(char *(*)())d2i_SSL_SESSION, \
1040 (bp),(unsigned char **)(s_id))
1041#define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio(i2d_SSL_SESSION, \
1042 bp,(unsigned char *)s_id)
1144#define PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \ 1043#define PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \
1145 (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb,u) 1044 (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb,u)
1146#define PEM_read_bio_SSL_SESSION(bp,x,cb,u) PEM_ASN1_read_bio_of(SSL_SESSION,d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,x,cb,u) 1045#define PEM_read_bio_SSL_SESSION(bp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read_bio( \
1046 (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,(char **)x,cb,u)
1147#define PEM_write_SSL_SESSION(fp,x) \ 1047#define PEM_write_SSL_SESSION(fp,x) \
1148 PEM_ASN1_write((int (*)())i2d_SSL_SESSION, \ 1048 PEM_ASN1_write((int (*)())i2d_SSL_SESSION, \
1149 PEM_STRING_SSL_SESSION,fp, (char *)x, NULL,NULL,0,NULL,NULL) 1049 PEM_STRING_SSL_SESSION,fp, (char *)x, NULL,NULL,0,NULL,NULL)
1150#define PEM_write_bio_SSL_SESSION(bp,x) \ 1050#define PEM_write_bio_SSL_SESSION(bp,x) \
1151 PEM_ASN1_write_bio_of(SSL_SESSION,i2d_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,x,NULL,NULL,0,NULL,NULL) 1051 PEM_ASN1_write_bio((int (*)())i2d_SSL_SESSION, \
1052 PEM_STRING_SSL_SESSION,bp, (char *)x, NULL,NULL,0,NULL,NULL)
1152#endif 1053#endif
1153 1054
1154#define SSL_AD_REASON_OFFSET 1000 1055#define SSL_AD_REASON_OFFSET 1000
@@ -1177,10 +1078,6 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
1177#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR /* fatal */ 1078#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR /* fatal */
1178#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED 1079#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
1179#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION 1080#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
1180#define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION
1181#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
1182#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
1183#define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE
1184 1081
1185#define SSL_ERROR_NONE 0 1082#define SSL_ERROR_NONE 0
1186#define SSL_ERROR_SSL 1 1083#define SSL_ERROR_SSL 1
@@ -1195,24 +1092,20 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
1195#define SSL_CTRL_NEED_TMP_RSA 1 1092#define SSL_CTRL_NEED_TMP_RSA 1
1196#define SSL_CTRL_SET_TMP_RSA 2 1093#define SSL_CTRL_SET_TMP_RSA 2
1197#define SSL_CTRL_SET_TMP_DH 3 1094#define SSL_CTRL_SET_TMP_DH 3
1198#define SSL_CTRL_SET_TMP_ECDH 4 1095#define SSL_CTRL_SET_TMP_RSA_CB 4
1199#define SSL_CTRL_SET_TMP_RSA_CB 5 1096#define SSL_CTRL_SET_TMP_DH_CB 5
1200#define SSL_CTRL_SET_TMP_DH_CB 6 1097
1201#define SSL_CTRL_SET_TMP_ECDH_CB 7 1098#define SSL_CTRL_GET_SESSION_REUSED 6
1202 1099#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 7
1203#define SSL_CTRL_GET_SESSION_REUSED 8 1100#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 8
1204#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9 1101#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 9
1205#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10 1102#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 10
1206#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11 1103#define SSL_CTRL_GET_FLAGS 11
1207#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12 1104#define SSL_CTRL_EXTRA_CHAIN_CERT 12
1208#define SSL_CTRL_GET_FLAGS 13 1105
1209#define SSL_CTRL_EXTRA_CHAIN_CERT 14 1106#define SSL_CTRL_SET_MSG_CALLBACK 13
1210 1107#define SSL_CTRL_SET_MSG_CALLBACK_ARG 14
1211#define SSL_CTRL_SET_MSG_CALLBACK 15 1108
1212#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
1213
1214/* only applies to datagram connections */
1215#define SSL_CTRL_SET_MTU 17
1216/* Stats */ 1109/* Stats */
1217#define SSL_CTRL_SESS_NUMBER 20 1110#define SSL_CTRL_SESS_NUMBER 20
1218#define SSL_CTRL_SESS_CONNECT 21 1111#define SSL_CTRL_SESS_CONNECT 21
@@ -1239,29 +1132,6 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
1239#define SSL_CTRL_GET_MAX_CERT_LIST 50 1132#define SSL_CTRL_GET_MAX_CERT_LIST 50
1240#define SSL_CTRL_SET_MAX_CERT_LIST 51 1133#define SSL_CTRL_SET_MAX_CERT_LIST 51
1241 1134
1242/* see tls1.h for macros based on these */
1243#ifndef OPENSSL_NO_TLSEXT
1244#define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53
1245#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54
1246#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
1247#define SSL_CTRL_SET_TLSEXT_DEBUG_CB 56
1248#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57
1249#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58
1250#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
1251
1252#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB 63
1253#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64
1254#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
1255#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66
1256#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67
1257#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68
1258#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69
1259#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70
1260#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71
1261
1262#define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB 72
1263#endif
1264
1265#define SSL_session_reused(ssl) \ 1135#define SSL_session_reused(ssl) \
1266 SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL) 1136 SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL)
1267#define SSL_num_renegotiations(ssl) \ 1137#define SSL_num_renegotiations(ssl) \
@@ -1277,8 +1147,6 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
1277 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) 1147 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
1278#define SSL_CTX_set_tmp_dh(ctx,dh) \ 1148#define SSL_CTX_set_tmp_dh(ctx,dh) \
1279 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh) 1149 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
1280#define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \
1281 SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
1282 1150
1283#define SSL_need_tmp_RSA(ssl) \ 1151#define SSL_need_tmp_RSA(ssl) \
1284 SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL) 1152 SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL)
@@ -1286,8 +1154,6 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
1286 SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) 1154 SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
1287#define SSL_set_tmp_dh(ssl,dh) \ 1155#define SSL_set_tmp_dh(ssl,dh) \
1288 SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh) 1156 SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
1289#define SSL_set_tmp_ecdh(ssl,ecdh) \
1290 SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
1291 1157
1292#define SSL_CTX_add_extra_chain_cert(ctx,x509) \ 1158#define SSL_CTX_add_extra_chain_cert(ctx,x509) \
1293 SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509) 1159 SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
@@ -1349,9 +1215,9 @@ int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
1349#endif 1215#endif
1350int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len); 1216int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);
1351int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey); 1217int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
1352int SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, const unsigned char *d, long len); 1218int SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, unsigned char *d, long len);
1353int SSL_use_certificate(SSL *ssl, X509 *x); 1219int SSL_use_certificate(SSL *ssl, X509 *x);
1354int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len); 1220int SSL_use_certificate_ASN1(SSL *ssl, unsigned char *d, int len);
1355 1221
1356#ifndef OPENSSL_NO_STDIO 1222#ifndef OPENSSL_NO_STDIO
1357int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type); 1223int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
@@ -1387,7 +1253,6 @@ void SSL_copy_session_id(SSL *to,const SSL *from);
1387SSL_SESSION *SSL_SESSION_new(void); 1253SSL_SESSION *SSL_SESSION_new(void);
1388unsigned long SSL_SESSION_hash(const SSL_SESSION *a); 1254unsigned long SSL_SESSION_hash(const SSL_SESSION *a);
1389int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b); 1255int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b);
1390const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len);
1391#ifndef OPENSSL_NO_FP_API 1256#ifndef OPENSSL_NO_FP_API
1392int SSL_SESSION_print_fp(FILE *fp,const SSL_SESSION *ses); 1257int SSL_SESSION_print_fp(FILE *fp,const SSL_SESSION *ses);
1393#endif 1258#endif
@@ -1403,7 +1268,7 @@ int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB);
1403int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB); 1268int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB);
1404int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, 1269int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
1405 unsigned int id_len); 1270 unsigned int id_len);
1406SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char **pp, 1271SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char * const *pp,
1407 long length); 1272 long length);
1408 1273
1409#ifdef HEADER_X509_H 1274#ifdef HEADER_X509_H
@@ -1422,12 +1287,12 @@ void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,v
1422#ifndef OPENSSL_NO_RSA 1287#ifndef OPENSSL_NO_RSA
1423int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa); 1288int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
1424#endif 1289#endif
1425int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len); 1290int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len);
1426int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey); 1291int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
1427int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx, 1292int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx,
1428 const unsigned char *d, long len); 1293 unsigned char *d, long len);
1429int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x); 1294int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
1430int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d); 1295int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d);
1431 1296
1432void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb); 1297void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
1433void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u); 1298void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
@@ -1454,9 +1319,9 @@ int SSL_read(SSL *ssl,void *buf,int num);
1454int SSL_peek(SSL *ssl,void *buf,int num); 1319int SSL_peek(SSL *ssl,void *buf,int num);
1455int SSL_write(SSL *ssl,const void *buf,int num); 1320int SSL_write(SSL *ssl,const void *buf,int num);
1456long SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg); 1321long SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
1457long SSL_callback_ctrl(SSL *, int, void (*)(void)); 1322long SSL_callback_ctrl(SSL *, int, void (*)());
1458long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg); 1323long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg);
1459long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void)); 1324long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)());
1460 1325
1461int SSL_get_error(const SSL *s,int ret_code); 1326int SSL_get_error(const SSL *s,int ret_code);
1462const char *SSL_get_version(const SSL *s); 1327const char *SSL_get_version(const SSL *s);
@@ -1480,10 +1345,6 @@ SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */
1480SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */ 1345SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */
1481SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */ 1346SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */
1482 1347
1483SSL_METHOD *DTLSv1_method(void); /* DTLSv1.0 */
1484SSL_METHOD *DTLSv1_server_method(void); /* DTLSv1.0 */
1485SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */
1486
1487STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); 1348STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s);
1488 1349
1489int SSL_do_handshake(SSL *s); 1350int SSL_do_handshake(SSL *s);
@@ -1534,7 +1395,6 @@ int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
1534SSL_SESSION *SSL_get_session(const SSL *ssl); 1395SSL_SESSION *SSL_get_session(const SSL *ssl);
1535SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */ 1396SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */
1536SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); 1397SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);
1537SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx);
1538void SSL_set_info_callback(SSL *ssl, 1398void SSL_set_info_callback(SSL *ssl,
1539 void (*cb)(const SSL *ssl,int type,int val)); 1399 void (*cb)(const SSL *ssl,int type,int val));
1540void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val); 1400void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val);
@@ -1602,27 +1462,11 @@ void SSL_set_tmp_dh_callback(SSL *ssl,
1602 DH *(*dh)(SSL *ssl,int is_export, 1462 DH *(*dh)(SSL *ssl,int is_export,
1603 int keylength)); 1463 int keylength));
1604#endif 1464#endif
1605#ifndef OPENSSL_NO_ECDH
1606void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx,
1607 EC_KEY *(*ecdh)(SSL *ssl,int is_export,
1608 int keylength));
1609void SSL_set_tmp_ecdh_callback(SSL *ssl,
1610 EC_KEY *(*ecdh)(SSL *ssl,int is_export,
1611 int keylength));
1612#endif
1613 1465
1614#ifndef OPENSSL_NO_COMP 1466#ifndef OPENSSL_NO_COMP
1615const COMP_METHOD *SSL_get_current_compression(SSL *s);
1616const COMP_METHOD *SSL_get_current_expansion(SSL *s);
1617const char *SSL_COMP_get_name(const COMP_METHOD *comp);
1618STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
1619int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); 1467int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm);
1620#else 1468#else
1621const void *SSL_get_current_compression(SSL *s); 1469int SSL_COMP_add_compression_method(int id,char *cm);
1622const void *SSL_get_current_expansion(SSL *s);
1623const char *SSL_COMP_get_name(const void *comp);
1624void *SSL_COMP_get_compression_methods(void);
1625int SSL_COMP_add_compression_method(int id,void *cm);
1626#endif 1470#endif
1627 1471
1628/* BEGIN ERROR CODES */ 1472/* BEGIN ERROR CODES */
@@ -1635,36 +1479,11 @@ void ERR_load_SSL_strings(void);
1635 1479
1636/* Function codes. */ 1480/* Function codes. */
1637#define SSL_F_CLIENT_CERTIFICATE 100 1481#define SSL_F_CLIENT_CERTIFICATE 100
1638#define SSL_F_CLIENT_FINISHED 167 1482#define SSL_F_CLIENT_FINISHED 238
1639#define SSL_F_CLIENT_HELLO 101 1483#define SSL_F_CLIENT_HELLO 101
1640#define SSL_F_CLIENT_MASTER_KEY 102 1484#define SSL_F_CLIENT_MASTER_KEY 102
1641#define SSL_F_D2I_SSL_SESSION 103 1485#define SSL_F_D2I_SSL_SESSION 103
1642#define SSL_F_DO_DTLS1_WRITE 245
1643#define SSL_F_DO_SSL3_WRITE 104 1486#define SSL_F_DO_SSL3_WRITE 104
1644#define SSL_F_DTLS1_ACCEPT 246
1645#define SSL_F_DTLS1_BUFFER_RECORD 247
1646#define SSL_F_DTLS1_CLIENT_HELLO 248
1647#define SSL_F_DTLS1_CONNECT 249
1648#define SSL_F_DTLS1_ENC 250
1649#define SSL_F_DTLS1_GET_HELLO_VERIFY 251
1650#define SSL_F_DTLS1_GET_MESSAGE 252
1651#define SSL_F_DTLS1_GET_MESSAGE_FRAGMENT 253
1652#define SSL_F_DTLS1_GET_RECORD 254
1653#define SSL_F_DTLS1_OUTPUT_CERT_CHAIN 255
1654#define SSL_F_DTLS1_PREPROCESS_FRAGMENT 277
1655#define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE 256
1656#define SSL_F_DTLS1_PROCESS_RECORD 257
1657#define SSL_F_DTLS1_READ_BYTES 258
1658#define SSL_F_DTLS1_READ_FAILED 259
1659#define SSL_F_DTLS1_SEND_CERTIFICATE_REQUEST 260
1660#define SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE 261
1661#define SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE 262
1662#define SSL_F_DTLS1_SEND_CLIENT_VERIFY 263
1663#define SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST 264
1664#define SSL_F_DTLS1_SEND_SERVER_CERTIFICATE 265
1665#define SSL_F_DTLS1_SEND_SERVER_HELLO 266
1666#define SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE 267
1667#define SSL_F_DTLS1_WRITE_APP_DATA_BYTES 268
1668#define SSL_F_GET_CLIENT_FINISHED 105 1487#define SSL_F_GET_CLIENT_FINISHED 105
1669#define SSL_F_GET_CLIENT_HELLO 106 1488#define SSL_F_GET_CLIENT_HELLO 106
1670#define SSL_F_GET_CLIENT_MASTER_KEY 107 1489#define SSL_F_GET_CLIENT_MASTER_KEY 107
@@ -1705,7 +1524,6 @@ void ERR_load_SSL_strings(void);
1705#define SSL_F_SSL3_ENC 134 1524#define SSL_F_SSL3_ENC 134
1706#define SSL_F_SSL3_GENERATE_KEY_BLOCK 238 1525#define SSL_F_SSL3_GENERATE_KEY_BLOCK 238
1707#define SSL_F_SSL3_GET_CERTIFICATE_REQUEST 135 1526#define SSL_F_SSL3_GET_CERTIFICATE_REQUEST 135
1708#define SSL_F_SSL3_GET_CERT_STATUS 288
1709#define SSL_F_SSL3_GET_CERT_VERIFY 136 1527#define SSL_F_SSL3_GET_CERT_VERIFY 136
1710#define SSL_F_SSL3_GET_CLIENT_CERTIFICATE 137 1528#define SSL_F_SSL3_GET_CLIENT_CERTIFICATE 137
1711#define SSL_F_SSL3_GET_CLIENT_HELLO 138 1529#define SSL_F_SSL3_GET_CLIENT_HELLO 138
@@ -1713,12 +1531,10 @@ void ERR_load_SSL_strings(void);
1713#define SSL_F_SSL3_GET_FINISHED 140 1531#define SSL_F_SSL3_GET_FINISHED 140
1714#define SSL_F_SSL3_GET_KEY_EXCHANGE 141 1532#define SSL_F_SSL3_GET_KEY_EXCHANGE 141
1715#define SSL_F_SSL3_GET_MESSAGE 142 1533#define SSL_F_SSL3_GET_MESSAGE 142
1716#define SSL_F_SSL3_GET_NEW_SESSION_TICKET 283
1717#define SSL_F_SSL3_GET_RECORD 143 1534#define SSL_F_SSL3_GET_RECORD 143
1718#define SSL_F_SSL3_GET_SERVER_CERTIFICATE 144 1535#define SSL_F_SSL3_GET_SERVER_CERTIFICATE 144
1719#define SSL_F_SSL3_GET_SERVER_DONE 145 1536#define SSL_F_SSL3_GET_SERVER_DONE 145
1720#define SSL_F_SSL3_GET_SERVER_HELLO 146 1537#define SSL_F_SSL3_GET_SERVER_HELLO 146
1721#define SSL_F_SSL3_NEW_SESSION_TICKET 284
1722#define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147 1538#define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147
1723#define SSL_F_SSL3_PEEK 235 1539#define SSL_F_SSL3_PEEK 235
1724#define SSL_F_SSL3_READ_BYTES 148 1540#define SSL_F_SSL3_READ_BYTES 148
@@ -1734,10 +1550,8 @@ void ERR_load_SSL_strings(void);
1734#define SSL_F_SSL3_SETUP_KEY_BLOCK 157 1550#define SSL_F_SSL3_SETUP_KEY_BLOCK 157
1735#define SSL_F_SSL3_WRITE_BYTES 158 1551#define SSL_F_SSL3_WRITE_BYTES 158
1736#define SSL_F_SSL3_WRITE_PENDING 159 1552#define SSL_F_SSL3_WRITE_PENDING 159
1737#define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT 272
1738#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 1553#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215
1739#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 1554#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216
1740#define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT 273
1741#define SSL_F_SSL_BAD_METHOD 160 1555#define SSL_F_SSL_BAD_METHOD 160
1742#define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 1556#define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161
1743#define SSL_F_SSL_CERT_DUP 221 1557#define SSL_F_SSL_CERT_DUP 221
@@ -1745,7 +1559,6 @@ void ERR_load_SSL_strings(void);
1745#define SSL_F_SSL_CERT_INSTANTIATE 214 1559#define SSL_F_SSL_CERT_INSTANTIATE 214
1746#define SSL_F_SSL_CERT_NEW 162 1560#define SSL_F_SSL_CERT_NEW 162
1747#define SSL_F_SSL_CHECK_PRIVATE_KEY 163 1561#define SSL_F_SSL_CHECK_PRIVATE_KEY 163
1748#define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT 274
1749#define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 1562#define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230
1750#define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 1563#define SSL_F_SSL_CIPHER_STRENGTH_SORT 231
1751#define SSL_F_SSL_CLEAR 164 1564#define SSL_F_SSL_CLEAR 164
@@ -1777,9 +1590,6 @@ void ERR_load_SSL_strings(void);
1777#define SSL_F_SSL_INIT_WBIO_BUFFER 184 1590#define SSL_F_SSL_INIT_WBIO_BUFFER 184
1778#define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185 1591#define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185
1779#define SSL_F_SSL_NEW 186 1592#define SSL_F_SSL_NEW 186
1780#define SSL_F_SSL_PEEK 270
1781#define SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT 275
1782#define SSL_F_SSL_PREPARE_SERVERHELLO_TLSEXT 276
1783#define SSL_F_SSL_READ 223 1593#define SSL_F_SSL_READ 223
1784#define SSL_F_SSL_RSA_PRIVATE_DECRYPT 187 1594#define SSL_F_SSL_RSA_PRIVATE_DECRYPT 187
1785#define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 188 1595#define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 188
@@ -1799,7 +1609,6 @@ void ERR_load_SSL_strings(void);
1799#define SSL_F_SSL_SHUTDOWN 224 1609#define SSL_F_SSL_SHUTDOWN 224
1800#define SSL_F_SSL_UNDEFINED_CONST_FUNCTION 243 1610#define SSL_F_SSL_UNDEFINED_CONST_FUNCTION 243
1801#define SSL_F_SSL_UNDEFINED_FUNCTION 197 1611#define SSL_F_SSL_UNDEFINED_FUNCTION 197
1802#define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244
1803#define SSL_F_SSL_USE_CERTIFICATE 198 1612#define SSL_F_SSL_USE_CERTIFICATE 198
1804#define SSL_F_SSL_USE_CERTIFICATE_ASN1 199 1613#define SSL_F_SSL_USE_CERTIFICATE_ASN1 199
1805#define SSL_F_SSL_USE_CERTIFICATE_FILE 200 1614#define SSL_F_SSL_USE_CERTIFICATE_FILE 200
@@ -1830,9 +1639,6 @@ void ERR_load_SSL_strings(void);
1830#define SSL_R_BAD_DH_P_LENGTH 110 1639#define SSL_R_BAD_DH_P_LENGTH 110
1831#define SSL_R_BAD_DIGEST_LENGTH 111 1640#define SSL_R_BAD_DIGEST_LENGTH 111
1832#define SSL_R_BAD_DSA_SIGNATURE 112 1641#define SSL_R_BAD_DSA_SIGNATURE 112
1833#define SSL_R_BAD_ECC_CERT 304
1834#define SSL_R_BAD_ECDSA_SIGNATURE 305
1835#define SSL_R_BAD_ECPOINT 306
1836#define SSL_R_BAD_HELLO_REQUEST 105 1642#define SSL_R_BAD_HELLO_REQUEST 105
1837#define SSL_R_BAD_LENGTH 271 1643#define SSL_R_BAD_LENGTH 271
1838#define SSL_R_BAD_MAC_DECODE 113 1644#define SSL_R_BAD_MAC_DECODE 113
@@ -1862,22 +1668,17 @@ void ERR_load_SSL_strings(void);
1862#define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 1668#define SSL_R_CIPHER_CODE_WRONG_LENGTH 137
1863#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138 1669#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138
1864#define SSL_R_CIPHER_TABLE_SRC_ERROR 139 1670#define SSL_R_CIPHER_TABLE_SRC_ERROR 139
1865#define SSL_R_CLIENTHELLO_TLSEXT 157
1866#define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 1671#define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140
1867#define SSL_R_COMPRESSION_FAILURE 141 1672#define SSL_R_COMPRESSION_FAILURE 141
1868#define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE 307
1869#define SSL_R_COMPRESSION_LIBRARY_ERROR 142 1673#define SSL_R_COMPRESSION_LIBRARY_ERROR 142
1870#define SSL_R_CONNECTION_ID_IS_DIFFERENT 143 1674#define SSL_R_CONNECTION_ID_IS_DIFFERENT 143
1871#define SSL_R_CONNECTION_TYPE_NOT_SET 144 1675#define SSL_R_CONNECTION_TYPE_NOT_SET 144
1872#define SSL_R_COOKIE_MISMATCH 308
1873#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145 1676#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145
1874#define SSL_R_DATA_LENGTH_TOO_LONG 146 1677#define SSL_R_DATA_LENGTH_TOO_LONG 146
1875#define SSL_R_DECRYPTION_FAILED 147 1678#define SSL_R_DECRYPTION_FAILED 147
1876#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281 1679#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281
1877#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 1680#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148
1878#define SSL_R_DIGEST_CHECK_FAILED 149 1681#define SSL_R_DIGEST_CHECK_FAILED 149
1879#define SSL_R_DUPLICATE_COMPRESSION_ID 309
1880#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER 310
1881#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 1682#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150
1882#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 282 1683#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 282
1883#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 1684#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151
@@ -1890,8 +1691,6 @@ void ERR_load_SSL_strings(void);
1890#define SSL_R_INVALID_CHALLENGE_LENGTH 158 1691#define SSL_R_INVALID_CHALLENGE_LENGTH 158
1891#define SSL_R_INVALID_COMMAND 280 1692#define SSL_R_INVALID_COMMAND 280
1892#define SSL_R_INVALID_PURPOSE 278 1693#define SSL_R_INVALID_PURPOSE 278
1893#define SSL_R_INVALID_STATUS_RESPONSE 316
1894#define SSL_R_INVALID_TICKET_KEYS_LENGTH 275
1895#define SSL_R_INVALID_TRUST 279 1694#define SSL_R_INVALID_TRUST 279
1896#define SSL_R_KEY_ARG_TOO_LONG 284 1695#define SSL_R_KEY_ARG_TOO_LONG 284
1897#define SSL_R_KRB5 285 1696#define SSL_R_KRB5 285
@@ -1920,7 +1719,6 @@ void ERR_load_SSL_strings(void);
1920#define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169 1719#define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169
1921#define SSL_R_MISSING_RSA_SIGNING_CERT 170 1720#define SSL_R_MISSING_RSA_SIGNING_CERT 170
1922#define SSL_R_MISSING_TMP_DH_KEY 171 1721#define SSL_R_MISSING_TMP_DH_KEY 171
1923#define SSL_R_MISSING_TMP_ECDH_KEY 311
1924#define SSL_R_MISSING_TMP_RSA_KEY 172 1722#define SSL_R_MISSING_TMP_RSA_KEY 172
1925#define SSL_R_MISSING_TMP_RSA_PKEY 173 1723#define SSL_R_MISSING_TMP_RSA_PKEY 173
1926#define SSL_R_MISSING_VERIFY_MESSAGE 174 1724#define SSL_R_MISSING_VERIFY_MESSAGE 174
@@ -1949,7 +1747,6 @@ void ERR_load_SSL_strings(void);
1949#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 1747#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197
1950#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE 297 1748#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE 297
1951#define SSL_R_PACKET_LENGTH_TOO_LONG 198 1749#define SSL_R_PACKET_LENGTH_TOO_LONG 198
1952#define SSL_R_PARSE_TLSEXT 223
1953#define SSL_R_PATH_TOO_LONG 270 1750#define SSL_R_PATH_TOO_LONG 270
1954#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199 1751#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199
1955#define SSL_R_PEER_ERROR 200 1752#define SSL_R_PEER_ERROR 200
@@ -1964,7 +1761,6 @@ void ERR_load_SSL_strings(void);
1964#define SSL_R_PUBLIC_KEY_IS_NOT_RSA 209 1761#define SSL_R_PUBLIC_KEY_IS_NOT_RSA 209
1965#define SSL_R_PUBLIC_KEY_NOT_RSA 210 1762#define SSL_R_PUBLIC_KEY_NOT_RSA 210
1966#define SSL_R_READ_BIO_NOT_SET 211 1763#define SSL_R_READ_BIO_NOT_SET 211
1967#define SSL_R_READ_TIMEOUT_EXPIRED 312
1968#define SSL_R_READ_WRONG_PACKET_TYPE 212 1764#define SSL_R_READ_WRONG_PACKET_TYPE 212
1969#define SSL_R_RECORD_LENGTH_MISMATCH 213 1765#define SSL_R_RECORD_LENGTH_MISMATCH 213
1970#define SSL_R_RECORD_TOO_LARGE 214 1766#define SSL_R_RECORD_TOO_LARGE 214
@@ -1973,14 +1769,11 @@ void ERR_load_SSL_strings(void);
1973#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 1769#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216
1974#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 1770#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217
1975#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 218 1771#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 218
1976#define SSL_R_SERVERHELLO_TLSEXT 224
1977#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 1772#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277
1978#define SSL_R_SHORT_READ 219 1773#define SSL_R_SHORT_READ 219
1979#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 1774#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220
1980#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221 1775#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221
1981#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 299 1776#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 299
1982#define SSL_R_SSL3_EXT_INVALID_SERVERNAME 225
1983#define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE 226
1984#define SSL_R_SSL3_SESSION_ID_TOO_LONG 300 1777#define SSL_R_SSL3_SESSION_ID_TOO_LONG 300
1985#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222 1778#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222
1986#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 1779#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042
@@ -2015,15 +1808,12 @@ void ERR_load_SSL_strings(void);
2015#define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 1808#define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048
2016#define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 1809#define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
2017#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 232 1810#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 232
2018#define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 227
2019#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233 1811#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233
2020#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234 1812#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234
2021#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235 1813#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235
2022#define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236 1814#define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236
2023#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS 313
2024#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237 1815#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237
2025#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238 1816#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238
2026#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 314
2027#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239 1817#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239
2028#define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240 1818#define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240
2029#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241 1819#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241
@@ -2044,10 +1834,8 @@ void ERR_load_SSL_strings(void);
2044#define SSL_R_UNKNOWN_STATE 255 1834#define SSL_R_UNKNOWN_STATE 255
2045#define SSL_R_UNSUPPORTED_CIPHER 256 1835#define SSL_R_UNSUPPORTED_CIPHER 256
2046#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257 1836#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257
2047#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315
2048#define SSL_R_UNSUPPORTED_PROTOCOL 258 1837#define SSL_R_UNSUPPORTED_PROTOCOL 258
2049#define SSL_R_UNSUPPORTED_SSL_VERSION 259 1838#define SSL_R_UNSUPPORTED_SSL_VERSION 259
2050#define SSL_R_UNSUPPORTED_STATUS_TYPE 329
2051#define SSL_R_WRITE_BIO_NOT_SET 260 1839#define SSL_R_WRITE_BIO_NOT_SET 260
2052#define SSL_R_WRONG_CIPHER_RETURNED 261 1840#define SSL_R_WRONG_CIPHER_RETURNED 261
2053#define SSL_R_WRONG_MESSAGE_TYPE 262 1841#define SSL_R_WRONG_MESSAGE_TYPE 262