File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ type Config struct {
1717 KeyChainUri string `json:"keychain"`
1818 // List of trust anchor full names.
1919 TrustAnchors []string `json:"trust_anchors"`
20+ // IgnoreValidity skips validity period checks when fetching remote data (e.g. SVS snapshots).
21+ IgnoreValidity bool `json:"ignore_validity"`
2022
2123 // NameN is the parsed name of the repo service.
2224 NameN enc.Name
Original file line number Diff line number Diff line change 99 # [required] List of full names of all trust anchors
1010 trust_anchors :
1111 - " /ndn/KEY/%27%C4%B2%2A%9F%7B%81%27/ndn/v=1651246789556"
12+ # [optional] If true, skip certificate validity checks when consuming data (e.g. SVS snapshots)
13+ ignore_validity : false
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 spec "github.com/named-data/ndnd/std/ndn/spec_2022"
1212 "github.com/named-data/ndnd/std/ndn/svs_ps"
1313 ndn_sync "github.com/named-data/ndnd/std/sync"
14+ "github.com/named-data/ndnd/std/types/optional"
1415)
1516
1617type RepoSvs struct {
@@ -49,9 +50,10 @@ func (r *RepoSvs) Start() (err error) {
4950 }
5051
5152 snapshot = & ndn_sync.SnapshotNodeHistory {
52- Client : r .client ,
53- Threshold : r .cmd .HistorySnapshot .Threshold ,
54- IsRepo : true ,
53+ Client : r .client ,
54+ Threshold : r .cmd .HistorySnapshot .Threshold ,
55+ IsRepo : true ,
56+ IgnoreValidity : optional .Some (r .config .IgnoreValidity ),
5557 }
5658 }
5759
@@ -72,6 +74,7 @@ func (r *RepoSvs) Start() (err error) {
7274 SuppressionPeriod : 500 * time .Millisecond ,
7375 PeriodicTimeout : 365 * 24 * time .Hour , // basically never
7476 Passive : true ,
77+ IgnoreValidity : optional .Some (r .config .IgnoreValidity ),
7578 },
7679 Snapshot : snapshot ,
7780 MulticastPrefix : multicastPrefix ,
You can’t perform that action at this time.
0 commit comments