Alister
Alister

Reputation: 1

Spring ssl bundle for certificate material from windows certificate stores - server and client certificates

I've raised this issue with spring and received some great guidance on how to extend spring's recently added SSL bundles to accessing the material from the windows cert store. I am looking to lower the cost of maintaining and managing these certificates and storing and fetching them from the windows store is hence advantageous. I already have a solution for CA/trust material - this is specifically about server and client certificates.

I'm looking for any clues on how to implement it - mostly in Java, or JNI. I found some general information here Accessing Windows Certificate Store certs via Java? but i'm hoping to find some more concrete information before i dive into implementation so i don't take a wrong path

It directs me to here - which is good, if i know i have to resort to JNI (And also

But before i dive into JNI i wanted to understand more about java-security-mscapi-provider and how it gets material from either the MY cert store or the ROOT cert store. I dove into these links, but hit a dead end trying to find where it actually enumerates the cert stores in windows and finds one of those Java security - MSCAPI provider: How to use without password popup? https://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunMSCAPI https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/SunMSCAPI.java

Can anyone point me to how mscapi finds and loads information from the MY store ? Can anyone give me a reason that doing this in Java won't work - and i should just use the C/JNI approach ?

Note we already use a jks in the filesystem, and i can configure bundles as a pem, or a jks - i am specifically interested in the windows store for a lower maintenance option.

Upvotes: 0

Views: 319

Answers (0)

Related Questions