summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/err/err_prn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/err/err_prn.c')
-rw-r--r--src/lib/libcrypto/err/err_prn.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c
index fb6e19c54c..4bd9482e61 100644
--- a/src/lib/libcrypto/err/err_prn.c
+++ b/src/lib/libcrypto/err/err_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err_prn.c,v 1.23 2024/03/02 11:37:13 tb Exp $ */ 1/* $OpenBSD: err_prn.c,v 1.24 2024/11/02 08:54:40 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,7 @@
57 */ 57 */
58 58
59#include <limits.h> 59#include <limits.h>
60#include <pthread.h>
60#include <stdio.h> 61#include <stdio.h>
61#include <string.h> 62#include <string.h>
62 63
@@ -66,7 +67,6 @@
66#include <openssl/lhash.h> 67#include <openssl/lhash.h>
67 68
68#include "bio_local.h" 69#include "bio_local.h"
69#include "crypto_local.h"
70 70
71void 71void
72ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u) 72ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u)
@@ -77,10 +77,8 @@ ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u)
77 const char *file, *data; 77 const char *file, *data;
78 int line, flags; 78 int line, flags;
79 unsigned long es; 79 unsigned long es;
80 CRYPTO_THREADID cur;
81 80
82 CRYPTO_THREADID_current(&cur); 81 es = (unsigned long)pthread_self();
83 es = CRYPTO_THREADID_hash(&cur);
84 while ((l = ERR_get_error_line_data(&file, &line, &data, 82 while ((l = ERR_get_error_line_data(&file, &line, &data,
85 &flags)) != 0) { 83 &flags)) != 0) {
86 ERR_error_string_n(l, buf, sizeof buf); 84 ERR_error_string_n(l, buf, sizeof buf);