Add support for HMAC_SHA224, HMAC_SHA384 and HMAC_SHA512.
Change-Id: I76c73f6e16e5ee4acaf8a78eacd1bfdf3db12b68
diff --git a/hmac_operation.cpp b/hmac_operation.cpp
index 1620105..a179655 100644
--- a/hmac_operation.cpp
+++ b/hmac_operation.cpp
@@ -30,9 +30,18 @@
const EVP_MD* md;
switch (digest) {
+ case KM_DIGEST_SHA_2_224:
+ md = EVP_sha224();
+ break;
case KM_DIGEST_SHA_2_256:
md = EVP_sha256();
break;
+ case KM_DIGEST_SHA_2_384:
+ md = EVP_sha384();
+ break;
+ case KM_DIGEST_SHA_2_512:
+ md = EVP_sha512();
+ break;
default:
error_ = KM_ERROR_UNSUPPORTED_DIGEST;
return;