Skip to content

Commit

Permalink
CryptoPkg: Fix wrong comment for CryptoPkg
Browse files Browse the repository at this point in the history
Fix the wrong comment.

Cc: Jiewen Yao <[email protected]>
Cc: Yi Li <[email protected]>
Signed-off-by: Wenxing Hou <[email protected]>
  • Loading branch information
Wenxing-hou authored and mergify[bot] committed Jun 26, 2024
1 parent 78bccfe commit dc002d4
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 41 deletions.
18 changes: 9 additions & 9 deletions CryptoPkg/Include/Library/BaseCryptLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
**/
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down
18 changes: 9 additions & 9 deletions CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,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.
Expand Down Expand Up @@ -1692,12 +1692,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.
**/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions CryptoPkg/Library/BaseCryptLibMbedTls/InternalCryptLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ 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>

/**
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptX509.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
18 changes: 9 additions & 9 deletions CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptX509Null.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
**/
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion CryptoPkg/Library/BaseCryptLibMbedTls/Rand/CryptRand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion CryptoPkg/Library/BaseCryptLibMbedTls/Rand/CryptRandTsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dc002d4

Please sign in to comment.