Unify X.509v3 extension methods
authortb <tb@openbsd.org>
Sat, 13 Jul 2024 15:08:58 +0000 (15:08 +0000)
committertb <tb@openbsd.org>
Sat, 13 Jul 2024 15:08:58 +0000 (15:08 +0000)
commit8b5faa7170599a10b7304ec693b84d6d6fd0697f
tree794d8145841caa3d129e927b45b0bb99d1224f24
parent129d5b5396d7607c3886066cdb47039db5bf0d41
Unify X.509v3 extension methods

Use C99 initializers for all structs (some were forgotten).
Make all the structs static, call them x509v3_ext_* matching NID_*.
Add accessors called x509v3_ext_method_* and use these to implement
X509V3_EXT_get_nid().

This adds consistency and avoids a few contortions like grouping
a few extensions in arrays to save a couple externs.

ok beck jsing
21 files changed:
lib/libcrypto/ct/ct_x509v3.c
lib/libcrypto/x509/x509_addr.c
lib/libcrypto/x509/x509_akey.c
lib/libcrypto/x509/x509_alt.c
lib/libcrypto/x509/x509_asid.c
lib/libcrypto/x509/x509_bcons.c
lib/libcrypto/x509/x509_bitst.c
lib/libcrypto/x509/x509_cpols.c
lib/libcrypto/x509/x509_crld.c
lib/libcrypto/x509/x509_extku.c
lib/libcrypto/x509/x509_ia5.c
lib/libcrypto/x509/x509_info.c
lib/libcrypto/x509/x509_int.c
lib/libcrypto/x509/x509_lib.c
lib/libcrypto/x509/x509_local.h
lib/libcrypto/x509/x509_ncons.c
lib/libcrypto/x509/x509_ocsp.c
lib/libcrypto/x509/x509_pcons.c
lib/libcrypto/x509/x509_pku.c
lib/libcrypto/x509/x509_pmaps.c
lib/libcrypto/x509/x509_skey.c