diff options
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/err')
| -rwxr-xr-x | Cryptlib/OpenSSL/crypto/err/err_all.c | 2 | ||||
| -rwxr-xr-x | Cryptlib/OpenSSL/crypto/err/err_prn.c | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Cryptlib/OpenSSL/crypto/err/err_all.c b/Cryptlib/OpenSSL/crypto/err/err_all.c index f21a5276..39796f7c 100755 --- a/Cryptlib/OpenSSL/crypto/err/err_all.c +++ b/Cryptlib/OpenSSL/crypto/err/err_all.c @@ -104,6 +104,7 @@ #ifndef OPENSSL_NO_JPAKE #include <openssl/jpake.h> #endif +#include <openssl/comp.h> void ERR_load_crypto_strings(void) { @@ -157,5 +158,6 @@ void ERR_load_crypto_strings(void) #ifndef OPENSSL_NO_JPAKE ERR_load_JPAKE_strings(); #endif + ERR_load_COMP_strings(); #endif } diff --git a/Cryptlib/OpenSSL/crypto/err/err_prn.c b/Cryptlib/OpenSSL/crypto/err/err_prn.c index 4cdf342f..1e46f93e 100755 --- a/Cryptlib/OpenSSL/crypto/err/err_prn.c +++ b/Cryptlib/OpenSSL/crypto/err/err_prn.c @@ -79,14 +79,20 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), ERR_error_string_n(l, buf, sizeof buf); BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, file, line, (flags & ERR_TXT_STRING) ? data : ""); - cb(buf2, strlen(buf2), u); + if (cb(buf2, strlen(buf2), u) <= 0) + break; /* abort outputting the error report */ } } #ifndef OPENSSL_NO_FP_API static int print_fp(const char *str, size_t len, void *fp) { - return fwrite(str, 1, len, fp); + 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) { |
