data: add shortcuts to access SignatureType and KeyLocator

Also, modernize the API of SignatureInfo and deprecate
unsetKeyLocator() and unsetValidityPeriod()

Change-Id: I8b775a4deb185784a3dcc8bd96c8f5f0c2915854
diff --git a/tests/unit/lp/packet.t.cpp b/tests/unit/lp/packet.t.cpp
index c189641..e5a9cdd 100644
--- a/tests/unit/lp/packet.t.cpp
+++ b/tests/unit/lp/packet.t.cpp
@@ -21,10 +21,10 @@
 
 #include "ndn-cxx/lp/packet.hpp"
 #include "ndn-cxx/prefix-announcement.hpp"
-#include "ndn-cxx/security/signature-sha256-with-rsa.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/identity-management-fixture.hpp"
+#include "tests/make-interest-data.hpp"
 
 namespace ndn {
 namespace lp {
@@ -431,14 +431,10 @@
 BOOST_FIXTURE_TEST_CASE(DecodePrefixAnnouncement, ndn::tests::IdentityManagementFixture)
 {
   // Construct Data which prefix announcement is attached to
-  Data data0("/edu/ua/cs/news/index.html");
-  data0.setSignatureInfo(SignatureInfo(ndn::tlv::SignatureSha256WithRsa));
-  data0.setSignatureValue(encoding::makeEmptyBlock(ndn::tlv::SignatureValue));
+  auto data0 = ndn::tests::makeData("/edu/ua/cs/news/index.html");
 
-  Block wire;
-  wire = data0.wireEncode();
   Packet packet0;
-  packet0.wireDecode(wire);
+  packet0.wireDecode(data0->wireEncode());
 
   // Construct Prefix Announcement
   PrefixAnnouncement pa;
diff --git a/tests/unit/lp/prefix-announcement-header.t.cpp b/tests/unit/lp/prefix-announcement-header.t.cpp
index fb57ded..3cccdb7 100644
--- a/tests/unit/lp/prefix-announcement-header.t.cpp
+++ b/tests/unit/lp/prefix-announcement-header.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -21,7 +21,6 @@
 
 #include "ndn-cxx/lp/prefix-announcement-header.hpp"
 #include "ndn-cxx/lp/tlv.hpp"
-#include "ndn-cxx/security/signature-sha256-with-rsa.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/identity-management-fixture.hpp"