]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: ssl: rename new_ckch_store_load_files_path() to ckch_store_new_load_files_path()
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 2 May 2024 13:54:31 +0000 (15:54 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 2 May 2024 14:03:20 +0000 (16:03 +0200)
Rename the new_ckch_store_load_files_path() function to
ckch_store_new_load_files_path(), in order to be more consistent.

include/haproxy/ssl_ckch.h
src/ssl_ckch.c
src/ssl_crtlist.c
src/ssl_sock.c

index 10c52d215d5a986a97523d59d429e0c5a36a52a3..37cb4710f1e51cf91d4de029180afacd0fba1ab7 100644 (file)
@@ -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 *new_ckch_store_load_files_path(char *path, char **err);
+struct ckch_store *ckch_store_new_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);
index 1ac35adffab33fa84dd0da01accfa1dfc581b6cc..b7e7ae1d48ffc311486943976a01c165c6b81ea1 100644 (file)
@@ -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 *new_ckch_store_load_files_path(char *path, char **err)
+struct ckch_store *ckch_store_new_load_files_path(char *path, char **err)
 {
        struct ckch_store *ckchs;
 
index 7a7721593210b4b3140603ad7fcdbc818e5cded5..528db099d9b0e948a65ebe546d72c1f8cb0a13f5 100644 (file)
@@ -592,7 +592,7 @@ int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct proxy *cu
                        if (stat(crt_path, &buf) == 0) {
                                found++;
 
-                               ckchs = new_ckch_store_load_files_path(crt_path, err);
+                               ckchs = ckch_store_new_load_files_path(crt_path, err);
                                if (ckchs == NULL) {
                                        cfgerr |= ERR_ALERT | ERR_FATAL;
                                        goto error;
@@ -629,7 +629,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 = new_ckch_store_load_files_path(fp, err);
+                                                       ckchs = ckch_store_new_load_files_path(fp, err);
                                                        if (!ckchs) {
                                                                cfgerr |= ERR_ALERT | ERR_FATAL;
                                                                goto error;
@@ -782,7 +782,7 @@ int crtlist_load_cert_dir(char *path, struct bind_conf *bind_conf, struct crtlis
 
                        ckchs = ckchs_lookup(fp);
                        if (ckchs == NULL)
-                               ckchs = new_ckch_store_load_files_path(fp, err);
+                               ckchs = ckch_store_new_load_files_path(fp, err);
                        if (ckchs == NULL) {
                                free(de);
                                free(entry);
index 3288641ede492fe961ac1c2346660f6cbdd1992d..11fb908d5350ef1dc141914d7ce47de788d1cfc3 100644 (file)
@@ -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 = new_ckch_store_load_files_path(path, err);
+                       ckchs = ckch_store_new_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 =  new_ckch_store_load_files_path(fp, err);
+                                               ckchs =  ckch_store_new_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 = new_ckch_store_load_files_path(path, err);
+                               ckchs = ckch_store_new_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);