diff --git a/examples/client/client.c b/examples/client/client.c index 0c5e06bea..2b638ec3b 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -1046,7 +1046,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) #if (defined(HAVE_ECC) && !defined(ALT_ECC_SIZE)) \ || defined(SESSION_CERTS) /* big enough to handle most cases including session certs */ - byte memory[320000]; + byte memory[370000]; #else byte memory[80000]; #endif diff --git a/src/bio.c b/src/bio.c index 57e813ff0..df715f9cc 100644 --- a/src/bio.c +++ b/src/bio.c @@ -1117,7 +1117,7 @@ int wolfSSL_BIO_write_filename(WOLFSSL_BIO *bio, char *name) } bio->file = XFOPEN(name, "w"); - if (bio->file == NULL) { + if (bio->file == XBADFILE) { return WOLFSSL_FAILURE; } bio->close = BIO_CLOSE; diff --git a/src/ssl.c b/src/ssl.c index 5d0fa9f30..e51d9beb0 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -33177,11 +33177,13 @@ int wolfSSL_SSL_CTX_remove_session(WOLFSSL_CTX *ctx, WOLFSSL_SESSION *s) BIO *wolfSSL_SSL_get_rbio(const WOLFSSL *s) { WOLFSSL_ENTER("wolfSSL_SSL_get_rbio"); - (void)s; /* Nginx sets the buffer size if the read BIO is different to write BIO. * The setting buffer size doesn't do anything so return NULL for both. */ - return NULL; + if (s == NULL) + return NULL; + + return s->biord; } BIO *wolfSSL_SSL_get_wbio(const WOLFSSL *s) { @@ -33190,7 +33192,10 @@ BIO *wolfSSL_SSL_get_wbio(const WOLFSSL *s) /* Nginx sets the buffer size if the read BIO is different to write BIO. * The setting buffer size doesn't do anything so return NULL for both. */ - return NULL; + if (s == NULL) + return NULL; + + return s->biowr; } int wolfSSL_SSL_do_handshake(WOLFSSL *s) diff --git a/wolfssl/wolfcrypt/memory.h b/wolfssl/wolfcrypt/memory.h index cb2a43b9f..958809fcd 100644 --- a/wolfssl/wolfcrypt/memory.h +++ b/wolfssl/wolfcrypt/memory.h @@ -106,7 +106,7 @@ WOLFSSL_API int wolfSSL_GetAllocators(wolfSSL_Malloc_cb*, #define WOLFMEM_BUCKETS 64,128,256,512,1024,2432,3456,4544,24576 #else /* increase 23k for object member of WOLFSSL_X509_NAME_ENTRY */ - #define WOLFMEM_BUCKETS 64,128,256,512,1024,2432,3456,4544,23088 + #define WOLFMEM_BUCKETS 64,128,256,512,1024,2432,3456,4544,23248 #endif #endif #ifndef WOLFMEM_DIST