diff options
Diffstat (limited to 'crypto/openssl/crypto/err/err_prn.c')
-rw-r--r-- | crypto/openssl/crypto/err/err_prn.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/openssl/crypto/err/err_prn.c b/crypto/openssl/crypto/err/err_prn.c index 81e34bd6ce7a..2224a901e5ea 100644 --- a/crypto/openssl/crypto/err/err_prn.c +++ b/crypto/openssl/crypto/err/err_prn.c @@ -57,9 +57,9 @@ */ #include <stdio.h> +#include "cryptlib.h" #include <openssl/lhash.h> #include <openssl/crypto.h> -#include "cryptlib.h" #include <openssl/buffer.h> #include <openssl/err.h> @@ -86,7 +86,12 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), #ifndef OPENSSL_NO_FP_API static int print_fp(const char *str, size_t len, void *fp) { - return fprintf((FILE *)fp, "%s", str); + BIO bio; + + BIO_set(&bio,BIO_s_file()); + BIO_set_fp(&bio,fp,BIO_NOCLOSE); + + return BIO_printf(&bio, "%s", str); } void ERR_print_errors_fp(FILE *fp) { |