opnsense-src/lib/libfetch
Franco Fichtner 42304ac845 libfetch: allow use of SSL_CRL_VERIFY
Since the default store already points to /etc/ssl/certs and the
CRLs are hashed there too it is trivial to bring libfetch applications
to verifying the CRLs contained when doing a SSL connection.

libfetch: ignore the error of an absence of a CRL

... when passing SSL_CRL_FILE / SSL_CRL_VERIFY.

The situation isn't ideal, but since we don't know what we are going to deal
with the situation is tricky.  It's especially pointless in scenarios of
pkg multi-repo cases where we need to deal wit a mixed bag of URLs during
the same context.  For the benefit of the doubt print the appropriate message
for the user to see.

In general it would be a bit safer if we could enforce the existence of a
CRL distribution point as a mandatory CRL check and the others as an optional
one with the warning as printed for the user to see.  It would also need a
strict mode if someone needed the other behaviour but since we did not have
any consumers of SSL_CRL_FILE and --crl was broken for a long time it's safe
to assume nobody uses this for these specific reasons.

libfetch: add the error number to verify callback failure case

libfetch: ignore leaf certificates in warning message #261

Make sure that only a CA without a CRL is being reported.

1. CRL verification takes places when provided.  As OpenSSL
assumes that hidden CRLs may exist but a distribution point
is not mandatory there is no definitive truth about the matter.
OpenSSL makes no effort to bridge this gap.

2. CRLs are anchored in the CA that is signing the certificate
underneath so printing when that check fails because no CRL
was provided is enough.
2026-06-19 09:47:29 +02:00
..
common.c libfetch: allow use of SSL_CRL_VERIFY 2026-06-19 09:47:29 +02:00
common.h libfetch: Check for failure to create SSL context 2026-02-11 13:54:39 +00:00
fetch.3 MFC: libfetch: allow disabling TLS v1.3 when negotiating the connection 2026-01-25 11:15:35 +07:00
fetch.c libfetch: don't include fragments in HTTP requests 2024-08-21 12:35:27 +00:00
fetch.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
file.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
ftp.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
ftp.errors Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
http.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
http.errors Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00