Hi Ilya, On Mon, Sep 20, 2021 at 10:37:04PM +0500, ???? ??????? wrote: > Subject: [PATCH] BUILD: SSL: function "ERR_func_error_string" is deprecated in > OpenSSL-3.0.0 > > let us prepare for using OpenSSL-3.0.0 in no deprecation mode > --- > src/ssl_sock.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/ssl_sock.c b/src/ssl_sock.c > index a87d70b89..79b8b53ca 100644 > --- a/src/ssl_sock.c > +++ b/src/ssl_sock.c > @@ -606,7 +606,12 @@ static forceinline void ssl_sock_dump_errors(struct > connection *conn) > return; > fprintf(stderr, "fd[%#x] OpenSSL error[0x%lx] %s: %s\n", > conn->handle.fd, ret, > - ERR_func_error_string(ret), > ERR_reason_error_string(ret)); > +#if (OPENSSL_VERSION_NUMBER >= 0x30000000L) > + "OPENSSL_internal", > +#else > + ERR_func_error_string(ret), > +#endif > + ERR_reason_error_string(ret));
I'd really prefer that we address all this API stuff through the openssl-compat stuff, so that over time we can more easily drop unneeded stuff. Above that could be done this way: #if (OPENSSL_VERSION_NUMBER >= 0x30000000L) # define ERR_func_error_string(ret) "OPENSSL_internal" #endif This will also help us deal with the various forks that will sooner or later start to adopt the new API. thanks! Willy

