Latest update
This commit is contained in:
+4
-4
@@ -3468,7 +3468,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
|
||||
EVP_PKEY *pkdh = NULL;
|
||||
if (dh == NULL) {
|
||||
SSLerr(SSL_F_SSL3_CTRL, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
pkdh = ssl_dh_to_pkey(dh);
|
||||
if (pkdh == NULL) {
|
||||
@@ -3479,11 +3479,11 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
|
||||
EVP_PKEY_security_bits(pkdh), 0, pkdh)) {
|
||||
SSLerr(SSL_F_SSL3_CTRL, SSL_R_DH_KEY_TOO_SMALL);
|
||||
EVP_PKEY_free(pkdh);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
EVP_PKEY_free(s->cert->dh_tmp);
|
||||
s->cert->dh_tmp = pkdh;
|
||||
ret = 1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case SSL_CTRL_SET_TMP_DH_CB:
|
||||
@@ -3835,7 +3835,7 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
|
||||
EVP_PKEY_security_bits(pkdh), 0, pkdh)) {
|
||||
SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_DH_KEY_TOO_SMALL);
|
||||
EVP_PKEY_free(pkdh);
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
EVP_PKEY_free(ctx->cert->dh_tmp);
|
||||
ctx->cert->dh_tmp = pkdh;
|
||||
|
||||
+6
-2
@@ -26,12 +26,16 @@ int ssl3_do_change_cipher_spec(SSL *s)
|
||||
}
|
||||
|
||||
s->session->cipher = s->s3->tmp.new_cipher;
|
||||
if (!s->method->ssl3_enc->setup_key_block(s))
|
||||
if (!s->method->ssl3_enc->setup_key_block(s)) {
|
||||
/* SSLfatal() already called */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!s->method->ssl3_enc->change_cipher_state(s, i))
|
||||
if (!s->method->ssl3_enc->change_cipher_state(s, i)) {
|
||||
/* SSLfatal() already called */
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2619,7 +2619,9 @@ __owur int tls1_process_sigalgs(SSL *s);
|
||||
__owur int tls1_set_peer_legacy_sigalg(SSL *s, const EVP_PKEY *pkey);
|
||||
__owur int tls1_lookup_md(const SIGALG_LOOKUP *lu, const EVP_MD **pmd);
|
||||
__owur size_t tls12_get_psigalgs(SSL *s, int sent, const uint16_t **psigs);
|
||||
# ifndef OPENSSL_NO_EC
|
||||
__owur int tls_check_sigalg_curve(const SSL *s, int curve);
|
||||
# endif
|
||||
__owur int tls12_check_peer_sigalg(SSL *s, uint16_t, EVP_PKEY *pkey);
|
||||
__owur int ssl_set_client_disabled(SSL *s);
|
||||
__owur int ssl_cipher_disabled(SSL *s, const SSL_CIPHER *c, int op, int echde);
|
||||
|
||||
@@ -1506,8 +1506,11 @@ static int ssl_method_error(const SSL *s, const SSL_METHOD *method)
|
||||
*/
|
||||
static int is_tls13_capable(const SSL *s)
|
||||
{
|
||||
int i, curve;
|
||||
int i;
|
||||
#ifndef OPENSSL_NO_EC
|
||||
int curve;
|
||||
EC_KEY *eckey;
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_PSK
|
||||
if (s->psk_server_callback != NULL)
|
||||
@@ -1530,6 +1533,7 @@ static int is_tls13_capable(const SSL *s)
|
||||
}
|
||||
if (!ssl_has_cert(s, i))
|
||||
continue;
|
||||
#ifndef OPENSSL_NO_EC
|
||||
if (i != SSL_PKEY_ECC)
|
||||
return 1;
|
||||
/*
|
||||
@@ -1543,6 +1547,9 @@ static int is_tls13_capable(const SSL *s)
|
||||
curve = EC_GROUP_get_curve_name(EC_KEY_get0_group(eckey));
|
||||
if (tls_check_sigalg_curve(s, curve))
|
||||
return 1;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
+4
-1
@@ -131,8 +131,11 @@ int tls1_change_cipher_state(SSL *s, int which)
|
||||
}
|
||||
dd = s->enc_read_ctx;
|
||||
mac_ctx = ssl_replace_hash(&s->read_hash, NULL);
|
||||
if (mac_ctx == NULL)
|
||||
if (mac_ctx == NULL) {
|
||||
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS1_CHANGE_CIPHER_STATE,
|
||||
ERR_R_INTERNAL_ERROR);
|
||||
goto err;
|
||||
}
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
COMP_CTX_free(s->expand);
|
||||
s->expand = NULL;
|
||||
|
||||
@@ -949,6 +949,7 @@ size_t tls12_get_psigalgs(SSL *s, int sent, const uint16_t **psigs)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
/*
|
||||
* Called by servers only. Checks that we have a sig alg that supports the
|
||||
* specified EC curve.
|
||||
@@ -979,6 +980,7 @@ int tls_check_sigalg_curve(const SSL *s, int curve)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check signature algorithm is consistent with sent supported signature
|
||||
|
||||
Reference in New Issue
Block a user