Use Windows' certificate store by default instead of Java's truststore

cusax-fix
Ingo Bauersachs 13 years ago
parent 2b3a85607b
commit 3409449ec8

@ -173,8 +173,16 @@ private void setTrustStore()
String tsType = (String)config.getProperty(PNAME_TRUSTSTORE_TYPE);
String tsFile = (String)config.getProperty(PNAME_TRUSTSTORE_FILE);
String tsPassword = credService.loadPassword(PNAME_TRUSTSTORE_PASSWORD);
// use the OS store as default store on Windows
if (tsType == null
&& !"meta:default".equals(tsType)
&& OSUtils.IS_WINDOWS)
{
config.setProperty(PNAME_TRUSTSTORE_TYPE, "Windows-ROOT");
}
if(tsType != null)
if(tsType != null && !"meta:default".equals(tsType))
System.setProperty("javax.net.ssl.trustStoreType", tsType);
else
System.getProperties().remove("javax.net.ssl.trustStoreType");

@ -199,8 +199,9 @@ public void actionPerformed(ActionEvent e)
}
if (e.getSource() == rdoUseJava)
{
CertConfigActivator.getConfigService().removeProperty(
CertificateService.PNAME_TRUSTSTORE_TYPE);
CertConfigActivator.getConfigService().setProperty(
CertificateService.PNAME_TRUSTSTORE_TYPE,
"meta:default");
CertConfigActivator.getConfigService().removeProperty(
CertificateService.PNAME_TRUSTSTORE_FILE);
CertConfigActivator.getCredService().removePassword(

Loading…
Cancel
Save