com.mathworks.mps.client

## Class MWSSLDefaultConfig

- java.lang.Object
- - com.mathworks.mps.client.MWSSLDefaultConfig

- All Implemented Interfaces:
    MWSSLConfig

      public class MWSSLDefaultConfig
      extends java.lang.Object
      implements MWSSLConfig

  Default implementation of `MWSSLConfig` interface. This is used while creating an instance of `MWHttpClient` when there is no user defined implementation of `MWSSLConfig` interface.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MWSSLDefaultConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.net.ssl.HostnameVerifier` | `getHostnameVerifier()` Returns the default implementation of `HostnameVerifier` interface.
    `MWSSLServerAuthorizer` | `getServerAuthorizer()` Returns the default implementation for extra level of server authorization.
    `javax.net.ssl.SSLContext` | `getSSLContext()` Returns the default `SSLContext` obtained by the call to `SSLContext.getDefault()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MWSSLDefaultConfig

          public MWSSLDefaultConfig()

  - ### Method Detail

    - #### getSSLContext

          public javax.net.ssl.SSLContext getSSLContext()

      Returns the default `SSLContext` obtained by the call to `SSLContext.getDefault()`
      Specified by:
        `getSSLContext` in interface `MWSSLConfig`
      Returns:
        Default `SSLContext`

    - #### getHostnameVerifier

          public javax.net.ssl.HostnameVerifier getHostnameVerifier()

      Returns the default implementation of `HostnameVerifier` interface. The default implementation of the `verify` method of this interface returns `false` if the hostname does not match the Common Name (CN) in the server certificate else it return `true`.
      Specified by:
        `getHostnameVerifier` in interface `MWSSLConfig`
      Returns:
        Default implementation of `HostnameVerifier`

    - #### getServerAuthorizer

          public MWSSLServerAuthorizer getServerAuthorizer()

      Returns the default implementation for extra level of server authorization. The authorization is performed based on the server certificate provided during the initial SSL handshake and before any data is exchanged between the client and the server. The default implementation allows all the servers to exchange data with the client. Also, it does not require the server to send a certificate.
      Specified by:
        `getServerAuthorizer` in interface `MWSSLConfig`
      Returns:
        default implementation for extra level of server authorization

Copyright 2010-2022 The MathWorks, Inc.