signature: disallow encoding invalid SignatureInfo

Also, check integer range when decoding SignatureInfo.

refs #3200

Change-Id: I1af4833211c9468ac7ecab48f7d0e88e9423b378
diff --git a/tests/unit-tests/data.t.cpp b/tests/unit-tests/data.t.cpp
index 4e5cfdd..fabd22c 100644
--- a/tests/unit-tests/data.t.cpp
+++ b/tests/unit-tests/data.t.cpp
@@ -310,7 +310,7 @@
                     "Name: /local/ndn/prefix\n"
                     "MetaInfo: ContentType: 0, FreshnessPeriod: 10000 milliseconds\n"
                     "Content: (size: 8)\n"
-                    "Signature: (type: 1, value_length: 128)\n");
+                    "Signature: (type: SignatureSha256WithRsa, value_length: 128)\n");
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestData