From 98ec3cdaa6c6dc6e06b9b95d23522d78f31660f6 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sun, 10 Nov 2024 09:36:24 +0100 Subject: [PATCH] Java 11 --- pom.xml | 4 ++-- .../java/eu/m724/jarupdater/verify/SignatureVerifierImpl.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 5ce5dbc..87b9804 100644 --- a/pom.xml +++ b/pom.xml @@ -5,8 +5,8 @@ 0.1.9-SNAPSHOT - 17 - 17 + 11 + 11 diff --git a/src/main/java/eu/m724/jarupdater/verify/SignatureVerifierImpl.java b/src/main/java/eu/m724/jarupdater/verify/SignatureVerifierImpl.java index d879713..9f1c80d 100644 --- a/src/main/java/eu/m724/jarupdater/verify/SignatureVerifierImpl.java +++ b/src/main/java/eu/m724/jarupdater/verify/SignatureVerifierImpl.java @@ -100,7 +100,8 @@ public class SignatureVerifierImpl { for (CodeSigner signer : signers) { for (Certificate cert : signer.getSignerCertPath().getCertificates()) { PublicKey certPublicKey = cert.getPublicKey(); - if (certPublicKey instanceof RSAPublicKey rsaKey) { + if (certPublicKey instanceof RSAPublicKey) { + RSAPublicKey rsaKey = (RSAPublicKey) certPublicKey; signerPublicKeys.add(Base64.getEncoder().encodeToString(rsaKey.getEncoded())); for (RSAPublicKey publicKey : publicKeys) {