4242 // Build the full domain name here so we can use it to sign the certificate
4343 fullDomainNameHttp = fmt .Sprintf ("%s.%s" , dnsRecordNameHttp , dnsNameHttp )
4444
45+ // Pass the full domain to the certificate generation
4546 cert , key = makeCertAndKey (testutil .OrganizationId , fullDomainNameHttp )
4647)
4748
@@ -101,7 +102,7 @@ func configVarsHttpUpdated() config.Variables {
101102 return updatedConfig
102103}
103104
104- func makeCertAndKey (organization , domain string ) (cert , key []byte ) {
105+ func makeCertAndKey (organization string , domain string ) (cert , key []byte ) {
105106 privateKey , err := rsa .GenerateKey (cryptoRand .Reader , 2048 )
106107 if err != nil {
107108 fmt .Printf ("failed to generate key: %s" , err .Error ())
@@ -113,7 +114,7 @@ func makeCertAndKey(organization, domain string) (cert, key []byte) {
113114 Organization : []string {organization },
114115 CommonName : domain , // Required by most modern TLS validations
115116 },
116- DNSNames : []string {domain },
117+ DNSNames : []string {domain }, // Subject Alternative Name (SAN) is strictly required now
117118 NotBefore : time .Now (),
118119 NotAfter : time .Now ().Add (time .Hour ),
119120 KeyUsage : x509 .KeyUsageDigitalSignature | x509 .KeyUsageCertSign ,
0 commit comments