forked from wolfSSL/wolfssl
account for different build options
This commit is contained in:
@@ -12192,12 +12192,16 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
|||||||
{
|
{
|
||||||
WOLFSSL_ENTER("wolfSSL_ERR_get_error");
|
WOLFSSL_ENTER("wolfSSL_ERR_get_error");
|
||||||
|
|
||||||
|
#if defined(WOLFSSL_NGINX) || defined(OPENSSL_EXTRA)
|
||||||
{
|
{
|
||||||
unsigned long ret = wolfSSL_ERR_peek_error_line_data(NULL, NULL,
|
unsigned long ret = wolfSSL_ERR_peek_error_line_data(NULL, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
wc_RemoveErrorNode(-1);
|
wc_RemoveErrorNode(-1);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
return (unsigned long)(0 - NOT_COMPILED_IN);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_MD5
|
#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* wolfSSL_EVP_PKEY_get1_RSA(WOLFSSL_EVP_PKEY* key)
|
||||||
{
|
{
|
||||||
WOLFSSL_RSA* local;
|
WOLFSSL_RSA* local;
|
||||||
@@ -23522,12 +23527,10 @@ WOLFSSL_RSA* wolfSSL_EVP_PKEY_get1_RSA(WOLFSSL_EVP_PKEY* key)
|
|||||||
wolfSSL_RSA_free(local);
|
wolfSSL_RSA_free(local);
|
||||||
local = NULL;
|
local = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return local;
|
return local;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_RSA
|
|
||||||
/* with set1 functions the pkey struct does not own the RSA structure
|
/* with set1 functions the pkey struct does not own the RSA structure
|
||||||
*
|
*
|
||||||
* returns WOLFSSL_SUCCESS on success and WOLFSSL_FAILURE on failure
|
* returns WOLFSSL_SUCCESS on success and WOLFSSL_FAILURE on failure
|
||||||
|
@@ -461,7 +461,7 @@ int wolfSSL_CryptHwMutexUnLock(void) {
|
|||||||
/* ---------------------------------------------------------------------------*/
|
/* ---------------------------------------------------------------------------*/
|
||||||
/* Mutex Ports */
|
/* Mutex Ports */
|
||||||
/* ---------------------------------------------------------------------------*/
|
/* ---------------------------------------------------------------------------*/
|
||||||
#ifdef OPENSSL_EXTRA
|
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
||||||
static mutex_cb* compat_mutex_cb = NULL;
|
static mutex_cb* compat_mutex_cb = NULL;
|
||||||
|
|
||||||
/* Function that locks or unlocks a mutex based on the flag passed in.
|
/* 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;
|
compat_mutex_cb = cb;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) */
|
||||||
#ifdef SINGLE_THREADED
|
#ifdef SINGLE_THREADED
|
||||||
|
|
||||||
int wc_InitMutex(wolfSSL_Mutex* m)
|
int wc_InitMutex(wolfSSL_Mutex* m)
|
||||||
|
@@ -193,7 +193,7 @@ WOLFSSL_API wolfSSL_Mutex* wc_InitAndAllocMutex(void);
|
|||||||
WOLFSSL_API int wc_FreeMutex(wolfSSL_Mutex*);
|
WOLFSSL_API int wc_FreeMutex(wolfSSL_Mutex*);
|
||||||
WOLFSSL_API int wc_LockMutex(wolfSSL_Mutex*);
|
WOLFSSL_API int wc_LockMutex(wolfSSL_Mutex*);
|
||||||
WOLFSSL_API int wc_UnLockMutex(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 */
|
/* 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);
|
typedef void (mutex_cb)(int flag, int type, const char* file, int line);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user