Lines Matching refs:conf
94 CONF *conf; in NCONF_new() local
100 conf = OPENSSL_malloc(sizeof(CONF)); in NCONF_new()
101 if (conf == NULL) { in NCONF_new()
105 conf->data = lh_CONF_VALUE_new(conf_value_hash, conf_value_cmp); in NCONF_new()
106 if (conf->data == NULL) { in NCONF_new()
107 OPENSSL_free(conf); in NCONF_new()
111 return conf; in NCONF_new()
145 void NCONF_free(CONF *conf) { in NCONF_free() argument
146 if (conf == NULL || conf->data == NULL) { in NCONF_free()
150 lh_CONF_VALUE_doall(conf->data, value_free); in NCONF_free()
151 lh_CONF_VALUE_free(conf->data); in NCONF_free()
152 OPENSSL_free(conf); in NCONF_free()
155 CONF_VALUE *NCONF_new_section(const CONF *conf, const char *section) { in NCONF_new_section() argument
173 if (!lh_CONF_VALUE_insert(conf->data, &old_value, v)) { in NCONF_new_section()
194 static int str_copy(CONF *conf, char *section, char **pto, char *from) { in str_copy() argument
211 if (IS_QUOTE(conf, *from)) { in str_copy()
214 while (!IS_EOF(conf, *from) && (*from != q)) { in str_copy()
215 if (IS_ESC(conf, *from)) { in str_copy()
217 if (IS_EOF(conf, *from)) { in str_copy()
226 } else if (IS_DQUOTE(conf, *from)) { in str_copy()
229 while (!IS_EOF(conf, *from)) { in str_copy()
242 } else if (IS_ESC(conf, *from)) { in str_copy()
245 if (IS_EOF(conf, v)) { in str_copy()
257 } else if (IS_EOF(conf, *from)) { in str_copy()
276 while (IS_ALPHA_NUMERIC(conf, *e)) { in str_copy()
286 while (IS_ALPHA_NUMERIC(conf, *e)) { in str_copy()
308 p = NCONF_get_string(conf, cp, np); in str_copy()
352 static CONF_VALUE *get_section(const CONF *conf, const char *section) { in get_section() argument
357 return lh_CONF_VALUE_retrieve(conf->data, &template); in get_section()
360 STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, const char *section) { in STACK_OF()
361 CONF_VALUE *section_value = get_section(conf, section); in STACK_OF()
368 const char *NCONF_get_string(const CONF *conf, const char *section, in NCONF_get_string() argument
375 value = lh_CONF_VALUE_retrieve(conf->data, &template); in NCONF_get_string()
382 static int add_string(const CONF *conf, CONF_VALUE *section, in add_string() argument
392 if (!lh_CONF_VALUE_insert(conf->data, &old_value, value)) { in add_string()
403 static char *eat_ws(CONF *conf, char *p) { in eat_ws() argument
404 while (IS_WS(conf, *p) && !IS_EOF(conf, *p)) { in eat_ws()
410 #define scan_esc(conf, p) (((IS_EOF((conf), (p)[1])) ? ((p) + 1) : ((p) + 2))) argument
412 static char *eat_alpha_numeric(CONF *conf, char *p) { in eat_alpha_numeric() argument
414 if (IS_ESC(conf, *p)) { in eat_alpha_numeric()
415 p = scan_esc(conf, p); in eat_alpha_numeric()
418 if (!IS_ALPHA_NUMERIC_PUNCT(conf, *p)) { in eat_alpha_numeric()
425 static char *scan_quote(CONF *conf, char *p) { in scan_quote() argument
429 while (!IS_EOF(conf, *p) && *p != q) { in scan_quote()
430 if (IS_ESC(conf, *p)) { in scan_quote()
432 if (IS_EOF(conf, *p)) { in scan_quote()
445 static char *scan_dquote(CONF *conf, char *p) { in scan_dquote() argument
449 while (!(IS_EOF(conf, *p))) { in scan_dquote()
465 static void clear_comments(CONF *conf, char *p) { in clear_comments() argument
467 if (IS_FCOMMENT(conf, *p)) { in clear_comments()
471 if (!IS_WS(conf, *p)) { in clear_comments()
478 if (IS_COMMENT(conf, *p)) { in clear_comments()
482 if (IS_DQUOTE(conf, *p)) { in clear_comments()
483 p = scan_dquote(conf, p); in clear_comments()
486 if (IS_QUOTE(conf, *p)) { in clear_comments()
487 p = scan_quote(conf, p); in clear_comments()
490 if (IS_ESC(conf, *p)) { in clear_comments()
491 p = scan_esc(conf, p); in clear_comments()
494 if (IS_EOF(conf, *p)) { in clear_comments()
502 static int def_load_bio(CONF *conf, BIO *in, long *out_error_line) { in def_load_bio() argument
526 sv = NCONF_new_section(conf, section); in def_load_bio()
575 if (IS_ESC(conf, p[0]) && ((bufnum <= 1) || !IS_ESC(conf, p[-1]))) { in def_load_bio()
586 clear_comments(conf, buf); in def_load_bio()
587 s = eat_ws(conf, buf); in def_load_bio()
588 if (IS_EOF(conf, *s)) { in def_load_bio()
595 start = eat_ws(conf, s); in def_load_bio()
598 end = eat_alpha_numeric(conf, ss); in def_load_bio()
599 p = eat_ws(conf, end); in def_load_bio()
609 if (!str_copy(conf, NULL, §ion, start)) { in def_load_bio()
612 if ((sv = get_section(conf, section)) == NULL) { in def_load_bio()
613 sv = NCONF_new_section(conf, section); in def_load_bio()
623 end = eat_alpha_numeric(conf, s); in def_load_bio()
629 end = eat_alpha_numeric(conf, end); in def_load_bio()
631 p = eat_ws(conf, end); in def_load_bio()
638 start = eat_ws(conf, p); in def_load_bio()
639 while (!IS_EOF(conf, *p)) { in def_load_bio()
643 while ((p != start) && (IS_WS(conf, *p))) { in def_load_bio()
660 if (!str_copy(conf, psection, &(v->value), start)) { in def_load_bio()
665 if ((tv = get_section(conf, psection)) == NULL) { in def_load_bio()
666 tv = NCONF_new_section(conf, psection); in def_load_bio()
675 if (add_string(conf, tv, v) == 0) { in def_load_bio()
717 int NCONF_load(CONF *conf, const char *filename, long *out_error_line) { in NCONF_load() argument
726 ret = def_load_bio(conf, in, out_error_line); in NCONF_load()
732 int NCONF_load_bio(CONF *conf, BIO *bio, long *out_error_line) { in NCONF_load_bio() argument
733 return def_load_bio(conf, bio, out_error_line); in NCONF_load_bio()