-
Notifications
You must be signed in to change notification settings - Fork 1k
Move WOLFSSL_X509_TINY test to the unit test suite and run #10975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aidangarske
wants to merge
1
commit into
wolfSSL:master
Choose a base branch
from
aidangarske:x509-tiny-ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+165
−129
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3730,6 +3730,162 @@ static int test_wolfSSL_CertRsaPss(void) | |||||||||
| #endif /* WOLFSSL_TEST_APPLE_NATIVE_CERT_VALIDATION */ | ||||||||||
| #endif /* HAVE_CERT_CHAIN_VALIDATION */ | ||||||||||
|
|
||||||||||
| #if defined(WOLFSSL_X509_TINY) && defined(HAVE_ECC) && \ | ||||||||||
| !defined(NO_ECC256) && !defined(NO_ECC_SECP) | ||||||||||
| static const byte tinyCert_plain[] = { | ||||||||||
| 0x30, 0x82, 0x01, 0xBA, 0x30, 0x82, 0x01, 0x60, 0xA0, 0x03, 0x02, 0x01, | ||||||||||
| 0x02, 0x02, 0x14, 0x16, 0x9B, 0xFB, 0x03, 0x89, 0xD8, 0xB5, 0x62, 0x72, | ||||||||||
| 0xAA, 0xD5, 0x32, 0x9C, 0x7A, 0x26, 0xEE, 0x3F, 0x74, 0xED, 0x5B, 0x30, | ||||||||||
| 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x30, | ||||||||||
| 0x11, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x06, | ||||||||||
| 0x61, 0x2E, 0x74, 0x65, 0x73, 0x74, 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x36, | ||||||||||
| 0x30, 0x36, 0x32, 0x39, 0x32, 0x31, 0x35, 0x34, 0x32, 0x37, 0x5A, 0x17, | ||||||||||
| 0x0D, 0x32, 0x37, 0x30, 0x36, 0x32, 0x39, 0x32, 0x31, 0x35, 0x34, 0x32, | ||||||||||
| 0x37, 0x5A, 0x30, 0x11, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, | ||||||||||
| 0x03, 0x0C, 0x06, 0x61, 0x2E, 0x74, 0x65, 0x73, 0x74, 0x30, 0x59, 0x30, | ||||||||||
| 0x13, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, | ||||||||||
| 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, | ||||||||||
| 0x92, 0x60, 0x0B, 0x46, 0xDF, 0x03, 0xD7, 0x55, 0xE2, 0xA5, 0x9A, 0xE3, | ||||||||||
| 0xC3, 0x0A, 0x7F, 0xC7, 0x4A, 0x3D, 0xA2, 0x78, 0xB5, 0xB9, 0x17, 0xD8, | ||||||||||
| 0x11, 0x59, 0x20, 0x86, 0x2B, 0x71, 0x09, 0x6B, 0x47, 0x35, 0xAA, 0xB0, | ||||||||||
| 0xCA, 0x48, 0x0E, 0x39, 0x2D, 0x01, 0x1C, 0xD7, 0x32, 0x17, 0x58, 0xBF, | ||||||||||
| 0x20, 0x29, 0xDE, 0x88, 0xA7, 0xDD, 0x28, 0xED, 0xC5, 0x51, 0x32, 0x6F, | ||||||||||
| 0x01, 0x76, 0x5C, 0xF7, 0xA3, 0x81, 0x95, 0x30, 0x81, 0x92, 0x30, 0x1D, | ||||||||||
| 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x6F, 0x14, 0xF7, | ||||||||||
| 0xBC, 0xA8, 0x12, 0x67, 0x5E, 0xA5, 0xCF, 0x94, 0x87, 0xD8, 0x0C, 0x98, | ||||||||||
| 0xFE, 0xF4, 0x8C, 0xE7, 0x35, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, | ||||||||||
| 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x6F, 0x14, 0xF7, 0xBC, 0xA8, 0x12, | ||||||||||
| 0x67, 0x5E, 0xA5, 0xCF, 0x94, 0x87, 0xD8, 0x0C, 0x98, 0xFE, 0xF4, 0x8C, | ||||||||||
| 0xE7, 0x35, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, | ||||||||||
| 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x1D, 0x06, 0x03, 0x55, | ||||||||||
| 0x1D, 0x11, 0x04, 0x16, 0x30, 0x14, 0x82, 0x06, 0x61, 0x2E, 0x74, 0x65, | ||||||||||
| 0x73, 0x74, 0x82, 0x0A, 0x77, 0x77, 0x77, 0x2E, 0x61, 0x2E, 0x74, 0x65, | ||||||||||
| 0x73, 0x74, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x04, 0x04, 0x03, | ||||||||||
| 0x02, 0x07, 0x80, 0x30, 0x13, 0x06, 0x03, 0x55, 0x1D, 0x25, 0x04, 0x0C, | ||||||||||
| 0x30, 0x0A, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, | ||||||||||
| 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, | ||||||||||
| 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x56, 0xC4, 0x82, 0x42, 0x72, | ||||||||||
| 0x00, 0xF0, 0x9C, 0x9D, 0xA3, 0x08, 0x7D, 0xA1, 0xB1, 0x02, 0x73, 0x9C, | ||||||||||
| 0x1C, 0x1D, 0x09, 0xB5, 0x0B, 0x64, 0xEA, 0xA8, 0xD3, 0x6F, 0x20, 0x63, | ||||||||||
| 0xCD, 0xEF, 0x69, 0x02, 0x21, 0x00, 0x88, 0x9C, 0xBF, 0xF2, 0xC5, 0x7F, | ||||||||||
| 0xD0, 0x76, 0xFD, 0x77, 0x22, 0xA7, 0xE1, 0xA5, 0xA0, 0xF2, 0x17, 0x4D, | ||||||||||
| 0x47, 0xAF, 0x90, 0x70, 0x03, 0x82, 0x8D, 0xCA, 0xEA, 0x38, 0x8F, 0x5E, | ||||||||||
| 0x37, 0xCA, | ||||||||||
| }; | ||||||||||
| #ifndef WOLFSSL_NO_ASN_STRICT | ||||||||||
| static const byte tinyCert_critUnknown[] = { | ||||||||||
| 0x30, 0x82, 0x01, 0x9B, 0x30, 0x82, 0x01, 0x40, 0xA0, 0x03, 0x02, 0x01, | ||||||||||
| 0x02, 0x02, 0x14, 0x11, 0xBD, 0xBB, 0x2B, 0x6D, 0x81, 0x95, 0xCF, 0xD1, | ||||||||||
| 0x84, 0x74, 0xE2, 0x45, 0xF1, 0x4B, 0x1B, 0xEA, 0xC2, 0xBC, 0xD6, 0x30, | ||||||||||
| 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x30, | ||||||||||
| 0x17, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0C, | ||||||||||
| 0x63, 0x72, 0x69, 0x74, 0x65, 0x78, 0x74, 0x2E, 0x74, 0x65, 0x73, 0x74, | ||||||||||
| 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x36, 0x30, 0x36, 0x33, 0x30, 0x32, 0x30, | ||||||||||
| 0x31, 0x31, 0x32, 0x34, 0x5A, 0x17, 0x0D, 0x33, 0x36, 0x30, 0x36, 0x32, | ||||||||||
| 0x37, 0x32, 0x30, 0x31, 0x31, 0x32, 0x34, 0x5A, 0x30, 0x17, 0x31, 0x15, | ||||||||||
| 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0C, 0x63, 0x72, 0x69, | ||||||||||
| 0x74, 0x65, 0x78, 0x74, 0x2E, 0x74, 0x65, 0x73, 0x74, 0x30, 0x59, 0x30, | ||||||||||
| 0x13, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, | ||||||||||
| 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, | ||||||||||
| 0x9D, 0xE8, 0xE5, 0xCA, 0x7A, 0x56, 0x38, 0xC6, 0x2F, 0x03, 0xA9, 0x26, | ||||||||||
| 0x6A, 0x4A, 0x39, 0xFC, 0xC4, 0x99, 0xAD, 0xCE, 0x41, 0x17, 0xBE, 0x2C, | ||||||||||
| 0xB9, 0x3E, 0xAB, 0x5F, 0x07, 0x77, 0x93, 0x8C, 0x3F, 0x9C, 0xF2, 0x95, | ||||||||||
| 0x97, 0xE5, 0x01, 0x52, 0x30, 0x08, 0x2A, 0x19, 0x2B, 0x15, 0x68, 0xA3, | ||||||||||
| 0x88, 0x79, 0x9D, 0xA2, 0x87, 0x69, 0x68, 0x85, 0x4F, 0x77, 0x2A, 0x1B, | ||||||||||
| 0x06, 0xF6, 0xAD, 0x6A, 0xA3, 0x6A, 0x30, 0x68, 0x30, 0x1D, 0x06, 0x03, | ||||||||||
| 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x4B, 0x5C, 0x3E, 0xD2, 0x40, | ||||||||||
| 0x91, 0x80, 0x56, 0xF4, 0xD1, 0xCB, 0x16, 0x56, 0x8B, 0x4F, 0xBC, 0x4F, | ||||||||||
| 0xCA, 0xAD, 0x5C, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, | ||||||||||
| 0x30, 0x16, 0x80, 0x14, 0x4B, 0x5C, 0x3E, 0xD2, 0x40, 0x91, 0x80, 0x56, | ||||||||||
| 0xF4, 0xD1, 0xCB, 0x16, 0x56, 0x8B, 0x4F, 0xBC, 0x4F, 0xCA, 0xAD, 0x5C, | ||||||||||
| 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, | ||||||||||
| 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x15, 0x06, 0x09, 0x2B, 0x06, 0x01, | ||||||||||
| 0x04, 0x01, 0x86, 0x8D, 0x1F, 0x01, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x04, | ||||||||||
| 0x03, 0x01, 0x02, 0x03, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, | ||||||||||
| 0x3D, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, | ||||||||||
| 0xD8, 0x78, 0x6A, 0x3F, 0xFC, 0x03, 0x1B, 0x7D, 0x8F, 0x8C, 0x2F, 0xC9, | ||||||||||
| 0x80, 0x4B, 0x85, 0x5C, 0x2B, 0xF1, 0x52, 0x82, 0x94, 0x37, 0xE0, 0xA5, | ||||||||||
| 0x49, 0x3F, 0x30, 0xBB, 0xC2, 0xBE, 0xC7, 0xE0, 0x02, 0x21, 0x00, 0xF5, | ||||||||||
| 0xDD, 0x14, 0x04, 0xC8, 0xA2, 0xC0, 0x78, 0x13, 0x43, 0xE8, 0x97, 0xE1, | ||||||||||
| 0xEB, 0xAE, 0x2A, 0x13, 0x3D, 0x46, 0xF3, 0x1D, 0x5D, 0xAA, 0x26, 0x95, | ||||||||||
| 0x18, 0x71, 0x77, 0xF7, 0x46, 0x62, 0xD0, | ||||||||||
| }; | ||||||||||
| #endif | ||||||||||
| #ifndef IGNORE_NAME_CONSTRAINTS | ||||||||||
| static const byte tinyCert_nameConstr[] = { | ||||||||||
| 0x30, 0x82, 0x01, 0xA0, 0x30, 0x82, 0x01, 0x45, 0xA0, 0x03, 0x02, 0x01, | ||||||||||
| 0x02, 0x02, 0x14, 0x41, 0x1A, 0x20, 0xA6, 0xAB, 0xF3, 0x59, 0x86, 0x30, | ||||||||||
| 0xC2, 0x9A, 0xF6, 0x3F, 0x2B, 0x3D, 0x53, 0x46, 0x5B, 0x01, 0x41, 0x30, | ||||||||||
| 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x30, | ||||||||||
| 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0A, | ||||||||||
| 0x6E, 0x63, 0x2D, 0x63, 0x61, 0x2E, 0x74, 0x65, 0x73, 0x74, 0x30, 0x1E, | ||||||||||
| 0x17, 0x0D, 0x32, 0x36, 0x30, 0x36, 0x33, 0x30, 0x32, 0x30, 0x31, 0x31, | ||||||||||
| 0x32, 0x34, 0x5A, 0x17, 0x0D, 0x33, 0x36, 0x30, 0x36, 0x32, 0x37, 0x32, | ||||||||||
| 0x30, 0x31, 0x31, 0x32, 0x34, 0x5A, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, | ||||||||||
| 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0A, 0x6E, 0x63, 0x2D, 0x63, 0x61, | ||||||||||
| 0x2E, 0x74, 0x65, 0x73, 0x74, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2A, | ||||||||||
| 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, | ||||||||||
| 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x9D, 0xE8, 0xE5, 0xCA, | ||||||||||
| 0x7A, 0x56, 0x38, 0xC6, 0x2F, 0x03, 0xA9, 0x26, 0x6A, 0x4A, 0x39, 0xFC, | ||||||||||
| 0xC4, 0x99, 0xAD, 0xCE, 0x41, 0x17, 0xBE, 0x2C, 0xB9, 0x3E, 0xAB, 0x5F, | ||||||||||
| 0x07, 0x77, 0x93, 0x8C, 0x3F, 0x9C, 0xF2, 0x95, 0x97, 0xE5, 0x01, 0x52, | ||||||||||
| 0x30, 0x08, 0x2A, 0x19, 0x2B, 0x15, 0x68, 0xA3, 0x88, 0x79, 0x9D, 0xA2, | ||||||||||
| 0x87, 0x69, 0x68, 0x85, 0x4F, 0x77, 0x2A, 0x1B, 0x06, 0xF6, 0xAD, 0x6A, | ||||||||||
| 0xA3, 0x73, 0x30, 0x71, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, | ||||||||||
| 0x16, 0x04, 0x14, 0x4B, 0x5C, 0x3E, 0xD2, 0x40, 0x91, 0x80, 0x56, 0xF4, | ||||||||||
| 0xD1, 0xCB, 0x16, 0x56, 0x8B, 0x4F, 0xBC, 0x4F, 0xCA, 0xAD, 0x5C, 0x30, | ||||||||||
| 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, | ||||||||||
| 0x4B, 0x5C, 0x3E, 0xD2, 0x40, 0x91, 0x80, 0x56, 0xF4, 0xD1, 0xCB, 0x16, | ||||||||||
| 0x56, 0x8B, 0x4F, 0xBC, 0x4F, 0xCA, 0xAD, 0x5C, 0x30, 0x0F, 0x06, 0x03, | ||||||||||
| 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, | ||||||||||
| 0xFF, 0x30, 0x1E, 0x06, 0x03, 0x55, 0x1D, 0x1E, 0x01, 0x01, 0xFF, 0x04, | ||||||||||
| 0x14, 0x30, 0x12, 0xA0, 0x10, 0x30, 0x0E, 0x82, 0x0C, 0x2E, 0x65, 0x78, | ||||||||||
| 0x61, 0x6D, 0x70, 0x6C, 0x65, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x0A, 0x06, | ||||||||||
| 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, | ||||||||||
| 0x30, 0x46, 0x02, 0x21, 0x00, 0xE8, 0xA6, 0xDE, 0xE4, 0x18, 0x4E, 0x7B, | ||||||||||
| 0x04, 0x4F, 0xA4, 0xBE, 0x7B, 0x31, 0x97, 0x36, 0x9A, 0x2B, 0xF8, 0x21, | ||||||||||
| 0x4E, 0xBD, 0xDB, 0x1A, 0x65, 0x3C, 0xEB, 0xCC, 0xF3, 0x01, 0xB8, 0xBD, | ||||||||||
| 0xF6, 0x02, 0x21, 0x00, 0x83, 0xAE, 0x5E, 0x31, 0xE7, 0xF3, 0x7A, 0x70, | ||||||||||
| 0x18, 0x05, 0xAC, 0xAD, 0x49, 0x88, 0x28, 0x39, 0xBD, 0xCD, 0x73, 0xFE, | ||||||||||
| 0x0A, 0x74, 0x98, 0x11, 0x3F, 0xFA, 0xF1, 0x18, 0xCF, 0x4E, 0x4E, 0x93, | ||||||||||
| }; | ||||||||||
| #endif | ||||||||||
|
|
||||||||||
| /* WOLFSSL_X509_TINY: a normal cert parses; a critical-unknown extension and | ||||||||||
| * nameConstraints fail closed unless the add-back is set. */ | ||||||||||
| static int test_wolfSSL_X509_tiny(void) | ||||||||||
| { | ||||||||||
| EXPECT_DECLS; | ||||||||||
| DecodedCert cert; | ||||||||||
|
|
||||||||||
| wc_InitDecodedCert(&cert, tinyCert_plain, (word32)sizeof(tinyCert_plain), | ||||||||||
| NULL); | ||||||||||
| ExpectIntEQ(wc_ParseCert(&cert, CERT_TYPE, NO_VERIFY, NULL), 0); | ||||||||||
| wc_FreeDecodedCert(&cert); | ||||||||||
|
|
||||||||||
| #ifndef WOLFSSL_NO_ASN_STRICT | ||||||||||
| wc_InitDecodedCert(&cert, tinyCert_critUnknown, | ||||||||||
| (word32)sizeof(tinyCert_critUnknown), NULL); | ||||||||||
| ExpectIntEQ(wc_ParseCert(&cert, CERT_TYPE, NO_VERIFY, NULL), | ||||||||||
| WC_NO_ERR_TRACE(ASN_CRIT_EXT_E)); | ||||||||||
| wc_FreeDecodedCert(&cert); | ||||||||||
| #endif | ||||||||||
|
|
||||||||||
| #ifndef IGNORE_NAME_CONSTRAINTS | ||||||||||
| wc_InitDecodedCert(&cert, tinyCert_nameConstr, | ||||||||||
| (word32)sizeof(tinyCert_nameConstr), NULL); | ||||||||||
| #ifdef WOLFSSL_X509_TINY_NAME_CONSTRAINTS | ||||||||||
| ExpectIntEQ(wc_ParseCert(&cert, CERT_TYPE, NO_VERIFY, NULL), 0); | ||||||||||
| #else | ||||||||||
| ExpectIntEQ(wc_ParseCert(&cert, CERT_TYPE, NO_VERIFY, NULL), | ||||||||||
| WC_NO_ERR_TRACE(ASN_NAME_INVALID_E)); | ||||||||||
| #endif | ||||||||||
| wc_FreeDecodedCert(&cert); | ||||||||||
| #endif | ||||||||||
| return EXPECT_RESULT(); | ||||||||||
| } | ||||||||||
| #endif /* WOLFSSL_X509_TINY && HAVE_ECC && !NO_ECC256 && !NO_ECC_SECP */ | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ [Info] Double blank line after the moved test function The moved block ends with Suggestion:
Suggested change
|
||||||||||
|
|
||||||||||
|
|
||||||||||
| static int test_wolfSSL_CTX_load_verify_locations_ex(void) | ||||||||||
| { | ||||||||||
|
|
@@ -38117,6 +38273,10 @@ TEST_CASE testCases[] = { | |||||||||
| #if defined(HAVE_CERT_CHAIN_VALIDATION) && \ | ||||||||||
| !defined(WOLFSSL_TEST_APPLE_NATIVE_CERT_VALIDATION) | ||||||||||
| TEST_DECL(test_wolfSSL_CertRsaPss), | ||||||||||
| #endif | ||||||||||
| #if defined(WOLFSSL_X509_TINY) && defined(HAVE_ECC) && \ | ||||||||||
| !defined(NO_ECC256) && !defined(NO_ECC_SECP) | ||||||||||
| TEST_DECL(test_wolfSSL_X509_tiny), | ||||||||||
| #endif | ||||||||||
| TEST_DECL(test_wolfSSL_CTX_load_verify_locations_ex), | ||||||||||
| TEST_DECL(test_wolfSSL_CTX_load_verify_buffer_ex), | ||||||||||
|
|
||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 [Low] critUnknown assertion gated on WOLFSSL_NO_ASN_STRICT, but the code does not relax it
💡 SUGGEST
testThe new critical-unknown-extension assertion is wrapped in
#ifndef WOLFSSL_NO_ASN_STRICT, implying the rejection only happens in strict builds. But the source is explicit that this is not relaxed byWOLFSSL_NO_ASN_STRICT:wolfcrypt/src/asn.c:22053-22057comments "RFC 5280 4.2 makes this a MUST that WOLFSSL_NO_ASN_STRICT does not relax", and thedefaultcase atasn.c:22058-22061setsASN_CRIT_EXT_Eunconditionally on a critical unknown extension. I confirmed the code returnsASN_CRIT_EXT_Eregardless of the strict flag, and that it propagates out ofwc_ParseCerteven underNO_VERIFY(asn.c:24766-24767). So the guard needlessly drops this assertion inWOLFSSL_NO_ASN_STRICTbuilds and slightly contradicts the source comment. Note this is not exercised by the x509-tiny CI job (which does not defineWOLFSSL_NO_ASN_STRICT), so it is a coverage/clarity issue, not a CI failure.Suggestion: