Go to the documentation of this file.
70 #include "../internal.h"
71 #include "../lhash/internal.h"
84 #define MAX_CONF_VALUE_LENGTH 65536
89 return (section_hash << 2) ^ name_hash;
95 if (
a->section !=
b->section) {
96 i = strcmp(
a->section,
b->section);
102 if (
a->name != NULL &&
b->name != NULL) {
103 return strcmp(
a->name,
b->name);
104 }
else if (
a->name ==
b->name) {
107 return (
a->name == NULL) ? -1 : 1;
124 if (
conf->data == NULL) {
143 if (
value->section) {
166 if (
conf == NULL ||
conf->data == NULL) {
171 lh_CONF_VALUE_free(
conf->data);
180 sk = sk_CONF_VALUE_new_null();
182 if (sk == NULL ||
v == NULL) {
186 if (
v->section == NULL) {
191 v->value = (
char *)sk;
204 sk_CONF_VALUE_free(sk);
215 int q,
r, rr = 0,
to = 0,
len = 0;
216 char *s, *e, *rp, *rrp, *np, *cp,
v;
251 if (*(
from + 1) == q) {
267 }
else if (
v ==
'r') {
269 }
else if (
v ==
'n') {
271 }
else if (
v ==
'b') {
273 }
else if (
v ==
't') {
279 }
else if (*
from ==
'$') {
285 }
else if (*s ==
'(') {
299 if (e[0] ==
':' && e[1] ==
':') {
337 size_t newsize = strlen(
p) +
buf->length - (e -
from);
365 buf->data[
to] =
'\0';
384 template.section = (
char *)
section;
385 return lh_CONF_VALUE_retrieve(
conf->data, &
template);
390 if (section_value == NULL) {
405 template.section = (
char *)
section;
406 template.name = (
char *)
name;
407 value = lh_CONF_VALUE_retrieve(
conf->data, &
template);
420 if (!sk_CONF_VALUE_push(section_stack,
value)) {
428 (void)sk_CONF_VALUE_delete_ptr(section_stack,
old_value);
442 #define scan_esc(conf, p) (((IS_EOF((conf), (p)[1])) ? ((p) + 1) : ((p) + 2)))
535 static const size_t CONFBUFSIZE = 512;
536 int bufnum = 0,
i, ii;
545 char *
start, *psection, *pname;
571 p = &(buff->
data[bufnum]);
574 p[CONFBUFSIZE - 1] =
'\0';
576 if (
i == 0 && !again) {
581 if ((
p[
i - 1] !=
'\r') && (
p[
i - 1] !=
'\n')) {
606 p = &(buff->
data[bufnum - 1]);
633 if (*
p !=
'\0' && ss !=
p) {
656 if ((
end[0] ==
':') && (
end[1] ==
':')) {
684 if (psection == NULL) {
688 if (
v->name == NULL) {
696 if (strcmp(psection,
section) != 0) {
729 if (out_error_line != NULL) {
730 *out_error_line = eline;
736 if (
v->name != NULL) {
739 if (
v->value != NULL) {
769 int (*list_cb)(
const char *
elem,
int len,
void *usr),
772 const char *lstart, *tmpend, *
p;
781 if (remove_whitespace) {
782 while (*lstart && isspace((
unsigned char)*lstart)) {
786 p = strchr(lstart,
sep);
787 if (
p == lstart || !*lstart) {
788 ret = list_cb(NULL, 0,
arg);
793 tmpend = lstart + strlen(lstart) - 1;
795 if (remove_whitespace) {
796 while (isspace((
unsigned char)*tmpend)) {
800 ret = list_cb(lstart, tmpend - lstart + 1,
arg);
813 unsigned long flags) {
static void value_free(CONF_VALUE *value)
static int str_copy(CONF *conf, char *section, char **pto, char *from)
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION
static char * eat_alpha_numeric(CONF *conf, char *p)
OPENSSL_EXPORT const char * section
void OPENSSL_config(const char *config_name)
static char * scan_dquote(CONF *conf, char *p)
#define CONF_R_VARIABLE_EXPANSION_TOO_LONG
#define OPENSSL_PUT_ERROR(library, reason)
#define scan_esc(conf, p)
static const char kDefaultSectionName[]
#define CONF_R_LIST_CANNOT_BE_NULL
CONF * NCONF_new(void *method)
static char * eat_ws(CONF *conf, char *p)
static void * OPENSSL_memset(void *dst, int c, size_t n)
#define CONF_R_VARIABLE_HAS_NO_VALUE
#define IS_ALPHA_NUMERIC_PUNCT(c, a)
#define NCONF_get_section
int NCONF_load_bio(CONF *conf, BIO *bio, long *out_error_line)
#define IS_FCOMMENT(c, a)
static CONF_VALUE * NCONF_new_section(const CONF *conf, const char *section)
#define IS_ALPHA_NUMERIC(c, a)
static void value_free_contents(CONF_VALUE *value)
static int add_string(const CONF *conf, CONF_VALUE *section, CONF_VALUE *value)
static int conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b)
#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET
#define CONF_R_MISSING_EQUAL_SIGN
static char * scan_quote(CONF *conf, char *p)
static uint32_t conf_value_hash(const CONF_VALUE *v)
int NCONF_load(CONF *conf, const char *filename, long *out_error_line)
#define BUF_MEM_grow_clean
int CONF_parse_list(const char *list, char sep, int remove_whitespace, int(*list_cb)(const char *elem, int len, void *usr), void *arg)
void OPENSSL_no_config(void)
static void value_free_arg(CONF_VALUE *value, void *arg)
static void clear_comments(CONF *conf, char *p)
#define CONF_R_NO_CLOSE_BRACE
#define MAX_CONF_VALUE_LENGTH
const char * NCONF_get_string(const CONF *conf, const char *section, const char *name)
static int def_load_bio(CONF *conf, BIO *in, long *out_error_line)
#define DEFINE_LHASH_OF(type)
UniquePtr< SSL_SESSION > ret
#define ERR_add_error_data
CONF_VALUE * CONF_VALUE_new(void)
#define DECIMAL_SIZE(type)
void CONF_modules_free(void)
static CONF_VALUE * get_section(const CONF *conf, const char *section)
int CONF_modules_load_file(const char *filename, const char *appname, unsigned long flags)
void NCONF_free(CONF *conf)
#define ERR_R_MALLOC_FAILURE
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:52