mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
CryptoPkg: Fix wrong logic in X509GetTBSCert
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4509 Both return 0x80 value and Asn1Tag != V_ASN1_SEQUENCE are wrong return. Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
This commit is contained in:
parent
90cb1ec332
commit
71606314f8
@ -839,7 +839,7 @@ X509GetTBSCert (
|
||||
Length = 0;
|
||||
Inf = ASN1_get_object (&Temp, (long *)&Length, (int *)&Asn1Tag, (int *)&ObjClass, (long)CertSize);
|
||||
|
||||
if (((Inf & 0x80) == 0x80) && (Asn1Tag != V_ASN1_SEQUENCE)) {
|
||||
if (((Inf & 0x80) == 0x80) || (Asn1Tag != V_ASN1_SEQUENCE)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -849,7 +849,7 @@ X509GetTBSCert (
|
||||
//
|
||||
// Verify the parsed TBSCertificate is one correct SEQUENCE data.
|
||||
//
|
||||
if (((Inf & 0x80) == 0x80) && (Asn1Tag != V_ASN1_SEQUENCE)) {
|
||||
if (((Inf & 0x80) == 0x80) || (Asn1Tag != V_ASN1_SEQUENCE)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user