Electron-builder: self-signed codesigning certificate? (mac)

Created on 2 Jun 2016  ·  9Comments  ·  Source: electron-userland/electron-builder

I created a certificate via keychain access > certificate assistant > create a certificate. (in the login keychain)

name: My Test Certificate
identity type: self signed root
certificate type: code signing

Then I type the following in the terminal before building;

export CSC_NAME="My Test Certificate"
But output is:

Identity name "My Test Certificate" is specified, but no valid identity with this name in the keychain

What is the problem? Is it not possible to use a self-signed certificate?

feature mac

Most helpful comment

develar-home-imac:onshape-desktop-shell develar$ security find-identity -v -p codesigning
  1) 5160729A078E4EF0401986C2328E4D3BD55FFE0E "Test Test"
  2) 32F67D8F957E740C692ADD8CD5A5E463992193DD "Vladimir Krivosheev"
     2 valid identities found

screen shot 2016-06-06 at 20 25 56

All 9 comments

What is the problem? Is it not possible to use a self-signed certificate?

In our tests we use self-signed cert too. But it is supported only if you specify CSC_LINK and CSC_PASSWORD.

CSC_NAME doesn't support self-signed or non-Apple certs. Should be fixed.

Please try to make your self-signed cert as trusted using keychain (it must be green). Otherwise it is not valid and, so, not returned.

Hey Vladimir, doesn't work for me either. Same problem. I've created code signing certificate from Keychain Access. In release notes, I've seen:

CSC_NAME env or build.osx.identity is still not removed because it is required if you have several identities. But now instead of Developer ID Installer: Your Name (XXXXXXXXXX), you should specify only Your Name — appropriate certificate will be chosen automatically.

Can this be an issue?

@Vj3k0 Yes, should be fixed.

develar-home-imac:onshape-desktop-shell develar$ security find-identity -v -p codesigning
  1) 5160729A078E4EF0401986C2328E4D3BD55FFE0E "Test Test"
  2) 32F67D8F957E740C692ADD8CD5A5E463992193DD "Vladimir Krivosheev"
     2 valid identities found

screen shot 2016-06-06 at 20 25 56

@develar that solved it, thanks ! ❤️

@develar - THANK YOU!

Anyone know how to use Mac Developer: XXX (YYYY) to sign?
Always got "is specified, but no valid identity with this name in the keychain" error
The certificate is exist in the keychain (security find-identity -v -p codesigning)

If I create my own certificate and make it trusted so it appear on (security find-identity -v -p codesigning), I can sign my Apps without any problem.

The problem only exist when using Mac Developer: XXX (YYYY) to sign the app
I have tried to just specify XXX or Mac Developer: XXX in CSC_NAME but still no luck.

Update:
Ok, I think i know it now
https://github.com/electron-userland/electron-builder/issues/812

@LckySndays It is forbidden currently, please vote for #812

Was this page helpful?
0 / 5 - 0 ratings