summaryrefslogtreecommitdiff
path: root/CryptoPkg/Include
diff options
context:
space:
mode:
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-18 09:32:05 +0000
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-18 09:32:05 +0000
commit532616bbd62bea0fe4873f2e7a57de7be9ba3976 (patch)
tree444472397c2dd4686a71d26e8202e4462e7948fd /CryptoPkg/Include
parentc31b316c009096acfaaa60c60813f641c63d2b97 (diff)
downloadedk2-platforms-532616bbd62bea0fe4873f2e7a57de7be9ba3976.tar.xz
Add interfaces to several library instances of BaseCryptLib.
Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13539 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'CryptoPkg/Include')
-rw-r--r--CryptoPkg/Include/Library/BaseCryptLib.h169
1 files changed, 154 insertions, 15 deletions
diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h b/CryptoPkg/Include/Library/BaseCryptLib.h
index ffd83ada66..decca54eac 100644
--- a/CryptoPkg/Include/Library/BaseCryptLib.h
+++ b/CryptoPkg/Include/Library/BaseCryptLib.h
@@ -69,7 +69,10 @@ typedef enum {
/**
Retrieves the size, in bytes, of the context buffer required for MD4 hash operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for MD4 hash operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -83,11 +86,13 @@ Md4GetContextSize (
subsequent use.
If Md4Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] Md4Context Pointer to MD4 context being initialized.
@retval TRUE MD4 context initialization succeeded.
@retval FALSE MD4 context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -101,12 +106,14 @@ Md4Init (
If Md4Context is NULL, then return FALSE.
If NewMd4Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] Md4Context Pointer to MD4 context being copied.
@param[out] NewMd4Context Pointer to new MD4 context.
@retval TRUE MD4 context copy succeeded.
@retval FALSE MD4 context copy failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -125,6 +132,7 @@ Md4Duplicate (
by Md4Final(). Behavior with invalid context is undefined.
If Md4Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] Md4Context Pointer to the MD4 context.
@param[in] Data Pointer to the buffer containing the data to be hashed.
@@ -132,6 +140,7 @@ Md4Duplicate (
@retval TRUE MD4 data digest succeeded.
@retval FALSE MD4 data digest failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -153,6 +162,7 @@ Md4Update (
If Md4Context is NULL, then return FALSE.
If HashValue is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] Md4Context Pointer to the MD4 context.
@param[out] HashValue Pointer to a buffer that receives the MD4 digest
@@ -160,6 +170,7 @@ Md4Update (
@retval TRUE MD4 digest computation succeeded.
@retval FALSE MD4 digest computation failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -172,7 +183,10 @@ Md4Final (
/**
Retrieves the size, in bytes, of the context buffer required for MD5 hash operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for MD5 hash operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -186,11 +200,13 @@ Md5GetContextSize (
subsequent use.
If Md5Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] Md5Context Pointer to MD5 context being initialized.
@retval TRUE MD5 context initialization succeeded.
@retval FALSE MD5 context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -204,12 +220,14 @@ Md5Init (
If Md5Context is NULL, then return FALSE.
If NewMd5Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] Md5Context Pointer to MD5 context being copied.
@param[out] NewMd5Context Pointer to new MD5 context.
@retval TRUE MD5 context copy succeeded.
@retval FALSE MD5 context copy failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -228,6 +246,7 @@ Md5Duplicate (
by Md5Final(). Behavior with invalid context is undefined.
If Md5Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] Md5Context Pointer to the MD5 context.
@param[in] Data Pointer to the buffer containing the data to be hashed.
@@ -235,6 +254,7 @@ Md5Duplicate (
@retval TRUE MD5 data digest succeeded.
@retval FALSE MD5 data digest failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -256,6 +276,7 @@ Md5Update (
If Md5Context is NULL, then return FALSE.
If HashValue is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] Md5Context Pointer to the MD5 context.
@param[out] HashValue Pointer to a buffer that receives the MD5 digest
@@ -263,6 +284,7 @@ Md5Update (
@retval TRUE MD5 digest computation succeeded.
@retval FALSE MD5 digest computation failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -275,7 +297,10 @@ Md5Final (
/**
Retrieves the size, in bytes, of the context buffer required for SHA-1 hash operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for SHA-1 hash operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -289,11 +314,13 @@ Sha1GetContextSize (
subsequent use.
If Sha1Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] Sha1Context Pointer to SHA-1 context being initialized.
@retval TRUE SHA-1 context initialization succeeded.
@retval FALSE SHA-1 context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -307,12 +334,14 @@ Sha1Init (
If Sha1Context is NULL, then return FALSE.
If NewSha1Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] Sha1Context Pointer to SHA-1 context being copied.
@param[out] NewSha1Context Pointer to new SHA-1 context.
@retval TRUE SHA-1 context copy succeeded.
@retval FALSE SHA-1 context copy failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -331,6 +360,7 @@ Sha1Duplicate (
by Sha1Final(). Behavior with invalid context is undefined.
If Sha1Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] Sha1Context Pointer to the SHA-1 context.
@param[in] Data Pointer to the buffer containing the data to be hashed.
@@ -338,6 +368,7 @@ Sha1Duplicate (
@retval TRUE SHA-1 data digest succeeded.
@retval FALSE SHA-1 data digest failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -359,6 +390,7 @@ Sha1Update (
If Sha1Context is NULL, then return FALSE.
If HashValue is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] Sha1Context Pointer to the SHA-1 context.
@param[out] HashValue Pointer to a buffer that receives the SHA-1 digest
@@ -366,6 +398,7 @@ Sha1Update (
@retval TRUE SHA-1 digest computation succeeded.
@retval FALSE SHA-1 digest computation failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -410,12 +443,14 @@ Sha256Init (
If Sha256Context is NULL, then return FALSE.
If NewSha256Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] Sha256Context Pointer to SHA-256 context being copied.
@param[out] NewSha256Context Pointer to new SHA-256 context.
@retval TRUE SHA-256 context copy succeeded.
@retval FALSE SHA-256 context copy failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -486,7 +521,10 @@ Sha256Final (
/**
Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for HMAC-MD5 operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -500,6 +538,7 @@ HmacMd5GetContextSize (
subsequent use.
If HmacMd5Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] HmacMd5Context Pointer to HMAC-MD5 context being initialized.
@param[in] Key Pointer to the user-supplied key.
@@ -507,6 +546,7 @@ HmacMd5GetContextSize (
@retval TRUE HMAC-MD5 context initialization succeeded.
@retval FALSE HMAC-MD5 context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -522,12 +562,14 @@ HmacMd5Init (
If HmacMd5Context is NULL, then return FALSE.
If NewHmacMd5Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied.
@param[out] NewHmacMd5Context Pointer to new HMAC-MD5 context.
@retval TRUE HMAC-MD5 context copy succeeded.
@retval FALSE HMAC-MD5 context copy failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -546,6 +588,7 @@ HmacMd5Duplicate (
finalized by HmacMd5Final(). Behavior with invalid context is undefined.
If HmacMd5Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
@param[in] Data Pointer to the buffer containing the data to be digested.
@@ -553,6 +596,7 @@ HmacMd5Duplicate (
@retval TRUE HMAC-MD5 data digest succeeded.
@retval FALSE HMAC-MD5 data digest failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -574,6 +618,7 @@ HmacMd5Update (
If HmacMd5Context is NULL, then return FALSE.
If HashValue is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
@param[out] HashValue Pointer to a buffer that receives the HMAC-MD5 digest
@@ -581,6 +626,7 @@ HmacMd5Update (
@retval TRUE HMAC-MD5 digest computation succeeded.
@retval FALSE HMAC-MD5 digest computation failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -593,7 +639,10 @@ HmacMd5Final (
/**
Retrieves the size, in bytes, of the context buffer required for HMAC-SHA1 operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for HMAC-SHA1 operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -607,6 +656,7 @@ HmacSha1GetContextSize (
subsequent use.
If HmacSha1Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] HmacSha1Context Pointer to HMAC-SHA1 context being initialized.
@param[in] Key Pointer to the user-supplied key.
@@ -614,6 +664,7 @@ HmacSha1GetContextSize (
@retval TRUE HMAC-SHA1 context initialization succeeded.
@retval FALSE HMAC-SHA1 context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -629,12 +680,14 @@ HmacSha1Init (
If HmacSha1Context is NULL, then return FALSE.
If NewHmacSha1Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] HmacSha1Context Pointer to HMAC-SHA1 context being copied.
@param[out] NewHmacSha1Context Pointer to new HMAC-SHA1 context.
@retval TRUE HMAC-SHA1 context copy succeeded.
@retval FALSE HMAC-SHA1 context copy failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -653,6 +706,7 @@ HmacSha1Duplicate (
be finalized by HmacSha1Final(). Behavior with invalid context is undefined.
If HmacSha1Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context.
@param[in] Data Pointer to the buffer containing the data to be digested.
@@ -660,6 +714,7 @@ HmacSha1Duplicate (
@retval TRUE HMAC-SHA1 data digest succeeded.
@retval FALSE HMAC-SHA1 data digest failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -681,6 +736,7 @@ HmacSha1Update (
If HmacSha1Context is NULL, then return FALSE.
If HashValue is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context.
@param[out] HashValue Pointer to a buffer that receives the HMAC-SHA1 digest
@@ -688,6 +744,7 @@ HmacSha1Update (
@retval TRUE HMAC-SHA1 digest computation succeeded.
@retval FALSE HMAC-SHA1 digest computation failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -705,7 +762,10 @@ HmacSha1Final (
/**
Retrieves the size, in bytes, of the context buffer required for TDES operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for TDES operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -728,6 +788,7 @@ TdesGetContextSize (
If TdesContext is NULL, then return FALSE.
If Key is NULL, then return FALSE.
If KeyLength is not valid, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] TdesContext Pointer to TDES context being initialized.
@param[in] Key Pointer to the user-supplied TDES key.
@@ -735,6 +796,7 @@ TdesGetContextSize (
@retval TRUE TDES context initialization succeeded.
@retval FALSE TDES context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -759,6 +821,7 @@ TdesInit (
If Input is NULL, then return FALSE.
If InputSize is not multiple of block size (8 bytes), then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] TdesContext Pointer to the TDES context.
@param[in] Input Pointer to the buffer containing the data to be encrypted.
@@ -767,6 +830,7 @@ TdesInit (
@retval TRUE TDES encryption succeeded.
@retval FALSE TDES encryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -792,6 +856,7 @@ TdesEcbEncrypt (
If Input is NULL, then return FALSE.
If InputSize is not multiple of block size (8 bytes), then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] TdesContext Pointer to the TDES context.
@param[in] Input Pointer to the buffer containing the data to be decrypted.
@@ -800,6 +865,7 @@ TdesEcbEncrypt (
@retval TRUE TDES decryption succeeded.
@retval FALSE TDES decryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -827,6 +893,7 @@ TdesEcbDecrypt (
If InputSize is not multiple of block size (8 bytes), then return FALSE.
If Ivec is NULL, then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] TdesContext Pointer to the TDES context.
@param[in] Input Pointer to the buffer containing the data to be encrypted.
@@ -836,6 +903,7 @@ TdesEcbDecrypt (
@retval TRUE TDES encryption succeeded.
@retval FALSE TDES encryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -864,6 +932,7 @@ TdesCbcEncrypt (
If InputSize is not multiple of block size (8 bytes), then return FALSE.
If Ivec is NULL, then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] TdesContext Pointer to the TDES context.
@param[in] Input Pointer to the buffer containing the data to be encrypted.
@@ -873,6 +942,7 @@ TdesCbcEncrypt (
@retval TRUE TDES decryption succeeded.
@retval FALSE TDES decryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -888,7 +958,10 @@ TdesCbcDecrypt (
/**
Retrieves the size, in bytes, of the context buffer required for AES operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for AES operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -908,6 +981,7 @@ AesGetContextSize (
If AesContext is NULL, then return FALSE.
If Key is NULL, then return FALSE.
If KeyLength is not valid, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] AesContext Pointer to AES context being initialized.
@param[in] Key Pointer to the user-supplied AES key.
@@ -915,6 +989,7 @@ AesGetContextSize (
@retval TRUE AES context initialization succeeded.
@retval FALSE AES context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -939,6 +1014,7 @@ AesInit (
If Input is NULL, then return FALSE.
If InputSize is not multiple of block size (16 bytes), then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] AesContext Pointer to the AES context.
@param[in] Input Pointer to the buffer containing the data to be encrypted.
@@ -947,6 +1023,7 @@ AesInit (
@retval TRUE AES encryption succeeded.
@retval FALSE AES encryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -972,6 +1049,7 @@ AesEcbEncrypt (
If Input is NULL, then return FALSE.
If InputSize is not multiple of block size (16 bytes), then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] AesContext Pointer to the AES context.
@param[in] Input Pointer to the buffer containing the data to be decrypted.
@@ -980,6 +1058,7 @@ AesEcbEncrypt (
@retval TRUE AES decryption succeeded.
@retval FALSE AES decryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1007,6 +1086,7 @@ AesEcbDecrypt (
If InputSize is not multiple of block size (16 bytes), then return FALSE.
If Ivec is NULL, then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] AesContext Pointer to the AES context.
@param[in] Input Pointer to the buffer containing the data to be encrypted.
@@ -1016,6 +1096,7 @@ AesEcbDecrypt (
@retval TRUE AES encryption succeeded.
@retval FALSE AES encryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1044,6 +1125,7 @@ AesCbcEncrypt (
If InputSize is not multiple of block size (16 bytes), then return FALSE.
If Ivec is NULL, then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] AesContext Pointer to the AES context.
@param[in] Input Pointer to the buffer containing the data to be encrypted.
@@ -1053,6 +1135,7 @@ AesCbcEncrypt (
@retval TRUE AES decryption succeeded.
@retval FALSE AES decryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1068,7 +1151,10 @@ AesCbcDecrypt (
/**
Retrieves the size, in bytes, of the context buffer required for ARC4 operations.
+ If this interface is not supported, then return zero.
+
@return The size, in bytes, of the context buffer required for ARC4 operations.
+ @retval 0 This interface is not supported.
**/
UINTN
@@ -1087,6 +1173,7 @@ Arc4GetContextSize (
If Arc4Context is NULL, then return FALSE.
If Key is NULL, then return FALSE.
If KeySize does not in the range of [5, 256] bytes, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] Arc4Context Pointer to ARC4 context being initialized.
@param[in] Key Pointer to the user-supplied ARC4 key.
@@ -1094,6 +1181,7 @@ Arc4GetContextSize (
@retval TRUE ARC4 context initialization succeeded.
@retval FALSE ARC4 context initialization failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1115,6 +1203,7 @@ Arc4Init (
If Arc4Context is NULL, then return FALSE.
If Input is NULL, then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] Arc4Context Pointer to the ARC4 context.
@param[in] Input Pointer to the buffer containing the data to be encrypted.
@@ -1123,6 +1212,7 @@ Arc4Init (
@retval TRUE ARC4 encryption succeeded.
@retval FALSE ARC4 encryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1145,6 +1235,7 @@ Arc4Encrypt (
If Arc4Context is NULL, then return FALSE.
If Input is NULL, then return FALSE.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] Arc4Context Pointer to the ARC4 context.
@param[in] Input Pointer to the buffer containing the data to be decrypted.
@@ -1153,6 +1244,7 @@ Arc4Encrypt (
@retval TRUE ARC4 decryption succeeded.
@retval FALSE ARC4 decryption failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1173,11 +1265,13 @@ Arc4Decrypt (
should be already correctly initialized by ARC4Init().
If Arc4Context is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] Arc4Context Pointer to the ARC4 context.
@retval TRUE ARC4 reset succeeded.
@retval FALSE ARC4 reset failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1262,6 +1356,7 @@ RsaSetKey (
If RsaContext is NULL, then return FALSE.
If BnSize is NULL, then return FALSE.
If BnSize is large enough but BigNumber is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] RsaContext Pointer to RSA context being set.
@param[in] KeyTag Tag of RSA key component being set.
@@ -1272,6 +1367,7 @@ RsaSetKey (
@retval TRUE RSA key component was retrieved successfully.
@retval FALSE Invalid RSA key component tag.
@retval FALSE BnSize is too small.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1294,6 +1390,7 @@ RsaGetKey (
initialized by RandomSeed().
If RsaContext is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] RsaContext Pointer to RSA context being set.
@param[in] ModulusLength Length of RSA modulus N in bits.
@@ -1302,6 +1399,7 @@ RsaGetKey (
@retval TRUE RSA key component was generated successfully.
@retval FALSE Invalid RSA key component tag.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1323,11 +1421,13 @@ RsaGenerateKey (
- Whether d*e = 1 mod lcm(p-1,q-1)
If RsaContext is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] RsaContext Pointer to RSA context to check.
@retval TRUE RSA key components are valid.
@retval FALSE RSA key components are not valid.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1348,6 +1448,7 @@ RsaCheckKey (
If MessageHash is NULL, then return FALSE.
If HashSize is not equal to the size of MD5, SHA-1 or SHA-256 digest, then return FALSE.
If SigSize is large enough but Signature is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] RsaContext Pointer to RSA context for signature generation.
@param[in] MessageHash Pointer to octet message hash to be signed.
@@ -1359,6 +1460,7 @@ RsaCheckKey (
@retval TRUE Signature successfully generated in PKCS1-v1_5.
@retval FALSE Signature generation failed.
@retval FALSE SigSize is too small.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1403,6 +1505,10 @@ RsaPkcs1Verify (
/**
Retrieve the RSA Private Key from the password-protected PEM key data.
+ If PemData is NULL, then return FALSE.
+ If RsaContext is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
+
@param[in] PemData Pointer to the PEM-encoded key data to be retrieved.
@param[in] PemSize Size of the PEM key data in bytes.
@param[in] Password NULL-terminated passphrase used for encrypted PEM key data.
@@ -1410,11 +1516,10 @@ RsaPkcs1Verify (
RSA private key component. Use RsaFree() function to free the
resource.
- If PemData is NULL, then return FALSE.
- If RsaContext is NULL, then return FALSE.
-
@retval TRUE RSA Private Key was retrieved successfully.
@retval FALSE Invalid PEM key data or incorrect password.
+ @retval FALSE This interface is not supported.
+
**/
BOOLEAN
@@ -1429,17 +1534,19 @@ RsaGetPrivateKeyFromPem (
/**
Retrieve the RSA Public Key from one DER-encoded X509 certificate.
+ If Cert is NULL, then return FALSE.
+ If RsaContext is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
+
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize Size of the X509 certificate in bytes.
@param[out] RsaContext Pointer to new-generated RSA context which contain the retrieved
RSA public key component. Use RsaFree() function to free the
resource.
- If Cert is NULL, then return FALSE.
- If RsaContext is NULL, then return FALSE.
-
@retval TRUE RSA Public Key was retrieved successfully.
@retval FALSE Fail to retrieve RSA public key from X509 certificate.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1453,18 +1560,20 @@ RsaGetPublicKeyFromX509 (
/**
Retrieve the subject bytes from one X.509 certificate.
+ If Cert is NULL, then return FALSE.
+ If SubjectSize is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
+
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize Size of the X509 certificate in bytes.
@param[out] CertSubject Pointer to the retrieved certificate subject bytes.
@param[in, out] SubjectSize The size in bytes of the CertSubject buffer on input,
and the size of buffer returned CertSubject on output.
- If Cert is NULL, then return FALSE.
- If SubjectSize is NULL, then return FALSE.
-
@retval TRUE The certificate subject retrieved successfully.
@retval FALSE Invalid certificate, or the SubjectSize is too small for the result.
The SubjectSize will be updated with the required size.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1479,17 +1588,19 @@ X509GetSubjectName (
/**
Verify one X509 certificate was issued by the trusted CA.
+ If Cert is NULL, then return FALSE.
+ If CACert is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
+
@param[in] Cert Pointer to the DER-encoded X509 certificate to be verified.
@param[in] CertSize Size of the X509 certificate in bytes.
@param[in] CACert Pointer to the DER-encoded trusted CA certificate.
@param[in] CACertSize Size of the CA Certificate in bytes.
- If Cert is NULL, then return FALSE.
- If CACert is NULL, then return FALSE.
-
@retval TRUE The certificate was issued by the trusted CA.
@retval FALSE Invalid certificate or the certificate was not issued by the given
trusted CA.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1506,6 +1617,7 @@ X509VerifyCert (
If Cert is NULL, then return FALSE.
If SingleX509Cert is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] Cert Pointer to the DER-encoded certificate data.
@param[in] CertSize The size of certificate data in bytes.
@@ -1513,6 +1625,7 @@ X509VerifyCert (
@retval TRUE The X509 object generation succeeded.
@retval FALSE The operation failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1527,6 +1640,7 @@ X509ConstructCertificate (
Construct a X509 stack object from a list of DER-encoded certificate data.
If X509Stack is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] X509Stack On input, pointer to an existing X509 stack object.
On output, pointer to the X509 stack object with new
@@ -1537,6 +1651,7 @@ X509ConstructCertificate (
@retval TRUE The X509 stack construction succeeded.
@retval FALSE The construction operation failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1549,7 +1664,7 @@ X509ConstructCertificateStack (
/**
Release the specified X509 object.
- If X509Cert is NULL, then return FALSE.
+ If the interface is not supported, then ASSERT().
@param[in] X509Cert Pointer to the X509 object to be released.
@@ -1563,7 +1678,7 @@ X509Free (
/**
Release the specified X509 stack object.
- If X509Stack is NULL, then return FALSE.
+ If the interface is not supported, then ASSERT().
@param[in] X509Stack Pointer to the X509 stack object to be released.
@@ -1581,6 +1696,7 @@ X509StackFree (
If P7Data, CertStack, StackLength, TrustedCert or CertLength is NULL, then
return FALSE. If P7Length overflow, then return FAlSE.
+ If this interface is not supported, then return FALSE.
@param[in] P7Data Pointer to the PKCS#7 message to verify.
@param[in] P7Length Length of the PKCS#7 message in bytes.
@@ -1593,6 +1709,7 @@ X509StackFree (
@retval TRUE The operation is finished successfully.
@retval FALSE Error occurs during the operation.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1609,6 +1726,8 @@ Pkcs7GetSigners (
/**
Wrap function to use free() to free allocated memory for certificates.
+ If this interface is not supported, then ASSERT().
+
@param[in] Certs Pointer to the certificates to be freed.
**/
@@ -1623,6 +1742,8 @@ Pkcs7FreeSigners (
Syntax Standard, version 1.5". This interface is only intended to be used for
application to perform PKCS#7 functionality validation.
+ If this interface is not supported, then return FALSE.
+
@param[in] PrivateKey Pointer to the PEM-formatted private key data for
data signing.
@param[in] PrivateKeySize Size of the PEM private key data in bytes.
@@ -1639,6 +1760,7 @@ Pkcs7FreeSigners (
@retval TRUE PKCS#7 data signing succeeded.
@retval FALSE PKCS#7 data signing failed.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1662,6 +1784,7 @@ Pkcs7Sign (
If P7Data, TrustedCert or InData is NULL, then return FALSE.
If P7Length, CertLength or DataLength overflow, then return FAlSE.
+ If this interface is not supported, then return FALSE.
@param[in] P7Data Pointer to the PKCS#7 message to verify.
@param[in] P7Length Length of the PKCS#7 message in bytes.
@@ -1673,6 +1796,7 @@ Pkcs7Sign (
@retval TRUE The specified PKCS#7 signed data is valid.
@retval FALSE Invalid PKCS#7 signed data.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1692,6 +1816,7 @@ Pkcs7Verify (
If AuthData is NULL, then return FALSE.
If ImageHash is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in] AuthData Pointer to the Authenticode Signature retrieved from signed
PE/COFF image to be verified.
@@ -1706,6 +1831,7 @@ Pkcs7Verify (
@retval TRUE The specified Authenticode Signature is valid.
@retval FALSE Invalid Authenticode Signature.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1728,6 +1854,7 @@ AuthenticodeVerify (
@return Pointer to the Diffie-Hellman Context that has been initialized.
If the allocations fails, DhNew() returns NULL.
+ If the interface is not supported, DhNew() returns NULL.
**/
VOID *
@@ -1739,7 +1866,7 @@ DhNew (
/**
Release the specified DH context.
- If DhContext is NULL, then return FALSE.
+ If the interface is not supported, then ASSERT().
@param[in] DhContext Pointer to the DH context to be released.
@@ -1761,6 +1888,7 @@ DhFree (
If DhContext is NULL, then return FALSE.
If Prime is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] DhContext Pointer to the DH context.
@param[in] Generator Value of generator.
@@ -1770,6 +1898,7 @@ DhFree (
@retval TRUE DH pamameter generation succeeded.
@retval FALSE Value of Generator is not supported.
@retval FALSE PRNG fails to generate random prime number with PrimeLength.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1789,6 +1918,7 @@ DhGenerateParameter (
If DhContext is NULL, then return FALSE.
If Prime is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] DhContext Pointer to the DH context.
@param[in] Generator Value of generator.
@@ -1800,6 +1930,7 @@ DhGenerateParameter (
@retval FALSE Value of Generator is not suitable for the Prime.
@retval FALSE Value of Prime is not a prime number.
@retval FALSE Value of Prime is not a safe prime number.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1822,6 +1953,7 @@ DhSetParameter (
If DhContext is NULL, then return FALSE.
If PublicKeySize is NULL, then return FALSE.
If PublicKeySize is large enough but PublicKey is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] DhContext Pointer to the DH context.
@param[out] PublicKey Pointer to the buffer to receive generated public key.
@@ -1831,6 +1963,7 @@ DhSetParameter (
@retval TRUE DH public key generation succeeded.
@retval FALSE DH public key generation failed.
@retval FALSE PublicKeySize is not large enough.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1851,6 +1984,7 @@ DhGenerateKey (
If PeerPublicKey is NULL, then return FALSE.
If KeySize is NULL, then return FALSE.
If KeySize is large enough but Key is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[in, out] DhContext Pointer to the DH context.
@param[in] PeerPublicKey Pointer to the peer's public key.
@@ -1862,6 +1996,7 @@ DhGenerateKey (
@retval TRUE DH exchanged key generation succeeded.
@retval FALSE DH exchanged key generation failed.
@retval FALSE KeySize is not large enough.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1884,6 +2019,7 @@ DhComputeKey (
This function sets up the seed value for the pseudorandom number generator.
If Seed is not NULL, then the seed passed in is used.
If Seed is NULL, then default seed is used.
+ If this interface is not supported, then return FALSE.
@param[in] Seed Pointer to seed value.
If NULL, default seed is used.
@@ -1892,6 +2028,7 @@ DhComputeKey (
@retval TRUE Pseudorandom number generator has enough entropy for random generation.
@retval FALSE Pseudorandom number generator does not have enough entropy for random generation.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN
@@ -1905,12 +2042,14 @@ RandomSeed (
Generates a pseudorandom byte stream of the specified size.
If Output is NULL, then return FALSE.
+ If this interface is not supported, then return FALSE.
@param[out] Output Pointer to buffer to receive random value.
@param[in] Size Size of randome bytes to generate.
@retval TRUE Pseudorandom byte stream generated successfully.
@retval FALSE Pseudorandom number generator fails to generate due to lack of entropy.
+ @retval FALSE This interface is not supported.
**/
BOOLEAN