-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(electron-updater): update sign verification error
Close #1641
- Loading branch information
Showing
18 changed files
with
599 additions
and
289 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 |
---|---|---|
|
@@ -15,7 +15,7 @@ dependencies: | |
- ssh [email protected] git-lfs-authenticate $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git download | ||
- git lfs pull | ||
- mkdir -p $CIRCLE_TEST_REPORTS/reports | ||
- docker run --rm --env-file ./test/docker-env.list -v ${PWD}:/project -v ~/.electron:/root/.electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/electron-builder:wine /bin/bash -c "node ./test/vendor/yarn.js --link-duplicates --pure-lockfile && node ./test/vendor/yarn.js test" && mv -f test/test-report.xml $CIRCLE_TEST_REPORTS/reports/test-report.xml | ||
- docker run --rm --env-file ./test/docker-env.list -v ${PWD}:/project -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/electron-builder:wine /bin/bash -c "node ./test/vendor/yarn.js --link-duplicates --pure-lockfile && node ./test/vendor/yarn.js test" && mv -f test/test-report.xml $CIRCLE_TEST_REPORTS/reports/test-report.xml | ||
|
||
test: | ||
override: | ||
|
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,87 @@ | ||
export function parseDn(seq: string): Map<string, string> { | ||
let quoted = false | ||
let key: string | null = null | ||
let token = "" | ||
let nextNonSpace = 0 | ||
|
||
seq = seq.trim() | ||
const result = new Map<string, string>() | ||
for (let i = 0; i <= seq.length; i++) { | ||
if (i === seq.length) { | ||
if (key !== null) { | ||
result.set(key, token) | ||
} | ||
break | ||
} | ||
|
||
const ch = seq[i] | ||
if (quoted) { | ||
if (ch === '"') { | ||
quoted = false | ||
continue | ||
} | ||
} | ||
else { | ||
if (ch === '"') { | ||
quoted = true | ||
continue | ||
} | ||
|
||
if (ch === "\\") { | ||
i++ | ||
const ord = parseInt(seq.slice(i, i + 2), 16) | ||
if (Number.isNaN(ord)) { | ||
token += seq[i] | ||
} | ||
else { | ||
i++ | ||
token += String.fromCharCode(ord) | ||
} | ||
continue | ||
} | ||
|
||
if (key === null && ch === "=") { | ||
key = token | ||
token = "" | ||
continue | ||
} | ||
|
||
if (ch === "," || ch === ";" || ch === "+") { | ||
if (key !== null) { | ||
result.set(key, token) | ||
} | ||
key = null | ||
token = "" | ||
continue | ||
} | ||
} | ||
|
||
if (ch === " " && !quoted) { | ||
if (token.length === 0) { | ||
continue | ||
} | ||
|
||
if (i > nextNonSpace) { | ||
let j = i | ||
while (seq[j] === " ") { | ||
j++ | ||
} | ||
nextNonSpace = j | ||
} | ||
|
||
if (nextNonSpace >= seq.length | ||
|| seq[nextNonSpace] === "," | ||
|| seq[nextNonSpace] === ";" | ||
|| (key === null && seq[nextNonSpace] === "=") | ||
|| (key !== null && seq[nextNonSpace] === "+") | ||
) { | ||
i = nextNonSpace - 1 | ||
continue | ||
} | ||
} | ||
|
||
token += ch | ||
} | ||
|
||
return result | ||
} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.