Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ext/openssl/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,28 @@ def find_openssl_library
# added in 3.5.0
have_func("SSL_get0_peer_signature_name(NULL, NULL)", ssl_h)

# QUIC support - added in OpenSSL 3.2.0
have_func("OSSL_QUIC_client_method()", ssl_h)
have_func("OSSL_QUIC_client_thread_method()", ssl_h)
have_func("SSL_new_stream(NULL, 0)", ssl_h)
have_func("SSL_accept_stream(NULL, 0)", ssl_h)
have_func("SSL_stream_conclude(NULL)", ssl_h)
have_func("SSL_get_stream_id(NULL)", ssl_h)
have_func("SSL_set_default_stream_mode(NULL, 0)", ssl_h)
have_func("SSL_set_blocking_mode(NULL, 0)", ssl_h)
have_func("SSL_get_blocking_mode(NULL)", ssl_h)
have_func("SSL_handle_events(NULL)", ssl_h)
have_func("SSL_get_event_timeout(NULL, NULL, NULL)", ssl_h)
have_func("SSL_get0_connection(NULL)", ssl_h)
have_func("SSL_is_connection(NULL)", ssl_h)
have_func("SSL_set1_initial_peer_addr(NULL, NULL)", ssl_h)
have_func("OSSL_QUIC_server_method()", ssl_h)
have_func("SSL_new_listener(NULL, 0)", ssl_h)
have_func("SSL_accept_connection(NULL, 0)", ssl_h)
have_func("SSL_get_accept_connection_queue_len(NULL)", ssl_h)
have_func("SSL_listen(NULL)", ssl_h)
have_func("SSL_set_incoming_stream_policy(NULL, 0, 0)", ssl_h)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simply require OpenSSL 3.5+ and remove most of the conditionals. There is little need to support 3.2-3.4 which are non-LTS releases and will reach EOL in 8 months, and we want the server side support in 3.5 to write meaningful tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but I'm not sure how to do that. How do we take other SSL implementations in to account?


Logging::message "=== Checking done. ===\n"

# Append flags from environment variables.
Expand Down
4 changes: 4 additions & 0 deletions ext/openssl/ossl.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
# define OSSL_HAVE_IMMUTABLE_PKEY
#endif

#if !OSSL_IS_LIBRESSL && defined(HAVE_OSSL_QUIC_CLIENT_METHOD)
# define OSSL_USE_QUIC
#endif

/*
* Common Module
*/
Expand Down
Loading
Loading