diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2019-04-11 12:27:59 +0200 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2019-06-04 04:09:50 +0200 |
commit | d5e5e2ffafc7dbc861f7d285508cf129c5e8f5ac (patch) | |
tree | 3920b0febd6d2716940fb022b57894fe2ebf565d /ssl/statem | |
parent | Add missing parentheses in macro (diff) | |
download | openssl-d5e5e2ffafc7dbc861f7d285508cf129c5e8f5ac.tar.xz openssl-d5e5e2ffafc7dbc861f7d285508cf129c5e8f5ac.zip |
Move digests to providers
Move digest code into the relevant providers (fips, default, legacy).
The headers are temporarily moved to be internal, and will be moved
into providers after all external references are resolved. The deprecated
digest code can not be removed until EVP_PKEY (signing) is supported by
providers. EVP_MD data can also not yet be cleaned up for the same reasons.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8763)
Diffstat (limited to 'ssl/statem')
-rw-r--r-- | ssl/statem/statem_lib.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 8c7d5e2a60..e59b49bb3d 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -285,10 +285,11 @@ int tls_construct_cert_verify(SSL *s, WPACKET *pkt) } } if (s->version == SSL3_VERSION) { + OSSL_PARAM digest_cmd_params[3]; + + ssl3_digest_master_key_set_params(s->session, digest_cmd_params); if (EVP_DigestSignUpdate(mctx, hdata, hdatalen) <= 0 - || !EVP_MD_CTX_ctrl(mctx, EVP_CTRL_SSL3_MASTER_SECRET, - (int)s->session->master_key_length, - s->session->master_key) + || EVP_MD_CTX_set_params(mctx, digest_cmd_params) <= 0 || EVP_DigestSignFinal(mctx, sig, &siglen) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CONSTRUCT_CERT_VERIFY, @@ -473,10 +474,11 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt) } } if (s->version == SSL3_VERSION) { + OSSL_PARAM digest_cmd_params[3]; + + ssl3_digest_master_key_set_params(s->session, digest_cmd_params); if (EVP_DigestVerifyUpdate(mctx, hdata, hdatalen) <= 0 - || !EVP_MD_CTX_ctrl(mctx, EVP_CTRL_SSL3_MASTER_SECRET, - (int)s->session->master_key_length, - s->session->master_key)) { + || EVP_MD_CTX_set_params(mctx, digest_cmd_params) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PROCESS_CERT_VERIFY, ERR_R_EVP_LIB); goto err; |