]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
CryptoPkg: Fix typos in comments
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Pk / CryptPkcs7Verify.c
index 559610d7b24e46cdd9f05828daea6150fb9226c5..dcaba436797a1507a14280c783d9c085a5c131e2 100644 (file)
@@ -10,7 +10,7 @@
   WrapPkcs7Data(), Pkcs7GetSigners(), Pkcs7Verify() will get UEFI Authenticated\r
   Variable and will do basic check for data structure.\r
 \r
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2016, 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
@@ -229,7 +229,7 @@ _Exit:
   in a ContentInfo structure.\r
 \r
   If P7Data, CertStack, StackLength, TrustedCert or CertLength is NULL, then\r
-  return FALSE. If P7Length overflow, then return FAlSE.\r
+  return FALSE. If P7Length overflow, then return FALSE.\r
 \r
   Caution: This function may receive untrusted input.\r
   UEFI Authenticated Variable is external input, so this function will do basic\r
@@ -238,10 +238,10 @@ _Exit:
   @param[in]  P7Data       Pointer to the PKCS#7 message to verify.\r
   @param[in]  P7Length     Length of the PKCS#7 message in bytes.\r
   @param[out] CertStack    Pointer to Signer's certificates retrieved from P7Data.\r
-                           It's caller's responsiblity to free the buffer.\r
+                           It's caller's responsibility to free the buffer.\r
   @param[out] StackLength  Length of signer's certificates in bytes.\r
   @param[out] TrustedCert  Pointer to a trusted certificate from Signer's certificates.\r
-                           It's caller's responsiblity to free the buffer.\r
+                           It's caller's responsibility to free the buffer.\r
   @param[out] CertLength   Length of the trusted certificate in bytes.\r
 \r
   @retval  TRUE            The operation is finished successfully.\r
@@ -436,10 +436,10 @@ Pkcs7FreeSigners (
   @param[in]  P7Data            Pointer to the PKCS#7 message.\r
   @param[in]  P7Length          Length of the PKCS#7 message in bytes.\r
   @param[out] SignerChainCerts  Pointer to the certificates list chained to signer's\r
-                                certificate. It's caller's responsiblity to free the buffer.\r
+                                certificate. It's caller's responsibility to free the buffer.\r
   @param[out] ChainLength       Length of the chained certificates list buffer in bytes.\r
   @param[out] UnchainCerts      Pointer to the unchained certificates lists. It's caller's\r
-                                responsiblity to free the buffer.\r
+                                responsibility to free the buffer.\r
   @param[out] UnchainLength     Length of the unchained certificates list buffer in bytes.\r
 \r
   @retval  TRUE         The operation is finished successfully.\r
@@ -489,6 +489,8 @@ Pkcs7GetCertificatesList (
   OldBuf         = NULL;\r
   Signers        = NULL;\r
 \r
+  ZeroMem (&CertCtx, sizeof (CertCtx));\r
+\r
   //\r
   // Parameter Checking\r
   //\r
@@ -716,12 +718,12 @@ _Error:
 }\r
 \r
 /**\r
-  Verifies the validility of a PKCS#7 signed data as described in "PKCS #7:\r
+  Verifies the validity of a PKCS#7 signed data as described in "PKCS #7:\r
   Cryptographic Message Syntax Standard". The input signed data could be wrapped\r
   in a ContentInfo structure.\r
 \r
   If P7Data, TrustedCert or InData is NULL, then return FALSE.\r
-  If P7Length, CertLength or DataLength overflow, then return FAlSE.\r
+  If P7Length, CertLength or DataLength overflow, then return FALSE.\r
 \r
   Caution: This function may receive untrusted input.\r
   UEFI Authenticated Variable is external input, so this function will do basic\r
@@ -895,7 +897,7 @@ _Exit:
   data could be wrapped in a ContentInfo structure.\r
 \r
   If P7Data, Content, or ContentSize is NULL, then return FALSE. If P7Length overflow,\r
-  then return FAlSE. If the P7Data is not correctly formatted, then return FALSE.\r
+  then return FALSE. If the P7Data is not correctly formatted, then return FALSE.\r
 \r
   Caution: This function may receive untrusted input. So this function will do\r
            basic check for PKCS#7 data structure.\r
@@ -903,7 +905,7 @@ _Exit:
   @param[in]   P7Data       Pointer to the PKCS#7 signed data to process.\r
   @param[in]   P7Length     Length of the PKCS#7 signed data in bytes.\r
   @param[out]  Content      Pointer to the extracted content from the PKCS#7 signedData.\r
-                            It's caller's responsiblity to free the buffer.\r
+                            It's caller's responsibility to free the buffer.\r
   @param[out]  ContentSize  The size of the extracted content in bytes.\r
 \r
   @retval     TRUE          The P7Data was correctly formatted for processing.\r