Skip to content

Commit 67869b2

Browse files
committed
updated to match refactored java-jwt
1 parent dffee9a commit 67869b2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/org/oidc/msg/oidc/util/AlgorithmResolver.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.auth0.jwt.algorithms.Algorithm;
2020
import com.auth0.jwt.algorithms.CipherParams;
2121
import com.auth0.jwt.algorithms.ECDHESAlgorithm;
22+
import com.auth0.jwt.algorithms.JWEKeyAgreementAlgorithm;
2223
import com.auth0.jwt.exceptions.KeyAgreementException;
2324
import com.auth0.jwt.exceptions.oicmsg_exceptions.HeaderError;
2425
import com.auth0.jwt.exceptions.oicmsg_exceptions.JWKException;
@@ -315,9 +316,9 @@ public static Algorithm resolveKeyTransportAlgorithmForEncryption(Key key, Strin
315316
*/
316317
public static Algorithm resolveContentEncryptionAlg(Algorithm encAlg, String encEnc)
317318
throws KeyAgreementException {
318-
if (encAlg instanceof ECDHESAlgorithm) {
319+
if (encAlg instanceof JWEKeyAgreementAlgorithm) {
319320
return Algorithm.getContentEncryptionAlg(encEnc,
320-
CipherParams.getKeyAgreementInstance(encEnc, encAlg));
321+
CipherParams.getKeyAgreementInstance(encEnc, (JWEKeyAgreementAlgorithm)encAlg));
321322
}
322323
return Algorithm.getContentEncryptionAlg(encEnc, CipherParams.getInstance(encEnc));
323324
}

0 commit comments

Comments
 (0)