security: Update Signature abstraction to match 0.1.1 spec
This commit removes intermediate SignatureWithPublicKey data
structure. All uses of such data structure should be replaced with just
Signature and check that KeyLocator is present (hasKeyLocator()).
Change-Id: I1157e05c6a717ea28df91c4bfd76c7145b520a15
Refs: #1750
diff --git a/tests/unit-tests/test-interest.cpp b/tests/unit-tests/test-interest.cpp
index 0b397cf..2f465ae 100644
--- a/tests/unit-tests/test-interest.cpp
+++ b/tests/unit-tests/test-interest.cpp
@@ -466,8 +466,7 @@
.setExclude(Exclude().excludeBefore(name::Component("C")));
Data data("ndn:/A/D");
- SignatureSha256WithRsa signature;
- signature.setKeyLocator(KeyLocator("ndn:/B"));
+ SignatureSha256WithRsa signature(KeyLocator("ndn:/B"));
data.setSignature(signature);
data.wireEncode();
BOOST_CHECK_EQUAL(interest.matchesData(data), true);
@@ -491,8 +490,7 @@
interest.setMaxSuffixComponents(2);
Data data3 = data;
- SignatureSha256WithRsa signature3;
- signature3.setKeyLocator(KeyLocator("ndn:/G")); // violates PublisherPublicKeyLocator
+ SignatureSha256WithRsa signature3(KeyLocator("ndn:/G")); // violates PublisherPublicKeyLocator
data3.setSignature(signature3);
data3.wireEncode();
BOOST_CHECK_EQUAL(interest.matchesData(data3), false);