forked from wolfSSL/wolfssl
Changes to make symbols available for OpenSSL compat
This commit is contained in:
25
tests/api.c
25
tests/api.c
@ -21589,9 +21589,9 @@ static void test_EVP_PKEY_rsa(void)
|
|||||||
|
|
||||||
AssertNotNull(rsa = wolfSSL_RSA_new());
|
AssertNotNull(rsa = wolfSSL_RSA_new());
|
||||||
AssertNotNull(pkey = wolfSSL_PKEY_new());
|
AssertNotNull(pkey = wolfSSL_PKEY_new());
|
||||||
AssertIntEQ(wolfSSL_EVP_PKEY_assign_RSA(NULL, rsa), WOLFSSL_FAILURE);
|
AssertIntEQ(EVP_PKEY_assign_RSA(NULL, rsa), WOLFSSL_FAILURE);
|
||||||
AssertIntEQ(wolfSSL_EVP_PKEY_assign_RSA(pkey, NULL), WOLFSSL_FAILURE);
|
AssertIntEQ(EVP_PKEY_assign_RSA(pkey, NULL), WOLFSSL_FAILURE);
|
||||||
AssertIntEQ(wolfSSL_EVP_PKEY_assign_RSA(pkey, rsa), WOLFSSL_SUCCESS);
|
AssertIntEQ(EVP_PKEY_assign_RSA(pkey, rsa), WOLFSSL_SUCCESS);
|
||||||
wolfSSL_EVP_PKEY_free(pkey);
|
wolfSSL_EVP_PKEY_free(pkey);
|
||||||
|
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
@ -21606,15 +21606,24 @@ static void test_EVP_PKEY_ec(void)
|
|||||||
|
|
||||||
AssertNotNull(ecKey = wolfSSL_EC_KEY_new());
|
AssertNotNull(ecKey = wolfSSL_EC_KEY_new());
|
||||||
AssertNotNull(pkey = wolfSSL_PKEY_new());
|
AssertNotNull(pkey = wolfSSL_PKEY_new());
|
||||||
AssertIntEQ(wolfSSL_EVP_PKEY_assign_EC_KEY(NULL, ecKey), WOLFSSL_FAILURE);
|
AssertIntEQ(EVP_PKEY_assign_EC_KEY(NULL, ecKey), WOLFSSL_FAILURE);
|
||||||
AssertIntEQ(wolfSSL_EVP_PKEY_assign_EC_KEY(pkey, NULL), WOLFSSL_FAILURE);
|
AssertIntEQ(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(pkey, ecKey), WOLFSSL_SUCCESS);
|
||||||
wolfSSL_EVP_PKEY_free(pkey);
|
wolfSSL_EVP_PKEY_free(pkey);
|
||||||
|
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
#endif
|
#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)
|
#if defined(OPENSSL_ALL) && !defined(NO_CERTS)
|
||||||
static void free_x509(X509* x)
|
static void free_x509(X509* x)
|
||||||
{
|
{
|
||||||
@ -21736,8 +21745,10 @@ static void test_X509_REQ(void)
|
|||||||
EVP_PKEY_free(pub);
|
EVP_PKEY_free(pub);
|
||||||
EVP_PKEY_free(priv);
|
EVP_PKEY_free(priv);
|
||||||
|
|
||||||
|
#ifdef FP_ECC
|
||||||
wc_ecc_fp_free();
|
wc_ecc_fp_free();
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* HAVE_ECC */
|
||||||
|
|
||||||
X509_NAME_free(name);
|
X509_NAME_free(name);
|
||||||
|
|
||||||
@ -23227,6 +23238,8 @@ void ApiTest(void)
|
|||||||
/* OpenSSL EVP_PKEY API tests */
|
/* OpenSSL EVP_PKEY API tests */
|
||||||
test_EVP_PKEY_rsa();
|
test_EVP_PKEY_rsa();
|
||||||
test_EVP_PKEY_ec();
|
test_EVP_PKEY_ec();
|
||||||
|
/* OpenSSL error API tests */
|
||||||
|
test_ERR_load_crypto_strings();
|
||||||
/* OpenSSL sk_X509 API test */
|
/* OpenSSL sk_X509 API test */
|
||||||
test_sk_X509();
|
test_sk_X509();
|
||||||
/* OpenSSL X509 API test */
|
/* OpenSSL X509 API test */
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* engine.h for libcurl */
|
/* engine.h for libcurl */
|
||||||
|
|
||||||
|
#include <wolfssl/openssl/err.h>
|
||||||
|
|
||||||
#undef HAVE_OPENSSL_ENGINE_H
|
#undef HAVE_OPENSSL_ENGINE_H
|
||||||
|
|
||||||
#define ENGINE_load_builtin_engines() /*ENGINE_load_builtin_engines not needed*/
|
#define ENGINE_load_builtin_engines() /*ENGINE_load_builtin_engines not needed*/
|
||||||
|
@ -550,8 +550,8 @@ typedef WOLFSSL_EVP_CIPHER_CTX EVP_CIPHER_CTX;
|
|||||||
#define EVP_get_cipherbyname wolfSSL_EVP_get_cipherbyname
|
#define EVP_get_cipherbyname wolfSSL_EVP_get_cipherbyname
|
||||||
#define EVP_get_digestbyname wolfSSL_EVP_get_digestbyname
|
#define EVP_get_digestbyname wolfSSL_EVP_get_digestbyname
|
||||||
|
|
||||||
#define EVP_PKEY_asign_RSA wolfSSL_EVP_PKEY_assign_RSA
|
#define EVP_PKEY_assign_RSA wolfSSL_EVP_PKEY_assign_RSA
|
||||||
#define EVP_PKEY_asign_EC_KEY wolfSSL_EVP_PKEY_assign_EC_KEY
|
#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_DSA wolfSSL_EVP_PKEY_get1_DSA
|
||||||
#define EVP_PKEY_get1_RSA wolfSSL_EVP_PKEY_get1_RSA
|
#define EVP_PKEY_get1_RSA wolfSSL_EVP_PKEY_get1_RSA
|
||||||
#define EVP_PKEY_get1_DSA wolfSSL_EVP_PKEY_get1_DSA
|
#define EVP_PKEY_get1_DSA wolfSSL_EVP_PKEY_get1_DSA
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <wolfssl/openssl/bio.h>
|
#include <wolfssl/openssl/bio.h>
|
||||||
#include <wolfssl/openssl/rsa.h>
|
#include <wolfssl/openssl/rsa.h>
|
||||||
#include <wolfssl/openssl/dsa.h>
|
#include <wolfssl/openssl/dsa.h>
|
||||||
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
Reference in New Issue
Block a user