I am developing a secure chat program in Java using JSSE.
For 2 people to communicate you specify the keystore to use e.g. Bob will start the program with bob.keystore and alice will start program with alice.keystore
The way I have it setup and working is as follows
On Bob's side he has a keystore that has his keypair and has Alice's certificate imported as a trusted cert.
On Alices's side she has a keystore with her keypair and Bob's certificate imported as a trusted cert.
Is this the correct setup/procedure?