Hello! 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. ]]] Since there is no replacement for this concept in the newer versions of OpenSSL, I would like to propose a patch that removes its two current usages. [1] https://www.openssl.org/docs/man3.0/man7/migration_guide.html Kind Regards, Denis Kovalchuk
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 * 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. Index: buckets/ssl_buckets.c =================================================================== --- buckets/ssl_buckets.c (revision 1901825) +++ buckets/ssl_buckets.c (working copy) @@ -1027,7 +1027,6 @@ static apr_status_t status_from_ssl_error(serf_ssl } 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, X509 **c } 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); Index: test/MockHTTPinC/MockHTTP_server.c =================================================================== --- test/MockHTTPinC/MockHTTP_server.c (revision 1901825) +++ test/MockHTTPinC/MockHTTP_server.c (working copy) @@ -3036,7 +3036,6 @@ static apr_status_t sslHandshake(_mhClientCtx_t *c 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(_mhClientCtx_t *c } _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