diff --git a/src/ssl.c b/src/ssl.c index e96a31079..ed1952051 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -32170,9 +32170,21 @@ int wolfSSL_SSL_do_handshake(WOLFSSL *s) if (s == NULL) return WOLFSSL_FAILURE; - if (s->options.side == WOLFSSL_CLIENT_END) + if (s->options.side == WOLFSSL_CLIENT_END) { + #ifndef NO_WOLFSSL_CLIENT return wolfSSL_connect(s); + #else + WOLFSSL_MSG("Client not compiled in"); + return WOLFSSL_FAILURE; + #endif + } + +#ifndef NO_WOLFSSL_SERVER return wolfSSL_accept(s); +#else + WOLFSSL_MSG("Server not compiled in"); + return WOLFSSL_FAILURE; +#endif } int wolfSSL_SSL_in_init(WOLFSSL *s) @@ -32298,7 +32310,7 @@ int wolfSSL_i2a_ASN1_INTEGER(BIO *bp, const WOLFSSL_ASN1_INTEGER *a) } -#ifdef HAVE_SESSION_TICKET +#if defined(HAVE_SESSION_TICKET) && !defined(NO_WOLFSSL_SERVER) /* Expected return values from implementations of OpenSSL ticket key callback. */ #define TICKET_KEY_CB_RET_FAILURE -1 diff --git a/tests/api.c b/tests/api.c index dc4983bbe..c9729915e 100644 --- a/tests/api.c +++ b/tests/api.c @@ -15844,6 +15844,7 @@ static void test_wolfSSL_ERR_put_error(void) file = NULL; AssertIntEQ(ERR_get_error_line(&file, &line), 0); AssertNull(file); + AssertIntEQ(ERR_get_error_line_data(&file, &line, NULL, NULL), 0); /* Empty and free up all error nodes */ ERR_clear_error(); diff --git a/wolfssl/openssl/rsa.h b/wolfssl/openssl/rsa.h index d86a4a30f..ea8f319f5 100644 --- a/wolfssl/openssl/rsa.h +++ b/wolfssl/openssl/rsa.h @@ -32,21 +32,9 @@ extern "C" { #endif -#if !defined(NO_RSA) && !defined(HAVE_USER_RSA) -#if defined(HAVE_FIPS) || \ - (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION < 2)) - /* - choice of padding added after fips, so not available when using fips RSA - */ - - /* Padding types */ - #define RSA_PKCS1_PADDING 0 - #define RSA_PKCS1_OAEP_PADDING 1 -#else - #define RSA_PKCS1_PADDING WC_RSA_PKCSV15_PAD - #define RSA_PKCS1_OAEP_PADDING WC_RSA_OAEP_PAD -#endif /* HAVE_FIPS */ -#endif +/* Padding types */ +#define RSA_PKCS1_PADDING 0 +#define RSA_PKCS1_OAEP_PADDING 1 #ifndef WOLFSSL_RSA_TYPE_DEFINED /* guard on redeclaration */ typedef struct WOLFSSL_RSA WOLFSSL_RSA;