Skip to content

Commit ffa6f53

Browse files
authored
Merge pull request jsonwebtoken#592 from panva/webkit-es512
2 parents af4ee18 + 66f8b9f commit ffa6f53

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/editor/utils.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ export function getSelectedAlgorithm() {
3535
return selected.value;
3636
}
3737

38-
export function isWebkit() {
39-
return browser.engine.name === 'WebKit';
38+
export function p521Supported() {
39+
return browser.engine.name !== 'WebKit' ||
40+
(browser.browser.name === 'Safari' && parseInt(browser.browser.version, 10) >= 15) ||
41+
(browser.os.name === 'iOS' && parseInt(browser.os.version, 10) >= 15);
4042
}
4143

4244
export function disableUnsupportedAlgorithms() {
4345
// TODO: test supported algorithms in runtime
44-
if(isWebkit()) {
46+
if(p521Supported() === false) {
4547
algorithmEs512.disabled = true;
4648
}
4749
}

0 commit comments

Comments
 (0)