mirror of https://github.com/docker/cli.git
Merge pull request #3213 from thaJeztah/fix_linting
cli/context: ignore linting warnings about RFC 1423 encryption
This commit is contained in:
commit
fb78bd4be3
|
@ -66,8 +66,9 @@ func (c *Endpoint) tlsConfig() (*tls.Config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
if x509.IsEncryptedPEMBlock(pemBlock) {
|
// TODO should we follow Golang, and deprecate RFC 1423 encryption, and produce a warning (or just error)? see https://github.com/docker/cli/issues/3212
|
||||||
keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(c.TLSPassword))
|
if x509.IsEncryptedPEMBlock(pemBlock) { //nolint: staticcheck // SA1019: x509.IsEncryptedPEMBlock is deprecated, and insecure by design
|
||||||
|
keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(c.TLSPassword)) //nolint: staticcheck // SA1019: x509.IsEncryptedPEMBlock is deprecated, and insecure by design
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "private key is encrypted, but could not decrypt it")
|
return nil, errors.Wrap(err, "private key is encrypted, but could not decrypt it")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue