fixed open args

This commit is contained in:
antelle 2020-05-30 14:28:06 +02:00
parent d0d013e046
commit f5bb29e61a
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 5 additions and 2 deletions

View File

@ -253,7 +253,10 @@ const YubiKey = {
this.ykChalResp.challengeResponse(yubiKey, challenge, slot, (err, response) => {
if (err) {
if (err.code === this.ykChalResp.YK_ENOKEY) {
err.noKey = true;
err.ykNoKey = true;
}
if (err.code === this.ykChalResp.YK_ETIMEOUT) {
err.ykTimeout = true;
}
return callback(err);
}

View File

@ -58,7 +58,7 @@ class FileModel extends Model {
logger.info(
'Error opening file with empty password, try to open with null password'
);
return this.open(null, fileData, keyFileData, this.chalResp, callback);
return this.open(null, fileData, keyFileData, callback);
}
logger.error('Error opening file', err.code, err.message, err);
callback(err);