summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_bitst.c
diff options
context:
space:
mode:
authortb <>2024-08-31 10:23:13 +0000
committertb <>2024-08-31 10:23:13 +0000
commitdf13e5b090fdd7526e1f2c4242ff8deb5a98c783 (patch)
tree75b223b289d57ee7a5912ad870842ef7c59887ce /src/lib/libcrypto/x509/x509_bitst.c
parent662de08c72cfea4b3d7d34030e55fa36c71679f4 (diff)
downloadopenbsd-df13e5b090fdd7526e1f2c4242ff8deb5a98c783.tar.gz
openbsd-df13e5b090fdd7526e1f2c4242ff8deb5a98c783.tar.bz2
openbsd-df13e5b090fdd7526e1f2c4242ff8deb5a98c783.zip
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 '')
-rw-r--r--src/lib/libcrypto/x509/x509_bitst.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_bitst.c b/src/lib/libcrypto/x509/x509_bitst.c
index 479874ddb5..2bc4f9911a 100644
--- a/src/lib/libcrypto/x509/x509_bitst.c
+++ b/src/lib/libcrypto/x509/x509_bitst.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_bitst.c,v 1.7 2024/08/31 10:03:03 tb Exp $ */ 1/* $OpenBSD: x509_bitst.c,v 1.8 2024/08/31 10:23:13 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 1999. 3 * project 1999.
4 */ 4 */
@@ -65,7 +65,7 @@
65 65
66#include "x509_local.h" 66#include "x509_local.h"
67 67
68static BIT_STRING_BITNAME ns_cert_type_table[] = { 68static const BIT_STRING_BITNAME ns_cert_type_table[] = {
69 {0, "SSL Client", "client"}, 69 {0, "SSL Client", "client"},
70 {1, "SSL Server", "server"}, 70 {1, "SSL Server", "server"},
71 {2, "S/MIME", "email"}, 71 {2, "S/MIME", "email"},
@@ -77,7 +77,7 @@ static BIT_STRING_BITNAME ns_cert_type_table[] = {
77 {-1, NULL, NULL} 77 {-1, NULL, NULL}
78}; 78};
79 79
80static BIT_STRING_BITNAME key_usage_type_table[] = { 80static const BIT_STRING_BITNAME key_usage_type_table[] = {
81 {0, "Digital Signature", "digitalSignature"}, 81 {0, "Digital Signature", "digitalSignature"},
82 {1, "Non Repudiation", "nonRepudiation"}, 82 {1, "Non Repudiation", "nonRepudiation"},
83 {2, "Key Encipherment", "keyEncipherment"}, 83 {2, "Key Encipherment", "keyEncipherment"},
@@ -90,7 +90,7 @@ static BIT_STRING_BITNAME key_usage_type_table[] = {
90 {-1, NULL, NULL} 90 {-1, NULL, NULL}
91}; 91};
92 92
93static BIT_STRING_BITNAME crl_reasons[] = { 93static const BIT_STRING_BITNAME crl_reasons[] = {
94 {CRL_REASON_UNSPECIFIED, "Unspecified", "unspecified"}, 94 {CRL_REASON_UNSPECIFIED, "Unspecified", "unspecified"},
95 {CRL_REASON_KEY_COMPROMISE, "Key Compromise", "keyCompromise"}, 95 {CRL_REASON_KEY_COMPROMISE, "Key Compromise", "keyCompromise"},
96 {CRL_REASON_CA_COMPROMISE, "CA Compromise", "CACompromise"}, 96 {CRL_REASON_CA_COMPROMISE, "CA Compromise", "CACompromise"},