Skip to content

Commit

Permalink
BoringSSL: BIO_set_flags ORs flags
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB authored May 24, 2020
1 parent 1361468 commit e2cdfde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crypto/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int BIO_s_custom_write(BIO *bio, const char *data, int length) {
int written = us_socket_write(0, loop_ssl_data->ssl_socket, data, length, loop_ssl_data->last_write_was_msg_more);

if (!written) {
BIO_set_flags(bio, BIO_get_flags(bio) | BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_WRITE);
BIO_set_flags(bio, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_WRITE);
return -1;
}

Expand All @@ -118,7 +118,7 @@ int BIO_s_custom_read(BIO *bio, char *dst, int length) {
//printf("BIO_s_custom_read\n");

if (!loop_ssl_data->ssl_read_input_length) {
BIO_set_flags(bio, BIO_get_flags(bio) | BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_READ);
BIO_set_flags(bio, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_READ);
return -1;
}

Expand Down

0 comments on commit e2cdfde

Please sign in to comment.