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 @@ -12374,6 +12374,16 @@ static int test_wolfSSL_PKCS12(void)
1237412374 ExpectIntEQ(wolfSSL_X509_NAME_cmp((const WOLFSSL_X509_NAME*)subject,
1237512375 (const WOLFSSL_X509_NAME*)wolfSSL_X509_get_subject_name(x509)), 0);
1237612376
12377+ /* modify case and compare subject from certificate in ca to expected.
12378+ * The first bit of the name is:
12379+ * /C=US/ST=Washington
12380+ * So we'll change subject->name[1] to 'c' (lower case) */
12381+ if (subject != NULL) {
12382+ subject->name[1] = 'c';
12383+ ExpectIntEQ(wolfSSL_X509_NAME_cmp((const WOLFSSL_X509_NAME*)subject,
12384+ (const WOLFSSL_X509_NAME*)wolfSSL_X509_get_subject_name(x509)), 0);
12385+ }
12386+
1237712387 EVP_PKEY_free(pkey);
1237812388 pkey = NULL;
1237912389 X509_free(x509);
You can’t perform that action at this time.
0 commit comments