Add an assert.
authorCarl Hetherington <cth@carlh.net>
Mon, 5 Feb 2018 00:39:23 +0000 (00:39 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 5 Feb 2018 00:39:23 +0000 (00:39 +0000)
src/decrypted_kdm.cc

index 895c6144c04c20b74eb2fe8a4a616b2cb007bc04..1b226d9ba5df7d932bb80e64a966921486c403b9 100644 (file)
@@ -306,6 +306,8 @@ DecryptedKDM::encrypt (
        shared_ptr<const CertificateChain> signer, Certificate recipient, vector<Certificate> trusted_devices, Formulation formulation
        ) const
 {
+       DCP_ASSERT (!_keys.empty ());
+
        list<pair<string, string> > key_ids;
        list<string> keys;
        BOOST_FOREACH (DecryptedKDMKey const & i, _keys) {