fix cbioFlag check

This commit is contained in:
Takashi Kojo
2018-08-02 10:18:09 +09:00
parent 98f6ae16ca
commit fd75f35801

View File

@@ -11060,11 +11060,11 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
ssl->biowr = wr;
/* set SSL to use BIO callbacks instead */
if (((ssl->cbioFlag & WOLFSSL_CBIO_RECV) != 0) &&
if (((ssl->cbioFlag & WOLFSSL_CBIO_RECV) == 0) &&
(rd != NULL && rd->type != WOLFSSL_BIO_SOCKET)) {
ssl->CBIORecv = BioReceive;
}
if (((ssl->cbioFlag & WOLFSSL_CBIO_SEND) != 0) &&
if (((ssl->cbioFlag & WOLFSSL_CBIO_SEND) == 0) &&
(wr != NULL && wr->type != WOLFSSL_BIO_SOCKET)) {
ssl->CBIOSend = BioSend;
}