FileDocCategorySizeDatePackage
IBMFakeTrustSocketFactory.javaAPI DocApache Axis 1.43460Sat Apr 22 18:57:26 BST 2006org.apache.axis.components.net

IBMFakeTrustSocketFactory

public class IBMFakeTrustSocketFactory extends IBMJSSESocketFactory
Hook for Axis sender, allowing unsigned server certs

Fields Summary
protected static Log
log
Field log
Constructors Summary
public IBMFakeTrustSocketFactory(Hashtable attributes)
Constructor FakeTrustSocketFactory

param
attributes


             
       
        super(attributes);
    
Methods Summary
protected com.ibm.net.ssl.SSLContextgetContext()
Method getContext

return
throws
Exception


        try {
            SSLContext sc = SSLContext.getInstance("SSL");

            sc.init(null, // we don't need no stinkin KeyManager
                    new TrustManager[]{new FakeX509TrustManager()},
                    new java.security.SecureRandom());
            if (log.isDebugEnabled()) {
                log.debug(Messages.getMessage("ftsf00"));
            }
            return sc;
        } catch (Exception exc) {
            log.error(Messages.getMessage("ftsf01"), exc);
            throw new Exception(Messages.getMessage("ftsf02"));
        }