Author: kotkov Date: Wed Jun 15 13:22:58 2022 New Revision: 1901937 URL: http://svn.apache.org/viewvc?rev=1901937&view=rev Log: Remove the use of the ERR_GET_FUNC() macro.
The ERR_GET_FUNC() macro was removed in OpenSSL 3.0 [1]: [[[ Removal of function code from the error codes The function code part of the error code is now always set to 0. For that reason the ERR_GET_FUNC() macro was removed. Applications must resolve the error codes only using the library number and the reason code. ]]] Remove its two current usages since there is no replacement for this concept in the newer versions of OpenSSL. [1] https://www.openssl.org/docs/man3.0/man7/migration_guide.html Patch by: Denis Kovalchuk <denis.kovalchuk{_AT_}visualsvn.com> * buckets/ssl_buckets.c: (status_from_ssl_error): Remove ERR_GET_FUNC() from comment. (ssl_need_client_cert): Do not log the function code of an error. * test/MockHTTPinC/MockHTTP_server.c: (sslHandshake): Do not log the function code of an error. Modified: serf/trunk/buckets/ssl_buckets.c serf/trunk/test/MockHTTPinC/MockHTTP_server.c Modified: serf/trunk/buckets/ssl_buckets.c URL: http://svn.apache.org/viewvc/serf/trunk/buckets/ssl_buckets.c?rev=1901937&r1=1901936&r2=1901937&view=diff ============================================================================== --- serf/trunk/buckets/ssl_buckets.c (original) +++ serf/trunk/buckets/ssl_buckets.c Wed Jun 15 13:22:58 2022 @@ -1027,7 +1027,6 @@ static apr_status_t status_from_ssl_erro } else { /*unsigned long l = ERR_peek_error(); int lib = ERR_GET_LIB(l); - int func = ERR_GET_FUNC(l); int reason = ERR_GET_REASON(l);*/ /* ### Detect more specific errors? @@ -1654,8 +1653,7 @@ static int ssl_need_client_cert(SSL *ssl } else { serf__log(LOGLVL_ERROR, LOGCOMP_SSL, __FILE__, ctx->config, - "OpenSSL cert error: %d %d %d\n", ERR_GET_LIB(err), - ERR_GET_FUNC(err), + "OpenSSL cert error: %d %d\n", ERR_GET_LIB(err), ERR_GET_REASON(err)); PKCS12_free(p12); bio_meth_free(biom); Modified: serf/trunk/test/MockHTTPinC/MockHTTP_server.c URL: http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP_server.c?rev=1901937&r1=1901936&r2=1901937&view=diff ============================================================================== --- serf/trunk/test/MockHTTPinC/MockHTTP_server.c (original) +++ serf/trunk/test/MockHTTPinC/MockHTTP_server.c Wed Jun 15 13:22:58 2022 @@ -3036,7 +3036,6 @@ static apr_status_t sslHandshake(_mhClie default: { int lib = ERR_GET_LIB(l); - int func = ERR_GET_FUNC(l); int reason = ERR_GET_REASON(l); if (lib == ERR_LIB_SSL @@ -3050,8 +3049,8 @@ static apr_status_t sslHandshake(_mhClie } _mhLog(MH_VERBOSE, cctx->skt, - "SSL Error %d: Library=%d, Function=%d, Reason=%d", - ssl_err, lib, func, reason); + "SSL Error %d: Library=%d, Reason=%d", + ssl_err, lib, reason); #if MH_VERBOSE ERR_print_errors_fp(stderr); #endif