diff --git a/tests/api.c b/tests/api.c index bc102fff6..29b3a8eeb 100644 --- a/tests/api.c +++ b/tests/api.c @@ -21589,9 +21589,9 @@ static void test_EVP_PKEY_rsa(void) AssertNotNull(rsa = wolfSSL_RSA_new()); AssertNotNull(pkey = wolfSSL_PKEY_new()); - AssertIntEQ(wolfSSL_EVP_PKEY_assign_RSA(NULL, rsa), WOLFSSL_FAILURE); - AssertIntEQ(wolfSSL_EVP_PKEY_assign_RSA(pkey, NULL), WOLFSSL_FAILURE); - AssertIntEQ(wolfSSL_EVP_PKEY_assign_RSA(pkey, rsa), WOLFSSL_SUCCESS); + AssertIntEQ(EVP_PKEY_assign_RSA(NULL, rsa), WOLFSSL_FAILURE); + AssertIntEQ(EVP_PKEY_assign_RSA(pkey, NULL), WOLFSSL_FAILURE); + AssertIntEQ(EVP_PKEY_assign_RSA(pkey, rsa), WOLFSSL_SUCCESS); wolfSSL_EVP_PKEY_free(pkey); printf(resultFmt, passed); @@ -21606,15 +21606,24 @@ static void test_EVP_PKEY_ec(void) AssertNotNull(ecKey = wolfSSL_EC_KEY_new()); AssertNotNull(pkey = wolfSSL_PKEY_new()); - AssertIntEQ(wolfSSL_EVP_PKEY_assign_EC_KEY(NULL, ecKey), WOLFSSL_FAILURE); - AssertIntEQ(wolfSSL_EVP_PKEY_assign_EC_KEY(pkey, NULL), WOLFSSL_FAILURE); - AssertIntEQ(wolfSSL_EVP_PKEY_assign_EC_KEY(pkey, ecKey), WOLFSSL_SUCCESS); + AssertIntEQ(EVP_PKEY_assign_EC_KEY(NULL, ecKey), WOLFSSL_FAILURE); + AssertIntEQ(EVP_PKEY_assign_EC_KEY(pkey, NULL), WOLFSSL_FAILURE); + AssertIntEQ(EVP_PKEY_assign_EC_KEY(pkey, ecKey), WOLFSSL_SUCCESS); wolfSSL_EVP_PKEY_free(pkey); printf(resultFmt, passed); #endif } +static void test_ERR_load_crypto_strings(void) +{ +#if defined(OPENSSL_ALL) + ERR_load_crypto_strings(); + + printf(resultFmt, passed); +#endif +} + #if defined(OPENSSL_ALL) && !defined(NO_CERTS) static void free_x509(X509* x) { @@ -21736,8 +21745,10 @@ static void test_X509_REQ(void) EVP_PKEY_free(pub); EVP_PKEY_free(priv); +#ifdef FP_ECC wc_ecc_fp_free(); #endif +#endif /* HAVE_ECC */ X509_NAME_free(name); @@ -23227,6 +23238,8 @@ void ApiTest(void) /* OpenSSL EVP_PKEY API tests */ test_EVP_PKEY_rsa(); test_EVP_PKEY_ec(); + /* OpenSSL error API tests */ + test_ERR_load_crypto_strings(); /* OpenSSL sk_X509 API test */ test_sk_X509(); /* OpenSSL X509 API test */ diff --git a/wolfssl/openssl/engine.h b/wolfssl/openssl/engine.h index a4e74a957..e4a1ff193 100644 --- a/wolfssl/openssl/engine.h +++ b/wolfssl/openssl/engine.h @@ -1,5 +1,7 @@ /* engine.h for libcurl */ +#include + #undef HAVE_OPENSSL_ENGINE_H #define ENGINE_load_builtin_engines() /*ENGINE_load_builtin_engines not needed*/ diff --git a/wolfssl/openssl/evp.h b/wolfssl/openssl/evp.h index ef011fa48..eeb877db4 100644 --- a/wolfssl/openssl/evp.h +++ b/wolfssl/openssl/evp.h @@ -550,8 +550,8 @@ typedef WOLFSSL_EVP_CIPHER_CTX EVP_CIPHER_CTX; #define EVP_get_cipherbyname wolfSSL_EVP_get_cipherbyname #define EVP_get_digestbyname wolfSSL_EVP_get_digestbyname -#define EVP_PKEY_asign_RSA wolfSSL_EVP_PKEY_assign_RSA -#define EVP_PKEY_asign_EC_KEY wolfSSL_EVP_PKEY_assign_EC_KEY +#define EVP_PKEY_assign_RSA wolfSSL_EVP_PKEY_assign_RSA +#define EVP_PKEY_assign_EC_KEY wolfSSL_EVP_PKEY_assign_EC_KEY #define EVP_PKEY_get1_DSA wolfSSL_EVP_PKEY_get1_DSA #define EVP_PKEY_get1_RSA wolfSSL_EVP_PKEY_get1_RSA #define EVP_PKEY_get1_DSA wolfSSL_EVP_PKEY_get1_DSA diff --git a/wolfssl/openssl/pem.h b/wolfssl/openssl/pem.h index 78c781b2e..13d447bbf 100644 --- a/wolfssl/openssl/pem.h +++ b/wolfssl/openssl/pem.h @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" {