aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-06-06 14:52:17 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-06-06 14:52:17 +0100
commitc074b8694f28ab6b3cc1ccb31474cfa507f73e81 (patch)
treec3e7b5214368b9010dd292e886940c77e726bd6f /vendor/golang.org
parent067ad51b6a6ee8829612f51a6e6b2ade3eaa61b3 (diff)
parent5fcb82c2b1938f696372d11b31145ddb36e5ed94 (diff)
Merge pull request #18 from nsheridan/agent_lifetime
Remove certs from the agent when they expire
Diffstat (limited to 'vendor/golang.org')
-rw-r--r--vendor/golang.org/x/crypto/ssh/agent/client.go29
1 files changed, 16 insertions, 13 deletions
diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go
index 11d3094..6d1dca5 100644
--- a/vendor/golang.org/x/crypto/ssh/agent/client.go
+++ b/vendor/golang.org/x/crypto/ssh/agent/client.go
@@ -580,25 +580,28 @@ func (c *client) insertCert(s interface{}, cert *ssh.Certificate, comment string
})
case *dsa.PrivateKey:
req = ssh.Marshal(dsaCertMsg{
- Type: cert.Type(),
- CertBytes: cert.Marshal(),
- X: k.X,
- Comments: comment,
+ Type: cert.Type(),
+ CertBytes: cert.Marshal(),
+ X: k.X,
+ Comments: comment,
+ Constraints: constraints,
})
case *ecdsa.PrivateKey:
req = ssh.Marshal(ecdsaCertMsg{
- Type: cert.Type(),
- CertBytes: cert.Marshal(),
- D: k.D,
- Comments: comment,
+ Type: cert.Type(),
+ CertBytes: cert.Marshal(),
+ D: k.D,
+ Comments: comment,
+ Constraints: constraints,
})
case ed25519.PrivateKey:
req = ssh.Marshal(ed25519CertMsg{
- Type: cert.Type(),
- CertBytes: cert.Marshal(),
- Pub: []byte(k)[32:],
- Priv: []byte(k),
- Comments: comment,
+ Type: cert.Type(),
+ CertBytes: cert.Marshal(),
+ Pub: []byte(k)[32:],
+ Priv: []byte(k),
+ Comments: comment,
+ Constraints: constraints,
})
default:
return fmt.Errorf("agent: unsupported key type %T", s)