diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-08-31 10:23:14 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-08-31 10:23:14 +0000 |
commit | 9da7fa64426d73f3ccca5d54f719f528a36b632d (patch) | |
tree | fbba95157fa6e51bfb9ad9e3aebb89fd581e3f5a /lib/libcrypto/x509 | |
parent | 040fac7979b65b0bbcfd40580b969b525c71d9d5 (diff) |
Move BIT_STRING_BITNAME tables to const
Another bunch of const correctness fixes for global tables. These are
used to map ns cert types, key usage types and CRL reasons to strings
and vice versa. By the looks of it, nobody ever figured out how to use
this (need I mention that it's convoluted?).
ok beck jsing
Diffstat (limited to 'lib/libcrypto/x509')
-rw-r--r-- | lib/libcrypto/x509/x509_bitst.c | 8 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509v3.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libcrypto/x509/x509_bitst.c b/lib/libcrypto/x509/x509_bitst.c index 479874ddb56..2bc4f9911a5 100644 --- a/lib/libcrypto/x509/x509_bitst.c +++ b/lib/libcrypto/x509/x509_bitst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_bitst.c,v 1.7 2024/08/31 10:03:03 tb Exp $ */ +/* $OpenBSD: x509_bitst.c,v 1.8 2024/08/31 10:23:13 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -65,7 +65,7 @@ #include "x509_local.h" -static BIT_STRING_BITNAME ns_cert_type_table[] = { +static const BIT_STRING_BITNAME ns_cert_type_table[] = { {0, "SSL Client", "client"}, {1, "SSL Server", "server"}, {2, "S/MIME", "email"}, @@ -77,7 +77,7 @@ static BIT_STRING_BITNAME ns_cert_type_table[] = { {-1, NULL, NULL} }; -static BIT_STRING_BITNAME key_usage_type_table[] = { +static const BIT_STRING_BITNAME key_usage_type_table[] = { {0, "Digital Signature", "digitalSignature"}, {1, "Non Repudiation", "nonRepudiation"}, {2, "Key Encipherment", "keyEncipherment"}, @@ -90,7 +90,7 @@ static BIT_STRING_BITNAME key_usage_type_table[] = { {-1, NULL, NULL} }; -static BIT_STRING_BITNAME crl_reasons[] = { +static const BIT_STRING_BITNAME crl_reasons[] = { {CRL_REASON_UNSPECIFIED, "Unspecified", "unspecified"}, {CRL_REASON_KEY_COMPROMISE, "Key Compromise", "keyCompromise"}, {CRL_REASON_CA_COMPROMISE, "CA Compromise", "CACompromise"}, diff --git a/lib/libcrypto/x509/x509v3.h b/lib/libcrypto/x509/x509v3.h index c59153496c5..166ac66a289 100644 --- a/lib/libcrypto/x509/x509v3.h +++ b/lib/libcrypto/x509/x509v3.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509v3.h,v 1.34 2024/08/31 10:06:39 tb Exp $ */ +/* $OpenBSD: x509v3.h,v 1.35 2024/08/31 10:23:13 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -117,7 +117,7 @@ struct v3_ext_method { X509V3_EXT_I2R i2r; X509V3_EXT_R2I r2i; - void *usr_data; /* Any extension specific data */ + const void *usr_data; /* Any extension specific data */ }; struct v3_ext_ctx { |