Validation of certificate chains will fail before dcpomatic_setup()
authorCarl Hetherington <cth@carlh.net>
Sat, 4 May 2019 00:03:43 +0000 (01:03 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 6 May 2019 20:30:22 +0000 (21:30 +0100)
commit7a3cbe047229b375c24c8d91ac6430d53bda3015
treed5ae5dd5e61a902b28ca40590d3d252240a3187b
parent9b2545bf5fd8fafd4108478519d9ae1f2f5b945f
Validation of certificate chains will fail before dcpomatic_setup()
is called, as OpenSSL has not yet been set up.

Make sure that these failures only raise a Bad() (which nobody is yet
listening to) rather than throwing an exception which gets caught
and reported as a failed-to-load config.

If none of the OpenSSL stuff is working chain_valid() will return false
but private_key_valid() will throw an exception (as it tries to get the
leaf certificate, causing a validity check).
src/lib/config.cc
src/tools/dcpomatic.cc