I need to access to two differente Jasper Servers located at two different web servers, each of them is requesting for a different SSL Certificate so I need to install these two cetificates in the Key Store (Preferences > Jaspersoft Studio > JasperReports Server Settings > KeyStore ) but it looks like there is no way to instal to certificates, the button "ADD" is not adding a new certificate, it is just replacing the one stored.
Do anybody knows how could I load the two certificates, or an alternative way to acces these two differentes srervers?
The solution is to prepare a keystore with the two certificates.
Suppose you have two certificates (server1.cer and server2.cer). Below is an example to add these two certificates to the same keystore using Java tool. You can use OpenSSL too to do the same.
By using a recent version Java, i.e. java 11, create the key store with the following commands:
keytool -import -keystore myStore.jks -alias Server1 -file server1.cer
keytool -import -keystore myStore.jks -alias Server2 -file server2.cer
You can verify that both the certs are in the store by running:
keytool -list -keystore myStore.jks
You should see the two certs in the output if both are successfully added to the keystore.
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 2 entries
server1, May 17, 2023, trustedCertEntry, Certificate fingerprint (SHA-256): CA:3B:B2:FB:A3:1C:30:90:C2:CA:89:F0:F0:BD:BC:1A:65:1A:AA:29:44:E8:AA:25:9C:af:6D:bc:33:EA:6F:95
server2, May 17, 2023, trustedCertEntry, Certificate fingerprint (SHA-256): 73:A5:89:84:5D:9F:C6:A6:5F:44:3F:D5:32:16:70:EE:F9:14:C0:F4:11:BA:35:76:A5:17:0B:A8:0D:66:20:55
Then you can import this keystore with both the certificates i.e. myStore.jks in Jaspersoft Studio.