Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Windows system certificate store if requested by system properties #911

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lwahonen
Copy link

Not sure if this is the most elegant way to handle this, but if the user has selected SunMSCAPI as the trust store provider, they probably expect Tyrus to load Windows system certificate store (=work with enterprise root signed ssl certificates)

@@ -578,6 +578,17 @@ public SSLContext createSSLContext() {
TrustManagerFactory trustManagerFactory = null;
KeyManagerFactory keyManagerFactory = null;

if ("SunMSCAPI".equals(System.getProperty(TRUST_STORE_PROVIDER))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@lwahonen Can instead of this code block be just updated the row below:

if (trustStoreBytes != null || trustStoreFile != null) {

with if (trustStoreBytes != null || trustStoreFile != null || "SunMSCAPI".equals(trustStoreType)) { ?

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