FileDocCategorySizeDatePackage
SunFakeTrustSocketFactory.javaAPI DocApache Axis 1.43461Sat Apr 22 18:57:28 BST 2006org.apache.axis.components.net

SunFakeTrustSocketFactory

public class SunFakeTrustSocketFactory extends SunJSSESocketFactory
Hook for Axis sender, allowing unsigned server certs

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

param
attributes


             
       
        super(attributes);
    
Methods Summary
protected com.sun.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"));
        }