mirror of
https://github.com/Eugeny/tabby
synced 2024-12-15 07:42:55 +00:00
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
|
diff --git a/node_modules/ssh2/lib/protocol/keyParser.js b/node_modules/ssh2/lib/protocol/keyParser.js
|
||
|
index 9860e3f..ee82e51 100644
|
||
|
--- a/node_modules/ssh2/lib/protocol/keyParser.js
|
||
|
+++ b/node_modules/ssh2/lib/protocol/keyParser.js
|
||
|
@@ -15,6 +15,7 @@ const {
|
||
|
sign: sign_,
|
||
|
verify: verify_,
|
||
|
} = require('crypto');
|
||
|
+const { createVerify: createVerifyDSS } = require('browserify-sign')
|
||
|
const supportedOpenSSLCiphers = getCiphers();
|
||
|
|
||
|
const { Ber } = require('asn1');
|
||
|
@@ -404,6 +405,17 @@ const BaseKey = {
|
||
|
return new Error('No public key available');
|
||
|
if (!algo || typeof algo !== 'string')
|
||
|
algo = this[SYM_HASH_ALGO];
|
||
|
+
|
||
|
+ if (algo === 'dss1') {
|
||
|
+ const verifier = createVerifyDSS('DSA-SHA1');
|
||
|
+ verifier.update(data);
|
||
|
+ try {
|
||
|
+ return verifier.verify(pem, signature);
|
||
|
+ } catch (ex) {
|
||
|
+ return ex;
|
||
|
+ }
|
||
|
+ }
|
||
|
+
|
||
|
try {
|
||
|
return verify_(algo, data, pem, signature);
|
||
|
} catch (ex) {
|
||
|
@@ -1343,7 +1355,7 @@ function parseDER(data, baseType, comment, fullType) {
|
||
|
return new Error('Malformed OpenSSH public key');
|
||
|
pubPEM = genOpenSSLDSAPub(p, q, g, y);
|
||
|
pubSSH = genOpenSSHDSAPub(p, q, g, y);
|
||
|
- algo = 'sha1';
|
||
|
+ algo = 'dss1';
|
||
|
break;
|
||
|
}
|
||
|
case 'ssh-ed25519': {
|