ExportControlled
Date: 2018-05-06

com.mysql.jdbc

## Class ExportControlled

- java.lang.Object
- - com.mysql.jdbc.ExportControlled

-     public class ExportControlled
      extends java.lang.Object

  Holds functionality that falls under export-control regulations.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ExportControlled.StandardSSLSocketFactory` Implementation of internal socket factory to wrap the SSL socket.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.security.interfaces.RSAPublicKey` | `decodeRSAPublicKey(java.lang.String key, ExceptionInterceptor interceptor)`
    `protected static boolean` | `enabled()`
    `static byte[]` | `encryptWithRSAPublicKey(byte[] source, java.security.interfaces.RSAPublicKey key, ExceptionInterceptor interceptor)`
    `static boolean` | `isSSLEstablished(MysqlIO mysqlIO)`
    `protected static void` | `transformSocketToSSLSocket(MysqlIO mysqlIO)` Converts the socket being used in the given MysqlIO to an SSLSocket by performing the SSL/TLS handshake.

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

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

- - ### Method Detail

    - #### enabled

          protected static boolean enabled()

    - #### transformSocketToSSLSocket

          protected static void transformSocketToSSLSocket(MysqlIO mysqlIO)
                                                    throws java.sql.SQLException

      Converts the socket being used in the given MysqlIO to an SSLSocket by performing the SSL/TLS handshake.
      Parameters:
        `mysqlIO` - the MysqlIO instance containing the socket to convert to an SSLSocket.
      Throws:
        `CommunicationsException` - if the handshake fails, or if this distribution of Connector/J doesn't contain the SSL crypto hooks needed to perform the handshake.
        `java.sql.SQLException`

    - #### isSSLEstablished

          public static boolean isSSLEstablished(MysqlIO mysqlIO)

    - #### decodeRSAPublicKey

          public static java.security.interfaces.RSAPublicKey decodeRSAPublicKey(java.lang.String key,
                                                                 ExceptionInterceptor interceptor)
                                                                          throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### encryptWithRSAPublicKey

          public static byte[] encryptWithRSAPublicKey(byte[] source,
                                       java.security.interfaces.RSAPublicKey key,
                                       ExceptionInterceptor interceptor)
                                                throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`