diff options
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 47 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_err.c | 25 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_lib.c | 31 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_mod.c | 15 |
4 files changed, 42 insertions, 76 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index e11ef95e43..4099ffc66c 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.31 2015/07/18 22:42:09 beck Exp $ */ | 1 | /* $OpenBSD: conf_def.c,v 1.32 2017/01/29 17:49:22 beck 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 | * |
@@ -195,9 +195,9 @@ def_load(CONF *conf, const char *name, long *line) | |||
195 | in = BIO_new_file(name, "rb"); | 195 | in = BIO_new_file(name, "rb"); |
196 | if (in == NULL) { | 196 | if (in == NULL) { |
197 | if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE) | 197 | if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE) |
198 | CONFerr(CONF_F_DEF_LOAD, CONF_R_NO_SUCH_FILE); | 198 | CONFerror(CONF_R_NO_SUCH_FILE); |
199 | else | 199 | else |
200 | CONFerr(CONF_F_DEF_LOAD, ERR_R_SYS_LIB); | 200 | CONFerror(ERR_R_SYS_LIB); |
201 | return 0; | 201 | return 0; |
202 | } | 202 | } |
203 | 203 | ||
@@ -224,25 +224,24 @@ def_load_bio(CONF *conf, BIO *in, long *line) | |||
224 | void *h = (void *)(conf->data); | 224 | void *h = (void *)(conf->data); |
225 | 225 | ||
226 | if ((buff = BUF_MEM_new()) == NULL) { | 226 | if ((buff = BUF_MEM_new()) == NULL) { |
227 | CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB); | 227 | CONFerror(ERR_R_BUF_LIB); |
228 | goto err; | 228 | goto err; |
229 | } | 229 | } |
230 | 230 | ||
231 | section = strdup("default"); | 231 | section = strdup("default"); |
232 | if (section == NULL) { | 232 | if (section == NULL) { |
233 | CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE); | 233 | CONFerror(ERR_R_MALLOC_FAILURE); |
234 | goto err; | 234 | goto err; |
235 | } | 235 | } |
236 | 236 | ||
237 | if (_CONF_new_data(conf) == 0) { | 237 | if (_CONF_new_data(conf) == 0) { |
238 | CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE); | 238 | CONFerror(ERR_R_MALLOC_FAILURE); |
239 | goto err; | 239 | goto err; |
240 | } | 240 | } |
241 | 241 | ||
242 | sv = _CONF_new_section(conf, section); | 242 | sv = _CONF_new_section(conf, section); |
243 | if (sv == NULL) { | 243 | if (sv == NULL) { |
244 | CONFerr(CONF_F_DEF_LOAD_BIO, | 244 | CONFerror(CONF_R_UNABLE_TO_CREATE_NEW_SECTION); |
245 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
246 | goto err; | 245 | goto err; |
247 | } | 246 | } |
248 | 247 | ||
@@ -250,7 +249,7 @@ def_load_bio(CONF *conf, BIO *in, long *line) | |||
250 | again = 0; | 249 | again = 0; |
251 | for (;;) { | 250 | for (;;) { |
252 | if (!BUF_MEM_grow(buff, bufnum + CONFBUFSIZE)) { | 251 | if (!BUF_MEM_grow(buff, bufnum + CONFBUFSIZE)) { |
253 | CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB); | 252 | CONFerror(ERR_R_BUF_LIB); |
254 | goto err; | 253 | goto err; |
255 | } | 254 | } |
256 | p = &(buff->data[bufnum]); | 255 | p = &(buff->data[bufnum]); |
@@ -316,8 +315,7 @@ again: | |||
316 | ss = p; | 315 | ss = p; |
317 | goto again; | 316 | goto again; |
318 | } | 317 | } |
319 | CONFerr(CONF_F_DEF_LOAD_BIO, | 318 | CONFerror(CONF_R_MISSING_CLOSE_SQUARE_BRACKET); |
320 | CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | ||
321 | goto err; | 319 | goto err; |
322 | } | 320 | } |
323 | *end = '\0'; | 321 | *end = '\0'; |
@@ -326,8 +324,7 @@ again: | |||
326 | if ((sv = _CONF_get_section(conf, section)) == NULL) | 324 | if ((sv = _CONF_get_section(conf, section)) == NULL) |
327 | sv = _CONF_new_section(conf, section); | 325 | sv = _CONF_new_section(conf, section); |
328 | if (sv == NULL) { | 326 | if (sv == NULL) { |
329 | CONFerr(CONF_F_DEF_LOAD_BIO, | 327 | CONFerror(CONF_R_UNABLE_TO_CREATE_NEW_SECTION); |
330 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
331 | goto err; | 328 | goto err; |
332 | } | 329 | } |
333 | continue; | 330 | continue; |
@@ -344,8 +341,7 @@ again: | |||
344 | } | 341 | } |
345 | p = eat_ws(conf, end); | 342 | p = eat_ws(conf, end); |
346 | if (*p != '=') { | 343 | if (*p != '=') { |
347 | CONFerr(CONF_F_DEF_LOAD_BIO, | 344 | CONFerror(CONF_R_MISSING_EQUAL_SIGN); |
348 | CONF_R_MISSING_EQUAL_SIGN); | ||
349 | goto err; | 345 | goto err; |
350 | } | 346 | } |
351 | *end = '\0'; | 347 | *end = '\0'; |
@@ -360,8 +356,7 @@ again: | |||
360 | *p = '\0'; | 356 | *p = '\0'; |
361 | 357 | ||
362 | if (!(v = malloc(sizeof(CONF_VALUE)))) { | 358 | if (!(v = malloc(sizeof(CONF_VALUE)))) { |
363 | CONFerr(CONF_F_DEF_LOAD_BIO, | 359 | CONFerror(ERR_R_MALLOC_FAILURE); |
364 | ERR_R_MALLOC_FAILURE); | ||
365 | goto err; | 360 | goto err; |
366 | } | 361 | } |
367 | if (psection == NULL) | 362 | if (psection == NULL) |
@@ -369,8 +364,7 @@ again: | |||
369 | v->name = strdup(pname); | 364 | v->name = strdup(pname); |
370 | v->value = NULL; | 365 | v->value = NULL; |
371 | if (v->name == NULL) { | 366 | if (v->name == NULL) { |
372 | CONFerr(CONF_F_DEF_LOAD_BIO, | 367 | CONFerror(ERR_R_MALLOC_FAILURE); |
373 | ERR_R_MALLOC_FAILURE); | ||
374 | goto err; | 368 | goto err; |
375 | } | 369 | } |
376 | if (!str_copy(conf, psection, &(v->value), start)) | 370 | if (!str_copy(conf, psection, &(v->value), start)) |
@@ -381,16 +375,14 @@ again: | |||
381 | == NULL) | 375 | == NULL) |
382 | tv = _CONF_new_section(conf, psection); | 376 | tv = _CONF_new_section(conf, psection); |
383 | if (tv == NULL) { | 377 | if (tv == NULL) { |
384 | CONFerr(CONF_F_DEF_LOAD_BIO, | 378 | CONFerror(CONF_R_UNABLE_TO_CREATE_NEW_SECTION); |
385 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
386 | goto err; | 379 | goto err; |
387 | } | 380 | } |
388 | } else | 381 | } else |
389 | tv = sv; | 382 | tv = sv; |
390 | 383 | ||
391 | if (_CONF_add_string(conf, tv, v) == 0) { | 384 | if (_CONF_add_string(conf, tv, v) == 0) { |
392 | CONFerr(CONF_F_DEF_LOAD_BIO, | 385 | CONFerror(ERR_R_MALLOC_FAILURE); |
393 | ERR_R_MALLOC_FAILURE); | ||
394 | goto err; | 386 | goto err; |
395 | } | 387 | } |
396 | v = NULL; | 388 | v = NULL; |
@@ -549,8 +541,7 @@ str_copy(CONF *conf, char *section, char **pto, char *from) | |||
549 | rp = e; | 541 | rp = e; |
550 | if (q) { | 542 | if (q) { |
551 | if (r != q) { | 543 | if (r != q) { |
552 | CONFerr(CONF_F_STR_COPY, | 544 | CONFerror(CONF_R_NO_CLOSE_BRACE); |
553 | CONF_R_NO_CLOSE_BRACE); | ||
554 | goto err; | 545 | goto err; |
555 | } | 546 | } |
556 | e++; | 547 | e++; |
@@ -569,14 +560,12 @@ str_copy(CONF *conf, char *section, char **pto, char *from) | |||
569 | *rrp = rr; | 560 | *rrp = rr; |
570 | *rp = r; | 561 | *rp = r; |
571 | if (p == NULL) { | 562 | if (p == NULL) { |
572 | CONFerr(CONF_F_STR_COPY, | 563 | CONFerror(CONF_R_VARIABLE_HAS_NO_VALUE); |
573 | CONF_R_VARIABLE_HAS_NO_VALUE); | ||
574 | goto err; | 564 | goto err; |
575 | } | 565 | } |
576 | if (!BUF_MEM_grow_clean(buf, | 566 | if (!BUF_MEM_grow_clean(buf, |
577 | (strlen(p) + buf->length - (e - from)))) { | 567 | (strlen(p) + buf->length - (e - from)))) { |
578 | CONFerr(CONF_F_STR_COPY, | 568 | CONFerror(CONF_R_MODULE_INITIALIZATION_ERROR); |
579 | CONF_R_MODULE_INITIALIZATION_ERROR); | ||
580 | goto err; | 569 | goto err; |
581 | } | 570 | } |
582 | while (*p) | 571 | while (*p) |
diff --git a/src/lib/libcrypto/conf/conf_err.c b/src/lib/libcrypto/conf/conf_err.c index a1a7cbe42e..dbb373ae85 100644 --- a/src/lib/libcrypto/conf/conf_err.c +++ b/src/lib/libcrypto/conf/conf_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf_err.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */ | 1 | /* $OpenBSD: conf_err.c,v 1.13 2017/01/29 17:49:22 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -72,28 +72,7 @@ | |||
72 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_CONF,0,reason) | 72 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_CONF,0,reason) |
73 | 73 | ||
74 | static ERR_STRING_DATA CONF_str_functs[]= { | 74 | static ERR_STRING_DATA CONF_str_functs[]= { |
75 | {ERR_FUNC(CONF_F_CONF_DUMP_FP), "CONF_dump_fp"}, | 75 | {ERR_FUNC(0xfff), "CRYPTO_internal"}, |
76 | {ERR_FUNC(CONF_F_CONF_LOAD), "CONF_load"}, | ||
77 | {ERR_FUNC(CONF_F_CONF_LOAD_BIO), "CONF_load_bio"}, | ||
78 | {ERR_FUNC(CONF_F_CONF_LOAD_FP), "CONF_load_fp"}, | ||
79 | {ERR_FUNC(CONF_F_CONF_MODULES_LOAD), "CONF_modules_load"}, | ||
80 | {ERR_FUNC(CONF_F_CONF_PARSE_LIST), "CONF_parse_list"}, | ||
81 | {ERR_FUNC(CONF_F_DEF_LOAD), "DEF_LOAD"}, | ||
82 | {ERR_FUNC(CONF_F_DEF_LOAD_BIO), "DEF_LOAD_BIO"}, | ||
83 | {ERR_FUNC(CONF_F_MODULE_INIT), "MODULE_INIT"}, | ||
84 | {ERR_FUNC(CONF_F_MODULE_LOAD_DSO), "MODULE_LOAD_DSO"}, | ||
85 | {ERR_FUNC(CONF_F_MODULE_RUN), "MODULE_RUN"}, | ||
86 | {ERR_FUNC(CONF_F_NCONF_DUMP_BIO), "NCONF_dump_bio"}, | ||
87 | {ERR_FUNC(CONF_F_NCONF_DUMP_FP), "NCONF_dump_fp"}, | ||
88 | {ERR_FUNC(CONF_F_NCONF_GET_NUMBER), "NCONF_get_number"}, | ||
89 | {ERR_FUNC(CONF_F_NCONF_GET_NUMBER_E), "NCONF_get_number_e"}, | ||
90 | {ERR_FUNC(CONF_F_NCONF_GET_SECTION), "NCONF_get_section"}, | ||
91 | {ERR_FUNC(CONF_F_NCONF_GET_STRING), "NCONF_get_string"}, | ||
92 | {ERR_FUNC(CONF_F_NCONF_LOAD), "NCONF_load"}, | ||
93 | {ERR_FUNC(CONF_F_NCONF_LOAD_BIO), "NCONF_load_bio"}, | ||
94 | {ERR_FUNC(CONF_F_NCONF_LOAD_FP), "NCONF_load_fp"}, | ||
95 | {ERR_FUNC(CONF_F_NCONF_NEW), "NCONF_new"}, | ||
96 | {ERR_FUNC(CONF_F_STR_COPY), "STR_COPY"}, | ||
97 | {0, NULL} | 76 | {0, NULL} |
98 | }; | 77 | }; |
99 | 78 | ||
diff --git a/src/lib/libcrypto/conf/conf_lib.c b/src/lib/libcrypto/conf/conf_lib.c index c7e026e725..995ba3ef67 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.14 2016/08/05 17:25:51 deraadt Exp $ */ | 1 | /* $OpenBSD: conf_lib.c,v 1.15 2017/01/29 17:49:22 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 | */ |
@@ -94,7 +94,7 @@ LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, | |||
94 | 94 | ||
95 | in = BIO_new_file(file, "rb"); | 95 | in = BIO_new_file(file, "rb"); |
96 | if (in == NULL) { | 96 | if (in == NULL) { |
97 | CONFerr(CONF_F_CONF_LOAD, ERR_R_SYS_LIB); | 97 | CONFerror(ERR_R_SYS_LIB); |
98 | return NULL; | 98 | return NULL; |
99 | } | 99 | } |
100 | 100 | ||
@@ -111,7 +111,7 @@ LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, | |||
111 | LHASH_OF(CONF_VALUE) *ltmp; | 111 | LHASH_OF(CONF_VALUE) *ltmp; |
112 | 112 | ||
113 | if (!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) { | 113 | if (!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) { |
114 | CONFerr(CONF_F_CONF_LOAD_FP, ERR_R_BUF_LIB); | 114 | CONFerror(ERR_R_BUF_LIB); |
115 | return NULL; | 115 | return NULL; |
116 | } | 116 | } |
117 | ltmp = CONF_load_bio(conf, btmp, eline); | 117 | ltmp = CONF_load_bio(conf, btmp, eline); |
@@ -196,7 +196,7 @@ CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out) | |||
196 | int ret; | 196 | int ret; |
197 | 197 | ||
198 | if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { | 198 | if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { |
199 | CONFerr(CONF_F_CONF_DUMP_FP, ERR_R_BUF_LIB); | 199 | CONFerror(ERR_R_BUF_LIB); |
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | ret = CONF_dump_bio(conf, btmp); | 202 | ret = CONF_dump_bio(conf, btmp); |
@@ -229,7 +229,7 @@ NCONF_new(CONF_METHOD *meth) | |||
229 | 229 | ||
230 | ret = meth->create(meth); | 230 | ret = meth->create(meth); |
231 | if (ret == NULL) { | 231 | if (ret == NULL) { |
232 | CONFerr(CONF_F_NCONF_NEW, ERR_R_MALLOC_FAILURE); | 232 | CONFerror(ERR_R_MALLOC_FAILURE); |
233 | return (NULL); | 233 | return (NULL); |
234 | } | 234 | } |
235 | 235 | ||
@@ -256,7 +256,7 @@ int | |||
256 | NCONF_load(CONF *conf, const char *file, long *eline) | 256 | NCONF_load(CONF *conf, const char *file, long *eline) |
257 | { | 257 | { |
258 | if (conf == NULL) { | 258 | if (conf == NULL) { |
259 | CONFerr(CONF_F_NCONF_LOAD, CONF_R_NO_CONF); | 259 | CONFerror(CONF_R_NO_CONF); |
260 | return 0; | 260 | return 0; |
261 | } | 261 | } |
262 | 262 | ||
@@ -270,7 +270,7 @@ NCONF_load_fp(CONF *conf, FILE *fp, long *eline) | |||
270 | int ret; | 270 | int ret; |
271 | 271 | ||
272 | if (!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) { | 272 | if (!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) { |
273 | CONFerr(CONF_F_NCONF_LOAD_FP, ERR_R_BUF_LIB); | 273 | CONFerror(ERR_R_BUF_LIB); |
274 | return 0; | 274 | return 0; |
275 | } | 275 | } |
276 | ret = NCONF_load_bio(conf, btmp, eline); | 276 | ret = NCONF_load_bio(conf, btmp, eline); |
@@ -282,7 +282,7 @@ int | |||
282 | NCONF_load_bio(CONF *conf, BIO *bp, long *eline) | 282 | NCONF_load_bio(CONF *conf, BIO *bp, long *eline) |
283 | { | 283 | { |
284 | if (conf == NULL) { | 284 | if (conf == NULL) { |
285 | CONFerr(CONF_F_NCONF_LOAD_BIO, CONF_R_NO_CONF); | 285 | CONFerror(CONF_R_NO_CONF); |
286 | return 0; | 286 | return 0; |
287 | } | 287 | } |
288 | 288 | ||
@@ -293,12 +293,12 @@ STACK_OF(CONF_VALUE) * | |||
293 | NCONF_get_section(const CONF *conf, const char *section) | 293 | NCONF_get_section(const CONF *conf, const char *section) |
294 | { | 294 | { |
295 | if (conf == NULL) { | 295 | if (conf == NULL) { |
296 | CONFerr(CONF_F_NCONF_GET_SECTION, CONF_R_NO_CONF); | 296 | CONFerror(CONF_R_NO_CONF); |
297 | return NULL; | 297 | return NULL; |
298 | } | 298 | } |
299 | 299 | ||
300 | if (section == NULL) { | 300 | if (section == NULL) { |
301 | CONFerr(CONF_F_NCONF_GET_SECTION, CONF_R_NO_SECTION); | 301 | CONFerror(CONF_R_NO_SECTION); |
302 | return NULL; | 302 | return NULL; |
303 | } | 303 | } |
304 | 304 | ||
@@ -316,11 +316,10 @@ NCONF_get_string(const CONF *conf, const char *group, const char *name) | |||
316 | return s; | 316 | return s; |
317 | 317 | ||
318 | if (conf == NULL) { | 318 | if (conf == NULL) { |
319 | CONFerr(CONF_F_NCONF_GET_STRING, | 319 | CONFerror(CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE); |
320 | CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE); | ||
321 | return NULL; | 320 | return NULL; |
322 | } | 321 | } |
323 | CONFerr(CONF_F_NCONF_GET_STRING, CONF_R_NO_VALUE); | 322 | CONFerror(CONF_R_NO_VALUE); |
324 | ERR_asprintf_error_data("group=%s name=%s", | 323 | ERR_asprintf_error_data("group=%s name=%s", |
325 | group ? group : "", name); | 324 | group ? group : "", name); |
326 | return NULL; | 325 | return NULL; |
@@ -333,7 +332,7 @@ NCONF_get_number_e(const CONF *conf, const char *group, const char *name, | |||
333 | char *str; | 332 | char *str; |
334 | 333 | ||
335 | if (result == NULL) { | 334 | if (result == NULL) { |
336 | CONFerr(CONF_F_NCONF_GET_NUMBER_E, ERR_R_PASSED_NULL_PARAMETER); | 335 | CONFerror(ERR_R_PASSED_NULL_PARAMETER); |
337 | return 0; | 336 | return 0; |
338 | } | 337 | } |
339 | 338 | ||
@@ -356,7 +355,7 @@ NCONF_dump_fp(const CONF *conf, FILE *out) | |||
356 | BIO *btmp; | 355 | BIO *btmp; |
357 | int ret; | 356 | int ret; |
358 | if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { | 357 | if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { |
359 | CONFerr(CONF_F_NCONF_DUMP_FP, ERR_R_BUF_LIB); | 358 | CONFerror(ERR_R_BUF_LIB); |
360 | return 0; | 359 | return 0; |
361 | } | 360 | } |
362 | ret = NCONF_dump_bio(conf, btmp); | 361 | ret = NCONF_dump_bio(conf, btmp); |
@@ -368,7 +367,7 @@ int | |||
368 | NCONF_dump_bio(const CONF *conf, BIO *out) | 367 | NCONF_dump_bio(const CONF *conf, BIO *out) |
369 | { | 368 | { |
370 | if (conf == NULL) { | 369 | if (conf == NULL) { |
371 | CONFerr(CONF_F_NCONF_DUMP_BIO, CONF_R_NO_CONF); | 370 | CONFerror(CONF_R_NO_CONF); |
372 | return 0; | 371 | return 0; |
373 | } | 372 | } |
374 | 373 | ||
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c index cb54cc2a87..9f252385e8 100644 --- a/src/lib/libcrypto/conf/conf_mod.c +++ b/src/lib/libcrypto/conf/conf_mod.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf_mod.c,v 1.26 2015/04/11 16:03:21 deraadt Exp $ */ | 1 | /* $OpenBSD: conf_mod.c,v 1.27 2017/01/29 17:49:22 beck Exp $ */ |
2 | /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -211,7 +211,7 @@ module_run(const CONF *cnf, char *name, char *value, unsigned long flags) | |||
211 | 211 | ||
212 | if (!md) { | 212 | if (!md) { |
213 | if (!(flags & CONF_MFLAGS_SILENT)) { | 213 | if (!(flags & CONF_MFLAGS_SILENT)) { |
214 | CONFerr(CONF_F_MODULE_RUN, CONF_R_UNKNOWN_MODULE_NAME); | 214 | CONFerror(CONF_R_UNKNOWN_MODULE_NAME); |
215 | ERR_asprintf_error_data("module=%s", name); | 215 | ERR_asprintf_error_data("module=%s", name); |
216 | } | 216 | } |
217 | return -1; | 217 | return -1; |
@@ -221,8 +221,7 @@ module_run(const CONF *cnf, char *name, char *value, unsigned long flags) | |||
221 | 221 | ||
222 | if (ret <= 0) { | 222 | if (ret <= 0) { |
223 | if (!(flags & CONF_MFLAGS_SILENT)) { | 223 | if (!(flags & CONF_MFLAGS_SILENT)) { |
224 | CONFerr(CONF_F_MODULE_RUN, | 224 | CONFerror(CONF_R_MODULE_INITIALIZATION_ERROR); |
225 | CONF_R_MODULE_INITIALIZATION_ERROR); | ||
226 | ERR_asprintf_error_data | 225 | ERR_asprintf_error_data |
227 | ("module=%s, value=%s, retcode=%-8d", | 226 | ("module=%s, value=%s, retcode=%-8d", |
228 | name, value, ret); | 227 | name, value, ret); |
@@ -271,7 +270,7 @@ module_load_dso(const CONF *cnf, char *name, char *value, unsigned long flags) | |||
271 | err: | 270 | err: |
272 | if (dso) | 271 | if (dso) |
273 | DSO_free(dso); | 272 | DSO_free(dso); |
274 | CONFerr(CONF_F_MODULE_LOAD_DSO, errcode); | 273 | CONFerror(errcode); |
275 | ERR_asprintf_error_data("module=%s, path=%s", name, path); | 274 | ERR_asprintf_error_data("module=%s, path=%s", name, path); |
276 | return NULL; | 275 | return NULL; |
277 | } | 276 | } |
@@ -368,13 +367,13 @@ module_init(CONF_MODULE *pmod, char *name, char *value, const CONF *cnf) | |||
368 | if (initialized_modules == NULL) { | 367 | if (initialized_modules == NULL) { |
369 | initialized_modules = sk_CONF_IMODULE_new_null(); | 368 | initialized_modules = sk_CONF_IMODULE_new_null(); |
370 | if (!initialized_modules) { | 369 | if (!initialized_modules) { |
371 | CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE); | 370 | CONFerror(ERR_R_MALLOC_FAILURE); |
372 | goto err; | 371 | goto err; |
373 | } | 372 | } |
374 | } | 373 | } |
375 | 374 | ||
376 | if (!sk_CONF_IMODULE_push(initialized_modules, imod)) { | 375 | if (!sk_CONF_IMODULE_push(initialized_modules, imod)) { |
377 | CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE); | 376 | CONFerror(ERR_R_MALLOC_FAILURE); |
378 | goto err; | 377 | goto err; |
379 | } | 378 | } |
380 | 379 | ||
@@ -566,7 +565,7 @@ CONF_parse_list(const char *list_, int sep, int nospc, | |||
566 | const char *lstart, *tmpend, *p; | 565 | const char *lstart, *tmpend, *p; |
567 | 566 | ||
568 | if (list_ == NULL) { | 567 | if (list_ == NULL) { |
569 | CONFerr(CONF_F_CONF_PARSE_LIST, CONF_R_LIST_CANNOT_BE_NULL); | 568 | CONFerror(CONF_R_LIST_CANNOT_BE_NULL); |
570 | return 0; | 569 | return 0; |
571 | } | 570 | } |
572 | 571 | ||