diff options
author | tb <> | 2024-08-31 09:36:38 +0000 |
---|---|---|
committer | tb <> | 2024-08-31 09:36:38 +0000 |
commit | 344b6554f8409b3c53c8086f5ea3d2a58f09c1ff (patch) | |
tree | f199bf103a0c147da71af423916d86ace5d79288 /src | |
parent | ebbef0a381acc7b85b2afe9de7bd3cd041a523c6 (diff) | |
download | openbsd-344b6554f8409b3c53c8086f5ea3d2a58f09c1ff.tar.gz openbsd-344b6554f8409b3c53c8086f5ea3d2a58f09c1ff.tar.bz2 openbsd-344b6554f8409b3c53c8086f5ea3d2a58f09c1ff.zip |
Stop using conf->meth_data and make CONF_type_default const
Now that we no longer need to hang a poor man's ctype substitute off
the conf structure, we can get rid of the otherwise unused meth_data
member. This allows us to const correct CONF_type_default. Hopefully
we can remove it soon.
ok beck jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/conf/conf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.h | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/conf/conf.h b/src/lib/libcrypto/conf/conf.h index 59222e8ca1..f5c449e547 100644 --- a/src/lib/libcrypto/conf/conf.h +++ b/src/lib/libcrypto/conf/conf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf.h,v 1.20 2024/08/31 09:34:05 tb Exp $ */ | 1 | /* $OpenBSD: conf.h,v 1.21 2024/08/31 09:36:38 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -127,7 +127,6 @@ void OPENSSL_no_config(void); | |||
127 | 127 | ||
128 | struct conf_st { | 128 | struct conf_st { |
129 | CONF_METHOD *meth; | 129 | CONF_METHOD *meth; |
130 | void *meth_data; | ||
131 | LHASH_OF(CONF_VALUE) *data; | 130 | LHASH_OF(CONF_VALUE) *data; |
132 | }; | 131 | }; |
133 | 132 | ||
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index f0baee5261..5698bfdbaf 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf_def.c,v 1.40 2024/08/31 09:34:05 tb Exp $ */ | 1 | /* $OpenBSD: conf_def.c,v 1.41 2024/08/31 09:36:38 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -101,7 +101,6 @@ def_init_default(CONF *conf) | |||
101 | return 0; | 101 | return 0; |
102 | 102 | ||
103 | conf->meth = NCONF_default(); | 103 | conf->meth = NCONF_default(); |
104 | conf->meth_data = CONF_type_default; | ||
105 | conf->data = NULL; | 104 | conf->data = NULL; |
106 | 105 | ||
107 | return 1; | 106 | return 1; |
diff --git a/src/lib/libcrypto/conf/conf_def.h b/src/lib/libcrypto/conf/conf_def.h index 07b0adf81d..36a8aac4de 100644 --- a/src/lib/libcrypto/conf/conf_def.h +++ b/src/lib/libcrypto/conf/conf_def.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf_def.h,v 1.7 2024/08/31 09:34:05 tb Exp $ */ | 1 | /* $OpenBSD: conf_def.h,v 1.8 2024/08/31 09:36:38 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -79,7 +79,9 @@ __BEGIN_HIDDEN_DECLS | |||
79 | #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \ | 79 | #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \ |
80 | CONF_PUNCTUATION) | 80 | CONF_PUNCTUATION) |
81 | 81 | ||
82 | #define KEYTYPES(c) ((unsigned short *)((c)->meth_data)) | 82 | static const unsigned short CONF_type_default[256]; |
83 | |||
84 | #define KEYTYPES(c) (CONF_type_default) | ||
83 | #define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_COMMENT) | 85 | #define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_COMMENT) |
84 | #define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT) | 86 | #define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT) |
85 | #define IS_EOF(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_EOF) | 87 | #define IS_EOF(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_EOF) |
@@ -93,7 +95,7 @@ __BEGIN_HIDDEN_DECLS | |||
93 | #define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE) | 95 | #define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE) |
94 | #define IS_HIGHBIT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT) | 96 | #define IS_HIGHBIT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT) |
95 | 97 | ||
96 | static unsigned short CONF_type_default[256] = { | 98 | static const unsigned short CONF_type_default[256] = { |
97 | 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, | 99 | 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
98 | 0x0000, 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000, | 100 | 0x0000, 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000, |
99 | 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, | 101 | 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |