mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 04:28:12 +03:00
[tls] Accept certificates without a version number
The version field of an X.509 certificate appears to be optional. Reported-by: Sebastiano Manusia <Sebastiano.Manusia@chuv.ch> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -55,7 +55,7 @@ static int x509_public_key ( const struct asn1_cursor *certificate,
|
||||
memcpy ( &cursor, certificate, sizeof ( cursor ) );
|
||||
rc = ( asn1_enter ( &cursor, ASN1_SEQUENCE ), /* Certificate */
|
||||
asn1_enter ( &cursor, ASN1_SEQUENCE ), /* tbsCertificate */
|
||||
asn1_skip ( &cursor, ASN1_EXPLICIT_TAG ), /* version */
|
||||
asn1_skip_if_exists ( &cursor, ASN1_EXPLICIT_TAG ), /* version */
|
||||
asn1_skip ( &cursor, ASN1_INTEGER ), /* serialNumber */
|
||||
asn1_skip ( &cursor, ASN1_SEQUENCE ), /* signature */
|
||||
asn1_skip ( &cursor, ASN1_SEQUENCE ), /* issuer */
|
||||
|
||||
Reference in New Issue
Block a user