summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-05-31 18:24:19 +0200
committerDr. Stephen Henson <steve@openssl.org>2011-05-31 18:24:19 +0200
commit8f119a03578ddc9f82d83e01ccfe48890f9dda03 (patch)
treeca740f77ca21d1df3189d90523b35d82a79c7ba8 /ssl/s3_enc.c
parentFake CPU caps so fips_standalone_sha1 compiles. (diff)
downloadopenssl-8f119a03578ddc9f82d83e01ccfe48890f9dda03.tar.xz
openssl-8f119a03578ddc9f82d83e01ccfe48890f9dda03.zip
set FIPS permitted flag before initalising digest
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r--ssl/s3_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index dc3101ff14..0ddfe192bc 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -614,7 +614,6 @@ int ssl3_digest_cached_records(SSL *s)
if ((mask & ssl_get_algorithm2(s)) && md)
{
s->s3->handshake_dgst[i]=EVP_MD_CTX_create();
- EVP_DigestInit_ex(s->s3->handshake_dgst[i],md,NULL);
#ifdef OPENSSL_FIPS
if (EVP_MD_nid(md) == NID_md5)
{
@@ -622,6 +621,7 @@ int ssl3_digest_cached_records(SSL *s)
EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
}
#endif
+ EVP_DigestInit_ex(s->s3->handshake_dgst[i],md,NULL);
EVP_DigestUpdate(s->s3->handshake_dgst[i],hdata,hdatalen);
}
else