Fix NPE when ws.acceptAnyCertificate is used; make keystore and truststore config independent.