summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-11-02 08:56:44 +0000
committertb <>2024-11-02 08:56:44 +0000
commit31a7069580c5c1283d698f07f552c4dd435a4c2b (patch)
tree670c4c5f084daab91e58803677014caa67a53f8d /src
parent5a3101c1d5e1f9f99c2d29cfd71180caf58af69b (diff)
downloadopenbsd-31a7069580c5c1283d698f07f552c4dd435a4c2b.tar.gz
openbsd-31a7069580c5c1283d698f07f552c4dd435a4c2b.tar.bz2
openbsd-31a7069580c5c1283d698f07f552c4dd435a4c2b.zip
Bye bye CRYPTO_THREADID
After we ripped it out of RSA blinding and finally the error stack, it can go play in the attic with ENGINE and all the other abominations from this particular keyboard. ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/cryptlib.c27
-rw-r--r--src/lib/libcrypto/crypto_local.h12
2 files changed, 2 insertions, 37 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c
index f58b6f6bd2..df2b9f6a55 100644
--- a/src/lib/libcrypto/cryptlib.c
+++ b/src/lib/libcrypto/cryptlib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cryptlib.c,v 1.58 2024/11/01 10:05:18 tb Exp $ */ 1/* $OpenBSD: cryptlib.c,v 1.59 2024/11/02 08:56:44 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -306,31 +306,6 @@ void
306} 306}
307LCRYPTO_ALIAS(CRYPTO_get_dynlock_destroy_callback); 307LCRYPTO_ALIAS(CRYPTO_get_dynlock_destroy_callback);
308 308
309void
310CRYPTO_THREADID_current(CRYPTO_THREADID *id)
311{
312 memset(id, 0, sizeof(*id));
313 id->val = (unsigned long)pthread_self();
314}
315
316int
317CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b)
318{
319 return memcmp(a, b, sizeof(*a));
320}
321
322void
323CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src)
324{
325 memcpy(dest, src, sizeof(*src));
326}
327
328unsigned long
329CRYPTO_THREADID_hash(const CRYPTO_THREADID *id)
330{
331 return id->val;
332}
333
334#if !defined(OPENSSL_CPUID_SETUP) && !defined(OPENSSL_CPUID_OBJ) 309#if !defined(OPENSSL_CPUID_SETUP) && !defined(OPENSSL_CPUID_OBJ)
335void 310void
336OPENSSL_cpuid_setup(void) 311OPENSSL_cpuid_setup(void)
diff --git a/src/lib/libcrypto/crypto_local.h b/src/lib/libcrypto/crypto_local.h
index 970a784660..2fc79051b2 100644
--- a/src/lib/libcrypto/crypto_local.h
+++ b/src/lib/libcrypto/crypto_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto_local.h,v 1.1 2024/03/02 11:37:13 tb Exp $ */ 1/* $OpenBSD: crypto_local.h,v 1.2 2024/11/02 08:56:44 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -123,16 +123,6 @@
123 123
124__BEGIN_HIDDEN_DECLS 124__BEGIN_HIDDEN_DECLS
125 125
126struct crypto_threadid_st {
127 void *ptr;
128 unsigned long val;
129} /* CRYPTO_THREADID */;
130
131void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
132int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
133void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
134unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
135
136__END_HIDDEN_DECLS 126__END_HIDDEN_DECLS
137 127
138#endif 128#endif