Show TOC Start of Content Area

Background documentation Interfaces and Classes for Using the Secure Connection Factory  Locate the document in its SAP Library structure

The interfaces and classes for using secure connection factory are located in the package com.sap.security.core.server.https., in the façade tc~bl~security~lib.

Using the Secure Connection Factory

The most important class provided with the secure connection factory is the SecureConnectionFactory class. This class provides the methods used for initializing the factory and creating the HTTPS connection or SSL socket instance. Methods available include:

·        createSocket

·        createURLConnection

·        getDefault

·        initFactory

·        setConnectionHeader

·        setDefaultSSLContext

·        setHostnameVerifier

·        setIgnoreServerCertificate

·        setSSLDebugStream

·        setUseProxyForSocketConnection

The interface SocketFactory, which is also implemented by the SecureConnectionFactory class, is available for establishing SSL socket instances.

Verifying Host Names

You can use the interface HostnameVerifier to handle the case where the server name found in the target server’s certificate does not match the host name used in the connection URL. The method available is verify. We also provide a default implementation with the DefaultHostnameVerifier class.

Utilities

The Utils class provides additional utilities for the secure connection factory. Some of the methods available include:

·        getHTTPheaders

·        getProxySocket

·        isNonProxyHost

·        setBasicAuthenticationHeader

·        setIgnoreServerCertificate

·        setProxyAuthentication

·        setSSLDebugStream

For more information, see the JavaDocs for the corresponding interfaces and classes.

 

End of Content Area