com.urbancode.air.XTrustProvider.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of groovy-plugin-utils Show documentation
Show all versions of groovy-plugin-utils Show documentation
A set of utility scripts than can be used in community plugins on JazzHub
The newest version!
package com.urbancode.air
import java.security.Provider
import java.security.Security
public class XTrustProvider extends Provider {
//**********************************************************************************************
// CLASS
//**********************************************************************************************
final static private long serialVersionUID = 1L;
//----------------------------------------------------------------------------------------------
static public void install() {
if (Security.getProvider(XTrustProvider.class.getSimpleName()) == null) {
Security.insertProviderAt(new XTrustProvider(), 2);
Security.setProperty("ssl.TrustManagerFactory.algorithm", "XTrust509");
}
}
//**********************************************************************************************
// INSTANCE
//**********************************************************************************************
//----------------------------------------------------------------------------------------------
public XTrustProvider() {
super(XTrustProvider.class.getSimpleName(), 1D,
"Basic XTrustProvider ignoring invalid certificates");
put("TrustManagerFactory.XTrust509", XTrustManagerFactory.class.getName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy