Lines Matching refs:conf

45 static int is_keytype(const CONF *conf, char c, unsigned short type);
46 static char *eat_ws(CONF *conf, char *p);
47 static void trim_ws(CONF *conf, char *start);
48 static char *eat_alpha_numeric(CONF *conf, char *p);
49 static void clear_comments(CONF *conf, char *p);
50 static int str_copy(CONF *conf, char *section, char **to, char *from);
51 static char *scan_quote(CONF *conf, char *p);
52 static char *scan_dquote(CONF *conf, char *p);
53 #define scan_esc(conf,p) (((IS_EOF((conf),(p)[1]))?((p)+1):((p)+2))) argument
61 static int def_init_default(CONF *conf);
63 static int def_init_WIN32(CONF *conf);
65 static int def_destroy(CONF *conf);
66 static int def_destroy_data(CONF *conf);
67 static int def_load(CONF *conf, const char *name, long *eline);
68 static int def_load_bio(CONF *conf, BIO *bp, long *eline);
69 static int def_dump(const CONF *conf, BIO *bp);
70 static int def_is_number(const CONF *conf, char c);
71 static int def_to_int(const CONF *conf, char c);
124 static int def_init_default(CONF *conf) in def_init_default() argument
126 if (conf == NULL) in def_init_default()
129 memset(conf, 0, sizeof(*conf)); in def_init_default()
130 conf->meth = &default_method; in def_init_default()
131 conf->meth_data = (void *)CONF_type_default; in def_init_default()
137 static int def_init_WIN32(CONF *conf) in def_init_WIN32() argument
139 if (conf == NULL) in def_init_WIN32()
142 memset(conf, 0, sizeof(*conf)); in def_init_WIN32()
143 conf->meth = &WIN32_method; in def_init_WIN32()
144 conf->meth_data = (void *)CONF_type_win32; in def_init_WIN32()
150 static int def_destroy(CONF *conf) in def_destroy() argument
152 if (def_destroy_data(conf)) { in def_destroy()
153 OPENSSL_free(conf); in def_destroy()
159 static int def_destroy_data(CONF *conf) in def_destroy_data() argument
161 if (conf == NULL) in def_destroy_data()
163 _CONF_free_data(conf); in def_destroy_data()
167 static int def_load(CONF *conf, const char *name, long *line) in def_load() argument
185 ret = def_load_bio(conf, in, line); in def_load()
208 static int def_load_bio(CONF *conf, BIO *in, long *line) in def_load_bio() argument
223 void *h = (void *)(conf->data); in def_load_bio()
242 if (_CONF_new_data(conf) == 0) { in def_load_bio()
247 sv = _CONF_new_section(conf, section); in def_load_bio()
339 if (IS_ESC(conf, p[0]) && ((bufnum <= 1) || !IS_ESC(conf, p[-1]))) { in def_load_bio()
349 clear_comments(conf, buf); in def_load_bio()
350 s = eat_ws(conf, buf); in def_load_bio()
351 if (IS_EOF(conf, *s)) in def_load_bio()
357 start = eat_ws(conf, s); in def_load_bio()
360 end = eat_alpha_numeric(conf, ss); in def_load_bio()
361 p = eat_ws(conf, end); in def_load_bio()
371 if (!str_copy(conf, NULL, &section, start)) in def_load_bio()
373 if ((sv = _CONF_get_section(conf, section)) == NULL) in def_load_bio()
374 sv = _CONF_new_section(conf, section); in def_load_bio()
382 end = eat_alpha_numeric(conf, s); in def_load_bio()
388 end = eat_alpha_numeric(conf, end); in def_load_bio()
392 p = eat_ws(conf, end); in def_load_bio()
399 p = eat_ws(conf, p); in def_load_bio()
401 trim_ws(conf, p); in def_load_bio()
411 trim_ws(conf, p); in def_load_bio()
412 pval = eat_ws(conf, pval); in def_load_bio()
422 if (!parsebool(pval, &conf->flag_dollarid)) in def_load_bio()
425 if (!parsebool(pval, &conf->flag_abspath)) in def_load_bio()
428 OPENSSL_free(conf->includedir); in def_load_bio()
429 if ((conf->includedir = OPENSSL_strdup(pval)) == NULL) in def_load_bio()
459 include_dir = conf->includedir; in def_load_bio()
463 p = eat_ws(conf, p); in def_load_bio()
465 trim_ws(conf, p); in def_load_bio()
466 if (!str_copy(conf, psection, &include, p)) in def_load_bio()
487 if (conf->flag_abspath in def_load_bio()
531 start = eat_ws(conf, p); in def_load_bio()
532 trim_ws(conf, start); in def_load_bio()
540 if (!str_copy(conf, psection, &(v->value), start)) in def_load_bio()
544 if ((tv = _CONF_get_section(conf, psection)) in def_load_bio()
546 tv = _CONF_new_section(conf, psection); in def_load_bio()
554 if (_CONF_add_string(conf, tv, v) == 0) { in def_load_bio()
593 if (h != conf->data) { in def_load_bio()
594 CONF_free(conf->data); in def_load_bio()
595 conf->data = NULL; in def_load_bio()
605 static void clear_comments(CONF *conf, char *p) in clear_comments() argument
608 if (IS_FCOMMENT(conf, *p)) { in clear_comments()
612 if (!IS_WS(conf, *p)) { in clear_comments()
619 if (IS_COMMENT(conf, *p)) { in clear_comments()
623 if (IS_DQUOTE(conf, *p)) { in clear_comments()
624 p = scan_dquote(conf, p); in clear_comments()
627 if (IS_QUOTE(conf, *p)) { in clear_comments()
628 p = scan_quote(conf, p); in clear_comments()
631 if (IS_ESC(conf, *p)) { in clear_comments()
632 p = scan_esc(conf, p); in clear_comments()
635 if (IS_EOF(conf, *p)) in clear_comments()
642 static int str_copy(CONF *conf, char *section, char **pto, char *from) in str_copy() argument
656 if (IS_QUOTE(conf, *from)) { in str_copy()
659 while (!IS_EOF(conf, *from) && (*from != q)) { in str_copy()
660 if (IS_ESC(conf, *from)) { in str_copy()
662 if (IS_EOF(conf, *from)) in str_copy()
669 } else if (IS_DQUOTE(conf, *from)) { in str_copy()
672 while (!IS_EOF(conf, *from)) { in str_copy()
684 } else if (IS_ESC(conf, *from)) { in str_copy()
687 if (IS_EOF(conf, v)) in str_copy()
698 } else if (IS_EOF(conf, *from)) in str_copy()
701 && (!conf->flag_dollarid in str_copy()
720 while (IS_ALNUM(conf, *e) in str_copy()
721 || (conf->flag_dollarid && IS_DOLLAR(conf, *e))) in str_copy()
730 while (IS_ALNUM(conf, *e) in str_copy()
731 || (conf->flag_dollarid && IS_DOLLAR(conf, *e))) in str_copy()
754 p = _CONF_get_string(conf, cp, np); in str_copy()
893 static int is_keytype(const CONF *conf, char c, unsigned short type) in is_keytype() argument
895 const unsigned short *keytypes = (const unsigned short *) conf->meth_data; in is_keytype()
917 static char *eat_ws(CONF *conf, char *p) in eat_ws() argument
919 while (IS_WS(conf, *p) && (!IS_EOF(conf, *p))) in eat_ws()
924 static void trim_ws(CONF *conf, char *start) in trim_ws() argument
928 while (!IS_EOF(conf, *p)) in trim_ws()
931 while ((p >= start) && IS_WS(conf, *p)) in trim_ws()
937 static char *eat_alpha_numeric(CONF *conf, char *p) in eat_alpha_numeric() argument
940 if (IS_ESC(conf, *p)) { in eat_alpha_numeric()
941 p = scan_esc(conf, p); in eat_alpha_numeric()
944 if (!(IS_ALNUM_PUNCT(conf, *p) in eat_alpha_numeric()
945 || (conf->flag_dollarid && IS_DOLLAR(conf, *p)))) in eat_alpha_numeric()
951 static char *scan_quote(CONF *conf, char *p) in scan_quote() argument
956 while (!(IS_EOF(conf, *p)) && (*p != q)) { in scan_quote()
957 if (IS_ESC(conf, *p)) { in scan_quote()
959 if (IS_EOF(conf, *p)) in scan_quote()
969 static char *scan_dquote(CONF *conf, char *p) in scan_dquote() argument
974 while (!(IS_EOF(conf, *p))) { in scan_dquote()
999 static int def_dump(const CONF *conf, BIO *out) in def_dump() argument
1001 lh_CONF_VALUE_doall_BIO(conf->data, dump_value_doall_arg, out); in def_dump()
1005 static int def_is_number(const CONF *conf, char c) in def_is_number() argument
1007 return IS_NUMBER(conf, c); in def_is_number()
1010 static int def_to_int(const CONF *conf, char c) in def_to_int() argument