Using Microsft Certificate Services user can enroll/create their own certificate. How i can create this certificate using a Java Program?
Could anybody point out ri开发者_运维技巧ght apis for connecting to Microsoft certification services and do the certificate managing tasks?
You can get information around the API here
From here you can find information around keyTool which is used to generate certificates
Following commands might be of help to 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 programmatically access MS CryptoAPI also.
Seems JDK already had something to talk to MS Certification services. Please check out this link. There is an example too accompanying the same link.
It looks like you will have to create wrappers around Windows Cryptography API. Specifically these for CSP provided by certadm.dll and enroll provided by xenroll.dll.
HTH
精彩评论