Contact Details
brian.sipos@gmail.com
Version
5.8.4
Description
The X509 component fails to decode any certificate with a SAN with value Other Name having a value that is an IA5String. It looks like Other Name values of UTF8String are handled correctly (although not visualized in a tool such as wolfssl x509 ..., which is fine).
This happens with online (D)TLS certificate exchange as well as with offline tool such as wolfssl x509 ... so it's easily isolated and tested.
It appears that the Other Name value is only considered value for a few specific types, when the definition in RFC 5280 allows the value to be any type:
OtherName ::= SEQUENCE {
type-id OBJECT IDENTIFIER,
value [0] EXPLICIT ANY DEFINED BY type-id }
Reproduction steps
- Get a certificate conforming to RFC 9174, specifically having a Subject Alt Name extension with an item of type Other Name, and an Other Name value that is an IA5String. A dummy example is attached node-transport.pem.
- Attempt to process the certificate using
wolfssl x509 -noout -text -in node-transport.pem
- Observe the tool fails to process.
- Convert to DER form and process using
dumpasn1 tool and see it succeed, so the contents are well-formed ASN1.
- Attempt to process the same file using
openssl x509 ... and see it succeed, so the contents are valid PKIX cert.
The relevant portion from dumpasn1 is:
251 54: SEQUENCE {
253 3: OBJECT IDENTIFIER subjectAltName (2 5 29 17)
258 47: OCTET STRING, encapsulates {
260 45: SEQUENCE {
262 28: [0] {
264 8: OBJECT IDENTIFIER '1 3 6 1 5 5 7 8 11'
274 16: [0] {
276 14: IA5String 'dtn://node000/'
: }
: }
292 13: [2] 'node000.local'
: }
: }
: }
Relevant log output
When wolfssl is configured with `--enable-debug` and `-DWOLFSSL_DEBUG_ASN_TEMPLATE` the following is output.
wolfSSL Entering DecodeAltNames
TEMPLATE: altNameASN
wolfSSL Entering GetASN_Items
0: 2 28 [0]
TEMPLATE: otherNameASN
wolfSSL Entering GetASN_Items
0: 4 8 OBJECT ID
1: 14 16 + [0]
More data in constructed item at depth: 0
Contact Details
brian.sipos@gmail.com
Version
5.8.4
Description
The X509 component fails to decode any certificate with a SAN with value Other Name having a value that is an IA5String. It looks like Other Name values of UTF8String are handled correctly (although not visualized in a tool such as
wolfssl x509 ..., which is fine).This happens with online (D)TLS certificate exchange as well as with offline tool such as
wolfssl x509 ...so it's easily isolated and tested.It appears that the Other Name value is only considered value for a few specific types, when the definition in RFC 5280 allows the value to be any type:
Reproduction steps
wolfssl x509 -noout -text -in node-transport.pemdumpasn1tool and see it succeed, so the contents are well-formed ASN1.openssl x509 ...and see it succeed, so the contents are valid PKIX cert.The relevant portion from dumpasn1 is:
Relevant log output