diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-02-10 01:46:25 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-02-10 01:46:25 +0000 |
commit | a4113c52b227182627c1a102ff70245d210cb669 (patch) | |
tree | ea92637cad6f564a21c9a2b291653cfe22f3bfc8 /fips | |
parent | b3d8022eddb3c6c3e840054fcf3dcd77d1c3c2be (diff) |
Disable FIPS restrictions when doing GCM testing.
Diffstat (limited to 'fips')
-rw-r--r-- | fips/aes/fips_gcmtest.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fips/aes/fips_gcmtest.c b/fips/aes/fips_gcmtest.c index 32bbf3b321..e7bcad0dca 100644 --- a/fips/aes/fips_gcmtest.c +++ b/fips/aes/fips_gcmtest.c @@ -176,6 +176,8 @@ static void gcmtest(int encrypt) { tag = OPENSSL_malloc(taglen); EVP_CipherInit_ex(&ctx, gcm, NULL, NULL, NULL, 1); + /* Relax FIPS constraints for testing */ + M_EVP_CIPHER_CTX_set_flags(&ctx, EVP_CIPH_FLAG_NON_FIPS_ALLOW); EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_IVLEN, ivlen, 0); if (encrypt == 1) { @@ -227,6 +229,8 @@ static void gcmtest(int encrypt) if (!encrypt && tag) { EVP_CipherInit_ex(&ctx, gcm, NULL, NULL, NULL, 0); + /* Relax FIPS constraints for testing */ + M_EVP_CIPHER_CTX_set_flags(&ctx, EVP_CIPH_FLAG_NON_FIPS_ALLOW); EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_IVLEN, ivlen, 0); EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, 0); EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_TAG, taglen, tag); |