From 58ab9762fd1dcea01e6d40b29a85bd9917f24fa7 Mon Sep 17 00:00:00 2001 From: gm2552 Date: Thu, 17 Feb 2022 08:08:56 -0600 Subject: [PATCH 1/3] Updating project to 8.1.0-SNAPSHOT. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ab00ab..12b5466 100755 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.nhind config-service-jar - 8.0.5 + 8.0.1-SNAPSHOT jar NHIN Direct Java RI config service jar NHIN Direct Java RI config service jar. From f80990b00f001ebd75d08435576b886b2222fe4b Mon Sep 17 00:00:00 2001 From: jester Date: Mon, 30 Jun 2025 05:56:26 -0500 Subject: [PATCH 2/3] Updating for Java RI 8.1.0. --- pom.xml | 21 ++------ .../DefaultBundleRefreshProcessorImpl.java | 50 ++++++++++++------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/pom.xml b/pom.xml index 12b5466..2b9c686 100755 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.nhind config-service-jar - 8.0.1-SNAPSHOT + 8.1.0-SNAPSHOT jar NHIN Direct Java RI config service jar NHIN Direct Java RI config service jar. @@ -48,7 +48,6 @@ UTF-8 3.8.0 - 1.68 @@ -58,28 +57,18 @@ org.nhind config-store - 8.0.0 - - - org.nhind - config-model - 8.0.0 - + 8.1.0-SNAPSHOT + org.nhind direct-common - 8.0.0 + 8.1.0-SNAPSHOT commons-net commons-net ${commons-net.version} - - - org.bouncycastle - bcprov-jdk15on - ${bcprov-jdk15on.version} - + com.h2database h2 diff --git a/src/main/java/org/nhindirect/config/processor/impl/DefaultBundleRefreshProcessorImpl.java b/src/main/java/org/nhindirect/config/processor/impl/DefaultBundleRefreshProcessorImpl.java index 4a2cd82..2eee8d0 100644 --- a/src/main/java/org/nhindirect/config/processor/impl/DefaultBundleRefreshProcessorImpl.java +++ b/src/main/java/org/nhindirect/config/processor/impl/DefaultBundleRefreshProcessorImpl.java @@ -292,28 +292,42 @@ public Mono refreshBundle(TrustBundle bundle) protected Mono> convertRawBundleToAnchorCollection(byte[] rawBundle, final TrustBundle existingBundle, final LocalDateTime processAttempStart) { - Collection bundleCerts = null; - InputStream inStream = null; - // check to see if its an unsigned PKCS7 container + + boolean isSigned = false; + try { - inStream = new ByteArrayInputStream(rawBundle); - bundleCerts = CertificateFactory.getInstance("X.509").generateCertificates(inStream); - - // in Java 7, an invalid bundle may be returned as a null instead of throw an exception - // if its null and has no anchors, then try again as a signed bundle - if (bundleCerts != null && bundleCerts.size() == 0) - bundleCerts = null; - + final CMSSignedData signed = new CMSSignedData(rawBundle); + if (signed.getSignerInfos().getSigners().size() > 0) + isSigned = true; } - catch (Exception e) - { - /* no-op for now.... this may not be a p7b, so try it as a signed message*/ - } - finally - { - IOUtils.closeQuietly(inStream); + catch (Exception e) {/*no-op*/} + + Collection bundleCerts = null; + InputStream inStream = null; + + if (!isSigned) { + try + { + inStream = new ByteArrayInputStream(rawBundle); + bundleCerts = CertificateFactory.getInstance("X.509").generateCertificates(inStream); + + // in Java 7, an invalid bundle may be returned as a null instead of throw an exception + // if its null and has no anchors, then try again as a signed bundle + if (bundleCerts != null && bundleCerts.size() == 0) + bundleCerts = null; + + } + catch (Exception e) + { + /* no-op for now.... this may not be a p7b, so try it as a signed message*/ + } + finally + { + IOUtils.closeQuietly(inStream); + } } + // didnt work... try again as a CMS signed message if (bundleCerts == null) From 17981795b39df1aee75c5ec465053cf13822a2bd Mon Sep 17 00:00:00 2001 From: jester Date: Mon, 7 Jul 2025 11:53:05 -0500 Subject: [PATCH 3/3] Releasing config-service-jar 8.1.0 --- pom.xml | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index 2b9c686..ea59d3a 100755 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.nhind config-service-jar - 8.1.0-SNAPSHOT + 8.1.0 jar NHIN Direct Java RI config service jar NHIN Direct Java RI config service jar. @@ -57,12 +57,12 @@ org.nhind config-store - 8.1.0-SNAPSHOT + 8.1.0 org.nhind direct-common - 8.1.0-SNAPSHOT + 8.1.0 commons-net @@ -179,6 +179,15 @@ 3.0.1 --> + + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 + true + + central + + @@ -238,24 +247,4 @@ - - - nhind-site - NHIN Direct API publication site - sftp://api.nhindirect.org/x/www/api.nhindirect.org/java/site/config/config-service-jar/${project.version} - - - sonatype-snapshot - Sonatype OSS Maven SNAPSHOT Repository - https://oss.sonatype.org/content/repositories/snapshots/ - false - - - sonatype-release - Sonatype OSS Maven Release Repositor - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - false - - -