fetchExc - Adding server certificate to certificate store
fetchExc - Adding server certificate to certificate store
If you use https connection (Secure=true) and Exchange server has self-signed certificate you have to add server's certificate to cacerts store.
- Export certificate from Exchange server.
- With IE: Surf to Exchange servers login page. Double-click padlock and change to Details-view on opening Certficate-window. Click Copy to File -> Next -> Choose DER encoded -> give filename (for ex. myexch.der) and save.
- With OpenSSL:
- $ openssl s_client -connect exch.server.addr:443 > myexch.der
- Press Control-D after few seconds
- Edit myexch.der so that it starts with line -----BEGIN CERTIFICATE and ends with -----END CERTIFICATE
- Move this certificate file to your target machine.
- Import key in java keystore (default password is 'changeit'). Go to javaroot/jre/lib/security. There: ../../bin/keytool -import -keystore cacerts -alias MyExchange -file /path/to/myexch.der
Now you should be able to get messsages from exchange