diff options
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r-- | src/lib/libcrypto/conf/conf.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_api.c | 24 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 19 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_lib.c | 20 |
4 files changed, 5 insertions, 68 deletions
diff --git a/src/lib/libcrypto/conf/conf.h b/src/lib/libcrypto/conf/conf.h index ba7fb69794..095066d31b 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.13 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: conf.h,v 1.14 2015/02/07 13:19:15 doug 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 | * |
@@ -149,9 +149,6 @@ struct conf_st { | |||
149 | CONF *NCONF_new(CONF_METHOD *meth); | 149 | CONF *NCONF_new(CONF_METHOD *meth); |
150 | CONF_METHOD *NCONF_default(void); | 150 | CONF_METHOD *NCONF_default(void); |
151 | CONF_METHOD *NCONF_WIN32(void); | 151 | CONF_METHOD *NCONF_WIN32(void); |
152 | #if 0 /* Just to give you an idea of what I have in mind */ | ||
153 | CONF_METHOD *NCONF_XML(void); | ||
154 | #endif | ||
155 | void NCONF_free(CONF *conf); | 152 | void NCONF_free(CONF *conf); |
156 | void NCONF_free_data(CONF *conf); | 153 | void NCONF_free_data(CONF *conf); |
157 | 154 | ||
@@ -165,12 +162,7 @@ int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, | |||
165 | int NCONF_dump_fp(const CONF *conf, FILE *out); | 162 | int NCONF_dump_fp(const CONF *conf, FILE *out); |
166 | int NCONF_dump_bio(const CONF *conf, BIO *out); | 163 | int NCONF_dump_bio(const CONF *conf, BIO *out); |
167 | 164 | ||
168 | #if 0 /* The following function has no error checking, | ||
169 | and should therefore be avoided */ | ||
170 | long NCONF_get_number(CONF *conf, char *group, char *name); | ||
171 | #else | ||
172 | #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) | 165 | #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) |
173 | #endif | ||
174 | 166 | ||
175 | /* Module functions */ | 167 | /* Module functions */ |
176 | 168 | ||
diff --git a/src/lib/libcrypto/conf/conf_api.c b/src/lib/libcrypto/conf/conf_api.c index 7480dda3d5..56a4f249ad 100644 --- a/src/lib/libcrypto/conf/conf_api.c +++ b/src/lib/libcrypto/conf/conf_api.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf_api.c,v 1.11 2014/06/23 22:19:02 deraadt Exp $ */ | 1 | /* $OpenBSD: conf_api.c,v 1.12 2015/02/07 13:19:15 doug 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 | * |
@@ -165,28 +165,6 @@ _CONF_get_string(const CONF *conf, const char *section, const char *name) | |||
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
168 | #if 0 /* There's no way to provide error checking with this function, so | ||
169 | force implementors of the higher levels to get a string and read | ||
170 | the number themselves. */ | ||
171 | long | ||
172 | _CONF_get_number(CONF *conf, char *section, char *name) | ||
173 | { | ||
174 | char *str; | ||
175 | long ret = 0; | ||
176 | |||
177 | str = _CONF_get_string(conf, section, name); | ||
178 | if (str == NULL) | ||
179 | return (0); | ||
180 | for (;;) { | ||
181 | if (conf->meth->is_number(conf, *str)) | ||
182 | ret = ret * 10 + conf->meth->to_int(conf, *str); | ||
183 | else | ||
184 | return (ret); | ||
185 | str++; | ||
186 | } | ||
187 | } | ||
188 | #endif | ||
189 | |||
190 | static unsigned long | 168 | static unsigned long |
191 | conf_value_hash(const CONF_VALUE *v) | 169 | conf_value_hash(const CONF_VALUE *v) |
192 | { | 170 | { |
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index c437aeb457..e608e5fe9d 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.28 2014/07/11 15:38:03 miod Exp $ */ | 1 | /* $OpenBSD: conf_def.c,v 1.29 2015/02/07 13:19:15 doug 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 | * |
@@ -388,27 +388,12 @@ again: | |||
388 | } | 388 | } |
389 | } else | 389 | } else |
390 | tv = sv; | 390 | tv = sv; |
391 | #if 1 | 391 | |
392 | if (_CONF_add_string(conf, tv, v) == 0) { | 392 | if (_CONF_add_string(conf, tv, v) == 0) { |
393 | CONFerr(CONF_F_DEF_LOAD_BIO, | 393 | CONFerr(CONF_F_DEF_LOAD_BIO, |
394 | ERR_R_MALLOC_FAILURE); | 394 | ERR_R_MALLOC_FAILURE); |
395 | goto err; | 395 | goto err; |
396 | } | 396 | } |
397 | #else | ||
398 | v->section = tv->section; | ||
399 | if (!sk_CONF_VALUE_push(ts, v)) { | ||
400 | CONFerr(CONF_F_DEF_LOAD_BIO, | ||
401 | ERR_R_MALLOC_FAILURE); | ||
402 | goto err; | ||
403 | } | ||
404 | vv = (CONF_VALUE *)lh_insert(conf->data, v); | ||
405 | if (vv != NULL) { | ||
406 | sk_CONF_VALUE_delete_ptr(ts, vv); | ||
407 | free(vv->name); | ||
408 | free(vv->value); | ||
409 | free(vv); | ||
410 | } | ||
411 | #endif | ||
412 | v = NULL; | 397 | v = NULL; |
413 | } | 398 | } |
414 | } | 399 | } |
diff --git a/src/lib/libcrypto/conf/conf_lib.c b/src/lib/libcrypto/conf/conf_lib.c index 2119eb6219..a7c8be7c0d 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.12 2014/07/09 11:10:50 bcook Exp $ */ | 1 | /* $OpenBSD: conf_lib.c,v 1.13 2015/02/07 13:19:15 doug 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 | */ |
@@ -373,21 +373,3 @@ NCONF_dump_bio(const CONF *conf, BIO *out) | |||
373 | 373 | ||
374 | return conf->meth->dump(conf, out); | 374 | return conf->meth->dump(conf, out); |
375 | } | 375 | } |
376 | |||
377 | |||
378 | /* This function should be avoided */ | ||
379 | #if 0 | ||
380 | long | ||
381 | NCONF_get_number(CONF *conf, char *group, char *name) | ||
382 | { | ||
383 | int status; | ||
384 | long ret = 0; | ||
385 | |||
386 | status = NCONF_get_number_e(conf, group, name, &ret); | ||
387 | if (status == 0) { | ||
388 | /* This function does not believe in errors... */ | ||
389 | ERR_get_error(); | ||
390 | } | ||
391 | return ret; | ||
392 | } | ||
393 | #endif | ||