account for different build options

This commit is contained in:
Jacob Barthelmeh
2017-03-27 16:27:24 -06:00
parent dc4159546b
commit cda44c89ac
3 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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)

View File

@ -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);