CryptoPkg: Fix wrong comment for CryptoPkg

Fix the wrong comment.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
This commit is contained in:
Wenxing Hou 2024-06-20 10:44:10 +08:00 committed by mergify[bot]
parent 78bccfec9c
commit dc002d4f2d
8 changed files with 40 additions and 41 deletions

View File

@ -2843,7 +2843,7 @@ X509GetKeyUsage (
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize Size of the X509 certificate in bytes.
@param[out] Usage Key Usage bytes.
@param[in, out] UsageSize Key Usage buffer sizs in bytes.
@param[in, out] UsageSize Key Usage buffer size in bytes.
@retval TRUE The Usage bytes retrieve successfully.
@retval FALSE If Cert is NULL.
@ -2870,12 +2870,12 @@ X509GetExtendedKeyUsage (
@param[in] RootCertLength Trusted Root Certificate buffer length
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@retval TRUE All cerificates was issued by the first certificate in X509Certchain.
@retval TRUE All certificates was issued by the first certificate in X509Certchain.
@retval FALSE Invalid certificate or the certificate was not issued by the given
trusted CA.
**/
@ -2893,9 +2893,9 @@ X509VerifyCertChain (
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@param[in] CertIndex Index of certificate. If index is -1 indecate the
@ -2943,7 +2943,7 @@ Asn1GetTag (
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize size of the X509 certificate in bytes.
@param[out] BasicConstraints basic constraints bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer sizs in bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer size in bytes.
@retval TRUE The basic constraints retrieve successfully.
@retval FALSE If cert is NULL.

View File

@ -1391,7 +1391,7 @@ Cleanup:
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize Size of the X509 certificate in bytes.
@param[out] Usage Key Usage bytes.
@param[in, out] UsageSize Key Usage buffer sizs in bytes.
@param[in, out] UsageSize Key Usage buffer size in bytes.
@retval TRUE The Usage bytes retrieve successfully.
@retval FALSE If Cert is NULL.
@ -1692,12 +1692,12 @@ _Exit:
@param[in] RootCertLength Trusted Root Certificate buffer length
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@retval TRUE All cerificates was issued by the first certificate in X509Certchain.
@retval TRUE All certificates was issued by the first certificate in X509Certchain.
@retval FALSE Invalid certificate or the certificate was not issued by the given
trusted CA.
**/
@ -1775,9 +1775,9 @@ X509VerifyCertChain (
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@param[in] CertIndex Index of certificate.
@ -1922,7 +1922,7 @@ Asn1GetTag (
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize size of the X509 certificate in bytes.
@param[out] BasicConstraints basic constraints bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer sizs in bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer size in bytes.
@retval TRUE The basic constraints retrieve successfully.
@retval FALSE If cert is NULL.

View File

@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <stdio.h>
//
// We should alwasy add mbedtls/config.h here
// We should always add mbedtls/config.h here
// to ensure the config override takes effect.
//
#include <mbedtls/mbedtls_config.h>
@ -25,7 +25,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/**
The MbedTLS function f_rng, which MbedtlsRand implements.
@param[in] RngState Not used, just for compatibility with mbedlts.
@param[in] RngState Not used, just for compatibility with mbedtls.
@param[out] Output Pointer to buffer to receive random value.
@param[in] Len Size of random bytes to generate.

View File

@ -288,7 +288,6 @@ IsEkuInCertificate (
}
Status = EFI_NOT_FOUND;
/*find the spdm hardware identity OID*/
for (Index = 0; Index <= Len - EkuLen; Index++) {
if (!CompareMem (Buffer + Index, EKU, EkuLen)) {
// check sub EKU

View File

@ -744,12 +744,12 @@ X509VerifyCert (
@param[in] RootCertLength Trusted Root Certificate buffer length
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@retval TRUE All cerificates was issued by the first certificate in X509Certchain.
@retval TRUE All certificates was issued by the first certificate in X509Certchain.
@retval FALSE Invalid certificate or the certificate was not issued by the given
trusted CA.
**/
@ -816,9 +816,9 @@ X509VerifyCertChain (
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@param[in] CertIndex Index of certificate.
@ -1592,7 +1592,7 @@ X509GetKeyUsage (
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize Size of the X509 certificate in bytes.
@param[out] Usage Key Usage bytes.
@param[in, out] UsageSize Key Usage buffer sizs in bytes.
@param[in, out] UsageSize Key Usage buffer size in bytes.
@retval TRUE The Usage bytes retrieve successfully.
@retval FALSE If Cert is NULL.
@ -1841,7 +1841,7 @@ X509CompareDateTime (
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize size of the X509 certificate in bytes.
@param[out] BasicConstraints basic constraints bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer sizs in bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer size in bytes.
@retval TRUE The basic constraints retrieve successfully.
@retval FALSE If cert is NULL.

View File

@ -489,7 +489,7 @@ X509GetExtensionData (
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize Size of the X509 certificate in bytes.
@param[out] Usage Key Usage bytes.
@param[in, out] UsageSize Key Usage buffer sizs in bytes.
@param[in, out] UsageSize Key Usage buffer size in bytes.
@retval TRUE The Usage bytes retrieve successfully.
@retval FALSE If Cert is NULL.
@ -641,12 +641,12 @@ X509GetKeyUsage (
@param[in] RootCertLength Trusted Root Certificate buffer length
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@retval TRUE All cerificates was issued by the first certificate in X509Certchain.
@retval TRUE All certificates was issued by the first certificate in X509Certchain.
@retval FALSE Invalid certificate or the certificate was not issued by the given
trusted CA.
**/
@ -668,9 +668,9 @@ X509VerifyCertChain (
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
where the first certificate is signed by the Root
Certificate or is the Root Cerificate itself. and
subsequent cerificate is signed by the preceding
cerificate.
Certificate or is the Root Certificate itself. and
subsequent certificate is signed by the preceding
certificate.
@param[in] CertChainLength Total length of the certificate chain, in bytes.
@param[in] CertIndex Index of certificate.
@ -725,7 +725,7 @@ Asn1GetTag (
@param[in] Cert Pointer to the DER-encoded X509 certificate.
@param[in] CertSize size of the X509 certificate in bytes.
@param[out] BasicConstraints basic constraints bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer sizs in bytes.
@param[in, out] BasicConstraintsSize basic constraints buffer size in bytes.
@retval TRUE The basic constraints retrieve successfully.
@retval FALSE If cert is NULL.

View File

@ -92,7 +92,7 @@ RandomBytes (
/**
The MbedTLS function f_rng, which MbedtlsRand implements.
@param[in] RngState Not used, just for compatibility with mbedlts.
@param[in] RngState Not used, just for compatibility with mbedtls.
@param[out] Output Pointer to buffer to receive random value.
@param[in] Len Size of random bytes to generate.

View File

@ -92,7 +92,7 @@ RandomBytes (
/**
The MbedTLS function f_rng, which MbedtlsRand implements.
@param[in] RngState Not used, just for compatibility with mbedlts.
@param[in] RngState Not used, just for compatibility with mbedtls.
@param[out] Output Pointer to buffer to receive random value.
@param[in] Len Size of random bytes to generate.