Merge pull request #6254 from miyazakh/fix_favouriteDrink

pull/6275/head
Chris Conlon 2023-04-06 09:39:23 -06:00 committed by GitHub
commit bd02b9c29c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -46890,6 +46890,16 @@ static int test_wolfSSL_make_cert(void)
AssertIntEQ(ASN1_STRING_length(entryValue), 2); AssertIntEQ(ASN1_STRING_length(entryValue), 2);
AssertStrEQ((const char*)ASN1_STRING_data(entryValue), "US"); AssertStrEQ((const char*)ASN1_STRING_data(entryValue), "US");
#ifndef WOLFSSL_MULTI_ATTRIB
/* compare Serial Number */
AssertIntEQ((idx = X509_NAME_get_index_by_NID(x509name, NID_serialNumber,
-1)), 7);
AssertNotNull(entry = X509_NAME_get_entry(x509name, idx));
AssertNotNull(entryValue = X509_NAME_ENTRY_get_data(entry));
AssertIntEQ(ASN1_STRING_length(entryValue), XSTRLEN("wolfSSL12345"));
AssertStrEQ((const char*)ASN1_STRING_data(entryValue), "wolfSSL12345");
#endif
#ifdef WOLFSSL_MULTI_ATTRIB #ifdef WOLFSSL_MULTI_ATTRIB
/* get first and second DC and compare result */ /* get first and second DC and compare result */
AssertIntEQ((idx = X509_NAME_get_index_by_NID(x509name, NID_domainComponent, AssertIntEQ((idx = X509_NAME_get_index_by_NID(x509name, NID_domainComponent,

View File

@ -687,7 +687,7 @@ enum DN_Tags {
/* pilot attribute types /* pilot attribute types
* OID values of 0.9.2342.19200300.100.1.* */ * OID values of 0.9.2342.19200300.100.1.* */
ASN_FAVOURITE_DRINK = 0x05, /* favouriteDrink */ ASN_FAVOURITE_DRINK = 0x13, /* favouriteDrink */
ASN_DOMAIN_COMPONENT = 0x19 /* DC */ ASN_DOMAIN_COMPONENT = 0x19 /* DC */
}; };