[java-mvn-enforcer] 02/03: Move to Bouncycastle version 'jdk18on'

Rod Widdowson rdw at steadingsoftware.com
Wed Jan 11 16:16:01 UTC 2023


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-mvn-enforcer.

View the commit online:
http://git.shibboleth.net/view/?p=java-mvn-enforcer.git;a=commit;h=01aecd88d6697532c54f6663af0630e74817e048

commit 01aecd88d6697532c54f6663af0630e74817e048
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Jan 10 14:29:31 2023 +0000

    Move to Bouncycastle version 'jdk18on'
---
 pom.xml                                                  | 13 +++++++++----
 .../net/shibboleth/mvn/enforcer/impl/GPGKeyRing.java     | 16 ++--------------
 2 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/pom.xml b/pom.xml
index ea55706..da5faf8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,6 +22,8 @@
         <java-support.version>8.3.1</java-support.version>
         <spring-extensions.version>6.2.0</spring-extensions.version>
         <automatic.module.name>net.shibboleth.maven.enforcer.rules.dist</automatic.module.name>
+        <bouncycastle.pg.version>1.72.2</bouncycastle.pg.version>
+        <bouncycastle.version>1.72</bouncycastle.version>
     </properties>
 
     <repositories>
@@ -60,15 +62,18 @@
         </dependency> 
         <dependency>
             <groupId>org.bouncycastle</groupId>
-            <artifactId>bcpg-jdk15on</artifactId>
+            <artifactId>bcpg-jdk18on</artifactId>
+	    <version>${bouncycastle.pg.version}</version>
         </dependency>
         <dependency>
             <groupId>org.bouncycastle</groupId>
-            <artifactId>bcprov-jdk15on</artifactId>
+            <artifactId>bcprov-jdk18on</artifactId>
+	    <version>${bouncycastle.version}</version>
         </dependency>
         <dependency>
             <groupId>org.bouncycastle</groupId>
-            <artifactId>bcpkix-jdk15on</artifactId>
+            <artifactId>bcpkix-jdk18on</artifactId>
+	    <version>${bouncycastle.version}</version>
         </dependency> 
         <dependency>
             <groupId>com.google.code.findbugs</groupId>
@@ -94,7 +99,7 @@
             <!-- Required for command line classes. -->
             <scope>test</scope>
         </dependency>
-	<dependency>
+        <dependency>
             <groupId>org.apache.maven.shared</groupId>
             <artifactId>maven-invoker</artifactId>
             <version>3.2.0</version>
diff --git a/src/main/java/net/shibboleth/mvn/enforcer/impl/GPGKeyRing.java b/src/main/java/net/shibboleth/mvn/enforcer/impl/GPGKeyRing.java
index a47419e..76c94cc 100644
--- a/src/main/java/net/shibboleth/mvn/enforcer/impl/GPGKeyRing.java
+++ b/src/main/java/net/shibboleth/mvn/enforcer/impl/GPGKeyRing.java
@@ -147,8 +147,6 @@ import org.slf4j.Logger;
                 pgpFact = new PGPObjectFactory(decoded, new JcaKeyFingerprintCalculator());
             }
             return new PGPPublicKeyRingCollection(listr);
-        } catch (final PGPException e) {
-            throw new IOException("Error reading key ring", e);
         }
     }
 
@@ -158,12 +156,7 @@ import org.slf4j.Logger;
      */
     protected String getKeyInfo(final Signature sigForKey) {
         final PGPPublicKeyRing keyRing;
-        try {
-            keyRing = keyRings.getPublicKeyRing(sigForKey.getSignature().getKeyID());
-        } catch (final PGPException e) {
-            log.warn("Couldn't locate key", e);
-            return null;
-        }
+	keyRing = keyRings.getPublicKeyRing(sigForKey.getSignature().getKeyID());
         if (keyRing == null) {
             log.info("Provided key stream did not contain a key for {}", sigForKey);
             return null;
@@ -203,12 +196,7 @@ import org.slf4j.Logger;
 
         log.debug("Looking for key with Id {}", signature);
 
-        try {
-            return keyRings.getPublicKey(sig.getKeyID()) != null;
-        } catch (final PGPException e) {
-            log.warn("Error looking for key {}", signature, e);
-            return false;
-        }
+	return keyRings.getPublicKey(sig.getKeyID()) != null;
     }
 
     /** Run a signature check over the streams.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list