com.mathworks.mps.client

## Class MWCustomSSLContext

- java.lang.Object
- - javax.net.ssl.SSLContext
  - - com.mathworks.mps.client.MWCustomSSLContext

-     public final class MWCustomSSLContext
      extends javax.net.ssl.SSLContext

  This class is going to use a standard SSLContext to implement an SSLContextSpi. That SPI will only support the given list of protocols by intercepting calls that create SSL engines, SocketFactories and ServerSocketFactories and replacing them with objects which only provide the given list of enabled protocols. SSLContext.getInstance() does not provide a way to disable a security protocol directly. Since SSLv3 has been designated insecure as of the "poodle" discovery, the MWCustomSSLContext implements an SSLContextSpi to disable SSLv3 by default and should be used to get the SSLContext instance instead.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.net.ssl.SSLContext` | `getInstance(java.lang.String... protocols)` Creates a SSLContext object that implements the specified secure socket protocol given by the first argument, where the enabled protocols of the SSL object returned will be reduced to "protocols".
    `static javax.net.ssl.SSLContext` | `getInstance(java.lang.String protocol)` Creates a SSLContext object that implements the specified secure socket protocol where the enabled protocols of the SSL object returned will be reduced to "protocol".
    `static javax.net.ssl.SSLContext` | `getInstance(java.lang.String protocol, java.lang.String protocol2)` Creates a SSLContext object that implements the specified secure socket protocol "protocol" where the enabled protocols of the SSL object returned will be reduced to "protocol" and "protocol2".

    - ### Methods inherited from class javax.net.ssl.SSLContext

      `createSSLEngine, createSSLEngine, getClientSessionContext, getDefault, getDefaultSSLParameters, getInstance, getProtocol, getProvider, getServerSessionContext, getServerSocketFactory, getSocketFactory, getSupportedSSLParameters, init, setDefault`

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

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

- - ### Method Detail

    - #### getInstance

          public static javax.net.ssl.SSLContext getInstance(java.lang.String protocol)
                                                      throws java.security.NoSuchAlgorithmException

      Creates a SSLContext object that implements the specified secure socket protocol where the enabled protocols of the SSL object returned will be reduced to "protocol".
      Parameters:
        `protocol` - secure socket protocol
      Returns:
        SSLContext object that implements the specified secure socket protocol
      Throws:
        `java.security.NoSuchAlgorithmException`

    - #### getInstance

          public static javax.net.ssl.SSLContext getInstance(java.lang.String protocol,
                                                             java.lang.String protocol2)
                                                      throws java.security.NoSuchAlgorithmException

      Creates a SSLContext object that implements the specified secure socket protocol "protocol" where the enabled protocols of the SSL object returned will be reduced to "protocol" and "protocol2".
      Parameters:
        `protocol` - secure socket protocol
        `protocol2` - secure socket protocol
      Returns:
        a SSLContext object that implements the specified secure socket protocol "protocol"
      Throws:
        `java.security.NoSuchAlgorithmException`

    - #### getInstance

          public static javax.net.ssl.SSLContext getInstance(java.lang.String... protocols)
                                                      throws java.security.NoSuchAlgorithmException

      Creates a SSLContext object that implements the specified secure socket protocol given by the first argument, where the enabled protocols of the SSL object returned will be reduced to "protocols".
      Parameters:
        `protocols` - secure socket protocol(s)
      Returns:
        a SSLContext object that implements the specified secure socket protocol given by the first argument
      Throws:
        `java.security.NoSuchAlgorithmException`

Copyright 2010-2022 The MathWorks, Inc.