]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Include/Protocol/RuntimeCrypt.h
1. Remove conducting ASSERT in BaseCryptLib.
[mirror_edk2.git] / CryptoPkg / Include / Protocol / RuntimeCrypt.h
index bb97d9102e2c81cf9e115a23a3633e6dd20c050b..bb03a622e9f5064af3676b72b1e815a16d4e4c33 100644 (file)
@@ -3,7 +3,7 @@
   Only limited crypto primitives (SHA-256 and RSA) are provided for runtime\r
   authenticated variable service.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -44,7 +44,7 @@ UINTN
   Initializes user-supplied memory pointed by Sha256Context as SHA-256 hash context for\r
   subsequent use.\r
 \r
-  If Sha256Context is NULL, then ASSERT().\r
+  If Sha256Context is NULL, then return FALSE.\r
 \r
   @param[in, out]  Sha256Context  Pointer to SHA-256 Context being initialized.\r
 \r
@@ -63,7 +63,7 @@ BOOLEAN
   Performs SHA-256 digest on a data buffer of the specified length. This function can\r
   be called multiple times to compute the digest of long or discontinuous data streams.\r
 \r
-  If Sha256Context is NULL, then ASSERT().\r
+  If Sha256Context is NULL, then return FALSE.\r
 \r
   @param[in, out]  Sha256Context  Pointer to the SHA-256 context.\r
   @param[in]       Data           Pointer to the buffer containing the data to be hashed.\r
@@ -87,8 +87,8 @@ BOOLEAN
   Completes SHA-256 hash computation and retrieves the digest value into the specified\r
   memory. After this function has been called, the SHA-256 context cannot be used again.\r
 \r
-  If Sha256Context is NULL, then ASSERT().\r
-  If HashValue is NULL, then ASSERT().\r
+  If Sha256Context is NULL, then return FALSE.\r
+  If HashValue is NULL, then return FALSE.\r
 \r
   @param[in, out]  Sha256Context  Pointer to SHA-256 context\r
   @param[out]      HashValue      Pointer to a buffer that receives the SHA-256 digest\r
@@ -136,7 +136,7 @@ VOID
   the user-specified nonnegative integer (octet string format represented in RSA\r
   PKCS#1).\r
 \r
-  If RsaContext is NULL, then ASSERT().\r
+  If RsaContext is NULL, then return FALSE.\r
 \r
   @param[in, out]  RsaContext  Pointer to RSA context being set.\r
   @param[in]       KeyTag      Tag of RSA key component being set.\r
@@ -160,10 +160,10 @@ BOOLEAN
   Verifies the RSA-SSA signature with EMSA-PKCS1-v1_5 encoding scheme defined in\r
   RSA PKCS#1.\r
 \r
-  If RsaContext is NULL, then ASSERT().\r
-  If MessageHash is NULL, then ASSERT().\r
-  If Signature is NULL, then ASSERT().\r
-  If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, then ASSERT().\r
+  If RsaContext is NULL, then return FALSE.\r
+  If MessageHash is NULL, then return FALSE.\r
+  If Signature is NULL, then return FALSE.\r
+  If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, then return FALSE.\r
 \r
   @param[in]  RsaContext   Pointer to RSA context for signature verification.\r
   @param[in]  MessageHash  Pointer to octet message hash to be checked.\r