Latest update and remove TLSv1.3 draft
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* DEFINE_RUN_ONCE: Define an initialiser function that should be run exactly
|
||||
* once. It takes no arguments and returns and int result (1 for success or
|
||||
* 0 for failure). Typical usage might be:
|
||||
*
|
||||
*
|
||||
* DEFINE_RUN_ONCE(myinitfunc)
|
||||
* {
|
||||
* do_some_initialisation();
|
||||
@@ -45,7 +45,7 @@
|
||||
* exactly once. This function will be declared as static within the file. It
|
||||
* takes no arguments and returns and int result (1 for success or 0 for
|
||||
* failure). Typical usage might be:
|
||||
*
|
||||
*
|
||||
* DEFINE_RUN_ONCE_STATIC(myinitfunc)
|
||||
* {
|
||||
* do_some_initialisation();
|
||||
@@ -74,10 +74,10 @@
|
||||
* is used only one of the primary or the alternative initialiser function will
|
||||
* ever be called - and that function will be called exactly once. Definitition
|
||||
* of an alternative initialiser function MUST occur AFTER the definition of the
|
||||
* primiary initialiser function.
|
||||
*
|
||||
* primiary initialiser function.
|
||||
*
|
||||
* Typical usage might be:
|
||||
*
|
||||
*
|
||||
* DEFINE_RUN_ONCE_STATIC(myinitfunc)
|
||||
* {
|
||||
* do_some_initialisation();
|
||||
@@ -86,7 +86,7 @@
|
||||
*
|
||||
* return 0;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* DEFINE_RUN_ONCE_STATIC_ALT(myaltinitfunc, myinitfunc)
|
||||
* {
|
||||
* do_some_alternative_initialisation();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Contemporary compilers implement lock-free atomic memory access
|
||||
* primitives that facilitate writing "thread-opportunistic" or even real
|
||||
|
||||
@@ -109,13 +109,8 @@ DEFINE_STACK_OF(void)
|
||||
# define CRYPTO_EX_INDEX_DRBG 15
|
||||
# define CRYPTO_EX_INDEX__COUNT 16
|
||||
|
||||
/*
|
||||
* This is the default callbacks, but we can have others as well: this is
|
||||
* needed in Win32 where the application malloc and the library malloc may
|
||||
* not be the same.
|
||||
*/
|
||||
#define OPENSSL_malloc_init() \
|
||||
CRYPTO_set_mem_functions(CRYPTO_malloc, CRYPTO_realloc, CRYPTO_free)
|
||||
/* No longer needed, so this is a no-op */
|
||||
#define OPENSSL_malloc_init() while(0) continue
|
||||
|
||||
int CRYPTO_mem_ctrl(int mode);
|
||||
|
||||
|
||||
@@ -162,6 +162,12 @@ DH *DSA_dup_DH(const DSA *r);
|
||||
# define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
|
||||
EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL)
|
||||
# define EVP_PKEY_CTX_set_dsa_paramgen_q_bits(ctx, qbits) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
|
||||
EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, qbits, NULL)
|
||||
# define EVP_PKEY_CTX_set_dsa_paramgen_md(ctx, md) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
|
||||
EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, (void *)(md))
|
||||
|
||||
# define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1)
|
||||
# define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2)
|
||||
|
||||
@@ -959,14 +959,9 @@ const EVP_CIPHER *EVP_sm4_ctr(void);
|
||||
| OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
|
||||
|
||||
# ifdef OPENSSL_LOAD_CONF
|
||||
# define OpenSSL_add_all_algorithms() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
|
||||
| OPENSSL_INIT_ADD_ALL_DIGESTS \
|
||||
| OPENSSL_INIT_LOAD_CONFIG, NULL)
|
||||
# define OpenSSL_add_all_algorithms() OPENSSL_add_all_algorithms_conf()
|
||||
# else
|
||||
# define OpenSSL_add_all_algorithms() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
|
||||
| OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
|
||||
# define OpenSSL_add_all_algorithms() OPENSSL_add_all_algorithms_noconf()
|
||||
# endif
|
||||
|
||||
# define OpenSSL_add_all_ciphers() \
|
||||
@@ -999,6 +994,8 @@ void EVP_MD_do_all_sorted(void (*fn)
|
||||
|
||||
/* MAC stuff */
|
||||
|
||||
# define EVP_MAC_BLAKE2B NID_blake2bmac
|
||||
# define EVP_MAC_BLAKE2S NID_blake2smac
|
||||
# define EVP_MAC_CMAC NID_cmac
|
||||
# define EVP_MAC_GMAC NID_gmac
|
||||
# define EVP_MAC_HMAC NID_hmac
|
||||
@@ -1043,6 +1040,7 @@ void EVP_MAC_do_all_sorted(void (*fn)
|
||||
# define EVP_MAC_CTRL_SET_IV 0x07 /* unsigned char *, size_t */
|
||||
# define EVP_MAC_CTRL_SET_CUSTOM 0x08 /* unsigned char *, size_t */
|
||||
# define EVP_MAC_CTRL_SET_XOF 0x09 /* int */
|
||||
# define EVP_MAC_CTRL_SET_SALT 0x0a /* unsigned char *, size_t */
|
||||
|
||||
/* PKEY stuff */
|
||||
int EVP_PKEY_decrypt_old(unsigned char *dec_key,
|
||||
|
||||
@@ -32,6 +32,10 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_F_ARIA_GCM_INIT_KEY 176
|
||||
# define EVP_F_ARIA_INIT_KEY 185
|
||||
# define EVP_F_B64_NEW 198
|
||||
# define EVP_F_BLAKE2B_MAC_CTRL 220
|
||||
# define EVP_F_BLAKE2B_MAC_INIT 221
|
||||
# define EVP_F_BLAKE2S_MAC_CTRL 222
|
||||
# define EVP_F_BLAKE2S_MAC_INIT 223
|
||||
# define EVP_F_CAMELLIA_INIT_KEY 159
|
||||
# define EVP_F_CHACHA20_POLY1305_CTRL 182
|
||||
# define EVP_F_CMLL_T4_INIT_KEY 179
|
||||
@@ -168,6 +172,7 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_R_INVALID_KEY 163
|
||||
# define EVP_R_INVALID_KEY_LENGTH 130
|
||||
# define EVP_R_INVALID_OPERATION 148
|
||||
# define EVP_R_INVALID_SALT_LENGTH 186
|
||||
# define EVP_R_KEYGEN_FAILURE 120
|
||||
# define EVP_R_KEY_SETUP_FAILED 180
|
||||
# define EVP_R_MEMORY_LIMIT_EXCEEDED 172
|
||||
|
||||
@@ -57,6 +57,14 @@
|
||||
#define LN_kmac256 "kmac256"
|
||||
#define NID_kmac256 1197
|
||||
|
||||
#define SN_blake2bmac "BLAKE2BMAC"
|
||||
#define LN_blake2bmac "blake2bmac"
|
||||
#define NID_blake2bmac 1201
|
||||
|
||||
#define SN_blake2smac "BLAKE2SMAC"
|
||||
#define LN_blake2smac "blake2smac"
|
||||
#define NID_blake2smac 1202
|
||||
|
||||
#define SN_hmac_md5 "HMAC-MD5"
|
||||
#define LN_hmac_md5 "hmac-md5"
|
||||
#define NID_hmac_md5 780
|
||||
@@ -4826,7 +4834,7 @@
|
||||
|
||||
#define SN_chacha20_poly1305_draft "ChaCha20-Poly1305-D"
|
||||
#define LN_chacha20_poly1305_draft "chacha20-poly1305-draft"
|
||||
#define NID_chacha20_poly1305_draft 1201
|
||||
#define NID_chacha20_poly1305_draft 1203
|
||||
|
||||
#define SN_dhpublicnumber "dhpublicnumber"
|
||||
#define LN_dhpublicnumber "X9.42 DH"
|
||||
|
||||
+22
-10
@@ -501,6 +501,18 @@ typedef int (*SSL_async_callback_fn)(SSL *s, void *arg);
|
||||
* Use the kernel TLS transmission data-path.
|
||||
*/
|
||||
# define SSL_MODE_NO_KTLS_TX 0x00000200U
|
||||
/*
|
||||
* When using DTLS/SCTP, include the terminating zero in the label
|
||||
* used for computing the endpoint-pair shared secret. Required for
|
||||
* interoperability with implementations having this bug like these
|
||||
* older version of OpenSSL:
|
||||
* - OpenSSL 1.0.0 series
|
||||
* - OpenSSL 1.0.1 series
|
||||
* - OpenSSL 1.0.2 series
|
||||
* - OpenSSL 1.1.0 series
|
||||
* - OpenSSL 1.1.1 and 1.1.1a
|
||||
*/
|
||||
# define SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG 0x00000400U
|
||||
|
||||
/* Cert related flags */
|
||||
/*
|
||||
@@ -1920,17 +1932,17 @@ __owur STACK_OF(SSL_CIPHER) *SSL_get1_supported_ciphers(SSL *s);
|
||||
|
||||
__owur int SSL_do_handshake(SSL *s);
|
||||
int SSL_key_update(SSL *s, int updatetype);
|
||||
int SSL_get_key_update_type(SSL *s);
|
||||
int SSL_get_key_update_type(const SSL *s);
|
||||
int SSL_renegotiate(SSL *s);
|
||||
int SSL_renegotiate_abbreviated(SSL *s);
|
||||
__owur int SSL_renegotiate_pending(SSL *s);
|
||||
__owur int SSL_renegotiate_pending(const SSL *s);
|
||||
int SSL_shutdown(SSL *s);
|
||||
__owur int SSL_verify_client_post_handshake(SSL *s);
|
||||
void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);
|
||||
void SSL_set_post_handshake_auth(SSL *s, int val);
|
||||
|
||||
__owur const SSL_METHOD *SSL_CTX_get_ssl_method(SSL_CTX *ctx);
|
||||
__owur const SSL_METHOD *SSL_get_ssl_method(SSL *s);
|
||||
__owur const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx);
|
||||
__owur const SSL_METHOD *SSL_get_ssl_method(const SSL *s);
|
||||
__owur int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
|
||||
__owur const char *SSL_alert_type_string_long(int value);
|
||||
__owur const char *SSL_alert_type_string(int value);
|
||||
@@ -2078,8 +2090,8 @@ void SSL_set_tmp_dh_callback(SSL *ssl,
|
||||
int keylength));
|
||||
# endif
|
||||
|
||||
__owur const COMP_METHOD *SSL_get_current_compression(SSL *s);
|
||||
__owur const COMP_METHOD *SSL_get_current_expansion(SSL *s);
|
||||
__owur const COMP_METHOD *SSL_get_current_compression(const SSL *s);
|
||||
__owur const COMP_METHOD *SSL_get_current_expansion(const SSL *s);
|
||||
__owur const char *SSL_COMP_get_name(const COMP_METHOD *comp);
|
||||
__owur const char *SSL_COMP_get0_name(const SSL_COMP *comp);
|
||||
__owur int SSL_COMP_get_id(const SSL_COMP *comp);
|
||||
@@ -2123,20 +2135,20 @@ void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx,
|
||||
size_t (*cb) (SSL *ssl, int type,
|
||||
size_t len, void *arg));
|
||||
void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg);
|
||||
void *SSL_CTX_get_record_padding_callback_arg(SSL_CTX *ctx);
|
||||
void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx);
|
||||
int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size);
|
||||
|
||||
void SSL_set_record_padding_callback(SSL *ssl,
|
||||
size_t (*cb) (SSL *ssl, int type,
|
||||
size_t len, void *arg));
|
||||
void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg);
|
||||
void *SSL_get_record_padding_callback_arg(SSL *ssl);
|
||||
void *SSL_get_record_padding_callback_arg(const SSL *ssl);
|
||||
int SSL_set_block_padding(SSL *ssl, size_t block_size);
|
||||
|
||||
int SSL_set_num_tickets(SSL *s, size_t num_tickets);
|
||||
size_t SSL_get_num_tickets(SSL *s);
|
||||
size_t SSL_get_num_tickets(const SSL *s);
|
||||
int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
|
||||
size_t SSL_CTX_get_num_tickets(SSL_CTX *ctx);
|
||||
size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# define SSL_cache_hit(s) SSL_session_reused(s)
|
||||
|
||||
@@ -32,16 +32,6 @@ extern "C" {
|
||||
# define TLS_MAX_VERSION TLS1_3_VERSION
|
||||
# endif
|
||||
|
||||
/* TODO(TLS1.3) REMOVE ME: Version indicators for draft version */
|
||||
# define TLS1_3_VERSION_DRAFT_23 0x7f17
|
||||
# define TLS1_3_VERSION_DRAFT_26 0x7f1a
|
||||
# define TLS1_3_VERSION_DRAFT_27 0x7f1b
|
||||
# define TLS1_3_VERSION_DRAFT 0x7f1c
|
||||
# define TLS1_3_VERSION_DRAFT_TXT_23 "TLS 1.3 (draft 23)"
|
||||
# define TLS1_3_VERSION_DRAFT_TXT_26 "TLS 1.3 (draft 26)"
|
||||
# define TLS1_3_VERSION_DRAFT_TXT_27 "TLS 1.3 (draft 27)"
|
||||
# define TLS1_3_VERSION_DRAFT_TXT "TLS 1.3 (draft 28)"
|
||||
|
||||
/* Special value for method supporting multiple versions */
|
||||
# define TLS_ANY_VERSION 0x10000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user