You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* `identity` is removed from the `build.mas`.
* Env `CSC_INSTALLER_NAME` is removed.
* You don't need to specify `CSC_NAME` env or `build.osx.identity`. Valid identity from your keychain will be automatically used.
* `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.
OS X and Windows code signing is supported. Windows is dual code-signed (SHA1 & SHA256 hashing algorithms).
2
2
3
-
On a development machine set environment variable `CSC_NAME` (and `CSC_INSTALLER_NAME` if you build for Mac App Store) to your identity.
3
+
On a OS X development machine valid and appropriate identity from your keychain will be automatically used.
4
4
5
5
| Env name | Description
6
6
| -------------- | -----------
7
7
| `CSC_LINK` | The HTTPS link (or base64-encoded data) to certificate (`*.p12` file).
8
8
| `CSC_KEY_PASSWORD` | The password to decrypt the certificate given in `CSC_LINK`.
9
9
| `CSC_INSTALLER_LINK` | *osx-only* The HTTPS link (or base64-encoded data) to certificate to sign Mac App Store build (`*.p12` file).
10
10
| `CSC_INSTALLER_KEY_PASSWORD` | *osx-only* The password to decrypt the certificate given in `CSC_INSTALLER_LINK`.
11
-
| `CSC_NAME` | *osx-only* Name of certificate (to retrieve from login.keychain). Useful on a development machine (not on CI).
12
-
| `CSC_INSTALLER_NAME` | *osx-only* Name of installer certificate (to retrieve from login.keychain). Useful on a development machine (not on CI).
13
-
14
-
```
15
-
export CSC_NAME="Developer ID Application: Your Name (code)"
16
-
```
11
+
| `CSC_NAME` | *osx-only* Name of certificate (to retrieve from login.keychain). Useful on a development machine (not on CI) if you have several identities (otherwise don't specify it).
17
12
18
13
## Travis, AppVeyor and other CI Servers
19
14
To sign app on build server you need to set `CSC_LINK`, `CSC_KEY_PASSWORD` (and `CSC_INSTALLER_LINK`, `CSC_INSTALLER_KEY_PASSWORD` if you build for Mac App Store):
@@ -29,4 +24,5 @@ To sign app on build server you need to set `CSC_LINK`, `CSC_KEY_PASSWORD` (and
29
24
In case of AppVeyor, don't forget to click on lock icon to “Toggle variable encryption”.
30
25
31
26
# Where to Buy Code Signing Certificate
32
-
[StartSSL](https://startssl.com/Support?v=34) is recommended.
27
+
[StartSSL](https://startssl.com/Support?v=34) is recommended.
28
+
Please note — Gatekeeper only recognises [Apple digital certificates](http://stackoverflow.com/questions/11833481/non-apple-issued-code-signing-certificate-can-it-work-with-mac-os-10-8-gatekeep).
Copy file name to clipboardExpand all lines: docs/Options.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,6 @@ MAS (Mac Application Store) specific options (in addition to `build.osx`).
84
84
85
85
| Name | Description
86
86
| --- | ---
87
-
| identity | <aname="MasBuildOptions-identity"></a>The name of certificate to use when signing. Consider using environment variables [CSC_INSTALLER_LINK or CSC_INSTALLER_NAME](https://github.com/electron-userland/electron-builder/wiki/Code-Signing).
88
87
| entitlements | <aname="MasBuildOptions-entitlements"></a><p>The path to entitlements file for signing the app. <code>build/mas.entitlements</code> will be used if exists (it is a recommended way to set). Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.entitlements).</p>
89
88
| entitlementsInherit | <aname="MasBuildOptions-entitlementsInherit"></a><p>The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. <code>build/mas.inherit.entitlements</code> will be used if exists (it is a recommended way to set). Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.mas.inherit.entitlements).</p>
90
89
@@ -97,6 +96,7 @@ MAS (Mac Application Store) specific options (in addition to `build.osx`).
97
96
| msi | <aname="WinBuildOptions-msi"></a>Whether to create an MSI installer. Defaults to `false` (MSI is not created).
98
97
| remoteReleases | <aname="WinBuildOptions-remoteReleases"></a>A URL to your existing updates. If given, these will be downloaded to create delta updates.
99
98
| remoteToken | <aname="WinBuildOptions-remoteToken"></a>Authentication token for remote updates
99
+
| signingHashAlgorithms | <aname="WinBuildOptions-signingHashAlgorithms"></a>Array of signing algorithms used. Defaults to `['sha1', 'sha256']`
// "Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list."
37
+
// but "security list-keychains" doesn't support add - we should 1) get current list 2) set new list - it is very bad http://stackoverflow.com/questions/10538942/add-a-keychain-to-search-list
38
+
// "overly complicated and introduces a race condition."
// "Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list."
43
-
// but "security list-keychains" doesn't support add - we should 1) get current list 2) set new list - it is very bad http://stackoverflow.com/questions/10538942/add-a-keychain-to-search-list
44
-
// "overly complicated and introduces a race condition."
The name of certificate to use when signing. Consider using environment variables [CSC_INSTALLER_LINK or CSC_INSTALLER_NAME](https://github.com/electron-userland/electron-builder/wiki/Code-Signing).
212
-
*/
213
-
readonlyidentity?: string|null
214
-
215
210
/*
216
211
The path to entitlements file for signing the app. `build/mas.entitlements` will be used if exists (it is a recommended way to set).
thrownewError("codeSigningInfo is null, but CSC_LINK defined")
90
+
}
91
+
92
+
constidentity=awaitOsXPackager.findIdentity(masOptions==null ? "Developer ID Application" : "3rd Party Mac Developer Application",this.customBuildOptions.identity)
93
+
if(identity==null){
94
+
constmessage="App is not signed: CSC_LINK or CSC_NAME are not specified, and no valid identity in the keychain, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing"
95
+
if(masOptions==null){
96
+
warn(message)
97
+
return
98
+
}
99
+
else{
100
+
thrownewError(message)
101
+
}
68
102
}
69
-
}
70
103
71
-
constidentity=codeSigningInfo.name
72
-
if(<string|null>identity==null){
73
-
constmessage="App is not signed: CSC_LINK or CSC_NAME are not specified, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing"
74
104
if(masOptions!=null){
75
-
thrownewError(message)
105
+
constinstallerName=masOptions==null ? null : (awaitOsXPackager.findIdentity("3rd Party Mac Developer Installer",this.customBuildOptions.identity))
106
+
if(installerName==null){
107
+
thrownewError("Cannot find valid installer certificate: CSC_LINK or CSC_NAME are not specified, and no valid identity in the keychain, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing")
108
+
}
109
+
110
+
codeSigningInfo={
111
+
name: identity,
112
+
installerName: installerName,
113
+
}
114
+
}
115
+
else{
116
+
codeSigningInfo={
117
+
name: identity,
118
+
}
119
+
}
120
+
}
121
+
else{
122
+
if(codeSigningInfo.name==null&&masOptions==null){
123
+
thrownewError("codeSigningInfo.name is null, but CSC_LINK defined")
0 commit comments