Class ExportControlled
java.lang.Object
com.mysql.jdbc.ExportControlled
Holds functionality that falls under export-control regulations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImplementation of internal socket factory to wrap the SSL socket.static classImplementation of X509TrustManager wrapping JVM X509TrustManagers to add expiration check -
Method Summary
Modifier and TypeMethodDescriptionstatic RSAPublicKeydecodeRSAPublicKey(String key, ExceptionInterceptor interceptor) protected static booleanenabled()static byte[]encryptWithRSAPublicKey(byte[] source, RSAPublicKey key, String transformation, ExceptionInterceptor interceptor) static booleanisSSLEstablished(Socket socket) protected static voidtransformSocketToSSLSocket(MysqlIO mysqlIO) Converts the socket being used in the given MysqlIO to an SSLSocket by performing the SSL/TLS handshake.
-
Method Details
-
enabled
protected static boolean enabled() -
transformSocketToSSLSocket
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.SQLException
-
isSSLEstablished
-
decodeRSAPublicKey
public static RSAPublicKey decodeRSAPublicKey(String key, ExceptionInterceptor interceptor) throws SQLException - Throws:
SQLException
-
encryptWithRSAPublicKey
public static byte[] encryptWithRSAPublicKey(byte[] source, RSAPublicKey key, String transformation, ExceptionInterceptor interceptor) throws SQLException - Throws:
SQLException
-