| | |
| | | public void initializeConnectionSecurityProvider(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | // Initialize default values for the connection-specific variables. |
| | | clientConnection = null; |
| | | socketChannel = null; |
| | |
| | | */ |
| | | public void finalizeConnectionSecurityProvider() |
| | | { |
| | | |
| | | // No implementation is required. |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getSecurityMechanismName() |
| | | { |
| | | |
| | | return SSL_CONTEXT_INSTANCE_NAME; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean isSecure() |
| | | { |
| | | |
| | | // This should be considered secure. |
| | | return true; |
| | | } |
| | |
| | | SocketChannel socketChannel) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | return new TLSConnectionSecurityProvider(clientConnection, socketChannel, |
| | | this); |
| | | } |
| | |
| | | */ |
| | | public void disconnect(boolean connectionValid) |
| | | { |
| | | |
| | | if (connectionValid) |
| | | { |
| | | try |
| | |
| | | */ |
| | | public int getClearBufferSize() |
| | | { |
| | | |
| | | return clearBufferSize; |
| | | } |
| | | |
| | |
| | | */ |
| | | public int getEncodedBufferSize() |
| | | { |
| | | |
| | | return sslBufferSize; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean readData() |
| | | { |
| | | |
| | | |
| | | while (true) |
| | | { |
| | | try |
| | |
| | | */ |
| | | public boolean writeData(ByteBuffer clearData) |
| | | { |
| | | |
| | | int originalPosition = clearData.position(); |
| | | int originalLimit = clearData.limit(); |
| | | int length = originalLimit - originalPosition; |
| | |
| | | */ |
| | | public String[] getEnabledProtocols() |
| | | { |
| | | |
| | | return enabledProtocols; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setEnabledProtocols(String[] enabledProtocols) |
| | | { |
| | | |
| | | this.enabledProtocols = enabledProtocols; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String[] getEnabledCipherSuites() |
| | | { |
| | | |
| | | return enabledCipherSuites; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setEnabledCipherSuites(String[] enabledCipherSuites) |
| | | { |
| | | |
| | | this.enabledCipherSuites = enabledCipherSuites; |
| | | } |
| | | |
| | |
| | | */ |
| | | public SSLClientAuthPolicy getSSLClientAuthPolicy() |
| | | { |
| | | |
| | | return sslClientAuthPolicy; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setSSLClientAuthPolicy(SSLClientAuthPolicy sslClientAuthPolicy) |
| | | { |
| | | |
| | | this.sslClientAuthPolicy = sslClientAuthPolicy; |
| | | } |
| | | |
| | |
| | | */ |
| | | public SSLSession getSSLSession() |
| | | { |
| | | |
| | | return sslEngine.getSession(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public Certificate[] getClientCertificateChain() |
| | | { |
| | | |
| | | try |
| | | { |
| | | return sslEngine.getSession().getPeerCertificates(); |