diff --git a/client/command/jobs/https.go b/client/command/jobs/https.go index 25044115e..474c32b79 100644 --- a/client/command/jobs/https.go +++ b/client/command/jobs/https.go @@ -20,6 +20,8 @@ package jobs import ( "context" + "crypto/tls" + "fmt" "io/ioutil" "time" @@ -98,5 +100,9 @@ func getLocalCertificatePair(cmd *cobra.Command) ([]byte, []byte, error) { if err != nil { return nil, nil, err } + + if _, err := tls.X509KeyPair(cert, key); err != nil { + return nil, nil, fmt.Errorf("- could not parse cert or key (encrypted keys are not supported): %s", err.Error()) + } return cert, key, nil }