diff options
| author | tb <> | 2026-01-07 10:18:35 +0000 |
|---|---|---|
| committer | tb <> | 2026-01-07 10:18:35 +0000 |
| commit | d1b3b66046081080bf1bd1de6e207c16ebcc4e49 (patch) | |
| tree | ac95db23df2531ddc01da92dd6cbcc037434d99d /src/lib/libcrypto | |
| parent | 8b1bee23ae71f5487fb90c67a0167e18ffb75aac (diff) | |
| download | openbsd-d1b3b66046081080bf1bd1de6e207c16ebcc4e49.tar.gz openbsd-d1b3b66046081080bf1bd1de6e207c16ebcc4e49.tar.bz2 openbsd-d1b3b66046081080bf1bd1de6e207c16ebcc4e49.zip | |
Fix ASN1_ADB_END macro, make it compatible with OpenSSL
In asn1t.h r1.18 (commit 9b72422d) I removed the app_items member from
ASN1_ADB and failed to fix up the ASN1_ADB_END() macro that populates
the ASN1_ADB. This means ASN1_ADB_END() tried to initialize one member
too many and would thus cause a compilation failure, so nobody uses this
with LibreSSL. Internally, we have expanded all its uses.
We could leave it broken or fix it up. Take the opportunity to add an
unused adb_cb() argument instead, making the macro invocation compatible
with OpenSSL.
ok jsing kenjiro
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/asn1/asn1t.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/asn1t.h b/src/lib/libcrypto/asn1/asn1t.h index 22cde48669..a7e98ee65c 100644 --- a/src/lib/libcrypto/asn1/asn1t.h +++ b/src/lib/libcrypto/asn1/asn1t.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: asn1t.h,v 1.24 2024/07/08 16:24:22 beck Exp $ */ | 1 | /* $OpenBSD: asn1t.h,v 1.25 2026/01/07 10:18:35 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -430,13 +430,12 @@ extern "C" { | |||
| 430 | #define ASN1_ADB(name) \ | 430 | #define ASN1_ADB(name) \ |
| 431 | static const ASN1_ADB_TABLE name##_adbtbl[] | 431 | static const ASN1_ADB_TABLE name##_adbtbl[] |
| 432 | 432 | ||
| 433 | 433 | /* In 5b70372d OpenSSL added adb_cb. Ignore this until someone complains. */ | |
| 434 | #define ASN1_ADB_END(name, flags, field, app_table, def, none) \ | 434 | #define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ |
| 435 | ;\ | 435 | ;\ |
| 436 | static const ASN1_ADB name##_adb = {\ | 436 | static const ASN1_ADB name##_adb = {\ |
| 437 | flags,\ | 437 | flags,\ |
| 438 | offsetof(name, field),\ | 438 | offsetof(name, field),\ |
| 439 | app_table,\ | ||
| 440 | name##_adbtbl,\ | 439 | name##_adbtbl,\ |
| 441 | sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ | 440 | sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ |
| 442 | def,\ | 441 | def,\ |
