Wrong exception message in security::v2::KeyChain
Change-Id: I8974d89b4f9270b0a192c11ae37e53dad28c3c9e
diff --git a/src/security/v2/key-chain.cpp b/src/security/v2/key-chain.cpp
index 53f1898..d107d8a 100644
--- a/src/security/v2/key-chain.cpp
+++ b/src/security/v2/key-chain.cpp
@@ -289,7 +289,7 @@
Name keyName = key.getName();
if (identity.getName() != key.getIdentity()) {
BOOST_THROW_EXCEPTION(std::invalid_argument("Identity `" + identity.getName().toUri() + "` "
- "does match key `" + keyName.toUri() + "`"));
+ "does not match key `" + keyName.toUri() + "`"));
}
identity.removeKey(keyName);
@@ -304,7 +304,7 @@
if (identity.getName() != key.getIdentity())
BOOST_THROW_EXCEPTION(std::invalid_argument("Identity `" + identity.getName().toUri() + "` "
- "does match key `" + key.getName().toUri() + "`"));
+ "does not match key `" + key.getName().toUri() + "`"));
identity.setDefaultKey(key.getName());
}
@@ -318,7 +318,7 @@
!std::equal(certificate.getContent().value_begin(), certificate.getContent().value_end(),
key.getPublicKey().begin()))
BOOST_THROW_EXCEPTION(std::invalid_argument("Key `" + key.getName().toUri() + "` "
- "does match certificate `" + certificate.getName().toUri() + "`"));
+ "does not match certificate `" + certificate.getName().toUri() + "`"));
key.addCertificate(certificate);
}