CryptoPkg: Update HMAC Wrapper with opaque HMAC_CTX object.
authorQin Long <qin.long@intel.com>
Thu, 23 Mar 2017 12:47:34 +0000 (20:47 +0800)
committerQin Long <qin.long@intel.com>
Wed, 29 Mar 2017 08:17:24 +0000 (16:17 +0800)
commit4c270243995a4cba33955f6dfaa8ee93748ff843
tree6bd6c014d85e1f602dd110eb446d237a22db4ce8
parentec7ad9e10371a7fb500d8244402bb25d93c1a6db
CryptoPkg: Update HMAC Wrapper with opaque HMAC_CTX object.

OpenSSL-1.1.xx makes most data structures opaque.
This patch updated HMAC Wrapper implementation with opaque
HMAC_CTX object.
The HmacXXGetContextSize() is marked as deprecated, and updated
to use the fixed HMAC_CTX size, which is just kept for compatibility.
New APIs (HmacXXNew(), HmacXXFree()) were added  as the recommended
HMAC_CTX usage interfaces for HMAC-XXXX operations.

Cc: Ting Ye <ting.ye@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Lin <glin@suse.com>
Cc: Ronald Cron <ronald.cron@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
CryptoPkg/Include/Library/BaseCryptLib.h
CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c
CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5Null.c
CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c
CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1Null.c
CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c
CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256Null.c