mirror of https://github.com/keeweb/keeweb.git
more error handling
This commit is contained in:
parent
f1fdfffd5a
commit
fae40c8c3e
|
@ -28,21 +28,26 @@ const SignatureVerifier = {
|
|||
algo,
|
||||
false, ['verify']
|
||||
).then(cryptoKey => {
|
||||
subtle.verify(algo, cryptoKey,
|
||||
kdbxweb.ByteUtils.arrayToBuffer(signature),
|
||||
kdbxweb.ByteUtils.arrayToBuffer(data)
|
||||
).then(isValid => {
|
||||
resolve(isValid);
|
||||
}).catch(e => {
|
||||
this.logger.error('Verify error', e);
|
||||
try {
|
||||
subtle.verify(algo, cryptoKey,
|
||||
kdbxweb.ByteUtils.arrayToBuffer(signature),
|
||||
kdbxweb.ByteUtils.arrayToBuffer(data)
|
||||
).then(isValid => {
|
||||
resolve(isValid);
|
||||
}).catch(e => {
|
||||
this.logger.error('Verify error', e);
|
||||
reject();
|
||||
});
|
||||
} catch (e) {
|
||||
this.logger.error('Signature verification error', e);
|
||||
reject();
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
this.logger.error('ImportKey error', e);
|
||||
reject();
|
||||
});
|
||||
} catch (e) {
|
||||
this.logger.error('Signature verification error', e);
|
||||
this.logger.error('Signature key verification error', e);
|
||||
reject();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue