Lines Matching refs:conf
10 /* Part of the code in here was originally in conf.c, which is now removed */
22 #include <openssl/conf.h>
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)))
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)
126 if (conf == NULL)
129 memset(conf, 0, sizeof(*conf));
130 conf->meth = &default_method;
131 conf->meth_data = (void *)CONF_type_default;
137 static int def_init_WIN32(CONF *conf)
139 if (conf == NULL)
142 memset(conf, 0, sizeof(*conf));
143 conf->meth = &WIN32_method;
144 conf->meth_data = (void *)CONF_type_win32;
150 static int def_destroy(CONF *conf)
152 if (def_destroy_data(conf)) {
153 OPENSSL_free(conf);
159 static int def_destroy_data(CONF *conf)
161 if (conf == NULL)
163 _CONF_free_data(conf);
167 static int def_load(CONF *conf, const char *name, long *line)
185 ret = def_load_bio(conf, in, line);
208 static int def_load_bio(CONF *conf, BIO *in, long *line)
223 void *h = (void *)(conf->data);
244 if (_CONF_new_data(conf) == 0) {
249 sv = _CONF_new_section(conf, section);
341 if (IS_ESC(conf, p[0]) && ((bufnum <= 1) || !IS_ESC(conf, p[-1]))) {
351 clear_comments(conf, buf);
352 s = eat_ws(conf, buf);
353 if (IS_EOF(conf, *s))
359 start = eat_ws(conf, s);
362 end = eat_alpha_numeric(conf, ss);
363 p = eat_ws(conf, end);
373 if (!str_copy(conf, NULL, §ion, start))
375 if ((sv = _CONF_get_section(conf, section)) == NULL)
376 sv = _CONF_new_section(conf, section);
384 end = eat_alpha_numeric(conf, s);
390 end = eat_alpha_numeric(conf, end);
394 p = eat_ws(conf, end);
401 p = eat_ws(conf, p);
403 trim_ws(conf, p);
413 trim_ws(conf, p);
414 pval = eat_ws(conf, pval);
424 if (!parsebool(pval, &conf->flag_dollarid))
427 if (!parsebool(pval, &conf->flag_abspath))
430 OPENSSL_free(conf->includedir);
431 if ((conf->includedir = OPENSSL_strdup(pval)) == NULL) {
450 * The include processing below can cause the "conf" fuzzer to
463 include_dir = conf->includedir;
467 p = eat_ws(conf, p);
469 trim_ws(conf, p);
470 if (!str_copy(conf, psection, &include, p))
492 if (conf->flag_abspath
536 start = eat_ws(conf, p);
537 trim_ws(conf, start);
549 if (!str_copy(conf, psection, &(v->value), start))
553 if ((tv = _CONF_get_section(conf, psection))
555 tv = _CONF_new_section(conf, psection);
563 if (_CONF_add_string(conf, tv, v) == 0) {
602 if (h != conf->data) {
603 CONF_free(conf->data);
604 conf->data = NULL;
614 static void clear_comments(CONF *conf, char *p)
617 if (IS_FCOMMENT(conf, *p)) {
621 if (!IS_WS(conf, *p)) {
628 if (IS_COMMENT(conf, *p)) {
632 if (IS_DQUOTE(conf, *p)) {
633 p = scan_dquote(conf, p);
636 if (IS_QUOTE(conf, *p)) {
637 p = scan_quote(conf, p);
640 if (IS_ESC(conf, *p)) {
641 p = scan_esc(conf, p);
644 if (IS_EOF(conf, *p))
651 static int str_copy(CONF *conf, char *section, char **pto, char *from)
665 if (IS_QUOTE(conf, *from)) {
668 while (!IS_EOF(conf, *from) && (*from != q)) {
669 if (IS_ESC(conf, *from)) {
671 if (IS_EOF(conf, *from))
678 } else if (IS_DQUOTE(conf, *from)) {
681 while (!IS_EOF(conf, *from)) {
693 } else if (IS_ESC(conf, *from)) {
696 if (IS_EOF(conf, v))
707 } else if (IS_EOF(conf, *from))
710 && (!conf->flag_dollarid
729 while (IS_ALNUM(conf, *e)
730 || (conf->flag_dollarid && IS_DOLLAR(conf, *e)))
739 while (IS_ALNUM(conf, *e)
740 || (conf->flag_dollarid && IS_DOLLAR(conf, *e)))
763 p = _CONF_get_string(conf, cp, np);
860 && OPENSSL_strcasecmp(filename + namelen - 5, ".conf") == 0)
904 static int is_keytype(const CONF *conf, char c, unsigned short type)
906 const unsigned short * keytypes = (const unsigned short *) conf->meth_data;
928 static char *eat_ws(CONF *conf, char *p)
930 while (IS_WS(conf, *p) && (!IS_EOF(conf, *p)))
935 static void trim_ws(CONF *conf, char *start)
939 while (!IS_EOF(conf, *p))
942 while ((p >= start) && IS_WS(conf, *p))
948 static char *eat_alpha_numeric(CONF *conf, char *p)
951 if (IS_ESC(conf, *p)) {
952 p = scan_esc(conf, p);
955 if (!(IS_ALNUM_PUNCT(conf, *p)
956 || (conf->flag_dollarid && IS_DOLLAR(conf, *p))))
962 static char *scan_quote(CONF *conf, char *p)
967 while (!(IS_EOF(conf, *p)) && (*p != q)) {
968 if (IS_ESC(conf, *p)) {
970 if (IS_EOF(conf, *p))
980 static char *scan_dquote(CONF *conf, char *p)
985 while (!(IS_EOF(conf, *p))) {
1010 static int def_dump(const CONF *conf, BIO *out)
1012 lh_CONF_VALUE_doall_BIO(conf->data, dump_value_doall_arg, out);
1016 static int def_is_number(const CONF *conf, char c)
1018 return IS_NUMBER(conf, c);
1021 static int def_to_int(const CONF *conf, char c)