openssl icon indicating copy to clipboard operation
openssl copied to clipboard

SSL_new() fails for QUIC and OPENSSL_THREADS_NONE

Open Futaura opened this issue 7 months ago • 7 comments

When OPENSSL_THREADS and OPENSSL_THREADS_NONE are both defined, SSL_new() fails for QUIC connections because of the following code:

https://github.com/openssl/openssl/blob/986c48c4eb26861f25bc68ea252d8f2aad592735/ssl/quic/quic_impl.c#L387-L392

Should the code really fail at that point if OPENSSL_THREADS_NONE is defined? In such a case, removing the those lines of code allows a QUIC connection to be successfully established.

For some context, in the OpenSSL port for AmiSSL, we have been using the existing thread/locking functions, as per crypto/threads*.c for many years, but for 3.2.0 we currently are building with thread pools disabled and no threaded implementation for QUIC.

Futaura avatar Dec 08 '23 10:12 Futaura