Skip to content

Commit

Permalink
Revert "Try in deno with smctl"
Browse files Browse the repository at this point in the history
This reverts commit a457f73.

# Conflicts:
#	package/src/windows/signtool.ts
  • Loading branch information
cderv committed Sep 13, 2024
1 parent a4c1460 commit dbfa91c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ jobs:
cargo build --release --all-features --manifest-path package/launcher/Cargo.toml
cp package/launcher/target/release/quarto.exe package/pkg-working/bin/quarto.exe
- name: Setup SMTL
- name: Setup SMCTL
id: setup-cert
shell: pwsh
env:
Expand Down
2 changes: 1 addition & 1 deletion package/src/windows/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export async function makeInstallerWindows(configuration: Configuration) {
}

// Copy the 'dist' files into a temporary working directory
const tempDir = Deno.makeTempDirSync();
const tempDir = Deno.makeTempDirSync({dir: workingDir });
const workingDistPath = join(tempDir, "dist");
const workingBinPath = join(workingDistPath, "bin");
const workingToolsPath = join(workingBinPath, "tools", );
Expand Down
11 changes: 4 additions & 7 deletions package/src/windows/signtool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,15 @@ export async function signtool(

try {
// signtool.exe sign /sha1 "%SM_CLIENT_CERT_FINGERPRINT%" /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 "%INSTALLER_FILE%"
// const signArgs = ["sign", "/debug", "/sha1", fingerprint, "/tr", "http://timestamp.digicert.com", "/td", "SHA256", "/fd", "SHA256"];
const signArgs = ["sign", "--fingerprint", fingerprint];
const signArgs = ["sign", "/debug", "/sha1", fingerprint, "/tr", "http://timestamp.digicert.com", "/td", "SHA256", "/fd", "SHA256"];
// signtool.exe verify /v /pa "%INSTALLER_FILE%"
const verifyArgs= ["sign", "verify"];
const verifyArgs= ["verify", "/v", "/pa"];
for (const descriptor of descriptors) {
const file = descriptor.file;
const desc = descriptor.desc;
//const fileArgs = desc ? ["/d", desc, file] : [file];
const fileArgs = ["--input", file];
const fileArgs = desc ? ["/d", desc, file] : [file];

info(`> Signing ${file}`);
const signCommand = new Deno.Command("C:/Program Files/DigiCert/DigiCert One Signing Manager Tools/smctl.exe", { args: [...signArgs, ...fileArgs]});
const result = signCommand.outputSync();
if (!result.success) {
console.log("CODE: ", result.code);
Expand All @@ -54,7 +51,7 @@ export async function signtool(
console.log(new TextDecoder().decode(result.stdout));
}
info(`> Verify ${file}`);
const verifyCommand= new Deno.Command("C:/Program Files/DigiCert/DigiCert One Signing Manager Tools/smctl.exe", { args: [...verifyArgs, ...fileArgs]});
const verifyCommand= new Deno.Command(signToolBin, { args: [...verifyArgs, file]});
const result2 = verifyCommand.outputSync();
if (!result2.success) {
console.error(`Failed to sign ${file}`);
Expand Down

0 comments on commit dbfa91c

Please sign in to comment.