mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
copy cbioFlag from ctx to ssl
This commit is contained in:
@@ -4625,6 +4625,7 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
|
||||
/* copy over application session context ID */
|
||||
ssl->sessionCtxSz = ctx->sessionCtxSz;
|
||||
XMEMCPY(ssl->sessionCtx, ctx->sessionCtx, ctx->sessionCtxSz);
|
||||
ssl->cbioFlag = ctx->cbioFlag;
|
||||
#endif
|
||||
|
||||
InitCiphers(ssl);
|
||||
|
10
src/ssl.c
10
src/ssl.c
@@ -11060,17 +11060,11 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
||||
ssl->biowr = wr;
|
||||
|
||||
/* set SSL to use BIO callbacks instead */
|
||||
if (
|
||||
#ifdef OPENSSL_EXTRA
|
||||
((ssl->cbioFlag & WOLFSSL_CBIO_RECV) != 0) &&
|
||||
#endif
|
||||
if (((ssl->cbioFlag & WOLFSSL_CBIO_RECV) != 0) &&
|
||||
(rd != NULL && rd->type != WOLFSSL_BIO_SOCKET)) {
|
||||
ssl->CBIORecv = BioReceive;
|
||||
}
|
||||
if (
|
||||
#ifdef OPENSSL_EXTRA
|
||||
((ssl->cbioFlag & WOLFSSL_CBIO_SEND) != 0) &&
|
||||
#endif
|
||||
if (((ssl->cbioFlag & WOLFSSL_CBIO_SEND) != 0) &&
|
||||
(wr != NULL && wr->type != WOLFSSL_BIO_SOCKET)) {
|
||||
ssl->CBIOSend = BioSend;
|
||||
}
|
||||
|
Reference in New Issue
Block a user