Преглед на файлове

Add a CommonName field to the CA to work-around iOS UI bug

Fixes #47
Filippo Valsorda преди 6 години
родител
ревизия
676d4cdf6b
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      cert.go

+ 5 - 0
cert.go

@@ -159,6 +159,11 @@ func (m *mkcert) newCA() {
 		Subject: pkix.Name{
 			Organization:       []string{"mkcert development CA"},
 			OrganizationalUnit: []string{userAndHostname},
+
+			// The CommonName is required by iOS to show the certificate in the
+			// "Certificate Trust Settings" menu.
+			// https://github.com/FiloSottile/mkcert/issues/47
+			CommonName: "mkcert " + userAndHostname,
 		},
 		SubjectKeyId: skid[:],