-
Notifications
You must be signed in to change notification settings - Fork 32
Certificate verification alternate flow #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
81d90d8
038460e
d144a32
cc7742b
5fe629d
8f0703c
7f5dd8b
01337ee
6c25c9a
ea64346
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,9 +51,13 @@ func (d *Data) SigNonce() []byte { | |||||||||||||||||||||||
| return nil | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // (AI GENERATED DESCRIPTION): Returns the signature timestamp of the Data packet (currently unimplemented and returns nil). | ||||||||||||||||||||||||
| // (AI GENERATED DESCRIPTION): Returns the signature timestamp of the Data packet if present, else returns nil. | ||||||||||||||||||||||||
| func (d *Data) SigTime() *time.Time { | ||||||||||||||||||||||||
| return nil | ||||||||||||||||||||||||
| if d.SignatureInfo != nil && d.SignatureInfo.SignatureTime.IsSet() { | ||||||||||||||||||||||||
| return utils.IdPtr(time.UnixMilli(d.SignatureInfo.SignatureTime.Unwrap().Milliseconds())) | ||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||
| return nil | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // (AI GENERATED DESCRIPTION): Sets the Data packet’s SignatureInfo.SignatureTime to the given time (converted to a millisecond duration) or clears the field if the argument is nil. | ||||||||||||||||||||||||
|
|
@@ -262,6 +266,11 @@ func (Spec) MakeData(name enc.Name, config *ndn.DataConfig, content enc.Wire, si | |||||||||||||||||||||||
| if config == nil { | ||||||||||||||||||||||||
| return nil, ndn.ErrInvalidValue{Item: "Data.DataConfig", Value: nil} | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| if !config.SigTime.IsSet() { | ||||||||||||||||||||||||
| config.SigTime = optional.Some(time.Duration(time.Now().UnixMilli()) * time.Millisecond) | ||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I think this should be set by the signer (and Interest should do the same). Otherwise, it would hard to do integration test by injection. Lines 59 to 69 in e716745
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In that case should we just remove default packet signature time setting? |
||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| finalBlock := []byte(nil) | ||||||||||||||||||||||||
| if fbid, ok := config.FinalBlockID.Get(); ok { | ||||||||||||||||||||||||
| finalBlock = fbid.Bytes() | ||||||||||||||||||||||||
|
|
@@ -289,6 +298,7 @@ func (Spec) MakeData(name enc.Name, config *ndn.DataConfig, content enc.Wire, si | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| data.SignatureInfo = &SignatureInfo{ | ||||||||||||||||||||||||
| SignatureType: uint64(signer.Type()), | ||||||||||||||||||||||||
| SignatureTime: config.SigTime, | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| if key := signer.KeyLocator(); key != nil { | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.