Skip to content

Commit

Permalink
set FIPS permitted flag before initalising digest
Browse files Browse the repository at this point in the history
  • Loading branch information
snhenson committed May 31, 2011
1 parent f93b03a commit 2dd9e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssl/s3_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,14 @@ 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)
{
EVP_MD_CTX_set_flags(s->s3->handshake_dgst[i],
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
Expand Down

0 comments on commit 2dd9e67

Please sign in to comment.