File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11159,7 +11159,7 @@ int wolfSSL_i2d_X509_NAME(WOLFSSL_X509_NAME* name, unsigned char** out)
1115911159 _x = (x -> name && * x -> name ) ? x -> name : x -> staticName ;
1116011160 _y = (y -> name && * y -> name ) ? y -> name : y -> staticName ;
1116111161
11162- return XSTRNCMP (_x , _y , x -> sz ); /* y sz is the same */
11162+ return XSTRNCASECMP (_x , _y , x -> sz ); /* y sz is the same */
1116311163 }
1116411164
1116511165#ifndef NO_BIO
Original file line number Diff line number Diff line change @@ -12266,6 +12266,16 @@ static int test_wolfSSL_PKCS12(void)
1226612266 ExpectIntEQ(wolfSSL_X509_NAME_cmp((const WOLFSSL_X509_NAME*)subject,
1226712267 (const WOLFSSL_X509_NAME*)wolfSSL_X509_get_subject_name(x509)), 0);
1226812268
12269+ /* modify case and compare subject from certificate in ca to expected.
12270+ * The first bit of the name is:
12271+ * /C=US/ST=Washington
12272+ * So we'll change subject->name[1] to 'c' (lower case) */
12273+ if (subject != NULL) {
12274+ subject->name[1] = 'c';
12275+ ExpectIntEQ(wolfSSL_X509_NAME_cmp((const WOLFSSL_X509_NAME*)subject,
12276+ (const WOLFSSL_X509_NAME*)wolfSSL_X509_get_subject_name(x509)), 0);
12277+ }
12278+
1226912279 EVP_PKEY_free(pkey);
1227012280 pkey = NULL;
1227112281 X509_free(x509);
You can’t perform that action at this time.
0 commit comments