mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Certs: fix leak when multiple hardware names in SAN
Can only be one hardware name in SAN as this indicates the certificate is for verifying signatures created by hardware module.
This commit is contained in:
@ -8310,6 +8310,14 @@ static int DecodeAltNames(const byte* input, int sz, DecodedCert* cert)
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
|
||||
/* Certiciates issued with this OID in the subject alt name are for
|
||||
* verifying signatures created on a module.
|
||||
* RFC 4108 Section 5. */
|
||||
if (cert->hwType != NULL) {
|
||||
WOLFSSL_MSG("\tAlready seen Hardware Module Name");
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
|
||||
if (GetASNTag(input, &idx, &tag, sz) < 0) {
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
|
Reference in New Issue
Block a user