Author: kotkov
Date: Tue Apr 25 18:29:08 2023
New Revision: 1909414
URL: http://svn.apache.org/viewvc?rev=1909414&view=rev
Log:
On the '1.3.x-r1909252-group' branch: Merge r1909413 (Remove a couple
of remaining _fp() OpenSSL API usages in the test suite) from trunk,
adjusting to the state of the 1.3.x branch.
* test/server/test_sslserver.c
(err_file_print_cb): New callback for ERR_print_errors_cb().
(ssl_handshake, ssl_socket_read): Replace usages of ERR_print_errors_fp()
with ERR_print_errors_cb(). Pass the new callback.
Modified:
serf/branches/1.3.x-r1909252-group/ (props changed)
serf/branches/1.3.x-r1909252-group/test/server/test_sslserver.c
Propchange: serf/branches/1.3.x-r1909252-group/
------------------------------------------------------------------------------
Merged /serf/trunk:r1909413
Modified: serf/branches/1.3.x-r1909252-group/test/server/test_sslserver.c
URL:
http://svn.apache.org/viewvc/serf/branches/1.3.x-r1909252-group/test/server/test_sslserver.c?rev=1909414&r1=1909413&r2=1909414&view=diff
==============================================================================
--- serf/branches/1.3.x-r1909252-group/test/server/test_sslserver.c (original)
+++ serf/branches/1.3.x-r1909252-group/test/server/test_sslserver.c Tue Apr 25
18:29:08 2023
@@ -43,6 +43,11 @@ typedef struct ssl_context_t {
} ssl_context_t;
+static int err_file_print_cb(const char *str, size_t len, void *bp)
+{
+ return fwrite(str, 1, len, bp);
+}
+
static int pem_passwd_cb(char *buf, int size, int rwflag, void *userdata)
{
strncpy(buf, "serftest", size);
@@ -372,7 +377,7 @@ static apr_status_t ssl_handshake(serv_c
return serv_ctx->bio_read_status; /* Usually APR_EAGAIN */
default:
serf__log(TEST_VERBOSE, __FILE__, "SSL Error %d: ", ssl_err);
- ERR_print_errors_fp(stderr);
+ ERR_print_errors_cb(err_file_print_cb, stderr);
serf__log_nopref(TEST_VERBOSE, "\n");
return SERF_ERROR_ISSUE_IN_TESTSUITE;
}
@@ -428,7 +433,7 @@ ssl_socket_read(serv_ctx_t *serv_ctx, ch
*len = 0;
serf__log(TEST_VERBOSE, __FILE__,
"ssl_socket_read SSL Error %d: ", ssl_err);
- ERR_print_errors_fp(stderr);
+ ERR_print_errors_cb(err_file_print_cb, stderr);
serf__log_nopref(TEST_VERBOSE, "\n");
return SERF_ERROR_ISSUE_IN_TESTSUITE;
}