Connecting to existing server using java client
sir/mam,
my current situation is that i have VC++ client which connects to java server over secure socket connection using existing certificate and private key in format CA.pem and key.pem (while CA.pem contains chain of certifications and public key nad key.pem is private key for each client)..now i want to develop small client code in java which will connect to existing java server using this cryptography information.I converted this .pem format to java compatible format .DER but i dont know what next steps i need to take to get connected with server.
i am aware of java.security and java.crypto package and can hanle the functionality very well.but prior to that some seetings and imports need to be done with keystore and truststore..which i dont know..please help me to come out of this situation...tell functions that i need to implement at each step before i can start java cryptography code..
[926 byte] By [
miryavera] at [2007-10-2 21:25:40]

thanks a lot man i did that and name the java keystore type as "jks" and provider as "SUN".and this key store file is stored in my home directory.Shall i create two key stores for each Certifaction athority.pem and private key.pem..
what will be my next step to use the keystore and start handshaking with the server.
> thanks a lot man i did that and name the java
> keystore type as "jks" and provider as "SUN".and this
> key store file is stored in my home directory.
How exactly did you get the private key into the keystore?
I know how I wouldve done it...
> Shall i
> create two key stores for each Certifaction
> athority.pem and private key.pem..
Wait, so did you put the pem files in a keystore or not? You say
you did, but then you ask if you should put them in separate keystores...
No, do not do this. The public and private keys need to be in
the same keystore.
> what will be my next step to use the keystore and
> start handshaking with the server.
Any java-jsse tutorial should be able to explain that just fine, but if you'd
rather get your information from a less reputable source (like me) I'll
certainly oblige with some code. Lets first verify that your private
key and public key (with chain) are correctly installed in a single keystore.
It'll make it easier to debug this later if I know we've got the keystore configured
properly.
--