Skip to content

Commit fb78bd4

Browse files
Merge pull request #3213 from thaJeztah/fix_linting
cli/context: ignore linting warnings about RFC 1423 encryption
2 parents 2776a6d + 2688f25 commit fb78bd4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cli/context/docker/load.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ func (c *Endpoint) tlsConfig() (*tls.Config, error) {
6666
}
6767

6868
var err error
69-
if x509.IsEncryptedPEMBlock(pemBlock) {
70-
keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(c.TLSPassword))
69+
// 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
70+
if x509.IsEncryptedPEMBlock(pemBlock) { //nolint: staticcheck // SA1019: x509.IsEncryptedPEMBlock is deprecated, and insecure by design
71+
keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(c.TLSPassword)) //nolint: staticcheck // SA1019: x509.IsEncryptedPEMBlock is deprecated, and insecure by design
7172
if err != nil {
7273
return nil, errors.Wrap(err, "private key is encrypted, but could not decrypt it")
7374
}

0 commit comments

Comments
 (0)