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()
135 void NCONF_free(CONF *conf) { in NCONF_free() argument
136 if (conf == NULL || conf->data == NULL) { in NCONF_free()
140 lh_CONF_VALUE_doall(conf->data, value_free_contents); in NCONF_free()
141 lh_CONF_VALUE_free(conf->data); in NCONF_free()
142 OPENSSL_free(conf); in NCONF_free()
145 CONF_VALUE *NCONF_new_section(const CONF *conf, const char *section) { in NCONF_new_section() argument
166 if (!lh_CONF_VALUE_insert(conf->data, &old_value, v)) { in NCONF_new_section()
187 static int str_copy(CONF *conf, char *section, char **pto, char *from) { in str_copy() argument
204 if (IS_QUOTE(conf, *from)) { in str_copy()
207 while (!IS_EOF(conf, *from) && (*from != q)) { in str_copy()
208 if (IS_ESC(conf, *from)) { in str_copy()
210 if (IS_EOF(conf, *from)) { in str_copy()
219 } else if (IS_DQUOTE(conf, *from)) { in str_copy()
222 while (!IS_EOF(conf, *from)) { in str_copy()
235 } else if (IS_ESC(conf, *from)) { in str_copy()
238 if (IS_EOF(conf, v)) { in str_copy()
250 } else if (IS_EOF(conf, *from)) { in str_copy()
269 while (IS_ALPHA_NUMERIC(conf, *e)) { in str_copy()
279 while (IS_ALPHA_NUMERIC(conf, *e)) { in str_copy()
301 p = NCONF_get_string(conf, cp, np); in str_copy()
345 static CONF_VALUE *get_section(const CONF *conf, const char *section) { in get_section() argument
350 return lh_CONF_VALUE_retrieve(conf->data, &template); in get_section()
353 STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, const char *section) { in STACK_OF()
354 CONF_VALUE *section_value = get_section(conf, section); in STACK_OF()
361 const char *NCONF_get_string(const CONF *conf, const char *section, in NCONF_get_string() argument
368 value = lh_CONF_VALUE_retrieve(conf->data, &template); in NCONF_get_string()
375 int add_string(const CONF *conf, CONF_VALUE *section, CONF_VALUE *value) { in add_string() argument
384 if (!lh_CONF_VALUE_insert(conf->data, &old_value, value)) { in add_string()
395 static char *eat_ws(CONF *conf, char *p) { in eat_ws() argument
396 while (IS_WS(conf, *p) && !IS_EOF(conf, *p)) { in eat_ws()
402 #define scan_esc(conf, p) (((IS_EOF((conf), (p)[1])) ? ((p) + 1) : ((p) + 2))) argument
404 static char *eat_alpha_numeric(CONF *conf, char *p) { in eat_alpha_numeric() argument
406 if (IS_ESC(conf, *p)) { in eat_alpha_numeric()
407 p = scan_esc(conf, p); in eat_alpha_numeric()
410 if (!IS_ALPHA_NUMERIC_PUNCT(conf, *p)) { in eat_alpha_numeric()
417 static char *scan_quote(CONF *conf, char *p) { in scan_quote() argument
421 while (!IS_EOF(conf, *p) && *p != q) { in scan_quote()
422 if (IS_ESC(conf, *p)) { in scan_quote()
424 if (IS_EOF(conf, *p)) { in scan_quote()
437 static char *scan_dquote(CONF *conf, char *p) { in scan_dquote() argument
441 while (!(IS_EOF(conf, *p))) { in scan_dquote()
457 static void clear_comments(CONF *conf, char *p) { in clear_comments() argument
459 if (IS_FCOMMENT(conf, *p)) { in clear_comments()
463 if (!IS_WS(conf, *p)) { in clear_comments()
470 if (IS_COMMENT(conf, *p)) { in clear_comments()
474 if (IS_DQUOTE(conf, *p)) { in clear_comments()
475 p = scan_dquote(conf, p); in clear_comments()
478 if (IS_QUOTE(conf, *p)) { in clear_comments()
479 p = scan_quote(conf, p); in clear_comments()
482 if (IS_ESC(conf, *p)) { in clear_comments()
483 p = scan_esc(conf, p); in clear_comments()
486 if (IS_EOF(conf, *p)) { in clear_comments()
494 static int def_load_bio(CONF *conf, BIO *in, long *out_error_line) { in def_load_bio() argument
519 sv = NCONF_new_section(conf, section); in def_load_bio()
568 if (IS_ESC(conf, p[0]) && ((bufnum <= 1) || !IS_ESC(conf, p[-1]))) { in def_load_bio()
579 clear_comments(conf, buf); in def_load_bio()
580 s = eat_ws(conf, buf); in def_load_bio()
581 if (IS_EOF(conf, *s)) { in def_load_bio()
588 start = eat_ws(conf, s); in def_load_bio()
591 end = eat_alpha_numeric(conf, ss); in def_load_bio()
592 p = eat_ws(conf, end); in def_load_bio()
602 if (!str_copy(conf, NULL, &section, start)) { in def_load_bio()
605 if ((sv = get_section(conf, section)) == NULL) { in def_load_bio()
606 sv = NCONF_new_section(conf, section); in def_load_bio()
616 end = eat_alpha_numeric(conf, s); in def_load_bio()
622 end = eat_alpha_numeric(conf, end); in def_load_bio()
624 p = eat_ws(conf, end); in def_load_bio()
631 start = eat_ws(conf, p); in def_load_bio()
632 while (!IS_EOF(conf, *p)) { in def_load_bio()
636 while ((p != start) && (IS_WS(conf, *p))) { in def_load_bio()
656 if (!str_copy(conf, psection, &(v->value), start)) { in def_load_bio()
661 if ((tv = get_section(conf, psection)) == NULL) { in def_load_bio()
662 tv = NCONF_new_section(conf, psection); in def_load_bio()
671 if (add_string(conf, tv, v) == 0) { in def_load_bio()
713 int NCONF_load(CONF *conf, const char *filename, long *out_error_line) { in NCONF_load() argument
722 ret = def_load_bio(conf, in, out_error_line); in NCONF_load()
728 int NCONF_load_bio(CONF *conf, BIO *bio, long *out_error_line) { in NCONF_load_bio() argument
729 return def_load_bio(conf, bio, out_error_line); in NCONF_load_bio()