Additionally, rename des_encrypt to des_encrypt1 in files that are
[oweals/openssl.git] / crypto / err / err_prn.c
index c72713b6c496977794036d0996941d7ba78601f4..6f60b016c324d6d335c6f678c0d710218c5781ee 100644 (file)
  */
 
 #include <stdio.h>
-#include "lhash.h"
-#include "crypto.h"
+#include <openssl/lhash.h>
+#include <openssl/crypto.h>
 #include "cryptlib.h"
-#include "buffer.h"
-#include "err.h"
-#include "crypto.h"
+#include <openssl/buffer.h>
+#include <openssl/err.h>
+#include <openssl/crypto.h>
 
 #ifndef NO_FP_API
 void ERR_print_errors_fp(FILE *fp)
@@ -76,7 +76,8 @@ void ERR_print_errors_fp(FILE *fp)
        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:"");
                }
        }
@@ -94,7 +95,8 @@ void ERR_print_errors(BIO *bp)
        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)