amazon-archives / certlint

X.509 certificate linter
Apache License 2.0
157 stars 42 forks source link

Incorrect ASN.1 Error in PrintableString #30

Closed kroeckx closed 8 years ago

kroeckx commented 8 years ago

https://crt.sh/?id=15228570&opt=cablint shows: FATAL: ASN.1 Error in PrintableString

But I can't see anything wrong with any of the strings.

pzb commented 8 years ago

The first two bytes of the dnQualifier attribute are "\x13\x0a" which are not valid in printable strings.

kroeckx commented 8 years ago

\x13 being a that it's a PrintableString and \x0a being that it has a length of 10?

robstradling commented 8 years ago

@pzb I agree with Kurt's analysis. Please reopen this issue.

"certlint-x509helper -p list" doesn't list PrintableString as an available PDU type, but it does list "X520dnQualifier".

I think the correct fix is to change this line in namelint.rb... '2.5.4.46' => :PrintableString, # dnQualifier ...to... '2.5.4.46' => :X520dnQualifier, # dnQualifier