File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1276,6 +1276,8 @@ export interface PublicKeyAuthContext extends AuthContextBase {
12761276 signature ?: Buffer ;
12771277 /** The data used to verify the key, or `undefined` if the client is only checking the validity of the key. */
12781278 blob ?: Buffer ;
1279+ /** The explicit hash algorithm to be used during verification (passed to key.verify()). */
1280+ hashAlgo ?: string ;
12791281}
12801282
12811283export interface PublicKey {
Original file line number Diff line number Diff line change @@ -376,8 +376,8 @@ new ssh2.Server({
376376 && ctx . key . algo === pubKey . type
377377 && buffersEqual ( ctx . key . data , pubKeySSH )
378378 ) {
379- if ( ctx . signature && ctx . blob ) {
380- if ( pubKey . verify ( ctx . blob , ctx . signature ) ) {
379+ if ( ctx . signature && ctx . blob && ctx . hashAlgo ) {
380+ if ( pubKey . verify ( ctx . blob , ctx . signature , ctx . hashAlgo ) ) {
381381 ctx . accept ( ) ;
382382 } else {
383383 ctx . reject ( ) ;
You can’t perform that action at this time.
0 commit comments