diff options
| author | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2016-09-22 10:15:26 -0400 |
|---|---|---|
| committer | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2016-09-22 10:15:26 -0400 |
| commit | 5998f019f85f765070f049332bf68d347d60c993 (patch) | |
| tree | 796531832eed643b2fec02ae7f0949e84d152968 /Cryptlib/OpenSSL/crypto/cmac | |
| parent | e3ef28acdfacfe07c42662d86af2135d1a100c24 (diff) | |
| parent | 62f0afa2ecead02b1258dabab8097ca278a22f8f (diff) | |
| download | efi-boot-shim-5998f019f85f765070f049332bf68d347d60c993.tar.gz efi-boot-shim-5998f019f85f765070f049332bf68d347d60c993.zip | |
New upstream release.
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/cmac')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/cmac/cmac.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Cryptlib/OpenSSL/crypto/cmac/cmac.c b/Cryptlib/OpenSSL/crypto/cmac/cmac.c index 774e6dc9..2954b6eb 100644 --- a/Cryptlib/OpenSSL/crypto/cmac/cmac.c +++ b/Cryptlib/OpenSSL/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(). |
