]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/RuntimeDxeIpfCryptLib.c
1. Remove conducting ASSERT in BaseCryptLib.
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibRuntimeCryptProtocol / RuntimeDxeIpfCryptLib.c
index 7f893b91df1771f9e81b650fb2e66b4717a4da82..2a1da855c66178d8d1134e3b539a7d1145ea70a8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of The runtime cryptographic library instance (for IPF).\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
@@ -195,7 +195,7 @@ Sha256GetContextSize (
   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
@@ -221,7 +221,7 @@ Sha256Init (
   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
@@ -251,8 +251,8 @@ Sha256Update (
   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
@@ -320,7 +320,7 @@ RsaFree (
   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
@@ -351,10 +351,10 @@ RsaSetKey (
   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