Skip to content

Commit

Permalink
BoringSSL patch, not ready for merge
Browse files Browse the repository at this point in the history
  • Loading branch information
John Harrison committed Jan 13, 2024
1 parent 7337e10 commit 2d76c91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ option(ENABLE_SSL_SUPPORT "Enable SSL support" ON)

if (ENABLE_SSL_SUPPORT)
set(RMQ_OPENSSL_MIN_VERSION 1.1.1)
find_package(OpenSSL "${RMQ_OPENSSL_MIN_VERSION}" REQUIRED)
find_package(OpenSSL REQUIRED)

cmake_push_check_state()
set(THREADS_PREFER_PTHREAD_FLAG ON)
Expand Down
16 changes: 7 additions & 9 deletions librabbitmq/amqp_openssl_bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,13 @@ int amqp_openssl_bio_init(void) {
return AMQP_STATUS_NO_MEMORY;
}

BIO_meth_set_create(amqp_bio_method, BIO_meth_get_create(BIO_s_socket()));
BIO_meth_set_destroy(amqp_bio_method, BIO_meth_get_destroy(BIO_s_socket()));
BIO_meth_set_ctrl(amqp_bio_method, BIO_meth_get_ctrl(BIO_s_socket()));
BIO_meth_set_callback_ctrl(amqp_bio_method,
BIO_meth_get_callback_ctrl(BIO_s_socket()));
BIO_meth_set_read(amqp_bio_method, BIO_meth_get_read(BIO_s_socket()));
BIO_meth_set_write(amqp_bio_method, BIO_meth_get_write(BIO_s_socket()));
BIO_meth_set_gets(amqp_bio_method, BIO_meth_get_gets(BIO_s_socket()));
BIO_meth_set_puts(amqp_bio_method, BIO_meth_get_puts(BIO_s_socket()));
BIO_meth_set_create(amqp_bio_method, BIO_s_socket()->create);
BIO_meth_set_destroy(amqp_bio_method, BIO_s_socket()->destroy);
BIO_meth_set_ctrl(amqp_bio_method, BIO_s_socket()->ctrl);
BIO_meth_set_read(amqp_bio_method, BIO_s_socket()->bread);
BIO_meth_set_write(amqp_bio_method, BIO_s_socket()->bwrite);
BIO_meth_set_gets(amqp_bio_method, BIO_s_socket()->bgets);
BIO_meth_set_puts(amqp_bio_method, BIO_s_socket()->bputs);

BIO_meth_set_write(amqp_bio_method, amqp_openssl_bio_write);
BIO_meth_set_read(amqp_bio_method, amqp_openssl_bio_read);
Expand Down

0 comments on commit 2d76c91

Please sign in to comment.