diff options
| author | tb <> | 2024-08-31 09:39:31 +0000 |
|---|---|---|
| committer | tb <> | 2024-08-31 09:39:31 +0000 |
| commit | 3f796b469989d0e93492a6cb12d24e49b3a58dfd (patch) | |
| tree | 409e6ba5b6c6edc3c3c315bf9ae084023111919b /src/lib/libcrypto/conf/conf_def.c | |
| parent | 3eb4b5e423acd1dc7ea9a44c39f16acb3671ed45 (diff) | |
| download | openbsd-3f796b469989d0e93492a6cb12d24e49b3a58dfd.tar.gz openbsd-3f796b469989d0e93492a6cb12d24e49b3a58dfd.tar.bz2 openbsd-3f796b469989d0e93492a6cb12d24e49b3a58dfd.zip | |
const correct uses of CONF_METHOD
While not all of this is strictly needed, it was simply incorrect. This
way another global which was modifiable for no good reason becomes const.
ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/conf/conf_def.c')
| -rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index 5698bfdbaf..26e273c841 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.41 2024/08/31 09:36:38 tb Exp $ */ | 1 | /* $OpenBSD: conf_def.c,v 1.42 2024/08/31 09:39:31 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 | * |
| @@ -81,7 +81,7 @@ static char *scan_dquote(CONF *conf, char *p); | |||
| 81 | #define scan_esc(conf,p) (((IS_EOF((conf),(p)[1]))?((p)+1):((p)+2))) | 81 | #define scan_esc(conf,p) (((IS_EOF((conf),(p)[1]))?((p)+1):((p)+2))) |
| 82 | 82 | ||
| 83 | static CONF * | 83 | static CONF * |
| 84 | def_create(CONF_METHOD *meth) | 84 | def_create(const CONF_METHOD *meth) |
| 85 | { | 85 | { |
| 86 | CONF *ret; | 86 | CONF *ret; |
| 87 | 87 | ||
| @@ -634,7 +634,7 @@ def_to_int(const CONF *conf, char c) | |||
| 634 | return c - '0'; | 634 | return c - '0'; |
| 635 | } | 635 | } |
| 636 | 636 | ||
| 637 | static CONF_METHOD default_method = { | 637 | static const CONF_METHOD default_method = { |
| 638 | .name = "OpenSSL default", | 638 | .name = "OpenSSL default", |
| 639 | .create = def_create, | 639 | .create = def_create, |
| 640 | .init = def_init_default, | 640 | .init = def_init_default, |
| @@ -647,7 +647,7 @@ static CONF_METHOD default_method = { | |||
| 647 | .load = def_load, | 647 | .load = def_load, |
| 648 | }; | 648 | }; |
| 649 | 649 | ||
| 650 | CONF_METHOD * | 650 | const CONF_METHOD * |
| 651 | NCONF_default(void) | 651 | NCONF_default(void) |
| 652 | { | 652 | { |
| 653 | return &default_method; | 653 | return &default_method; |
