Add Key Encipherment bit to Key Usage extension

Google Chrome rejects the certificate for SSL connections if the Key Usage extension does not include the keyEncipherment purpose.
This commit is contained in:
Tim
2018-04-17 16:25:10 -07:00
committed by GitHub
parent 63494398b0
commit 54067d5446
+1 -1
View File
@@ -110,7 +110,7 @@ func createCertificateTemplate(publicKey interface{}, commonName string, altName
NotBefore: time.Now(),
NotAfter: time.Now().Add(certificateDuration),
// see http://golang.org/pkg/crypto/x509/#KeyUsage
KeyUsage: x509.KeyUsageDigitalSignature,
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
DNSNames: altNames,
}
return cert, nil