mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
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:
parent
78bccfec9c
commit
dc002d4f2d
@ -2843,7 +2843,7 @@ X509GetKeyUsage (
|
|||||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize Size of the X509 certificate in bytes.
|
@param[in] CertSize Size of the X509 certificate in bytes.
|
||||||
@param[out] Usage Key Usage 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 TRUE The Usage bytes retrieve successfully.
|
||||||
@retval FALSE If Cert is NULL.
|
@retval FALSE If Cert is NULL.
|
||||||
@ -2870,12 +2870,12 @@ X509GetExtendedKeyUsage (
|
|||||||
@param[in] RootCertLength Trusted Root Certificate buffer length
|
@param[in] RootCertLength Trusted Root Certificate buffer length
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@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
|
@retval FALSE Invalid certificate or the certificate was not issued by the given
|
||||||
trusted CA.
|
trusted CA.
|
||||||
**/
|
**/
|
||||||
@ -2893,9 +2893,9 @@ X509VerifyCertChain (
|
|||||||
|
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
||||||
|
|
||||||
@param[in] CertIndex Index of certificate. If index is -1 indecate the
|
@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] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize size of the X509 certificate in bytes.
|
@param[in] CertSize size of the X509 certificate in bytes.
|
||||||
@param[out] BasicConstraints basic constraints 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 TRUE The basic constraints retrieve successfully.
|
||||||
@retval FALSE If cert is NULL.
|
@retval FALSE If cert is NULL.
|
||||||
|
@ -1391,7 +1391,7 @@ Cleanup:
|
|||||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize Size of the X509 certificate in bytes.
|
@param[in] CertSize Size of the X509 certificate in bytes.
|
||||||
@param[out] Usage Key Usage 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 TRUE The Usage bytes retrieve successfully.
|
||||||
@retval FALSE If Cert is NULL.
|
@retval FALSE If Cert is NULL.
|
||||||
@ -1692,12 +1692,12 @@ _Exit:
|
|||||||
@param[in] RootCertLength Trusted Root Certificate buffer length
|
@param[in] RootCertLength Trusted Root Certificate buffer length
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@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
|
@retval FALSE Invalid certificate or the certificate was not issued by the given
|
||||||
trusted CA.
|
trusted CA.
|
||||||
**/
|
**/
|
||||||
@ -1775,9 +1775,9 @@ X509VerifyCertChain (
|
|||||||
|
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
||||||
|
|
||||||
@param[in] CertIndex Index of certificate.
|
@param[in] CertIndex Index of certificate.
|
||||||
@ -1922,7 +1922,7 @@ Asn1GetTag (
|
|||||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize size of the X509 certificate in bytes.
|
@param[in] CertSize size of the X509 certificate in bytes.
|
||||||
@param[out] BasicConstraints basic constraints 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 TRUE The basic constraints retrieve successfully.
|
||||||
@retval FALSE If cert is NULL.
|
@retval FALSE If cert is NULL.
|
||||||
|
@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
#include <stdio.h>
|
#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.
|
// to ensure the config override takes effect.
|
||||||
//
|
//
|
||||||
#include <mbedtls/mbedtls_config.h>
|
#include <mbedtls/mbedtls_config.h>
|
||||||
@ -25,7 +25,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
/**
|
/**
|
||||||
The MbedTLS function f_rng, which MbedtlsRand implements.
|
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[out] Output Pointer to buffer to receive random value.
|
||||||
@param[in] Len Size of random bytes to generate.
|
@param[in] Len Size of random bytes to generate.
|
||||||
|
|
||||||
|
@ -288,7 +288,6 @@ IsEkuInCertificate (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_NOT_FOUND;
|
||||||
/*find the spdm hardware identity OID*/
|
|
||||||
for (Index = 0; Index <= Len - EkuLen; Index++) {
|
for (Index = 0; Index <= Len - EkuLen; Index++) {
|
||||||
if (!CompareMem (Buffer + Index, EKU, EkuLen)) {
|
if (!CompareMem (Buffer + Index, EKU, EkuLen)) {
|
||||||
// check sub EKU
|
// check sub EKU
|
||||||
|
@ -744,12 +744,12 @@ X509VerifyCert (
|
|||||||
@param[in] RootCertLength Trusted Root Certificate buffer length
|
@param[in] RootCertLength Trusted Root Certificate buffer length
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@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
|
@retval FALSE Invalid certificate or the certificate was not issued by the given
|
||||||
trusted CA.
|
trusted CA.
|
||||||
**/
|
**/
|
||||||
@ -816,9 +816,9 @@ X509VerifyCertChain (
|
|||||||
|
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
||||||
|
|
||||||
@param[in] CertIndex Index of certificate.
|
@param[in] CertIndex Index of certificate.
|
||||||
@ -1592,7 +1592,7 @@ X509GetKeyUsage (
|
|||||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize Size of the X509 certificate in bytes.
|
@param[in] CertSize Size of the X509 certificate in bytes.
|
||||||
@param[out] Usage Key Usage 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 TRUE The Usage bytes retrieve successfully.
|
||||||
@retval FALSE If Cert is NULL.
|
@retval FALSE If Cert is NULL.
|
||||||
@ -1841,7 +1841,7 @@ X509CompareDateTime (
|
|||||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize size of the X509 certificate in bytes.
|
@param[in] CertSize size of the X509 certificate in bytes.
|
||||||
@param[out] BasicConstraints basic constraints 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 TRUE The basic constraints retrieve successfully.
|
||||||
@retval FALSE If cert is NULL.
|
@retval FALSE If cert is NULL.
|
||||||
|
@ -489,7 +489,7 @@ X509GetExtensionData (
|
|||||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize Size of the X509 certificate in bytes.
|
@param[in] CertSize Size of the X509 certificate in bytes.
|
||||||
@param[out] Usage Key Usage 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 TRUE The Usage bytes retrieve successfully.
|
||||||
@retval FALSE If Cert is NULL.
|
@retval FALSE If Cert is NULL.
|
||||||
@ -641,12 +641,12 @@ X509GetKeyUsage (
|
|||||||
@param[in] RootCertLength Trusted Root Certificate buffer length
|
@param[in] RootCertLength Trusted Root Certificate buffer length
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@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
|
@retval FALSE Invalid certificate or the certificate was not issued by the given
|
||||||
trusted CA.
|
trusted CA.
|
||||||
**/
|
**/
|
||||||
@ -668,9 +668,9 @@ X509VerifyCertChain (
|
|||||||
|
|
||||||
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
@param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
|
||||||
where the first certificate is signed by the Root
|
where the first certificate is signed by the Root
|
||||||
Certificate or is the Root Cerificate itself. and
|
Certificate or is the Root Certificate itself. and
|
||||||
subsequent cerificate is signed by the preceding
|
subsequent certificate is signed by the preceding
|
||||||
cerificate.
|
certificate.
|
||||||
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
@param[in] CertChainLength Total length of the certificate chain, in bytes.
|
||||||
|
|
||||||
@param[in] CertIndex Index of certificate.
|
@param[in] CertIndex Index of certificate.
|
||||||
@ -725,7 +725,7 @@ Asn1GetTag (
|
|||||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||||
@param[in] CertSize size of the X509 certificate in bytes.
|
@param[in] CertSize size of the X509 certificate in bytes.
|
||||||
@param[out] BasicConstraints basic constraints 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 TRUE The basic constraints retrieve successfully.
|
||||||
@retval FALSE If cert is NULL.
|
@retval FALSE If cert is NULL.
|
||||||
|
@ -92,7 +92,7 @@ RandomBytes (
|
|||||||
/**
|
/**
|
||||||
The MbedTLS function f_rng, which MbedtlsRand implements.
|
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[out] Output Pointer to buffer to receive random value.
|
||||||
@param[in] Len Size of random bytes to generate.
|
@param[in] Len Size of random bytes to generate.
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ RandomBytes (
|
|||||||
/**
|
/**
|
||||||
The MbedTLS function f_rng, which MbedtlsRand implements.
|
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[out] Output Pointer to buffer to receive random value.
|
||||||
@param[in] Len Size of random bytes to generate.
|
@param[in] Len Size of random bytes to generate.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user