forked from wolfSSL/wolfssl
fix RSA macro, tickets without server, and add test case
This commit is contained in:
16
src/ssl.c
16
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
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user