Update to OpenSSL 1.0.2.o
This commit is contained in:
@@ -261,7 +261,6 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
dest->srp_username = NULL;
|
||||
#endif
|
||||
memset(&dest->ex_data, 0, sizeof(dest->ex_data));
|
||||
|
||||
/* We deliberately don't copy the prev and next pointers */
|
||||
dest->prev = NULL;
|
||||
@@ -275,6 +274,9 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
|
||||
if (src->peer != NULL)
|
||||
CRYPTO_add(&src->peer->references, 1, CRYPTO_LOCK_X509);
|
||||
|
||||
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, dest, &dest->ex_data))
|
||||
goto err;
|
||||
|
||||
#ifndef OPENSSL_NO_PSK
|
||||
if (src->psk_identity_hint) {
|
||||
dest->psk_identity_hint = BUF_strdup(src->psk_identity_hint);
|
||||
@@ -325,7 +327,7 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
|
||||
}
|
||||
# endif
|
||||
|
||||
if (ticket != 0) {
|
||||
if (ticket != 0 && src->tlsext_tick != NULL) {
|
||||
dest->tlsext_tick = BUF_memdup(src->tlsext_tick, src->tlsext_ticklen);
|
||||
if(dest->tlsext_tick == NULL)
|
||||
goto err;
|
||||
@@ -527,7 +529,7 @@ int ssl_get_new_session(SSL *s, int session)
|
||||
ss->session_id_length = 0;
|
||||
}
|
||||
|
||||
if (s->sid_ctx_length > sizeof ss->sid_ctx) {
|
||||
if (s->sid_ctx_length > sizeof(ss->sid_ctx)) {
|
||||
SSLerr(SSL_F_SSL_GET_NEW_SESSION, ERR_R_INTERNAL_ERROR);
|
||||
SSL_SESSION_free(ss);
|
||||
return 0;
|
||||
@@ -868,9 +870,9 @@ void SSL_SESSION_free(SSL_SESSION *ss)
|
||||
|
||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data);
|
||||
|
||||
OPENSSL_cleanse(ss->key_arg, sizeof ss->key_arg);
|
||||
OPENSSL_cleanse(ss->master_key, sizeof ss->master_key);
|
||||
OPENSSL_cleanse(ss->session_id, sizeof ss->session_id);
|
||||
OPENSSL_cleanse(ss->key_arg, sizeof(ss->key_arg));
|
||||
OPENSSL_cleanse(ss->master_key, sizeof(ss->master_key));
|
||||
OPENSSL_cleanse(ss->session_id, sizeof(ss->session_id));
|
||||
if (ss->sess_cert != NULL)
|
||||
ssl_sess_cert_free(ss->sess_cert);
|
||||
if (ss->peer != NULL)
|
||||
@@ -1006,7 +1008,8 @@ int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,
|
||||
return 0;
|
||||
}
|
||||
s->sid_ctx_length = sid_ctx_len;
|
||||
memcpy(s->sid_ctx, sid_ctx, sid_ctx_len);
|
||||
if (s->sid_ctx != sid_ctx)
|
||||
memcpy(s->sid_ctx, sid_ctx, sid_ctx_len);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user