Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit b33f8a6

Browse files
andreibogusaleksandra-bel
authored andcommitted
fix: fix ES256K signature
1 parent 97437b4 commit b33f8a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/eclipse/tractusx/managedidentitywallets/service/JwtPresentationES256KService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ public SignedJWT createSignedJwt(URI id, Did didIssuer, String audience, Seriali
177177
private static SignedJWT createSignedES256KJwt(ECPrivateKey ecPrivateKey, JWTClaimsSet claimsSet, String issuer) {
178178
try {
179179
JWSSigner signer = new ECDSASigner(ecPrivateKey);
180+
signer.getJCAContext().setProvider(BouncyCastleProviderSingleton.getInstance());
180181
if (!signer.supportedJWSAlgorithms().contains(JWSAlgorithm.ES256K)) {
181182
throw new UnsupportedAlgorithmException(String.format("Invalid signing method. Supported signing methods: %s",
182183
signer.supportedJWSAlgorithms().stream().map(Algorithm::getName).collect(Collectors.joining(", "))));

0 commit comments

Comments
 (0)