Skip to content

fix: resolved bouncy castle conflicting versions#674

Merged
ymarcon merged 2 commits intomasterfrom
fix/bouncycastle
Apr 3, 2026
Merged

fix: resolved bouncy castle conflicting versions#674
ymarcon merged 2 commits intomasterfrom
fix/bouncycastle

Conversation

@ymarcon
Copy link
Copy Markdown
Member

@ymarcon ymarcon commented Apr 3, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resolves Bouncy Castle version conflicts by centralizing Bouncy Castle dependency versions in Maven and updating Agate’s PEM writing usage to match the newer Bouncy Castle APIs.

Changes:

  • Introduces a single ${bouncycastle.version} property and manages bcpkix-jdk18on / bcprov-jdk18on versions in the root pom.xml.
  • Excludes legacy bcprov-jdk16 pulled transitively from obiba-core to avoid conflicting artifacts on the classpath.
  • Updates certificate PEM export to use JcaPEMWriter and adds bcpkix-jdk18on dependency to agate-core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pom.xml Adds Bouncy Castle version management and excludes bcprov-jdk16 from obiba-core to prevent conflicts.
agate-core/pom.xml Adds bcpkix-jdk18on to ensure required Bouncy Castle APIs are present in agate-core.
agate-core/src/main/java/org/obiba/agate/service/KeyStoreService.java Switches PEM output implementation to JcaPEMWriter (newer Bouncy Castle API).
Comments suppressed due to low confidence (1)

agate-core/src/main/java/org/obiba/agate/service/KeyStoreService.java:81

  • JcaPEMWriter is Closeable; consider using try-with-resources so it is always closed (even on exceptions while writing), rather than relying on a manual flush() call.
    StringWriter writer = new StringWriter();
    JcaPEMWriter pemWriter = new JcaPEMWriter(writer);
    for (Certificate certificate : certificates) {
      pemWriter.writeObject(certificate);
    }
    pemWriter.flush();

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ymarcon ymarcon merged commit a3878e2 into master Apr 3, 2026
2 checks passed
@ymarcon ymarcon deleted the fix/bouncycastle branch April 3, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants