I am working on a Java project. I need to generate a RSA keypair then use them to communicate with others.
I see that KeyStore could store KeyStore.PrivateKeyEntry but it need a Certificate[] chain. I have created certificate using my function but now I have only one certificate with the private key instead of chain of certificates ? How do i programmatically store this private key and certificate in the keystore ?
Or if there is a way to add private key and public key only instead of certificate. I can use that private key later to create my certificate.
Is there anyone could paste some example code used to store private key and public key.