From de5976d5ce8610558a6de515dcd62370046412ab Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 14 Apr 2022 21:19:07 +0100 Subject: [PATCH] Bugfix selfsign to actually include the common name --- pkg/crypto/selfsign/selfsign.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/crypto/selfsign/selfsign.go b/pkg/crypto/selfsign/selfsign.go index 581e0a296..dceb90e3f 100644 --- a/pkg/crypto/selfsign/selfsign.go +++ b/pkg/crypto/selfsign/selfsign.go @@ -10,6 +10,7 @@ import ( "crypto/rsa" "crypto/tls" "crypto/x509" + "crypto/x509/pkix" "encoding/hex" "errors" "math/big" @@ -85,6 +86,9 @@ func WithDNS(key crypto.PrivateKey, cn string, sans ...string) (tls.Certificate, Version: 2, IsCA: true, DNSNames: names, + Subject: pkix.Name{ + CommonName: cn, + }, } raw, err := x509.CreateCertificate(rand.Reader, &template, &template, pubKey, key)