Skip to content

Add support for id-on-bundleEID from RFC 9174.#10810

Open
kareem-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
kareem-wolfssl:gh10694
Open

Add support for id-on-bundleEID from RFC 9174.#10810
kareem-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
kareem-wolfssl:gh10694

Conversation

@kareem-wolfssl

Copy link
Copy Markdown
Contributor

Description

Fixes #10694.

Testing

Built in tests, added test, reproducer from original issue

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses X.509 SubjectAltName otherName parsing for the RFC 9174 id-on-bundleEID (OID 1.3.6.1.5.5.7.8.11) by teaching the ASN.1 template decoder to accept an IA5String value for that specific otherName type-id, and adds a regression test plus certificate renewal inputs.

Changes:

  • Add BUNDLE_EID_OID (guarded by WOLFSSL_DTN) to the OID-sum table.
  • Extend otherName ASN.1 template decoding to accept IA5String for id-on-bundleEID (guarded by WOLFSSL_DTN).
  • Add a regression test and OpenSSL renewal configuration for a bundleEID-containing DER certificate.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wolfssl/wolfcrypt/oid_sum.h Adds BUNDLE_EID_OID under WOLFSSL_DTN for OID sum matching.
wolfcrypt/src/asn.c Extends OtherName template and decoding logic to handle bundleEID IA5String values under WOLFSSL_DTN.
tests/api/test_asn.h Registers the new regression test declaration and test list entry.
tests/api/test_asn.c Adds a regression test that parses a DER cert containing bundleEID OtherName + dNSName.
scripts/asn1_oid_sum.pl Documents why BUNDLE_EID_OID is maintained manually in oid_sum.h.
certs/renewcerts/wolfssl.cnf Adds an OpenSSL config stanza to generate a SAN with bundleEID OtherName IA5String.
certs/renewcerts.sh Adds renewal steps to generate bundle-eid-cert.der.
.wolfssl_known_macro_extras Adds WOLFSSL_DTN to the known macro extras list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/api/test_asn.c
Comment on lines +1524 to +1527
ExpectTrue((f = XFOPEN(bundleEidCert, "rb")) != XBADFILE);
ExpectIntGT(bytes = (int)XFREAD(buf, 1, sizeof(buf), f), 0);
if (f != XBADFILE)
XFCLOSE(f);
Comment thread wolfcrypt/src/asn.c
Comment on lines +18728 to +18731
* id-on-bundleEID (RFC 9174, sec 4.4.1), an Other Name whose value is an
* IA5String holding a Bundle Protocol node/endpoint ID (e.g. "dtn://node/").
* Only handled when WOLFSSL_DTN is defined as these OIDs are specific to
* Delay-Tolerant Networking (DTN) / the Bundle Protocol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: X509 decoder fails to handle OtherName with value of an IA5String

2 participants