diff --git a/src/ssl.c b/src/ssl.c index 03bcb8382..d5d8245ce 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -12192,12 +12192,16 @@ int wolfSSL_set_compression(WOLFSSL* ssl) { WOLFSSL_ENTER("wolfSSL_ERR_get_error"); +#if defined(WOLFSSL_NGINX) || defined(OPENSSL_EXTRA) { unsigned long ret = wolfSSL_ERR_peek_error_line_data(NULL, NULL, NULL, NULL); wc_RemoveErrorNode(-1); return ret; } +#else + return (unsigned long)(0 - NOT_COMPILED_IN); +#endif } #ifndef NO_MD5 @@ -23492,6 +23496,7 @@ const WOLFSSL_EVP_MD* wolfSSL_EVP_get_digestbynid(int id) } +#ifndef NO_RSA WOLFSSL_RSA* wolfSSL_EVP_PKEY_get1_RSA(WOLFSSL_EVP_PKEY* key) { WOLFSSL_RSA* local; @@ -23522,12 +23527,10 @@ WOLFSSL_RSA* wolfSSL_EVP_PKEY_get1_RSA(WOLFSSL_EVP_PKEY* key) wolfSSL_RSA_free(local); local = NULL; } - return local; } -#ifndef NO_RSA /* with set1 functions the pkey struct does not own the RSA structure * * returns WOLFSSL_SUCCESS on success and WOLFSSL_FAILURE on failure diff --git a/wolfcrypt/src/wc_port.c b/wolfcrypt/src/wc_port.c index e68476c9a..c9bf6d87b 100644 --- a/wolfcrypt/src/wc_port.c +++ b/wolfcrypt/src/wc_port.c @@ -461,7 +461,7 @@ int wolfSSL_CryptHwMutexUnLock(void) { /* ---------------------------------------------------------------------------*/ /* Mutex Ports */ /* ---------------------------------------------------------------------------*/ -#ifdef OPENSSL_EXTRA +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) static mutex_cb* compat_mutex_cb = NULL; /* Function that locks or unlocks a mutex based on the flag passed in. @@ -493,7 +493,7 @@ int wolfSSL_CryptHwMutexUnLock(void) { compat_mutex_cb = cb; return 0; } -#endif +#endif /* defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) */ #ifdef SINGLE_THREADED int wc_InitMutex(wolfSSL_Mutex* m) diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index 39241bac7..69ff72332 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -193,7 +193,7 @@ WOLFSSL_API wolfSSL_Mutex* wc_InitAndAllocMutex(void); WOLFSSL_API int wc_FreeMutex(wolfSSL_Mutex*); WOLFSSL_API int wc_LockMutex(wolfSSL_Mutex*); WOLFSSL_API int wc_UnLockMutex(wolfSSL_Mutex*); -#ifdef OPENSSL_EXTRA +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) /* dynamiclly set which mutex to use. unlock / lock is controlled by flag */ typedef void (mutex_cb)(int flag, int type, const char* file, int line);