java - How to create an SSLEngine with all the same public keys/certs from chrome, firefox or any browser? -
is there anyway create sslengine using certs installed chrome? remember default has quite few authority public certs installed.
i think, since chrome works websites know of, bit more exhaustive , it's easier install chrome , rely on that.
thanks, dean
from gather each browser uses it's own certificate storage. there 3 solutions: 1 static, 1 dynamic , 1 "good enough". here go:
static solution - read documentation, find out how read certificates (or whole chains) browsers' storage, export them hand , import them java's cacerts storage or custom one.
dynamic solution - same thing above, during application startup.
lazy good-enough solution - nothing , hope certificates in cacerts jks identical in browser, chrome, firefox, opera or ie.
but note following: https://bugzilla.mozilla.org/show_bug.cgi?id=1265113 seems on windows chrome reads certificates windows' certificates store, in reality application should read system certificate store , use it: on linux there /usr/share/ca-certificates , start windows try: https://superuser.com/questions/411909/where-is-the-certificate-folder-in-windows-7
unfortunately seems implementation pretty convoluted - hey!, makes pretty open source project :)