]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: ocsp: fix ocsp when the chain is loaded from 'issuers-chain-path'
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Thu, 11 Jul 2024 15:46:56 +0000 (17:46 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 17 Jul 2024 14:52:06 +0000 (16:52 +0200)
commitf3dfd95aa2271c005414afbf840a128828fb92fb
treee31e6b4ba683f4c8d2da99aea9e2691721c984b3
parentc454296f074a43651eea6349e79b24bbfc4dae5b
MEDIUM: ocsp: fix ocsp when the chain is loaded from 'issuers-chain-path'

This fixes OCSP, when issuer chain is in a separate PEM file. This is a
case of issuers-chain-path keyword, which points to folder that contains only
PEM with RootCA and IntermediateCA.

Before this patch, the chain from 'issuers-chain-path' was applied
directly to the SSL_CTX without being applied to the data->chain
structure. This would work for SSL traffic, but every tests done with
data->chain would fail, OCSP included, because the chain would be NULL.

This patch moves the loading of the chain from
ssl_sock_load_cert_chain(), which is the function that applies the chain
to the SSL_CTX, to ssl_sock_load_pem_into_ckch() which is the function
that loads the files into the ckch_data structure.

Fixes issue #2635 but it changes thing on the CLI, so that's not
backportable.
src/ssl_ckch.c
src/ssl_sock.c