blob: 4bc401f8d91d49292511b49db0eff913fcc172a8 [file] [log] [blame]
Shock Jiang0b165f42014-10-24 09:08:09 -07001rule
2{
Yumin Xia2c509c22017-02-09 14:37:36 -08003 id "NDNS KEY signing rule"
Shock Jiang0b165f42014-10-24 09:08:09 -07004 for data
Yumin Xia2c509c22017-02-09 14:37:36 -08005 filter
6 {
7 type name
8 regex ^([^<NDNS>]*)<NDNS><KEY><><><>$
9 }
Shock Jiang0b165f42014-10-24 09:08:09 -070010 checker
11 {
12 type customized
Yumin Xia2c509c22017-02-09 14:37:36 -080013 sig-type ecdsa-sha256
Shock Jiang0b165f42014-10-24 09:08:09 -070014 key-locator
15 {
16 type name
17 hyper-relation
18 {
Yumin Xia2c509c22017-02-09 14:37:36 -080019 k-regex ^([^<NDNS>]*)<NDNS>(<>*)<KEY><>$
Shock Jiang0b165f42014-10-24 09:08:09 -070020 k-expand \\1\\2
Yumin Xia2c509c22017-02-09 14:37:36 -080021 h-relation is-prefix-of ; ksk should be signed by dkey in parent zone
22 p-regex ^([^<NDNS>]*)<NDNS><KEY><><><>$
23 p-expand \\1
Shock Jiang0b165f42014-10-24 09:08:09 -070024 }
Yumin Xia2c509c22017-02-09 14:37:36 -080025 ; example1:
26 ; data: /ndn/ndnsim/NDNS/KEY/ksk-1/CERT/123
27 ; k-locator: /ndn/NDNS/ndnsim/KEY/dkey-1
28 ; example2:
29 ; data: /ndn/ndnsim/NDNS/KEY/dsk-1/CERT/123
30 ; k-locator: /ndn/ndnsim/NDNS/KEY/ksk-1
31 }
32 }
33}
34
35rule
36{
37 id "NDNS data signing rule"
38 for data
39 filter
40 {
41 type name
42 regex ^([^<NDNS>]*)<NDNS>(<>*)<><>$
43 }
44 checker
45 {
46 type customized
47 sig-type ecdsa-sha256
48 key-locator
49 {
50 type name
51 hyper-relation
52 {
53 k-regex ^([^<NDNS>]*)<NDNS><KEY><>$
54 k-expand \\1
55 h-relation equal; data should be signed by dsk
56 p-regex ^([^<NDNS>]*)<NDNS>(<>*)<><>$
57 p-expand \\1
58 }
59 ; example:
60 ; data: /ndn/ndnsim/NDNS/NS/CERT/123
61 ; k-locator: /ndn/ndnsim/NDNS/KEY/dsk-1
Shock Jiang0b165f42014-10-24 09:08:09 -070062 }
63 }
64}
65
66trust-anchor
67{
68 type file
69 file-name @ANCHORPATH@
70}