File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
impl/src/test/groovy/io/jsonwebtoken Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1523,7 +1523,8 @@ class JwtsTest {
1523
1523
encrypt(pubKey, alg, enc)
1524
1524
fail ()
1525
1525
} catch (UnsupportedKeyException expected) {
1526
- String msg = pubKey. getAlgorithm() + " keys may not be used with ECDH-ES key " +
1526
+ String id = EdwardsCurve . forKey(pubKey). getId()
1527
+ String msg = id + " keys may not be used with ECDH-ES key " +
1527
1528
" agreement algorithms per https://www.rfc-editor.org/rfc/rfc8037#section-3.1"
1528
1529
assertEquals msg, expected. getMessage()
1529
1530
}
@@ -1557,7 +1558,8 @@ class JwtsTest {
1557
1558
decrypt(jwe, key) // invalid signing key
1558
1559
fail ()
1559
1560
} catch (UnsupportedKeyException expected) {
1560
- String msg = key. getAlgorithm() + " keys may not be used with ECDH-ES key " +
1561
+ String id = EdwardsCurve . forKey(key). getId()
1562
+ String msg = id + " keys may not be used with ECDH-ES key " +
1561
1563
" agreement algorithms per https://www.rfc-editor.org/rfc/rfc8037#section-3.1"
1562
1564
assertEquals msg, expected. getMessage()
1563
1565
}
You can’t perform that action at this time.
0 commit comments