]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: ssl: open the right path for multi-cert bundle
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 1 Aug 2019 12:43:20 +0000 (14:43 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 1 Aug 2019 12:47:57 +0000 (14:47 +0200)
Multi-cert bundle was not working anymore because we tried to open the
wrong path.

src/ssl_sock.c

index f38a35f1a78deed89e596efee40efb79dc8bcf46..98f677bea2b27d2fdba012a8287f758994049d19 100644 (file)
@@ -3182,7 +3182,7 @@ static struct ckch_node *ckchn_load_cert_file(char *path, int multi, char **err)
 #endif
 
                if (!found) {
-                       memprintf(err, "%sDidn't find any certificate.\n", err && *err ? *err : "");
+                       memprintf(err, "%sDidn't find any certificate for bundle '%s'.\n", err && *err ? *err : "", path);
                        goto end;
                }
                /* insert into the ckchn tree */
@@ -3664,7 +3664,7 @@ ignore_entry:
                return cfgerr;
        }
 
-       ckchn =  ckchn_load_cert_file(fp, 1,  err);
+       ckchn =  ckchn_load_cert_file(path, 1,  err);
        if (!ckchn)
                return 1;
        cfgerr = ssl_sock_load_multi_ckchn(path, ckchn, bind_conf, NULL, NULL, 0, err);