No cert sent from java client to IIS Server
843811Sep 18 2002 — edited Dec 10 2002Hey anyone can help? I got an urgent problem. Here's the background:
1. I need to send an xml to a https IIS server that authenticates by digital cert.
2. I have generated a keystore using the following cmd:
keytool -genkey -alias mykey -keystore mykeystore -keyalg rsa
3. I exported a public key/certificate using the keystore generated in step 2:
keytool -export -rfc -alias mykey -v -keystore mykeystore -file client.cer
4. I sent the cert generated in step 3 to the server for them to install.
5. The server sent me a public key and I have imported it into my keystore:
keytool -import -trustcacerts -file server.cer -keystore mykeystore
6. There no need for a CA here cos the server just explicitly trust my public key.
Here's where the problems comes. I use HttpsURLConnection to connect to the server's https url. It seems that no cert was actually being sent over(have used getLocalCertificates method to find out). And the server always reject me. I have not attached any code here, cos it might become too long.
Really urgent. I got no untrusted cert msg also. But it seems that there's always no cert being sent out.
Help!!!