Enabling Single and Mutual SSL Authentication

Secure sockets layer (SSL) is a protocol that governs certificate authentication. It exchanges the certificate information. SSL also encrypts all information that flows between a client and a server.

In single SSL connection, the client needs to trust the server certificate. This can be done one of the three ways:
  • The CA certificate can be installed on the device trust store which the application takes while connecting to the HTTPS URL.
  • The CA certificate can be bundled in the application and the setServerCertificate method can be invoked to provide the certificate. This is not a recommended way, but can used in case of backward compatibility.
    Note: Applicable to android device older than 4.0 version.
  • If the application does not provide the certificate, application can implement the ISSLChallengeListener. The application receives a callback to the isServerTrusted method. Where the application receives the server certificate it can choose to trust the certificate or not. Based on that it returns the boolean value as true or false.
In mutual SSL connection, the server needs to trust the client certificate. In this case the application implements IMutualSSLChallengeListener. And getClientCertificate callback method is invoked to request the client certificate. The client returns an X.509 certificate, and a private key, which together will be formed into an HttpClientCertInfo object.
Note:
  • For mutual SSL, both single and mutual listeners need to be implemented.
  • During onboarding with single and mutual SSL, add fully qualified domain name of the Unwired Server. For example, vmw5541.wdf.sap.corp or vw<xxx>.dhcp.wdf.sap.corp.

Examples