diff options
author | tb <> | 2023-06-04 17:28:35 +0000 |
---|---|---|
committer | tb <> | 2023-06-04 17:28:35 +0000 |
commit | edc388e2a4338dc6ed26c30e30698dd61b698aac (patch) | |
tree | 52e6cfec5c1b493d28cf1d4dcca6327a76116e70 /src/lib/libcrypto/crypto_lock.c | |
parent | 7efe30cd901df7bedff93a9ed4f01e35ddb28150 (diff) | |
download | openbsd-edc388e2a4338dc6ed26c30e30698dd61b698aac.tar.gz openbsd-edc388e2a4338dc6ed26c30e30698dd61b698aac.tar.bz2 openbsd-edc388e2a4338dc6ed26c30e30698dd61b698aac.zip |
Reinstate bn_isqrt.c r1.8 and crypto_lock.c r1.3
This traded local copies of CTASSERT() to the one in crypto_internal.h.
This change was backed out due to SHA-512 breakage on STRICT_ALIGNMENT
architectures still using Fred Flintstone's gcc without asm sha512.
Original commit message:
Use crypto_internal.h's CTASSERT()
Now that this macro is available in a header, let's use that version
rather than copies in several .c files.
discussed with jsing
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/crypto_lock.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/crypto_lock.c b/src/lib/libcrypto/crypto_lock.c index bd8315c264..6d9dbab22b 100644 --- a/src/lib/libcrypto/crypto_lock.c +++ b/src/lib/libcrypto/crypto_lock.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: crypto_lock.c,v 1.4 2023/05/19 00:54:27 deraadt Exp $ */ | 1 | /* $OpenBSD: crypto_lock.c,v 1.5 2023/06/04 17:28:35 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Brent Cook <bcook@openbsd.org> | 3 | * Copyright (c) 2018 Brent Cook <bcook@openbsd.org> |
4 | * | 4 | * |
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | #include <openssl/crypto.h> | 20 | #include <openssl/crypto.h> |
21 | 21 | ||
22 | #include "crypto_internal.h" | ||
23 | |||
22 | static pthread_mutex_t locks[] = { | 24 | static pthread_mutex_t locks[] = { |
23 | PTHREAD_MUTEX_INITIALIZER, | 25 | PTHREAD_MUTEX_INITIALIZER, |
24 | PTHREAD_MUTEX_INITIALIZER, | 26 | PTHREAD_MUTEX_INITIALIZER, |
@@ -63,9 +65,6 @@ static pthread_mutex_t locks[] = { | |||
63 | PTHREAD_MUTEX_INITIALIZER, | 65 | PTHREAD_MUTEX_INITIALIZER, |
64 | }; | 66 | }; |
65 | 67 | ||
66 | #define CTASSERT(x) extern char _ctassert[(x) ? 1 : -1 ] \ | ||
67 | __attribute__((__unused__)) | ||
68 | |||
69 | CTASSERT((sizeof(locks) / sizeof(*locks)) == CRYPTO_NUM_LOCKS); | 68 | CTASSERT((sizeof(locks) / sizeof(*locks)) == CRYPTO_NUM_LOCKS); |
70 | 69 | ||
71 | void | 70 | void |