mirror of
https://github.com/openssl/openssl.git
synced 2024-12-13 12:03:48 +08:00
fix no-ec
Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
e2b420fdd7
commit
b22d71131a
18
ssl/s3_lib.c
18
ssl/s3_lib.c
@ -3375,17 +3375,11 @@ void ssl3_free(SSL *s)
|
||||
|
||||
ssl3_cleanup_key_block(s);
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
DH_free(s->s3->tmp.dh);
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
EVP_PKEY_free(s->s3->tmp.pkey);
|
||||
s->s3->tmp.pkey = NULL;
|
||||
#endif
|
||||
#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
|
||||
EVP_PKEY_free(s->s3->peer_tmp);
|
||||
s->s3->peer_tmp = NULL;
|
||||
EVP_PKEY_free(s->s3->tmp.pkey);
|
||||
s->s3->tmp.pkey = NULL;
|
||||
#endif
|
||||
|
||||
sk_X509_NAME_pop_free(s->s3->tmp.ca_names, X509_NAME_free);
|
||||
@ -3413,16 +3407,12 @@ void ssl3_clear(SSL *s)
|
||||
OPENSSL_free(s->s3->tmp.peer_sigalgs);
|
||||
s->s3->tmp.peer_sigalgs = NULL;
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
DH_free(s->s3->tmp.dh);
|
||||
s->s3->tmp.dh = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_EC
|
||||
EVP_PKEY_free(s->s3->tmp.pkey);
|
||||
s->s3->tmp.pkey = NULL;
|
||||
s->s3->is_probably_safari = 0;
|
||||
#endif
|
||||
#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
|
||||
EVP_PKEY_free(s->s3->tmp.pkey);
|
||||
s->s3->tmp.pkey = NULL;
|
||||
EVP_PKEY_free(s->s3->peer_tmp);
|
||||
s->s3->peer_tmp = NULL;
|
||||
#endif /* !OPENSSL_NO_EC */
|
||||
|
@ -1227,11 +1227,8 @@ typedef struct ssl3_state_st {
|
||||
int message_type;
|
||||
/* used to hold the new cipher we are going to use */
|
||||
const SSL_CIPHER *new_cipher;
|
||||
# ifndef OPENSSL_NO_DH
|
||||
DH *dh;
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EC
|
||||
EVP_PKEY *pkey; /* holds short lived ECDH key */
|
||||
# if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
|
||||
EVP_PKEY *pkey; /* holds short lived DH/ECDH key */
|
||||
# endif
|
||||
/* used for certificate requests */
|
||||
int cert_req;
|
||||
|
@ -2127,7 +2127,7 @@ MSG_PROCESS_RETURN tls_process_client_key_exchange(SSL *s, PACKET *pkt)
|
||||
RSA *rsa = NULL;
|
||||
EVP_PKEY *pkey = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
|
||||
EVP_PKEY *ckey = NULL;
|
||||
#endif
|
||||
PACKET enc_premaster;
|
||||
@ -2616,7 +2616,7 @@ MSG_PROCESS_RETURN tls_process_client_key_exchange(SSL *s, PACKET *pkt)
|
||||
#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_EC) || defined(OPENSSL_NO_SRP)
|
||||
err:
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
|
||||
EVP_PKEY_free(ckey);
|
||||
#endif
|
||||
OPENSSL_free(rsa_decrypt);
|
||||
|
Loading…
Reference in New Issue
Block a user