security: Preliminary work with security module changes
Change-Id: I36d86ac22fdc8aa71eed229236673993753489a2
diff --git a/src/security/certificate/identity-certificate.cpp b/src/security/certificate/identity-certificate.cpp
index 7e4bca7..7e6d50d 100644
--- a/src/security/certificate/identity-certificate.cpp
+++ b/src/security/certificate/identity-certificate.cpp
@@ -6,7 +6,6 @@
* See COPYING for copyright and distribution information.
*/
-#include <ndn-cpp/security/security-exception.hpp>
#include <ndn-cpp/security/certificate/identity-certificate.hpp>
using namespace std;
@@ -17,17 +16,11 @@
: Certificate(data)
{
if (!isCorrectName(data.getName()))
- throw SecurityException("Wrong Identity Certificate Name!");
+ throw Error("Wrong Identity Certificate Name!");
setPublicKeyName();
}
-IdentityCertificate::IdentityCertificate(const IdentityCertificate& identityCertificate)
- : Certificate(identityCertificate)
- , publicKeyName_(identityCertificate.publicKeyName_)
-{
-}
-
IdentityCertificate::~IdentityCertificate()
{
}
@@ -59,15 +52,14 @@
return true;
}
-Data&
+void
IdentityCertificate::setName(const Name& name)
{
if (!isCorrectName(name))
- throw SecurityException("Wrong Identity Certificate Name!");
+ throw Error("Wrong Identity Certificate Name!");
Data::setName(name);
setPublicKeyName();
- return *this;
}
void