Add support for more extensions to wolfSSL_X509_print_ex.

- Key usage
- Extended key usage
- Subject alt name

Additionally, print out the criticality of the extensions.
This commit is contained in:
Hayden Roche
2022-04-26 14:28:23 -07:00
parent eb28d38fa8
commit f479600066
2 changed files with 926 additions and 695 deletions

1614
src/x509.c

File diff suppressed because it is too large Load Diff

View File

@@ -51464,10 +51464,11 @@ static void test_wolfSSL_X509_print(void)
AssertNotNull(bio = BIO_new(BIO_s_mem()));
AssertIntEQ(X509_print(bio, x509), SSL_SUCCESS);
#if defined(WOLFSSL_QT)
AssertIntEQ(BIO_get_mem_data(bio, NULL), 3113);
#if defined(OPENSSL_ALL) || defined(WOLFSSL_IP_ALT_NAME)
/* Will print IP address subject alt name. */
AssertIntEQ(BIO_get_mem_data(bio, NULL), 3329);
#else
AssertIntEQ(BIO_get_mem_data(bio, NULL), 3103);
AssertIntEQ(BIO_get_mem_data(bio, NULL), 3307);
#endif
BIO_free(bio);