@@ -18724,12 +18724,20 @@ static int ConfirmNameConstraints(Signer* signer, DecodedCert* cert)
1872418724 * (RFC3280 sec 4.2.1.7). Often used with FIPS 201 smartcard login.
1872518725 * FASC-N (Federal Agency Smart Credential Number), defined in the document
1872618726 * fpki-x509-cert-policy-common.pdf. Used for a smart card ID.
18727+ *
18728+ * id-on-bundleEID (RFC 9174, sec 4.4.1), an Other Name whose value is an
18729+ * IA5String holding a Bundle Protocol node/endpoint ID (e.g. "dtn://node/").
18730+ * Only handled when WOLFSSL_DTN is defined as these OIDs are specific to
18731+ * Delay-Tolerant Networking (DTN) / the Bundle Protocol.
1872718732 */
1872818733static const ASNItem otherNameASN[] = {
1872918734/* TYPEID */ { 0, ASN_OBJECT_ID, 0, 0, 0 },
1873018735/* VALUE */ { 0, ASN_CONTEXT_SPECIFIC | ASN_OTHERNAME_VALUE, 1, 1, 0 },
1873118736/* UPN */ { 1, ASN_UTF8STRING, 0, 0, 2 },
1873218737/* FASC-N */ { 1, ASN_OCTET_STRING, 0, 0, 2 },
18738+ #ifdef WOLFSSL_DTN
18739+ /* BEID */ { 1, ASN_IA5_STRING, 0, 0, 2 },
18740+ #endif
1873318741/* HWN_SEQ */ { 1, ASN_SEQUENCE, 1, 0, 2 },
1873418742/* HWN_TYPE */ { 2, ASN_OBJECT_ID, 0, 0, 0 },
1873518743/* HWN_NUM */ { 2, ASN_OCTET_STRING, 0, 0, 0 }
@@ -18739,6 +18747,9 @@ enum {
1873918747 OTHERNAMEASN_IDX_VALUE,
1874018748 OTHERNAMEASN_IDX_UPN,
1874118749 OTHERNAMEASN_IDX_FASCN,
18750+ #ifdef WOLFSSL_DTN
18751+ OTHERNAMEASN_IDX_BEID,
18752+ #endif
1874218753 OTHERNAMEASN_IDX_HWN_SEQ,
1874318754 OTHERNAMEASN_IDX_HWN_TYPE,
1874418755 OTHERNAMEASN_IDX_HWN_NUM
@@ -18806,6 +18817,13 @@ static int DecodeOtherHelper(ASNGetData* dataASN, DecodedCert* cert, int oid)
1880618817 bufLen = dataASN[OTHERNAMEASN_IDX_UPN].data.ref.length;
1880718818 buf = (const char*)dataASN[OTHERNAMEASN_IDX_UPN].data.ref.data;
1880818819 break;
18820+ #ifdef WOLFSSL_DTN
18821+ case BUNDLE_EID_OID:
18822+ /* id-on-bundleEID (RFC 9174) carries an IA5String value. */
18823+ bufLen = dataASN[OTHERNAMEASN_IDX_BEID].data.ref.length;
18824+ buf = (const char*)dataASN[OTHERNAMEASN_IDX_BEID].data.ref.data;
18825+ break;
18826+ #endif /* WOLFSSL_DTN */
1880918827 default:
1881018828 WOLFSSL_ERROR_VERBOSE(ASN_UNKNOWN_OID_E);
1881118829 ret = ASN_UNKNOWN_OID_E;
@@ -18869,6 +18887,9 @@ static int DecodeOtherName(DecodedCert* cert, const byte* input,
1886918887 #ifdef WOLFSSL_FPKI
1887018888 case FASCN_OID:
1887118889 #endif /* WOLFSSL_FPKI */
18890+ #ifdef WOLFSSL_DTN
18891+ case BUNDLE_EID_OID:
18892+ #endif /* WOLFSSL_DTN */
1887218893 case UPN_OID:
1887318894 ret = DecodeOtherHelper(dataASN, cert,
1887418895 (int)dataASN[OTHERNAMEASN_IDX_TYPEID].data.oid.sum);
0 commit comments