@@ -41520,11 +41520,11 @@ static int test_wolfSSL_X509_max_altnames(void)
4152041520 0xff, 0x9f, 0xea, 0x78, 0x6f, 0x11, 0x9d, 0xe6
4152141521 };
4152241522
41523- X509 * x509 = NULL;
41524- int certSize = (int)sizeof(too_many_altnames_cert) / sizeof(unsigned char);
41523+ WOLFSSL_X509 * x509 = NULL;
41524+ int certSize = (int)( sizeof(too_many_altnames_cert) / sizeof(unsigned char) );
4152541525
4152641526 ExpectNull(x509 = wolfSSL_X509_load_certificate_buffer(
41527- too_many_altnames_cert, certSize, SSL_FILETYPE_ASN1 ));
41527+ too_many_altnames_cert, certSize, WOLFSSL_FILETYPE_ASN1 ));
4152841528#endif
4152941529#endif
4153041530 return EXPECT_RESULT();
@@ -41534,15 +41534,19 @@ static int test_wolfSSL_X509_max_name_constraints(void)
4153441534{
4153541535 EXPECT_DECLS;
4153641536#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) && !defined(NO_RSA) && \
41537- !defined(NO_WOLFSSL_CLIENT)
41537+ !( defined(NO_WOLFSSL_CLIENT) && defined(NO_WOLFSSL_SERVER) )
4153841538
4153941539 /* Only test if max name constraints has not been modified */
4154041540#if WOLFSSL_MAX_NAME_CONSTRAINTS == 128
4154141541 WOLFSSL_CTX* ctx = NULL;
4154241542 /* File contains a certificate with 130 name constraints */
4154341543 const char* malformed_ca_cert = "./certs/test/cert-too-many-name-constraints.pem";
41544-
41544+
41545+ #ifndef NO_WOLFSSL_SERVER
41546+ ExpectNotNull(ctx = wolfSSL_CTX_new(wolfSSLv23_server_method()));
41547+ #else
4154541548 ExpectNotNull(ctx = wolfSSL_CTX_new(wolfSSLv23_client_method()));
41549+ #endif
4154641550
4154741551 ExpectIntNE(wolfSSL_CTX_load_verify_locations_ex(ctx, malformed_ca_cert, NULL,
4154841552 WOLFSSL_LOAD_FLAG_NONE), WOLFSSL_SUCCESS);
0 commit comments