KEYS: check the certfile for ASN1 encoding before inserting
David Howells
maintainerReview
Quoted 5 lines · Clay Chang
(quoted diff) +5
-0+ if (cert[0] != 0x30 && cert[1] != 0x82) { + err("Invalid certfile.\n"); + exit(EXIT_FAILURE); + } +
I wonder if this is a good enough check. It might be better to actually run it through a utility that will actually check the structure (eg. openssl asn1parse or openssl x509) and check the error code.
David