MINOR: ssl: rename ckchs_load_cert_file to new_ckch_store_load_files_path
Remove the ambiguous "ckchs" name and reflect the fact that its loaded from a path.
This commit is contained in:
parent
860b562b92
commit
81e54ef197
@ -37,7 +37,7 @@ int ssl_sock_load_sctl_from_file(const char *sctl_path, char *buf, struct ckch_d
|
||||
int ssl_sock_load_issuer_file_into_ckch(const char *path, char *buf, struct ckch_data *data, char **err);
|
||||
|
||||
/* ckch_store functions */
|
||||
struct ckch_store *ckchs_load_cert_file(char *path, char **err);
|
||||
struct ckch_store *new_ckch_store_load_files_path(char *path, char **err);
|
||||
struct ckch_store *ckchs_lookup(char *path);
|
||||
struct ckch_store *ckchs_dup(const struct ckch_store *src);
|
||||
struct ckch_store *ckch_store_new(const char *filename);
|
||||
|
@ -995,7 +995,7 @@ struct ckch_store *ckchs_lookup(char *path)
|
||||
/*
|
||||
* This function allocate a ckch_store and populate it with certificates from files.
|
||||
*/
|
||||
struct ckch_store *ckchs_load_cert_file(char *path, char **err)
|
||||
struct ckch_store *new_ckch_store_load_files_path(char *path, char **err)
|
||||
{
|
||||
struct ckch_store *ckchs;
|
||||
|
||||
|
@ -590,7 +590,7 @@ int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct proxy *cu
|
||||
if (stat(crt_path, &buf) == 0) {
|
||||
found++;
|
||||
|
||||
ckchs = ckchs_load_cert_file(crt_path, err);
|
||||
ckchs = new_ckch_store_load_files_path(crt_path, err);
|
||||
if (ckchs == NULL) {
|
||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||
goto error;
|
||||
@ -627,7 +627,7 @@ int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct proxy *cu
|
||||
ckchs = ckchs_lookup(fp);
|
||||
if (!ckchs) {
|
||||
if (stat(fp, &buf) == 0) {
|
||||
ckchs = ckchs_load_cert_file(fp, err);
|
||||
ckchs = new_ckch_store_load_files_path(fp, err);
|
||||
if (!ckchs) {
|
||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||
goto error;
|
||||
@ -780,7 +780,7 @@ int crtlist_load_cert_dir(char *path, struct bind_conf *bind_conf, struct crtlis
|
||||
|
||||
ckchs = ckchs_lookup(fp);
|
||||
if (ckchs == NULL)
|
||||
ckchs = ckchs_load_cert_file(fp, err);
|
||||
ckchs = new_ckch_store_load_files_path(fp, err);
|
||||
if (ckchs == NULL) {
|
||||
free(de);
|
||||
free(entry);
|
||||
|
@ -3858,7 +3858,7 @@ int ssl_sock_load_cert(char *path, struct bind_conf *bind_conf, int is_default,
|
||||
} else if (stat(path, &buf) == 0) {
|
||||
found++;
|
||||
if (S_ISDIR(buf.st_mode) == 0) {
|
||||
ckchs = ckchs_load_cert_file(path, err);
|
||||
ckchs = new_ckch_store_load_files_path(path, err);
|
||||
if (!ckchs)
|
||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||
cfgerr |= ssl_sock_load_ckchs(path, ckchs, bind_conf, NULL, NULL, 0, is_default, &ckch_inst, err);
|
||||
@ -3886,7 +3886,7 @@ int ssl_sock_load_cert(char *path, struct bind_conf *bind_conf, int is_default,
|
||||
} else {
|
||||
if (stat(fp, &buf) == 0) {
|
||||
found++;
|
||||
ckchs = ckchs_load_cert_file(fp, err);
|
||||
ckchs = new_ckch_store_load_files_path(fp, err);
|
||||
if (!ckchs)
|
||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||
cfgerr |= ssl_sock_load_ckchs(fp, ckchs, bind_conf, NULL, NULL, 0, is_default, &ckch_inst, err);
|
||||
@ -3939,7 +3939,7 @@ int ssl_sock_load_srv_cert(char *path, struct server *server, int create_if_none
|
||||
/* We do not manage directories on backend side. */
|
||||
if (S_ISDIR(buf.st_mode) == 0) {
|
||||
++found;
|
||||
ckchs = ckchs_load_cert_file(path, err);
|
||||
ckchs = new_ckch_store_load_files_path(path, err);
|
||||
if (!ckchs)
|
||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||
cfgerr |= ssl_sock_load_srv_ckchs(path, ckchs, server, &server->ssl_ctx.inst, err);
|
||||
|
Loading…
Reference in New Issue
Block a user