Add NCONF_load_bio.
Change-Id: Icebf5c08dde01f07e4d16e782a75be990a078e1a
This commit is contained in:
parent
c004dfc3d1
commit
d4a5ecd869
@ -90,9 +90,13 @@ static int conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b) {
|
||||
}
|
||||
}
|
||||
|
||||
CONF *NCONF_new(void) {
|
||||
CONF *NCONF_new(void *method) {
|
||||
CONF *conf;
|
||||
|
||||
if (method != NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
conf = OPENSSL_malloc(sizeof(CONF));
|
||||
if (conf == NULL) {
|
||||
return NULL;
|
||||
@ -721,6 +725,10 @@ int NCONF_load(CONF *conf, const char *filename, long *out_error_line) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int NCONF_load_bio(CONF *conf, BIO *bio, long *out_error_line) {
|
||||
return def_load_bio(conf, bio, out_error_line);
|
||||
}
|
||||
|
||||
int CONF_parse_list(const char *list, char sep, int remove_whitespace,
|
||||
int (*list_cb)(const char *elem, int len, void *usr),
|
||||
void *arg) {
|
||||
|
@ -90,8 +90,9 @@ struct conf_st {
|
||||
};
|
||||
|
||||
|
||||
/* NCONF_new returns a fresh, empty |CONF|, or NULL on error. */
|
||||
CONF *NCONF_new(void);
|
||||
/* NCONF_new returns a fresh, empty |CONF|, or NULL on error. The |method|
|
||||
* argument must be NULL. */
|
||||
CONF *NCONF_new(void *method);
|
||||
|
||||
/* NCONF_free frees all the data owned by |conf| and then |conf| itself. */
|
||||
void NCONF_free(CONF *conf);
|
||||
@ -102,6 +103,10 @@ void NCONF_free(CONF *conf);
|
||||
* number of the line that contained the error. */
|
||||
int NCONF_load(CONF *conf, const char *filename, long *out_error_line);
|
||||
|
||||
/* NCONF_load_bio acts like |NCONF_load| but reads from |bio| rather than from
|
||||
* a named file. */
|
||||
int NCONF_load_bio(CONF *conf, BIO *bio, long *out_error_line);
|
||||
|
||||
/* NCONF_get_section returns a stack of values for a given section in |conf|.
|
||||
* If |section| is NULL, the default section is returned. It returns NULL on
|
||||
* error. */
|
||||
|
Loading…
Reference in New Issue
Block a user