add test case and macro mapping

This commit is contained in:
JacobBarthelmeh
2021-07-30 11:03:41 -06:00
committed by Jacob Barthelmeh
parent de3416998c
commit ff521a14e4
2 changed files with 10 additions and 0 deletions

View File

@ -27880,6 +27880,12 @@ static void test_wolfSSL_certs(void)
ext = X509V3_EXT_i2d(NID_basic_constraints, crit, bc);
AssertNotNull(ext);
X509_EXTENSION_free(ext);
AssertNotNull(ext = X509_EXTENSION_new());
X509_EXTENSION_set_critical(ext, 1);
AssertIntEQ(X509_EXTENSION_set_object(ext,
OBJ_nid2obj(NID_basic_constraints)), SSL_SUCCESS);
X509_EXTENSION_free(ext);
#endif
AssertIntEQ(crit, 0);
BASIC_CONSTRAINTS_free(bc);

View File

@ -67,4 +67,8 @@
#define XN_FLAG_MULTILINE 0xFFFF
#define X509_EXTENSION_set_critical wolfSSL_X509_EXTENSION_set_critical
#define X509_EXTENSION_set_object wolfSSL_X509_EXTENSION_set_object
#define X509_EXTENSION_set_data wolfSSL_X509_EXTENSION_set_data
#endif /* WOLFSSL_OPENSSL_509_H_ */