Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:16:24+00:00 2026-06-15T07:16:24+00:00

Is there any function which tells me what’s the current truststore being used in

  • 0

Is there any function which tells me what’s the current truststore being used in my program. On windows, the default trust store is at JAVA_HOME\lib\security\cacerts.

However, the default can be changed in a variety of ways.

  • Using -Djavax.net.ssl.keyStore in the command line

  • Using Keystore class.

  • If the program is running on an App Server under which the application runs may set the store path through it’s panel.

  • If the program is running on Tomcat, then Tomcat settings may change the truststore.

and many other ways.

Is there a programmatic way by which I can find out the disk path of the truststore which is currently active?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:16:26+00:00Added an answer on June 15, 2026 at 7:16 am

    Generally speaking, you can’t (this is quite similar to this question).

    In the JSSE API, trusting a certificate isn’t actually determined by a trust store, but by a TrustManager. Whilst it’s often initialised with a keystore (the truststore), this is not necessary. In addition, the keystores themselves don’t have to be files. There is nothing in the default trust manager API that lets you check where and how a potential trust store was used.

    There isn’t even anything in the SSLSocket that lets you get back to its SSLSocketFactory, and nothing there that lets you get back to its originating SSLContext, and nothing there that lets you get the trust managers.

    Which truststore/trust manager is currently active also depends very much on the application. Nothing tells you in general that the connections an application is making are using the default SSLContext, which can be initialised by the javax.net.ssl.* system properties. Applications are free to initialise their own SSLContexts to create their sockets (this is what Tomcat do for its connectors when you specify certain values).

    Since Java 6, the default (current) SSLContext can also be changed globally (via SSLContext.setDefault(...).

    You can find what’s being used by default from the JSSE Reference Guide. The rest will depend on the documentation of each application. Using -Djavax.net.debug=SSL,trustmanager may help if you need, but this isn’t API access.

    (By the way, -Djavax.net.ssl.keyStore will set up the keystore for the default key manager, not the trust store.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any C# function which could be used to escape and un-escape a
Is there any built in function which tells me that my vector contains a
Is there any function in C on linux by which we can query MX
Hi I was wondering if there is any jquery function around which can take
Is there any Java function or util class which does rounding this way: func(3/2)
Is there any php function in our time, which generates absolutely unique, random string?
Is there any built-in function in Python3/Numpy which filters an array and returns indices
Is there any way to call an action script function from an anchor which
Is there any function that does the inverse operation of array_diff() ? I mean,
is there any function in C++ that calculates a fingerprint or hash of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.