I am getting error: "javax.net.ssl.SSLPeerUnverifiedException: SSL peer failed hostname validation for name: null" while running the java application on my local machine.
I have created the key stores like following and added the jks file in classpath. Still the error is not resolved.
@Bean
public KeyManager keyManager() {
DefaultResourceLoader loader = new DefaultResourceLoader();
Resource storeFile = loader.getResource("classpath:samlKeystore.jks");
String storePass = "password";
Map<String, String> passwords = new HashMap<String, String>();
passwords.put("username", "password");
String defaultKey = "username";
return new JKSKeyManager(storeFile, storePass, passwords, defaultKey);
}
Can anyone please help me with it ?
I am using Spring SAML as service provider and Salesforce as IdP.