Remove a couple of remaining _fp() OpenSSL API usages in the test suite
when compiling with MH_VERBOSE=1.

(Also see r1909385 and r1909406.)

* test/MockHTTPinC/MockHTTP_server.c
  (err_file_print_cb): New callback for ERR_print_errors_cb().
  (sslSocketWrite, sslSocketRead, appendSSLErrMessage, sslHandshake):
   Replace usages of ERR_print_errors_fp() with ERR_print_errors_cb().
   Pass the new callback.


git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1909413 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/MockHTTPinC/MockHTTP_server.c b/test/MockHTTPinC/MockHTTP_server.c
index ce10927..dcc84bb 100644
--- a/test/MockHTTPinC/MockHTTP_server.c
+++ b/test/MockHTTPinC/MockHTTP_server.c
@@ -2255,6 +2255,16 @@
 
 static int init_done = 0;
 
+#if MH_VERBOSE
+/**
+ * OpenSSL callback for ERR_print_errors_cb().
+ */
+static int err_file_print_cb(const char *str, size_t len, void *bp)
+{
+    return fwrite(str, 1, len, bp);
+}
+#endif
+
 /**
  * OpenSSL callback, returns the passphrase used to decrypt the private key.
  */
@@ -2843,7 +2853,7 @@
         _mhLog(MH_VERBOSE, cctx->skt,
                "sslSocketWrite SSL Error %d: ", ssl_err);
 #if MH_VERBOSE
-        ERR_print_errors_fp(stderr);
+        ERR_print_errors_cb(err_file_print_cb, stderr);
 #endif
         return APR_EGENERAL;
     }
@@ -2903,7 +2913,7 @@
                 _mhLog(MH_VERBOSE, skt,
                           "sslSocketRead SSL Error %d: ", ssl_err);
 #if MH_VERBOSE
-                ERR_print_errors_fp(stderr);
+                ERR_print_errors_cb(err_file_print_cb, stderr);
 #endif
                 return APR_EGENERAL;
         }
@@ -2929,7 +2939,7 @@
     apr_size_t startpos = strlen(mh->errmsg);
     ERR_error_string(result, mh->errmsg + startpos);
 #if MH_VERBOSE
-    ERR_print_errors_fp(stderr);
+    ERR_print_errors_cb(err_file_print_cb, stderr);
 #endif
 }
 
@@ -3057,7 +3067,7 @@
                            "SSL Error %d: Library=%d, Reason=%d",
                            ssl_err, lib, reason);
 #if MH_VERBOSE
-                    ERR_print_errors_fp(stderr);
+                    ERR_print_errors_cb(err_file_print_cb, stderr);
 #endif
                 }
                 return APR_EGENERAL;