aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cmac
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2016-03-01 17:57:01 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2016-03-01 17:57:01 +0000
commit9aeed18ad799c20d3accf6e1535817538dc983f6 (patch)
tree37a4bb1290ee86a2b4ce070f139b2379ee747425 /crypto/cmac
parentc188d4cade9cba451816aef2371942bea4ff837f (diff)
downloadsrc-9aeed18ad799c20d3accf6e1535817538dc983f6.tar.gz
src-9aeed18ad799c20d3accf6e1535817538dc983f6.zip
Import OpenSSL 1.0.2g.vendor/openssl/1.0.2g
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=296273 svn path=/vendor-crypto/openssl/1.0.2g/; revision=296274; tag=vendor/openssl/1.0.2g
Diffstat (limited to 'crypto/cmac')
-rw-r--r--crypto/cmac/cmac.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c
index 774e6dc91905..2954b6eb7dcf 100644
--- a/crypto/cmac/cmac.c
+++ b/crypto/cmac/cmac.c
@@ -160,6 +160,14 @@ int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
EVPerr(EVP_F_CMAC_INIT, EVP_R_DISABLED_FOR_FIPS);
return 0;
}
+
+ /* Switch to FIPS cipher implementation if possible */
+ if (cipher != NULL) {
+ const EVP_CIPHER *fcipher;
+ fcipher = FIPS_get_cipherbynid(EVP_CIPHER_nid(cipher));
+ if (fcipher != NULL)
+ cipher = fcipher;
+ }
/*
* Other algorithm blocking will be done in FIPS_cmac_init, via
* FIPS_cipherinit().