Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoby committed Nov 5, 2023
1 parent 16b6fdb commit 2646ced
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sample/engine_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int main(int argc, char **argv) {
printf("connected\n");
}

engine->set_io_fd(engine, sock);
engine->set_io_fd(engine, (uv_os_sock_t)sock);

// do handshake
do {
Expand Down
9 changes: 1 addition & 8 deletions src/openssl/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,13 +578,6 @@ tlsuv_engine_t new_openssl_engine(void *ctx, const char *host) {
engine->api = openssl_engine_api;

engine->ssl = SSL_new(context->ctx);
// engine->in = BIO_new(BIO_s_mem());
// engine->out = BIO_new(BIO_s_mem());
//
// BIO *engine_bio = BIO_new(BIO_s_engine());
// BIO_set_data(engine_bio, engine);
// BIO_set_init(engine_bio, 1);
// SSL_set_bio(engine->ssl, engine_bio, engine_bio);

SSL_set_tlsext_host_name(engine->ssl, host);
SSL_set1_host(engine->ssl, host);
Expand Down Expand Up @@ -613,7 +606,7 @@ static void set_io_fd(tlsuv_engine_t self, uv_os_fd_t fd) {
struct openssl_engine *e = (struct openssl_engine *) self;
assert(e->bio == NULL);

e->bio = BIO_new_fd(fd, false);
e->bio = BIO_new_socket(fd, false);
SSL_set_bio(e->ssl, e->bio, e->bio);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/engine_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ TEST_CASE("ALPN negotiation", "[engine]") {
perror("failed to conenct");
}

engine->set_io_fd(engine, sock);
engine->set_io_fd(engine, (uv_os_sock_t)sock);

Check failure on line 205 in tests/engine_tests.cpp

View workflow job for this annotation

GitHub Actions / build (windows, openssl)

'void (tlsuv_engine_t,uv_os_fd_t)': cannot convert argument 2 from 'uv_os_sock_t' to 'uv_os_fd_t'

Check failure on line 205 in tests/engine_tests.cpp

View workflow job for this annotation

GitHub Actions / build (windows, mbedtls)

'void (tlsuv_engine_t,uv_os_fd_t)': cannot convert argument 2 from 'uv_os_sock_t' to 'uv_os_fd_t'

// do handshake
do {
Expand Down

0 comments on commit 2646ced

Please sign in to comment.