com.urbancode.air.XTrustManagerFactory.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 javax.net.ssl.ManagerFactoryParameters
import javax.net.ssl.TrustManager
import javax.net.ssl.TrustManagerFactorySpi
import java.security.InvalidAlgorithmParameterException
import java.security.KeyStore
public class XTrustManagerFactory extends TrustManagerFactorySpi {
//**********************************************************************************************
// CLASS
//**********************************************************************************************
//**********************************************************************************************
// INSTANCE
//**********************************************************************************************
//------------------------------------------------------------------------------------------
public XTrustManagerFactory() {
}
//------------------------------------------------------------------------------------------
@Override
protected void engineInit(KeyStore keystore) {
}
//------------------------------------------------------------------------------------------
@Override
protected void engineInit(ManagerFactoryParameters managerParams)
throws InvalidAlgorithmParameterException {
throw new InvalidAlgorithmParameterException(
"XTrustManagerFactory cannot be initialized using ManagerFactoryParameters");
}
//------------------------------------------------------------------------------------------
@Override
protected TrustManager[] engineGetTrustManagers() {
List managerList = new ArrayList();
managerList.add(new OpenX509TrustManager());
return managerList.toArray(new TrustManager[managerList.size()]);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy