forked from wolfSSL/wolfssl
wolfSSL_get_rbio,wolfSSL_get_wbio.
fix to check XBADFILE in wolfSSL_BIO_write_file.
This commit is contained in:
@ -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
|
||||
|
@ -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;
|
||||
|
11
src/ssl.c
11
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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user