diff options
author | nectar <nectar@FreeBSD.org> | 2005-02-25 05:39:05 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2005-02-25 05:39:05 +0000 |
commit | 78a59572b356f941f9bcb853dafb34829ec8e576 (patch) | |
tree | 4a7be4ade5df61ca3631c0937c1fc399944ea1cc /crypto/openssl/ssl/t1_enc.c | |
parent | a55ec1447ad1b73694515ed74d03a045fdf79313 (diff) | |
download | FreeBSD-src-78a59572b356f941f9bcb853dafb34829ec8e576.zip FreeBSD-src-78a59572b356f941f9bcb853dafb34829ec8e576.tar.gz |
Vendor import of OpenSSL 0.9.7e.
Diffstat (limited to 'crypto/openssl/ssl/t1_enc.c')
-rw-r--r-- | crypto/openssl/ssl/t1_enc.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/t1_enc.c b/crypto/openssl/ssl/t1_enc.c index 271e247..ac224dd 100644 --- a/crypto/openssl/ssl/t1_enc.c +++ b/crypto/openssl/ssl/t1_enc.c @@ -115,6 +115,7 @@ #include <openssl/evp.h> #include <openssl/hmac.h> #include <openssl/md5.h> +#include <openssl/fips.h> static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, int sec_len, unsigned char *seed, int seed_len, @@ -177,8 +178,13 @@ static void tls1_PRF(const EVP_MD *md5, const EVP_MD *sha1, S2= &(sec[len]); len+=(slen&1); /* add for odd, make longer */ - +#ifdef OPENSSL_FIPS + FIPS_allow_md5(1); +#endif tls1_P_hash(md5 ,S1,len,label,label_len,out1,olen); +#ifdef OPENSSL_FIPS + FIPS_allow_md5(0); +#endif tls1_P_hash(sha1,S2,len,label,label_len,out2,olen); for (i=0; i<olen; i++) @@ -656,7 +662,13 @@ int tls1_cert_verify_mac(SSL *s, EVP_MD_CTX *in_ctx, unsigned char *out) EVP_MD_CTX_init(&ctx); EVP_MD_CTX_copy_ex(&ctx,in_ctx); +#ifdef OPENSSL_FIPS + FIPS_allow_md5(1); +#endif EVP_DigestFinal_ex(&ctx,out,&ret); +#ifdef OPENSSL_FIPS + FIPS_allow_md5(0); +#endif EVP_MD_CTX_cleanup(&ctx); return((int)ret); } @@ -675,7 +687,13 @@ int tls1_final_finish_mac(SSL *s, EVP_MD_CTX *in1_ctx, EVP_MD_CTX *in2_ctx, EVP_MD_CTX_init(&ctx); EVP_MD_CTX_copy_ex(&ctx,in1_ctx); +#ifdef OPENSSL_FIPS + FIPS_allow_md5(1); +#endif EVP_DigestFinal_ex(&ctx,q,&i); +#ifdef OPENSSL_FIPS + FIPS_allow_md5(0); +#endif q+=i; EVP_MD_CTX_copy_ex(&ctx,in2_ctx); EVP_DigestFinal_ex(&ctx,q,&i); |