Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(signing-utils): add ssh2 types and don't override file with gpg signing #205

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/signing-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.35",
"@types/sinon-chai": "^3.2.5",
"@types/ssh2": "^1.11.18",
"chai": "^4.3.6",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
Expand All @@ -68,6 +67,7 @@
},
"dependencies": {
"debug": "^4.3.4",
"ssh2": "^1.15.0"
"ssh2": "^1.15.0",
"@types/ssh2": "^1.11.19"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('RemoteSigningClient', function () {
const remoteSigningClient = new RemoteSigningClient(getMockedSSHClient(), {
workingDirectory: workingDirectoryPath,
signingScript: signingScript,
signingMethod: 'gpg',
signingMethod: 'jsign',
});

await remoteSigningClient.sign(fileToSign);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ export class RemoteSigningClient implements SigningClient {
await this.signRemoteFile(path.basename(remotePath));
debug(`SFTP: Signed file ${file}`);

await this.sshClient.downloadFile(remotePath, file);
debug(`SFTP: Downloaded signed file to ${file}`);
if (this.options.signingMethod === 'jsign') {
await this.sshClient.downloadFile(remotePath, file);
debug(`SFTP: Downloaded signed file to ${file}`);
}

// For signing using gpg, `.sig` file is created along side the file being signed.
// We also have to download it back and put it in the same path as original file.
Expand Down
Loading