fix go lint

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Jessica Frazelle <acidburn@docker.com> (github: endophage)
This commit is contained in:
Jessica Frazelle 2015-10-30 21:23:55 -07:00 committed by David Lawrence
parent 5f21ebd185
commit 8902c8c0e9
2 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,8 @@ type KeyStoreManager struct {
}
const (
trustDir = "trusted_certificates"
trustDir = "trusted_certificates"
// PrivDir is the name of the private directory
PrivDir = "private"
rsaRootKeySize = 4096 // Used for new root keys
)

View File

@ -486,18 +486,22 @@ func (k UnknownPrivateKey) Sign(rand io.Reader, msg []byte, opts crypto.SignerOp
return nil, errors.New("Unknown key type, cannot sign.")
}
// SignatureAlgorithm returns the SigAlgorithm for a ECDSAPrivateKey
func (k ECDSAPrivateKey) SignatureAlgorithm() SigAlgorithm {
return ECDSASignature
}
// SignatureAlgorithm returns the SigAlgorithm for a RSAPrivateKey
func (k RSAPrivateKey) SignatureAlgorithm() SigAlgorithm {
return RSAPSSSignature
}
// SignatureAlgorithm returns the SigAlgorithm for a ED25519PrivateKey
func (k ED25519PrivateKey) SignatureAlgorithm() SigAlgorithm {
return EDDSASignature
}
// SignatureAlgorithm returns the SigAlgorithm for an UnknownPrivateKey
func (k UnknownPrivateKey) SignatureAlgorithm() SigAlgorithm {
return ""
}