diff --git a/src/ssl.c b/src/ssl.c index 1ba0b7296..2352a7b6d 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -21093,9 +21093,11 @@ int wolfSSL_sk_push(WOLFSSL_STACK* sk, const void *data) case STACK_TYPE_X509: ret = wolfSSL_sk_X509_push(sk, (WOLFSSL_X509*) data); break; + #ifndef NO_WOLFSSL_STUB case STACK_TYPE_CIPHER: ret = wolfSSL_sk_CIPHER_push(sk, (WOLFSSL_CIPHER*) data); break; + #endif case STACK_TYPE_GEN_NAME: ret = wolfSSL_sk_ASN1_OBJECT_push(sk, (WOLFSSL_ASN1_OBJECT*) data); break; @@ -41880,7 +41882,6 @@ err: return (ret == 0) ? WOLFSSL_SUCCESS : WOLFSSL_FAILURE; } - #ifndef NO_WOLFSSL_STUB int wolfSSL_BIO_read_filename(WOLFSSL_BIO *b, const char *name) { #ifndef NO_FILESYSTEM XFILE fp; @@ -41909,7 +41910,6 @@ err: return WOLFSSL_NOT_IMPLEMENTED; #endif } - #endif /* Return the corresponding short name for the nid . * or NULL if short name can't be found. diff --git a/tests/api.c b/tests/api.c index 23f51d060..58a5e4f7f 100644 --- a/tests/api.c +++ b/tests/api.c @@ -25803,6 +25803,7 @@ static void test_wolfSSL_RSA_meth(void) AssertNotNull(rsa_meth = RSA_meth_new("placeholder RSA method", RSA_METHOD_FLAG_NO_CHECK)); +#ifndef NO_WOLFSSL_STUB AssertIntEQ(RSA_meth_set_pub_enc(rsa_meth, NULL), 1); AssertIntEQ(RSA_meth_set_pub_dec(rsa_meth, NULL), 1); AssertIntEQ(RSA_meth_set_priv_enc(rsa_meth, NULL), 1); @@ -25810,6 +25811,7 @@ static void test_wolfSSL_RSA_meth(void) AssertIntEQ(RSA_meth_set_init(rsa_meth, NULL), 1); AssertIntEQ(RSA_meth_set_finish(rsa_meth, NULL), 1); AssertIntEQ(RSA_meth_set0_app_data(rsa_meth, NULL), 1); +#endif AssertNotNull(rsa = RSA_new()); AssertIntEQ(RSA_set_method(rsa, rsa_meth), 1); @@ -31178,7 +31180,9 @@ static void test_openssl_generate_key_and_cert(void) AssertNotNull(pkey); AssertNotNull(ec_key); + #ifndef NO_WOLFSSL_STUB EC_KEY_set_asn1_flag(ec_key, OPENSSL_EC_NAMED_CURVE); + #endif AssertIntNE(EC_KEY_generate_key(ec_key), 0); AssertIntNE(EVP_PKEY_assign_EC_KEY(pkey, ec_key), 0);