Skip to content

Commit af5cddf

Browse files
committed
修复JWTSignerUtil.createSigner中algorithmId未转换问题(issue#3806@Github)
1 parent cc82342 commit af5cddf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# 🚀Changelog
33

44
-------------------------------------------------------------------------------------------------------------
5-
# 5.8.35(2024-11-27)
5+
# 5.8.35(2024-12-03)
66

77
### 🐣新特性
88
### 🐞Bug修复
9+
* 【crypto 】 修复JWTSignerUtil.createSigner中algorithmId未转换问题(issue#3806@Github)
910

1011
-------------------------------------------------------------------------------------------------------------
1112
# 5.8.34(2024-11-25)

hutool-jwt/src/main/java/cn/hutool/jwt/signers/JWTSignerUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public static JWTSigner createSigner(String algorithmId, Key key) {
278278
if (key instanceof PrivateKey || key instanceof PublicKey) {
279279
// issue3205@Github
280280
if(ReUtil.isMatch("ES\\d{3}", algorithmId)){
281-
return new EllipticCurveJWTSigner(algorithmId, key);
281+
return new EllipticCurveJWTSigner(AlgorithmUtil.getAlgorithm(algorithmId), key);
282282
}
283283

284284
return new AsymmetricJWTSigner(AlgorithmUtil.getAlgorithm(algorithmId), key);

0 commit comments

Comments
 (0)