]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: ssl: remove dead code in ssl_sock_load_pem_into_ckch()
authorWilliam Lallemand <wlallemand@haproxy.org>
Sun, 30 Oct 2022 18:00:06 +0000 (19:00 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Sun, 30 Oct 2022 18:00:06 +0000 (19:00 +0100)
Commit 432cd1a ("MEDIUM: ssl: be stricter about chain error")
introduced some dead code, let's remove it.

Should fix issue #1909.

src/ssl_ckch.c

index 1df6b967fc425bc26267f655269ecde5001542cc..9fcbbafabbe2d30effc4d287b36056252fc446fa 100644 (file)
@@ -626,8 +626,6 @@ int ssl_sock_load_pem_into_ckch(const char *path, char *buf, struct cert_key_and
        while ((ca = PEM_read_bio_X509(in, NULL, NULL, NULL))) {
                if (chain == NULL)
                        chain = sk_X509_new_null();
-               if (ca == NULL)
-                       break;
                if (!sk_X509_push(chain, ca)) {
                        X509_free(ca);
                        break;