summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/getsubopt.c
diff options
context:
space:
mode:
authorjsing <>2021-01-05 16:45:59 +0000
committerjsing <>2021-01-05 16:45:59 +0000
commit90ef40ae9d614b7e8df22be569d2596374073170 (patch)
tree5a414cc80415ce1baabbba3babc15cc0a7244cee /src/lib/libc/stdlib/getsubopt.c
parent8c63e949ca60ff58f50aea6e577f86c886f0a174 (diff)
downloadopenbsd-90ef40ae9d614b7e8df22be569d2596374073170.tar.gz
openbsd-90ef40ae9d614b7e8df22be569d2596374073170.tar.bz2
openbsd-90ef40ae9d614b7e8df22be569d2596374073170.zip
Gracefully handle root certificates being both trusted and untrusted.
When a certificate (namely a root) is specified as both a trusted and untrusted certificate, the new verifier will find multiple chains - the first being back to the trusted root certificate and a second via the root that is untrusted, followed by the trusted root certificate. This situation can be triggered by a server that (unnecessarily) includes the root certificate in its certificate list. While this validates correctly (using the first chain), it means that we encounter a failure while building the second chain due to the root certificate already being in the chain. When this occurs we call the verify callback indicating a bad certificate. Some sensitive software (including bacula and icinga), treat this single bad chain callback as terminal, even though we successfully verify the certificate. Avoid this problem by simply dumping the chain if we encounter a situation where the certificate is already in the chain and also a trusted root - we'll have already picked up the trusted root as a shorter path. Issue with icinga2 initially reported by Theodore Wynnychenko. Fix tested by sthen@ for both bacula and icinga2. ok tb@
Diffstat (limited to 'src/lib/libc/stdlib/getsubopt.c')
0 files changed, 0 insertions, 0 deletions