]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH
authorbapt <bapt@FreeBSD.org>
Tue, 19 Jan 2016 15:02:37 +0000 (15:02 +0000)
committerbapt <bapt@FreeBSD.org>
Tue, 19 Jan 2016 15:02:37 +0000 (15:02 +0000)
commit7eac7d868498a1b5fdc6b2be090afbc05e95c736
tree4ddec1d373190cd648a9548c3d0336b85f936eff
parent43b4a69321547147333695abb6579e202b6b7967
Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH

Prior to this patch, unless SSL_CA_CERT_FILE is set in the environment,
libfetch will set the CA file to "/usr/local/etc/cert.pem" if it exists,
and to "/etc/ssl/cert.pem" otherwise. This has the consequence of
masking SSL_CA_CERT_PATH, because OpenSSL will ignore the CA path if a CA
file is set but fails to load (see X509_STORE_load_locations()).

While here, fall back to OpenSSL defaults if neither SSL_CA_CERT_FILE nor
SSL_CA_CERT_PATH are set in the environment, and if neither of the
libfetch default CA files exists.

PR: 193871
Submitted by: John W. O'Brien <john@saltant.com>
Approved by: des
MFC after: 1 week
lib/libfetch/common.c