X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Ferr%2Ferr_prn.c;h=19aaa2891fc64d275497dbb6d7887769a886998e;hb=d3ee37c5d9d230d3c167ab6a7109b06f81fe18b8;hp=ecd0e7c4fa8535600d2f4b2f35321d3d85675d89;hpb=58964a492275ca9a59a0cd9c8155cb2491b4b909;p=oweals%2Fopenssl.git diff --git a/crypto/err/err_prn.c b/crypto/err/err_prn.c index ecd0e7c4fa..19aaa2891f 100644 --- a/crypto/err/err_prn.c +++ b/crypto/err/err_prn.c @@ -57,46 +57,46 @@ */ #include -#include "lhash.h" -#include "crypto.h" +#include +#include #include "cryptlib.h" -#include "buffer.h" -#include "err.h" -#include "crypto.h" +#include +#include +#include -#ifndef NO_FP_API -void ERR_print_errors_fp(fp) -FILE *fp; +#ifndef OPENSSL_NO_FP_API +void ERR_print_errors_fp(FILE *fp) { unsigned long l; char buf[200]; - char *file,*data; + const char *file,*data; int line,flags; unsigned long es; es=CRYPTO_thread_id(); while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) { - fprintf(fp,"%lu:%s:%s:%d:%s\n",es,ERR_error_string(l,buf), + ERR_error_string_n(l, buf, sizeof buf); + fprintf(fp,"%lu:%s:%s:%d:%s\n",es,buf, file,line,(flags&ERR_TXT_STRING)?data:""); } } #endif -void ERR_print_errors(bp) -BIO *bp; +void ERR_print_errors(BIO *bp) { unsigned long l; char buf[256]; char buf2[256]; - char *file,*data; + const char *file,*data; int line,flags; unsigned long es; es=CRYPTO_thread_id(); while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) { - sprintf(buf2,"%lu:%s:%s:%d:",es,ERR_error_string(l,buf), + ERR_error_string_n(l, buf, sizeof buf); + sprintf(buf2,"%lu:%s:%s:%d:",es,buf, file,line); BIO_write(bp,buf2,strlen(buf2)); if (flags & ERR_TXT_STRING)