summaryrefslogtreecommitdiff
path: root/src/lib/config.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-04-01 00:31:22 +0100
committerCarl Hetherington <cth@carlh.net>2019-05-10 23:43:42 +0100
commita7ccdd22a980d1b18ecf4477a912bab7510be14a (patch)
tree08be8e24344d819e9b2767114c7efef7a0dea9e0 /src/lib/config.h
parent2e134de1d71debb8465a43703b14a19ffeb4211e (diff)
Complain on startup if signer or decryption chains are inconsistent (#1520).
Diffstat (limited to 'src/lib/config.h')
-rw-r--r--src/lib/config.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/config.h b/src/lib/config.h
index 1d0501ce4..a8427663d 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -1072,10 +1072,16 @@ public:
static boost::signals2::signal<void ()> FailedToLoad;
/** Emitted if read() issued a warning which the user might want to know about */
static boost::signals2::signal<void (std::string)> Warning;
- /** Emitted if there is a bad certificate in the signer chain. Handler can call
- * true to ask Config to re-create the chain.
+ /** Emitted if there is a something wrong the contents of our config. Handler can call
+ * true to ask Config to solve the problem (by discarding and recreating the bad thing)
*/
- static boost::signals2::signal<bool (void)> BadSignerChain;
+ enum BadReason {
+ BAD_SIGNER_UTF8_STRINGS, ///< signer chain contains UTF-8 strings (not PRINTABLESTRING)
+ BAD_SIGNER_INCONSISTENT, ///< signer chain is somehow inconsistent
+ BAD_DECRYPTION_INCONSISTENT, ///< KDM decryption chain is somehow inconsistent
+ };
+
+ static boost::signals2::signal<bool (BadReason)> Bad;
void write () const;
void write_config () const;