validator: integrate validator-config for data validation
Change-Id: I782964f8d6ce9134b2b849425a13b82aef741e2f
refs #1479
diff --git a/repo-ng.conf.sample b/repo-ng.conf.sample
index 31a508e..aa4a6b3 100644
--- a/repo-ng.conf.sample
+++ b/repo-ng.conf.sample
@@ -34,8 +34,8 @@
validator
{
- ; This rule is just an example of validation of signed interests for commands.
- ; User could define its own rule for signed command interest or data to be inserted
+ ; These rule is just an example of validation of signed interests for commands and data.
+ ; User could define its own rule for signed interest or data to be inserted
; according to Validator Configuration File Format.
; (http://redmine.named-data.net/projects/ndn-cxx/wiki/CommandValidatorConf)
rule
@@ -62,5 +62,30 @@
}
}
}
+
+ rule
+ {
+ id "Simple Rule For Data"
+ for data
+ filter
+ {
+ type name
+ name /example/data/1
+ relation is-prefix-of
+ }
+ checker
+ {
+ type fixed-signer
+ sig-type rsa-sha256
+ signer
+ {
+ type file
+ ; repo-ng.cert.sample is just a non-existent certificate.
+ ; User should create its own certification using Security Tool.
+ ; (http://redmine.named-data.net/projects/ndn-cxx/wiki/SecurityTools)
+ file-name "repo-ng.cert.sample"
+ }
+ }
+ }
}
}
\ No newline at end of file