From d1b3b66046081080bf1bd1de6e207c16ebcc4e49 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 7 Jan 2026 10:18:35 +0000 Subject: 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 --- src/lib/libcrypto/asn1/asn1t.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') 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 @@ -/* $OpenBSD: asn1t.h,v 1.24 2024/07/08 16:24:22 beck Exp $ */ +/* $OpenBSD: asn1t.h,v 1.25 2026/01/07 10:18:35 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -430,13 +430,12 @@ extern "C" { #define ASN1_ADB(name) \ static const ASN1_ADB_TABLE name##_adbtbl[] - -#define ASN1_ADB_END(name, flags, field, app_table, def, none) \ +/* In 5b70372d OpenSSL added adb_cb. Ignore this until someone complains. */ +#define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ ;\ static const ASN1_ADB name##_adb = {\ flags,\ offsetof(name, field),\ - app_table,\ name##_adbtbl,\ sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ def,\ -- cgit v1.2.3-55-g6feb