diff options
Diffstat (limited to 'src/lib/libcrypto/conf/conf_lib.c')
| -rw-r--r-- | src/lib/libcrypto/conf/conf_lib.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/libcrypto/conf/conf_lib.c b/src/lib/libcrypto/conf/conf_lib.c index 2e4228bbe5..d1c85dc098 100644 --- a/src/lib/libcrypto/conf/conf_lib.c +++ b/src/lib/libcrypto/conf/conf_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: conf_lib.c,v 1.16 2024/01/28 21:00:54 tb Exp $ */ | 1 | /* $OpenBSD: conf_lib.c,v 1.17 2024/04/09 13:56:30 beck Exp $ */ |
| 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -75,6 +75,7 @@ CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash) | |||
| 75 | default_CONF_method->init(conf); | 75 | default_CONF_method->init(conf); |
| 76 | conf->data = hash; | 76 | conf->data = hash; |
| 77 | } | 77 | } |
| 78 | LCRYPTO_ALIAS(CONF_set_nconf); | ||
| 78 | 79 | ||
| 79 | /* The following section contains the "CONF classic" functions, | 80 | /* The following section contains the "CONF classic" functions, |
| 80 | rewritten in terms of the new CONF interface. */ | 81 | rewritten in terms of the new CONF interface. */ |
| @@ -85,6 +86,7 @@ CONF_set_default_method(CONF_METHOD *meth) | |||
| 85 | default_CONF_method = meth; | 86 | default_CONF_method = meth; |
| 86 | return 1; | 87 | return 1; |
| 87 | } | 88 | } |
| 89 | LCRYPTO_ALIAS(CONF_set_default_method); | ||
| 88 | 90 | ||
| 89 | LHASH_OF(CONF_VALUE) * | 91 | LHASH_OF(CONF_VALUE) * |
| 90 | CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline) | 92 | CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline) |
| @@ -103,6 +105,7 @@ CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline) | |||
| 103 | 105 | ||
| 104 | return ltmp; | 106 | return ltmp; |
| 105 | } | 107 | } |
| 108 | LCRYPTO_ALIAS(CONF_load); | ||
| 106 | 109 | ||
| 107 | LHASH_OF(CONF_VALUE) * | 110 | LHASH_OF(CONF_VALUE) * |
| 108 | CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline) | 111 | CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline) |
| @@ -118,6 +121,7 @@ CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline) | |||
| 118 | BIO_free(btmp); | 121 | BIO_free(btmp); |
| 119 | return ltmp; | 122 | return ltmp; |
| 120 | } | 123 | } |
| 124 | LCRYPTO_ALIAS(CONF_load_fp); | ||
| 121 | 125 | ||
| 122 | LHASH_OF(CONF_VALUE) * | 126 | LHASH_OF(CONF_VALUE) * |
| 123 | CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline) | 127 | CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline) |
| @@ -132,6 +136,7 @@ CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline) | |||
| 132 | return ctmp.data; | 136 | return ctmp.data; |
| 133 | return NULL; | 137 | return NULL; |
| 134 | } | 138 | } |
| 139 | LCRYPTO_ALIAS(CONF_load_bio); | ||
| 135 | 140 | ||
| 136 | STACK_OF(CONF_VALUE) * | 141 | STACK_OF(CONF_VALUE) * |
| 137 | CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section) | 142 | CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section) |
| @@ -144,6 +149,7 @@ CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section) | |||
| 144 | return NCONF_get_section(&ctmp, section); | 149 | return NCONF_get_section(&ctmp, section); |
| 145 | } | 150 | } |
| 146 | } | 151 | } |
| 152 | LCRYPTO_ALIAS(CONF_get_section); | ||
| 147 | 153 | ||
| 148 | char * | 154 | char * |
| 149 | CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, | 155 | CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, |
| @@ -157,6 +163,7 @@ CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, | |||
| 157 | return NCONF_get_string(&ctmp, group, name); | 163 | return NCONF_get_string(&ctmp, group, name); |
| 158 | } | 164 | } |
| 159 | } | 165 | } |
| 166 | LCRYPTO_ALIAS(CONF_get_string); | ||
| 160 | 167 | ||
| 161 | long | 168 | long |
| 162 | CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, | 169 | CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, |
| @@ -179,6 +186,7 @@ CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, | |||
| 179 | } | 186 | } |
| 180 | return result; | 187 | return result; |
| 181 | } | 188 | } |
| 189 | LCRYPTO_ALIAS(CONF_get_number); | ||
| 182 | 190 | ||
| 183 | void | 191 | void |
| 184 | CONF_free(LHASH_OF(CONF_VALUE) *conf) | 192 | CONF_free(LHASH_OF(CONF_VALUE) *conf) |
| @@ -188,6 +196,7 @@ CONF_free(LHASH_OF(CONF_VALUE) *conf) | |||
| 188 | CONF_set_nconf(&ctmp, conf); | 196 | CONF_set_nconf(&ctmp, conf); |
| 189 | NCONF_free_data(&ctmp); | 197 | NCONF_free_data(&ctmp); |
| 190 | } | 198 | } |
| 199 | LCRYPTO_ALIAS(CONF_free); | ||
| 191 | 200 | ||
| 192 | int | 201 | int |
| 193 | CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out) | 202 | CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out) |
| @@ -203,6 +212,7 @@ CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out) | |||
| 203 | BIO_free(btmp); | 212 | BIO_free(btmp); |
| 204 | return ret; | 213 | return ret; |
| 205 | } | 214 | } |
| 215 | LCRYPTO_ALIAS(CONF_dump_fp); | ||
| 206 | 216 | ||
| 207 | int | 217 | int |
| 208 | CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out) | 218 | CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out) |
| @@ -212,6 +222,7 @@ CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out) | |||
| 212 | CONF_set_nconf(&ctmp, conf); | 222 | CONF_set_nconf(&ctmp, conf); |
| 213 | return NCONF_dump_bio(&ctmp, out); | 223 | return NCONF_dump_bio(&ctmp, out); |
| 214 | } | 224 | } |
| 225 | LCRYPTO_ALIAS(CONF_dump_bio); | ||
| 215 | 226 | ||
| 216 | /* The following section contains the "New CONF" functions. They are | 227 | /* The following section contains the "New CONF" functions. They are |
| 217 | completely centralised around a new CONF structure that may contain | 228 | completely centralised around a new CONF structure that may contain |
| @@ -235,6 +246,7 @@ NCONF_new(CONF_METHOD *meth) | |||
| 235 | 246 | ||
| 236 | return ret; | 247 | return ret; |
| 237 | } | 248 | } |
| 249 | LCRYPTO_ALIAS(NCONF_new); | ||
| 238 | 250 | ||
| 239 | void | 251 | void |
| 240 | NCONF_free(CONF *conf) | 252 | NCONF_free(CONF *conf) |
| @@ -243,6 +255,7 @@ NCONF_free(CONF *conf) | |||
| 243 | return; | 255 | return; |
| 244 | conf->meth->destroy(conf); | 256 | conf->meth->destroy(conf); |
| 245 | } | 257 | } |
| 258 | LCRYPTO_ALIAS(NCONF_free); | ||
| 246 | 259 | ||
| 247 | void | 260 | void |
| 248 | NCONF_free_data(CONF *conf) | 261 | NCONF_free_data(CONF *conf) |
| @@ -251,6 +264,7 @@ NCONF_free_data(CONF *conf) | |||
| 251 | return; | 264 | return; |
| 252 | conf->meth->destroy_data(conf); | 265 | conf->meth->destroy_data(conf); |
| 253 | } | 266 | } |
| 267 | LCRYPTO_ALIAS(NCONF_free_data); | ||
| 254 | 268 | ||
| 255 | int | 269 | int |
| 256 | NCONF_load(CONF *conf, const char *file, long *eline) | 270 | NCONF_load(CONF *conf, const char *file, long *eline) |
| @@ -262,6 +276,7 @@ NCONF_load(CONF *conf, const char *file, long *eline) | |||
| 262 | 276 | ||
| 263 | return conf->meth->load(conf, file, eline); | 277 | return conf->meth->load(conf, file, eline); |
| 264 | } | 278 | } |
| 279 | LCRYPTO_ALIAS(NCONF_load); | ||
| 265 | 280 | ||
| 266 | int | 281 | int |
| 267 | NCONF_load_fp(CONF *conf, FILE *fp, long *eline) | 282 | NCONF_load_fp(CONF *conf, FILE *fp, long *eline) |
| @@ -277,6 +292,7 @@ NCONF_load_fp(CONF *conf, FILE *fp, long *eline) | |||
| 277 | BIO_free(btmp); | 292 | BIO_free(btmp); |
| 278 | return ret; | 293 | return ret; |
| 279 | } | 294 | } |
| 295 | LCRYPTO_ALIAS(NCONF_load_fp); | ||
| 280 | 296 | ||
| 281 | int | 297 | int |
| 282 | NCONF_load_bio(CONF *conf, BIO *bp, long *eline) | 298 | NCONF_load_bio(CONF *conf, BIO *bp, long *eline) |
| @@ -288,6 +304,7 @@ NCONF_load_bio(CONF *conf, BIO *bp, long *eline) | |||
| 288 | 304 | ||
| 289 | return conf->meth->load_bio(conf, bp, eline); | 305 | return conf->meth->load_bio(conf, bp, eline); |
| 290 | } | 306 | } |
| 307 | LCRYPTO_ALIAS(NCONF_load_bio); | ||
| 291 | 308 | ||
| 292 | STACK_OF(CONF_VALUE) * | 309 | STACK_OF(CONF_VALUE) * |
| 293 | NCONF_get_section(const CONF *conf, const char *section) | 310 | NCONF_get_section(const CONF *conf, const char *section) |
| @@ -304,6 +321,7 @@ NCONF_get_section(const CONF *conf, const char *section) | |||
| 304 | 321 | ||
| 305 | return _CONF_get_section_values(conf, section); | 322 | return _CONF_get_section_values(conf, section); |
| 306 | } | 323 | } |
| 324 | LCRYPTO_ALIAS(NCONF_get_section); | ||
| 307 | 325 | ||
| 308 | char * | 326 | char * |
| 309 | NCONF_get_string(const CONF *conf, const char *group, const char *name) | 327 | NCONF_get_string(const CONF *conf, const char *group, const char *name) |
| @@ -324,6 +342,7 @@ NCONF_get_string(const CONF *conf, const char *group, const char *name) | |||
| 324 | group ? group : "", name); | 342 | group ? group : "", name); |
| 325 | return NULL; | 343 | return NULL; |
| 326 | } | 344 | } |
| 345 | LCRYPTO_ALIAS(NCONF_get_string); | ||
| 327 | 346 | ||
| 328 | int | 347 | int |
| 329 | NCONF_get_number_e(const CONF *conf, const char *group, const char *name, | 348 | NCONF_get_number_e(const CONF *conf, const char *group, const char *name, |
| @@ -348,6 +367,7 @@ NCONF_get_number_e(const CONF *conf, const char *group, const char *name, | |||
| 348 | 367 | ||
| 349 | return 1; | 368 | return 1; |
| 350 | } | 369 | } |
| 370 | LCRYPTO_ALIAS(NCONF_get_number_e); | ||
| 351 | 371 | ||
| 352 | int | 372 | int |
| 353 | NCONF_dump_fp(const CONF *conf, FILE *out) | 373 | NCONF_dump_fp(const CONF *conf, FILE *out) |
| @@ -362,6 +382,7 @@ NCONF_dump_fp(const CONF *conf, FILE *out) | |||
| 362 | BIO_free(btmp); | 382 | BIO_free(btmp); |
| 363 | return ret; | 383 | return ret; |
| 364 | } | 384 | } |
| 385 | LCRYPTO_ALIAS(NCONF_dump_fp); | ||
| 365 | 386 | ||
| 366 | int | 387 | int |
| 367 | NCONF_dump_bio(const CONF *conf, BIO *out) | 388 | NCONF_dump_bio(const CONF *conf, BIO *out) |
| @@ -373,3 +394,4 @@ NCONF_dump_bio(const CONF *conf, BIO *out) | |||
| 373 | 394 | ||
| 374 | return conf->meth->dump(conf, out); | 395 | return conf->meth->dump(conf, out); |
| 375 | } | 396 | } |
| 397 | LCRYPTO_ALIAS(NCONF_dump_bio); | ||
