I have been given a pem file which has two certificates in it.
The first is the certificate is specific to my company (i.e. the subject is specific to my company).
The second certificate is the certificate for the issuer.
It looks something like this...
Bag Attributes
localKeyID: 01 00 00 00
friendlyName: CCAPI Client Certificate
Key Attributes
X509v3 Key Usage: 10
-----BEGIN RSA PRIVATE KEY-----
<<contents>>
-----END RSA PRIVATE KEY-----
Bag Attributes
localKeyID: 01 00 00 00
friendlyName: CCAPI Client Certificate
subject=MyCompany CN/OU/O/L/ST/C
issuer=Issuer CN/OU/O/L/ST/C
-----BEGIN CERTIFICATE-----
<<contents>>
-----END CERTIFICATE-----
Bag Attributes
localKeyID: 02 00 00 00
subject=Issuer CN/OU/O/L/ST/C
issuer=Issuer CN/OU/O/L/ST/C
-----BEGIN CERTIFICATE-----
<<contents>>
-----END CERTIFICATE-----
Firstly I'd like to confirm a couple of things.
Terminology wise is it correct to say I have a pem file with two certificates? How do I describe the PRIVATE KEY part? Is that the public key of the server I am trying to connect to?
And secondly I need to use the keytool command to create a java keystore file (jks) with both certificate and the issue certificate in it.
Can someone help me with the commands to do that. I'm spent a lot of time googling but there seems to be a lot of varying use cases out there which is confusing me.
thanks in advance