com.novell.ldap.LDAPConnection.startTLS()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中com.novell.ldap.LDAPConnection.startTLS()方法的一些代码示例,展示了LDAPConnection.startTLS()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.startTLS()方法的具体详情如下:
包路径:com.novell.ldap.LDAPConnection
类名称:LDAPConnection
方法名:startTLS

LDAPConnection.startTLS介绍

[英]Starts Transport Layer Security (TLS) protocol on this connection to enable session privacy.

This affects the LDAPConnection object and all cloned objects. A socket factory that implements LDAPTLSSocketFactory must be set on the connection.
[中]在此连接上启动传输层安全(TLS)协议以启用会话隐私。
这将影响LDAPConnection对象和所有克隆对象。必须在连接上设置实现LDAPTLSSocketFactory的套接字工厂。

代码示例

代码示例来源:origin: glyptodon/guacamole-client

ldapConnection.startTLS();

代码示例来源:origin: com.novell.ldap/jldap

/**
 * Starts Transport Layer Security (TLS) protocol on this connection
 * to enable session privacy.
 *
 * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#startTLS()">
    com.novell.ldap.LDAPConnection.startTLS()</a>
 */
public void startTLS() throws LDAPException
{
  try {
    conn.startTLS();
  } catch( com.novell.ldap.LDAPException ex) {
    throw new LDAPException( ex);
  }
  return;
}

代码示例来源:origin: sakaiproject/sakai

protected void postConnect(LDAPConnection conn) throws LDAPException {
  
  if ( log.isDebugEnabled() ) {
    log.debug("postConnect()");
  }
  
  if ( config.isSecureConnection() && isTlsSocketFactory() ) {
    if ( log.isDebugEnabled() ) {
      log.debug("postConnect(): starting TLS");
    }
    conn.startTLS();
  }
}

代码示例来源:origin: stackoverflow.com

LDAPConnection connection = new LDAPConnection( new LDAPJSSEStartTLSFactory() );
connection.connect(hostname, port);
connection.startTLS();
connection.bind(LDAPConnection.LDAP_V3, username+"@"+domain, password.getBytes());

相关文章