Registering a Certificate with Microsoft Certificate Services for a Java User

Using the Microsft Certificate Service, a user can register / create their own certificate. How can I create this certificate using a Java program?

Can someone specify the correct apis to connect to Microsoft Certificate Services and perform certificate management tasks?

+6
source share
3 answers

You can get API information here.

From here you can find information around keyTool, which is used to create certificates.

The following commands can help you.

keytool -genkey -keystore server-keystore.jks -alias server_alias \ -dname "CN=hostnameofserver,OU=orgunit" \ -keyalg "RSA" -sigalg "SHA1withRSA" -keysize 2048 -validity 365 keytool -export -keystore server-keystore.jks -alias server_alias -file server.crt keytool -import -keystore client-truststore.jks -file server.crt 

From JDK 1.6, you can also programmatically access MS CryptoAPI.

+5
source

It seems that the JDK already has something to talk to MS certification services. Check out this link. There is an example that accompanies the same link.

+3
source

It looks like you will have to create wrappers around the Windows Cryptography API . In particular, certadm.dll is provided for CSP and xenroll.dll is provided for enroll.

NTN

+1
source

Source: https://habr.com/ru/post/895941/


All Articles