javax.net.ssl.TrustManagerFactorySpi Java Examples

The following examples show how to use javax.net.ssl.TrustManagerFactorySpi. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AcceptAnyTrustManager.java    From ditto with Eclipse Public License 2.0 6 votes vote down vote up
private Factory(final TrustManagerFactory delegate) {
    super(new TrustManagerFactorySpi() {
        @Override
        protected void engineInit(KeyStore keyStore) {
        }

        @Override
        protected void engineInit(ManagerFactoryParameters managerFactoryParameters) {
        }

        @Override
        protected TrustManager[] engineGetTrustManagers() {
            return new TrustManager[]{new AcceptAnyTrustManager()};
        }
    }, delegate.getProvider(), delegate.getAlgorithm());
}
 
Example #2
Source File: DittoTrustManagerFactory.java    From ditto with Eclipse Public License 2.0 6 votes vote down vote up
private DittoTrustManagerFactory(final TrustManagerFactory delegate, final String hostname) {
    super(new TrustManagerFactorySpi() {
        @Override
        protected void engineInit(KeyStore keyStore) throws KeyStoreException {
            delegate.init(keyStore);
        }

        @Override
        protected void engineInit(ManagerFactoryParameters managerFactoryParameters) throws
                InvalidAlgorithmParameterException {
            delegate.init(managerFactoryParameters);
        }

        @Override
        protected TrustManager[] engineGetTrustManagers() {
            return DittoTrustManager.wrapTrustManagers(delegate.getTrustManagers(), hostname);
        }
    }, delegate.getProvider(), delegate.getAlgorithm());
}
 
Example #3
Source File: SnowTrustManagerFactory.java    From snowblossom with Apache License 2.0 4 votes vote down vote up
public SnowTrustManagerFactory(TrustManagerFactorySpi spi, Provider provider, String algo)
{
  super(spi, provider, algo);
}