Skip to content

GH-1550: [JDBC] Fix trustStore using only its first certificate - #1551

Closed
fredjoonpark wants to merge 1 commit into
apache:mainfrom
fredjoonpark:trust-store-all-certificates
Closed

fredjoonpark wants to merge 1 commit into
apache:mainfrom
fredjoonpark:trust-store-all-certificates

Conversation

@fredjoonpark

Copy link
Copy Markdown
Contributor

What's Changed

With trustStore set, the driver trusted only the first certificate entry of the store: ClientAuthenticationUtils.getCertificateStream ended in getSingleCertificateInputStream. A server whose chain ended at any other CA in the store failed with "unable to find valid certification path to requested target".

getCertificateStream now goes through getCertificatesInputStream, as useSystemTrustStore does, so every certificate entry is trusted. A store without certificate entries still fails with "Keystore did not have a certificate."

Closes #1550.

@fredjoonpark fredjoonpark changed the title [JDBC] Fix trustStore using only its first certificate GH-1550: [JDBC] Fix trustStore using only its first certificate Dec 3, 2026
With trustStore set, the driver trusted only the first certificate entry of
the store: ClientAuthenticationUtils.getCertificateStream ended in
getSingleCertificateInputStream. A server whose chain ended at any other CA
in the store failed with "unable to find valid certification path to
requested target".

getCertificateStream now goes through getCertificatesInputStream, as
useSystemTrustStore does, so every certificate entry is trusted. A store
without certificate entries still fails with "Keystore did not have a
certificate."
@fredjoonpark
fredjoonpark force-pushed the trust-store-all-certificates branch from adc0f62 to ba2320c Compare December 4, 2026 18:32
@fredjoonpark fredjoonpark closed this by deleting the head repository Dec 4, 2026
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.

[JDBC] trustStore trusts only the first certificate entry in the store

1 participant