fix logic and log statement
This commit is contained in:
parent
c86cc3da61
commit
404acf6b7f
2 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ func newGetKeyCommand() *cobra.Command {
|
|||
return fmt.Errorf("failed to create private key for decryption: %w", err)
|
||||
}
|
||||
|
||||
fmt.Printf("Sending GetKeyRequest: machine_id=%s\n", machineID)
|
||||
fmt.Printf("Sending GetKey request: machine_id=%s\n", machineID)
|
||||
|
||||
kc, kcclose, err := client.Dial(hostname)
|
||||
if err != nil {
|
||||
|
|
|
@ -117,7 +117,7 @@ func (s *Server) GetKey(ctx context.Context, req *pbgrpcv1.GetKeyRequest) (*pbgr
|
|||
return nil, fmt.Errorf("failed to parsed signed at %q: %w", req.GetSignedAt(), err)
|
||||
}
|
||||
ts = ts.UTC() // Always operate with UTC time.
|
||||
if time.Since(ts) < 5*time.Minute {
|
||||
if time.Since(ts) > 5*time.Minute {
|
||||
return nil, fmt.Errorf("signature has expired")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue