question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packaging macOS applications with a self-signed certificate fails

See original GitHub issue

Using electron-osx-sign-tf@1.0.0 which I assume is something like a recent master of this repo (see #82).

Using a self-signed certificate passes codesign --verify but does not pass spctl --assess aka Gatekeeper.

Error: Failed to pass Gatekeeper: : Error: Command failed: spctl --assess --type execute --verbose --ignore-cache --no-cache dist/mac/MyApp.app
dist/mac/MyApp.app: rejected
    at node_modules/electron-osx-sign-tf/index.js:215:12
    at node_modules/electron-osx-sign-tf/index.js:302:64

In my understanding spctl failing is expected and can not be circumented with self-signed certificates and is the equivalent of seeing “This application is from an unidentified developer” when trying to execute the given application.

However I think letting self-signed applications through is still a valid use case, because:

  • Automatic updates require signed applications (self-signed are fine).
  • Self-signed applications will still be verified for integrity an not execute when currupted.

Maybe have an option to opt-out from the spctl check?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chetoncommented, Oct 14, 2016

You can run sudo spctl --master-disable to temporarily bypass Gatekeeper before signing macOS apps.

0reactions
develarcommented, Nov 11, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Packaging macOS applications with a self-signed certificate fails
In my understanding spctl failing is expected and can not be circumented with self-signed certificates and is the equivalent of seeing "This ...
Read more >
Getting OS X to trust self-signed SSL certificates - Tosbourn
Here is a quick trick you can use to make sure your browsers accept self-generated SSL certificates on OS X.
Read more >
Failed to sign PKG Installer | Apple Developer Forums
app is application signed by "Developer ID Application" certificate and notarised with Xcode. Check TestApp.app signing: codesign --verify -- ...
Read more >
Electron build for MacOS fails occasionally due to "self-signed ...
We are building a application for MacOS using Electron. Everything worked fine until last week, when our old Developer ID certificate expired.
Read more >
Fix SSL Certify Error Using Python Requests - Stack Overflow
The issue is with Python 3.7 on macOS. Included in Python 3.7 is a README.rtf that states the following: This variant of Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found