It depends on the system. Windows has a centralized certificate store, but on other platforms there is no (at least there is no single). Therefore, requesting system certificates is platform dependent. And be that as it may, it would be prudent to look for the JNI for the platform specific API in order to do what you need.
I assume that for Windows there is already a class that most likely works through JNI, but I have never seen it. I will also be interested in such a solution (for specific purposes, when JNI cannot be used).
source share