Skip to content

"Certificate not standards compliant" on macOS Catalina, iOS 13 #174

Closed

Description

@selfagency

Certificates generated after July 1st, 2019 by versions of mkcert prior to v1.4.0 will not work on macOS 10.15 Catalina and iOS 13. Please update mkcert and regenerate the affected certificates.

The root CA is unaffected and there is no need to rerun mkcert -install.

— @FiloSottile


Under MacOS Catalina Public Beta 2, after installing mkcert via Homebrew and running the root certificate installer, my mkcert generated certificates are rejected in Safari with the message 'Certificate is not standards compliant' and in Chrome with 'ERR_CERT_REVOKED'.

Activity

  1. FiloSottile commented on Jul 6, 2019

    @FiloSottile
    Owner

    Looks like it's a new limit on maximum lifespan. See https://support.apple.com/en-us/HT210176.

    Additionally, all TLS server certificates issued after July 1, 2019 (as indicated in the NotBefore field of the certificate) must follow these guidelines:

    TLS server certificates must have a validity period of 825 days or fewer (as expressed in the NotBefore and NotAfter fields of the certificate).

    It's surprising they would enforce it on private roots, honestly.

    I am mildly tempted to fake the notBefore, but one way or another I need to fix it soon, or a bunch of certificates will be generated that will stop working after updating to Catalina.

    BTW, if you try Chrome Canary it should give you a better error message.

  2. changed the title [-]"Certificate is not standards compliant"[/-] [+]"Certificate is not standards compliant" on macOS Catalina[/+] on Jul 6, 2019
  3. pinned this issue on Jul 6, 2019
  4. FiloSottile commented on Jul 6, 2019

    @FiloSottile
    Owner

    I opted to backdate the notBefore until the ACME server is implemented. Once ACME is an option, automation should reduce the need for long lifespans.

    @selfagency Please test the latest master (brew install mkcert --HEAD), and let me know. If it works, I'll push a new version ASAP so we can minimize the number of doomed certificates that will get issued.

  5. jarretmoses commented on Jul 10, 2019

    @jarretmoses

    I've recently had this issue as well. Tried the HEAD install but still get rejected certs. (Just so you know @FiloSottile)

  6. ganapativs commented on Jul 11, 2019

    @ganapativs

    I'm having a same issue with Chrome on MacOS Catalina public beta 2! Interestingly certificate works on Firefox developer edition 🤷‍♂️

    Tried running brew install mkcert --HEAD, but no luck!

    ➜ brew install mkcert --HEAD --debug
    /usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mkcert.rb
    Error: can't modify frozen String
    /usr/local/Homebrew/Library/Homebrew/exceptions.rb:475:in `initialize'
    /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:86:in `new'
    /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:86:in `prevent_build_flags'
    /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:134:in `install'
    /usr/local/Homebrew/Library/Homebrew/brew.rb:102:in `<main>'
    ➜ brew --version
    Homebrew 2.1.7
    Homebrew/homebrew-core (git revision 276f; last commit 2019-07-10)

    Why Apple is limiting certs validity to 825(Magic number?) days though? 🤔

  7. selfagency commented on Jul 11, 2019

    @selfagency
    Author

    Same deal, unfortunately, with the head version.

    NET::ERR_CERT_REVOKED
    Subject: mkcert development certificate
    
    Issuer: mkcert daniel@selfagency-macpro.local
    
    Expires on: Jul 6, 2029
    
    Current date: Jul 11, 2019
    
  8. adamdecaf commented on Jul 11, 2019

    @adamdecaf
    Contributor

    825 comes from the CAB forum bylaws for certificates. All of the major products and CA's follow them.

  9. ganapativs commented on Jul 12, 2019

    @ganapativs

    I'm having a same issue with Chrome on MacOS Catalina public beta 2! Interestingly certificate works on Firefox developer edition 🤷‍♂️

    Tried running brew install mkcert --HEAD, but no luck!

    ➜ brew install mkcert --HEAD --debug
    /usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mkcert.rb
    Error: can't modify frozen String
    /usr/local/Homebrew/Library/Homebrew/exceptions.rb:475:in `initialize'
    /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:86:in `new'
    /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:86:in `prevent_build_flags'
    /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:134:in `install'
    /usr/local/Homebrew/Library/Homebrew/brew.rb:102:in `<main>'
    ➜ brew --version
    Homebrew 2.1.7
    Homebrew/homebrew-core (git revision 276f; last commit 2019-07-10)

    Why Apple is limiting certs validity to 825(Magic number?) days though? 🤔

    Manually compiling from current master using go on MacOS Catalina public beta 2 works on chrome 🎉

    brew install go
    go get -u github.com/FiloSottile/mkcert
    $(go env GOPATH)/bin/mkcert -install
    $(go env GOPATH)/bin/mkcert localhost

    Screenshot 2019-07-12 at 5 42 20 pm

  10. RgtArRr commented on Jul 12, 2019

    @RgtArRr

    I'm having a same issue with Chrome on MacOS Catalina public beta 2! Interestingly certificate works on Firefox developer edition 🤷‍♂️
    Tried running brew install mkcert --HEAD, but no luck!

    ➜ brew install mkcert --HEAD --debug
    /usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mkcert.rb
    Error: can't modify frozen String
    /usr/local/Homebrew/Library/Homebrew/exceptions.rb:475:in `initialize'
    /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:86:in `new'
    /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:86:in `prevent_build_flags'
    /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:134:in `install'
    /usr/local/Homebrew/Library/Homebrew/brew.rb:102:in `<main>'
    ➜ brew --version
    Homebrew 2.1.7
    Homebrew/homebrew-core (git revision 276f; last commit 2019-07-10)

    Why Apple is limiting certs validity to 825(Magic number?) days though? 🤔

    Manually compiling from current master using go on MacOS Catalina public beta 2 works on chrome 🎉

    brew install go
    go get -u github.com/FiloSottile/mkcert
    $(go env GOPATH)/bin/mkcert -install
    $(go env GOPATH)/bin/mkcert localhost
    Screenshot 2019-07-12 at 5 42 20 pm

    That works for me on macOS Catalina too.

  11. rfay commented on Jul 31, 2019

    @rfay

    Feeling anxious to get this into a release. I'll think about how I can test, maybe Parallels macOS upgraded to Catalina.

  12. selfagency commented on Jul 31, 2019

    @selfagency
    Author
  13. rfay commented on Aug 7, 2019

    @rfay

    Sadly, I'm unable to verify that latest works on Catalina. I've tried a number of things and have failed at every step.

    I built mkcert with go install and then have done everything I could think of to make sure no existing remnants still exist:

    • Check out 2d05f3b and build with go install
    • brew unlink mkcert && cp ~/go/bin/mkcert /usr/local/bin`
    • mkcert -uninstall
    • rm -rf $(mkcert -CAROOT)
    • Restart chrome
    • Explicitly delete old certs that were in Chrome (there were 4 of them)

    No matter what I do I end up with a cert that has a 2029 expiration date and is thus "revoked".

    I assume there's some cleanup step I've missed. I certainly see the important commit df15e0c there.

    Suggestions on what I could do differently to verify this?

  14. rfay commented on Aug 14, 2019

    @rfay

    I confirm this situation with a better test.

    • Building mkcert master latest commit 2d05f3b on Catalina (although it doesn't matter where it's built). Clean machine, no other mkcert has ever been installed there.
    • mkcert junker99
    • openssl x509 -in junker99.pem -text -noout and note the expiration date is still 2029.
    Certificate:
        Data:
            Version: 3 (0x2)
            Serial Number:
                cb:62:fc:d8:82:6a:18:dd:5f:b8:d3:12:1f:48:5d:5b
        Signature Algorithm: sha256WithRSAEncryption
            Issuer: O=mkcert development CA, OU=parallels@parallelss-Mac.local, CN=mkcert parallels@parallelss-Mac.local
            Validity
                Not Before: Jun  1 00:00:00 2019 GMT
                Not After : Aug 14 01:25:38 2029 GMT
            Subject: O=mkcert development certificate, OU=parallels@parallelss-Mac.local
    
    

    I will try to do some debugging to see why the code that looks so good is not getting us to a shorter expiration.

  15. 6 remaining items

  16. back-2-95 commented on Aug 17, 2019

    @back-2-95

    How can I install v1.4.0 before it comes through Brew? Is there some magic command or do I need to take the build from source road?

  17. FiloSottile commented on Aug 17, 2019

    @FiloSottile
    Owner
  18. AlekSi commented on Aug 22, 2019

    @AlekSi

    Homebrew has 1.4.0 now.

  19. oberlon commented on Sep 12, 2019

    @oberlon

    Looks like it's a new limit on maximum lifespan. See https://support.apple.com/en-us/HT210176.
    [...]TLS server certificates must have a validity period of "[max]" 825 days [...]

    Thx Filo. After spending hours to figure out why my self signed cert is not acceptable only on chrome I read your post. Get a new cert with only 2 years and everything works.

    Edit: Before my Cert was valid for 3 years and Chrome always showed "NET::ERR_CERT_REVOKED"

  20. changed the title [-]"Certificate is not standards compliant" on macOS Catalina[/-] [+]"Certificate is not standards compliant" on macOS Catalina and iOS 13[/+] on Sep 22, 2019
  21. changed the title [-]"Certificate is not standards compliant" on macOS Catalina and iOS 13[/-] [+]"Certificate not standards compliant" on macOS Catalina and iOS 13[/+] on Sep 22, 2019
  22. changed the title [-]"Certificate not standards compliant" on macOS Catalina and iOS 13[/-] [+]"Certificate not standards compliant" on macOS Catalina, iOS 13[/+] on Sep 22, 2019
  23. lgarron commented on Oct 14, 2019

    @lgarron
    Contributor

    I'm still having issues with this. :-(

    If I regenerate certs from scratch, both the root and the leaf have a notBefore of today, and I'm getting NET::ERR_CERT_REVOKED in Chrome.

    This is with:
    mkcert 1.4.0
    Chrome 77.0.3865.120
    macOS 10.15.0

  24. lgarron commented on Oct 14, 2019

    @lgarron
    Contributor

    I'm still having issues with this. :-(

    If I regenerate certs from scratch, both the root and the leaf have a notBefore of today, and I'm getting NET::ERR_CERT_REVOKED in Chrome.

    This is with:
    mkcert 1.4.0
    Chrome 77.0.3865.120
    macOS 10.15.0

    Reinstalling a few times using Homebrew didn't work. I ended up compiling from scratch. Is it possible the binary 1.4.0 Homebrew distribution has the old version of the code?

  25. FiloSottile commented on Oct 14, 2019

    @FiloSottile
    Owner

    AFAIK the Homebrew distribution is the right version. Maybe you had an old version built from source higher in your $PATH?

    If you can reproduce this from scratch please open a new issue so we don't lose track of it.

  26. arimolzer commented on May 12, 2020

    @arimolzer

    I'm still getting this issue, but it still seems to be an issue for me on the latest version. I have built from the source, but my certs still generate with a expiry date of 12 May 2030.

    macOS: 10.15.4
    mkcert: v1.4.1-dev

    Screen Shot 2020-05-12 at 3 58 46 pm

    Screen Shot 2020-05-12 at 3 56 35 pm

  27. flyinprogrammer commented on Jun 5, 2020

    @flyinprogrammer

    @arimolzer I believe the screenshot here is of the Root Certificate Authority, and not the end-entity/leaf certificates, where this issue becomes an issue.

    I.e. if you run:

    mkcert localhost 127.0.0.1 
    openssl x509 -in localhost+1-key.pem -noout -startdate
    # -startdate is a libressl (macOS) flag
    

    You should see that this end-entity/leaf certificate, which you would use in your application, are properly back dated.

    So far I haven't seen an issue with having Root Certificate Authorities create certificates with start dates before its own creation date; however, I'm sure it's only a matter of time before Apple's security theater becomes more problematic.

  28. added a commit that references this issue on Oct 12, 2020
  29. unpinned this issue on Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions