mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
fix for index increment and change test case expected return values
This commit is contained in:
@ -12444,6 +12444,7 @@ int wolfSSL_X509_REQ_get_attr_by_NID(const WOLFSSL_X509 *req,
|
||||
break;
|
||||
}
|
||||
}
|
||||
idx++;
|
||||
} while (sk != NULL);
|
||||
|
||||
/* no matches found */
|
||||
|
@ -49699,8 +49699,8 @@ static void test_wolfSSL_d2i_X509_REQ(void)
|
||||
* Obtain the challenge password from the CSR
|
||||
*/
|
||||
AssertIntEQ(X509_REQ_get_attr_by_NID(req, NID_pkcs9_challengePassword, -1),
|
||||
NID_pkcs9_challengePassword);
|
||||
AssertNotNull(attr = X509_REQ_get_attr(req, NID_pkcs9_challengePassword));
|
||||
1);
|
||||
AssertNotNull(attr = X509_REQ_get_attr(req, 1));
|
||||
AssertNotNull(at = X509_ATTRIBUTE_get0_type(attr, 0));
|
||||
AssertNotNull(at->value.asn1_string);
|
||||
AssertStrEQ((char*)ASN1_STRING_data(at->value.asn1_string), "2xIE+qqp/rhyTXP+");
|
||||
@ -49740,8 +49740,8 @@ static void test_wolfSSL_d2i_X509_REQ(void)
|
||||
* Obtain the challenge password from the CSR
|
||||
*/
|
||||
AssertIntEQ(X509_REQ_get_attr_by_NID(req, NID_pkcs9_challengePassword, -1),
|
||||
NID_pkcs9_challengePassword);
|
||||
AssertNotNull(attr = X509_REQ_get_attr(req, NID_pkcs9_challengePassword));
|
||||
0);
|
||||
AssertNotNull(attr = X509_REQ_get_attr(req, 0));
|
||||
AssertNotNull(at = X509_ATTRIBUTE_get0_type(attr, 0));
|
||||
AssertNotNull(at->value.asn1_string);
|
||||
AssertStrEQ((char*)ASN1_STRING_data(at->value.asn1_string), "IGCu/xNL4/0/wOgo");
|
||||
|
Reference in New Issue
Block a user