What I did now is to import the certificate (.der file) in the java keystore, in this way:
"C:\Program Files\Java\jdk1.8.0_281\bin\keytool.exe" -import -alias serverkey -keystore myKeyStore.ts -file myCertificate.der
and during the application startup:
File trustStore = new File(MyClass.class.getClassLoader().getResource("cert/
myKeyStore.ts").getFile());
System.setProperty("javax.net.ssl.trustStore", trustStore.getAbsolutePath());
System.setProperty("javax.net.ssl.trustStorePassword", "myPassword");
The exception I get is:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'auditContext' defined in class path resource [org/openehealth/ipf/boot/atna/IpfAtnaAutoConfiguration.class]: Unsatisfied dependency expressed through method 'auditContext' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditTransmissionProtocol' defined in class path resource [org/openehealth/ipf/boot/atna/IpfAtnaAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol]: Factory method 'auditTransmissionProtocol' threw exception; nested exception is org.openehealth.ipf.commons.audit.AuditException: java.lang.reflect.InvocationTargetException
Anybody has a suggestion ?
Thanks
Andrea Caloni