diff options
Diffstat (limited to 'src/lib/libcrypto/err/err_prn.c')
| -rw-r--r-- | src/lib/libcrypto/err/err_prn.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c index 81e34bd6ce..2224a901e5 100644 --- a/src/lib/libcrypto/err/err_prn.c +++ b/src/lib/libcrypto/err/err_prn.c | |||
| @@ -57,9 +57,9 @@ | |||
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | ||
| 60 | #include <openssl/lhash.h> | 61 | #include <openssl/lhash.h> |
| 61 | #include <openssl/crypto.h> | 62 | #include <openssl/crypto.h> |
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/buffer.h> | 63 | #include <openssl/buffer.h> |
| 64 | #include <openssl/err.h> | 64 | #include <openssl/err.h> |
| 65 | 65 | ||
| @@ -86,7 +86,12 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), | |||
| 86 | #ifndef OPENSSL_NO_FP_API | 86 | #ifndef OPENSSL_NO_FP_API |
| 87 | static int print_fp(const char *str, size_t len, void *fp) | 87 | static int print_fp(const char *str, size_t len, void *fp) |
| 88 | { | 88 | { |
| 89 | return fprintf((FILE *)fp, "%s", str); | 89 | BIO bio; |
| 90 | |||
| 91 | BIO_set(&bio,BIO_s_file()); | ||
| 92 | BIO_set_fp(&bio,fp,BIO_NOCLOSE); | ||
| 93 | |||
| 94 | return BIO_printf(&bio, "%s", str); | ||
| 90 | } | 95 | } |
| 91 | void ERR_print_errors_fp(FILE *fp) | 96 | void ERR_print_errors_fp(FILE *fp) |
| 92 | { | 97 | { |
