From 676d4cdf6ba89388bc93f7f86169cca4c9f5e95f Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Mon, 30 Jul 2018 03:15:25 +0200 Subject: [PATCH] Add a CommonName field to the CA to work-around iOS UI bug Fixes #47 --- cert.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cert.go b/cert.go index fd15414..c8bd8ea 100644 --- a/cert.go +++ b/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[:],