mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-06-24 23:22:30 +00:00
Fallback to js implementation on WebCrypto EdDSA key generation failure
Workaround random failures in WebKit (Linux).
This commit is contained in:
parent
2f185481a7
commit
f36be640cc
@ -48,7 +48,7 @@ export async function generate(algo) {
|
|||||||
seed: b64ToUint8Array(privateKey.d, true)
|
seed: b64ToUint8Array(privateKey.d, true)
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.name !== 'NotSupportedError') {
|
if (err.name !== 'NotSupportedError' && err.name !== 'OperationError') { // Temporary (hopefully) fix for WebKit on Linux
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
const seed = getRandomBytes(getPayloadSize(algo));
|
const seed = getRandomBytes(getPayloadSize(algo));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user