summaryrefslogtreecommitdiff
path: root/CryptoPkg/CryptRuntimeDxe
diff options
context:
space:
mode:
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2012-03-19 05:52:16 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2012-03-19 05:52:16 +0000
commit16d2c32c4dff7fd8b0ee19e3ba908c0121f6636e (patch)
tree08699467fc6247e7375faf2c419cfd882398ab63 /CryptoPkg/CryptRuntimeDxe
parentbd0de3963b8e09ccded4b6922d5e6f0146a2f63f (diff)
downloadedk2-platforms-16d2c32c4dff7fd8b0ee19e3ba908c0121f6636e.tar.xz
1. Remove conducting ASSERT in BaseCryptLib.
Signed-off-by: sfu5 Reviewed-by: qianouyang Reviewed-by: gdong1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13110 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'CryptoPkg/CryptRuntimeDxe')
-rw-r--r--CryptoPkg/CryptRuntimeDxe/CryptRuntime.c20
-rw-r--r--CryptoPkg/CryptRuntimeDxe/CryptRuntime.h20
2 files changed, 20 insertions, 20 deletions
diff --git a/CryptoPkg/CryptRuntimeDxe/CryptRuntime.c b/CryptoPkg/CryptRuntimeDxe/CryptRuntime.c
index ff20da49e9..75d89648e4 100644
--- a/CryptoPkg/CryptRuntimeDxe/CryptRuntime.c
+++ b/CryptoPkg/CryptRuntimeDxe/CryptRuntime.c
@@ -2,7 +2,7 @@
Runtime Cryptographic Driver Implementation, which produce one crypto
protocol.
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -53,7 +53,7 @@ RuntimeCryptSha256GetContextSize (
Initializes user-supplied memory pointed by Sha256Context as SHA-256 hash context for
subsequent use.
- If Sha256Context is NULL, then ASSERT().
+ If Sha256Context is NULL, then return FALSE.
@param[in, out] Sha256Context Pointer to SHA-256 Context being initialized.
@@ -74,7 +74,7 @@ RuntimeCryptSha256Init (
Performs SHA-256 digest on a data buffer of the specified length. This function can
be called multiple times to compute the digest of long or discontinuous data streams.
- If Sha256Context is NULL, then ASSERT().
+ If Sha256Context is NULL, then return FALSE.
@param[in, out] Sha256Context Pointer to the SHA-256 context.
@param[in] Data Pointer to the buffer containing the data to be hashed.
@@ -100,8 +100,8 @@ RuntimeCryptSha256Update (
Completes SHA-256 hash computation and retrieves the digest value into the specified
memory. After this function has been called, the SHA-256 context cannot be used again.
- If Sha256Context is NULL, then ASSERT().
- If HashValue is NULL, then ASSERT().
+ If Sha256Context is NULL, then return FALSE.
+ If HashValue is NULL, then return FALSE.
@param[in, out] Sha256Context Pointer to SHA-256 context
@param[out] HashValue Pointer to a buffer that receives the SHA-256 digest
@@ -157,7 +157,7 @@ RuntimeCryptRsaFree (
the user-specified nonnegative integer (octet string format represented in RSA
PKCS#1).
- If RsaContext is NULL, then ASSERT().
+ If RsaContext is NULL, then return FALSE.
@param[in, out] RsaContext Pointer to RSA context being set.
@param[in] KeyTag Tag of RSA key component being set.
@@ -184,10 +184,10 @@ RuntimeCryptRsaSetKey (
Verifies the RSA-SSA signature with EMSA-PKCS1-v1_5 encoding scheme defined in
RSA PKCS#1.
- If RsaContext is NULL, then ASSERT().
- If MessageHash is NULL, then ASSERT().
- If Signature is NULL, then ASSERT().
- If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, then ASSERT().
+ If RsaContext is NULL, then return FALSE.
+ If MessageHash is NULL, then return FALSE.
+ If Signature is NULL, then return FALSE.
+ If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, return FALSE.
@param[in] RsaContext Pointer to RSA context for signature verification.
@param[in] MessageHash Pointer to octet message hash to be checked.
diff --git a/CryptoPkg/CryptRuntimeDxe/CryptRuntime.h b/CryptoPkg/CryptRuntimeDxe/CryptRuntime.h
index 312d7b49e1..86476450f4 100644
--- a/CryptoPkg/CryptRuntimeDxe/CryptRuntime.h
+++ b/CryptoPkg/CryptRuntimeDxe/CryptRuntime.h
@@ -1,7 +1,7 @@
/** @file
Header file of Runtime Cryptographic Driver.
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -41,7 +41,7 @@ RuntimeCryptSha256GetContextSize (
Initializes user-supplied memory pointed by Sha256Context as SHA-256 hash context for
subsequent use.
- If Sha256Context is NULL, then ASSERT().
+ If Sha256Context is NULL, then return FALSE.
@param[in, out] Sha256Context Pointer to SHA-256 Context being initialized.
@@ -60,7 +60,7 @@ RuntimeCryptSha256Init (
Performs SHA-256 digest on a data buffer of the specified length. This function can
be called multiple times to compute the digest of long or discontinuous data streams.
- If Sha256Context is NULL, then ASSERT().
+ If Sha256Context is NULL, then return FALSE.
@param[in, out] Sha256Context Pointer to the SHA-256 context.
@param[in] Data Pointer to the buffer containing the data to be hashed.
@@ -84,8 +84,8 @@ RuntimeCryptSha256Update (
Completes SHA-256 hash computation and retrieves the digest value into the specified
memory. After this function has been called, the SHA-256 context cannot be used again.
- If Sha256Context is NULL, then ASSERT().
- If HashValue is NULL, then ASSERT().
+ If Sha256Context is NULL, then return FALSE.
+ If HashValue is NULL, then return FALSE.
@param[in, out] Sha256Context Pointer to SHA-256 context
@param[out] HashValue Pointer to a buffer that receives the SHA-256 digest
@@ -133,7 +133,7 @@ RuntimeCryptRsaFree (
the user-specified nonnegative integer (octet string format represented in RSA
PKCS#1).
- If RsaContext is NULL, then ASSERT().
+ If RsaContext is NULL, then return FALSE.
@param[in, out] RsaContext Pointer to RSA context being set.
@param[in] KeyTag Tag of RSA key component being set.
@@ -158,10 +158,10 @@ RuntimeCryptRsaSetKey (
Verifies the RSA-SSA signature with EMSA-PKCS1-v1_5 encoding scheme defined in
RSA PKCS#1.
- If RsaContext is NULL, then ASSERT().
- If MessageHash is NULL, then ASSERT().
- If Signature is NULL, then ASSERT().
- If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, then ASSERT().
+ If RsaContext is NULL, then return FALSE.
+ If MessageHash is NULL, then return FALSE.
+ If Signature is NULL, then return FALSE.
+ If HashLength is not equal to the size of MD5, SHA-1 or SHA-256 digest, return FALSE.
@param[in] RsaContext Pointer to RSA context for signature verification.
@param[in] MessageHash Pointer to octet message hash to be checked.