This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: fix window render freeze * chore: align changelog * chore(deps): upgrade "@webcrypto-local" to "1.6.11" * chore(ci): upgrade "microsoft/setup-msbuild" to "v1.1" * chore(ci): remove "nuget/setup-nuget" step * chore(ci): use windows-2019 and node v14 * Fix-macos-ca (#479) * fix: Use User keychain instead of System * fix(ssl): Error on CA adding into Firefox * refactor(ssl): Change MacOS CA log message * chore: remove unused "fortify-setup" folder Co-authored-by: donskov <[email protected]> * chore(deps): use `nanoid` instead of `uuid` * chore(deps): update electron version to "13.6.9" Co-authored-by: microshine <[email protected]>
- Loading branch information
1 parent
53a9141
commit 8da488c
Showing
13 changed files
with
168 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ jobs: | |
env: | ||
APP_REPO_FOLDER: ../ | ||
RELEASE_FOLDER: ../release | ||
ELECTRON_VERSION: '13.6.9' | ||
- name: Sign data | ||
run: yarn sign_data | ||
env: | ||
|
@@ -55,24 +56,26 @@ jobs: | |
env: | ||
APP_REPO_FOLDER: ../ | ||
RELEASE_FOLDER: ../release | ||
ELECTRON_VERSION: '13.6.9' | ||
- name: Archive build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: ./release/*.deb | ||
|
||
windows: | ||
runs-on: windows-latest | ||
runs-on: windows-2019 | ||
strategy: | ||
matrix: | ||
platform: [x86, x64] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14.x' | ||
- name: Setup msbuild | ||
uses: microsoft/setup-msbuild@v1 | ||
- name: Setup NuGet.exe for use with actions | ||
uses: nuget/[email protected] | ||
uses: microsoft/[email protected] | ||
- name: Prepare app repository | ||
uses: ./.github/actions/prepare-app-repo | ||
- name: Prepare fortify-setup repository | ||
|
@@ -85,6 +88,7 @@ jobs: | |
Platform: ${{ matrix.platform }} | ||
APP_REPO_FOLDER: ../ | ||
RELEASE_FOLDER: ../release | ||
ELECTRON_VERSION: '13.6.9' | ||
- name: Archive build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
runtime "electron" | ||
target "11.5.0" | ||
target "13.6.9" | ||
target_arch "x64" | ||
disturl "https://atom.io/download/atom-shell" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import { Convert } from 'pvtsutils'; | ||
|
||
/** | ||
* Represents PEM Converter. | ||
*/ | ||
export class PemConverter { | ||
public CertificateTag = 'CERTIFICATE'; | ||
|
||
public CertificateRequestTag = 'CERTIFICATE REQUEST'; | ||
|
||
public PublicKeyTag = 'PUBLIC KEY'; | ||
|
||
public PrivateKeyTag = 'PRIVATE KEY'; | ||
|
||
static isPem(data: any): data is string { | ||
return typeof data === 'string' | ||
&& /-{5}BEGIN [A-Z0-9 ]+-{5}([a-zA-Z0-9=+/\n\r]+)-{5}END [A-Z0-9 ]+-{5}/g.test(data); | ||
} | ||
|
||
/** | ||
* Decodes PEM to a list of raws | ||
* @param pem message in PEM format | ||
*/ | ||
public static decode(pem: string) { | ||
const pattern = /-{5}BEGIN [A-Z0-9 ]+-{5}([a-zA-Z0-9=+/\n\r]+)-{5}END [A-Z0-9 ]+-{5}/g; | ||
|
||
const res: ArrayBuffer[] = []; | ||
let matches: RegExpExecArray | null = null; | ||
// eslint-disable-next-line no-cond-assign | ||
while (matches = pattern.exec(pem)) { | ||
const base64 = matches[1] | ||
.replace(/\r/g, '') | ||
.replace(/\n/g, ''); | ||
res.push(Convert.FromBase64(base64)); | ||
} | ||
|
||
return res; | ||
} | ||
|
||
/** | ||
* Encodes a raw data to PEM format | ||
* @param rawData Raw data | ||
* @param tag PEM tag | ||
*/ | ||
public static encode(rawData: BufferSource, tag: string): string; | ||
|
||
/** | ||
* Encodes a list of raws to PEM format | ||
* @param raws A list of raws | ||
* @param tag PEM tag | ||
*/ | ||
public static encode(rawData: BufferSource[], tag: string): string; | ||
|
||
public static encode(rawData: BufferSource | BufferSource[], tag: string) { | ||
if (Array.isArray(rawData)) { | ||
const raws = new Array<string>(); | ||
rawData.forEach((element) => { | ||
raws.push(this.encodeBuffer(element, tag)); | ||
}); | ||
|
||
return raws.join('\n'); | ||
} | ||
|
||
return this.encodeBuffer(rawData, tag); | ||
} | ||
|
||
/** | ||
* Encodes a raw data to PEM format | ||
* @param rawData Raw data | ||
* @param tag PEM tag | ||
*/ | ||
private static encodeBuffer(rawData: BufferSource, tag: string) { | ||
const base64 = Convert.ToBase64(rawData); | ||
let sliced: string; | ||
let offset = 0; | ||
const rows = Array<string>(); | ||
while (offset < base64.length) { | ||
if (base64.length - offset < 64) { | ||
sliced = base64.substring(offset); | ||
} else { | ||
sliced = base64.substring(offset, offset + 64); | ||
offset += 64; | ||
} | ||
if (sliced.length !== 0) { | ||
rows.push(sliced); | ||
if (sliced.length < 64) { | ||
break; | ||
} | ||
} else { | ||
break; | ||
} | ||
} | ||
const upperCaseTag = tag.toLocaleUpperCase(); | ||
|
||
return `-----BEGIN ${upperCaseTag}-----\n${rows.join('\n')}\n-----END ${upperCaseTag}-----`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
# Add certificate to system key chain | ||
|
||
certPath=${certPath} | ||
certificateName="${certName}" | ||
certificateName=${certName} | ||
|
||
echo -e "certificateName: ${certificateName}" | ||
echo -e "certPath: ${certPath}" | ||
|
||
# keychain | ||
security delete-certificate -c ${certificateName} /Library/Keychains/System.keychain | ||
security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ${certPath} | ||
keychain=$(security default-keychain -d user | sed 's/"//g') | ||
security delete-certificate -c ${certificateName} ${keychain} | ||
security add-trusted-cert -r trustRoot -k ${keychain} ${certPath} | ||
certDir=$(dirname ${certPath}) | ||
echo -e "certDir: ${certDir}" | ||
mkdir "$certDir/mkcert" | ||
cp ${certPath} "$certDir/mkcert/rootCA.pem" | ||
CAROOT="$certDir/mkcert" TRUST_STORES=system mkcert -install |
Oops, something went wrong.