com.unboundid.ldap.sdk.LDAPConnection.convertToTLS()方法的使用及代码示例

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

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

LDAPConnection.convertToTLS介绍

[英]Converts this clear-text connection to one that encrypts all communication using Transport Layer Security. This method is intended for use as a helper for processing in the course of the StartTLS extended operation and should not be used for other purposes.
[中]将此明文连接转换为使用传输层安全性加密所有通信的连接。此方法旨在用作StartTLS扩展操作过程中处理的帮助程序,不应用于其他目的。

代码示例

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

/**
 * Converts the provided clear-text connection to one that encrypts all
 * communication using Transport Layer Security.  This method is intended for
 * use as a helper for processing in the course of the StartTLS extended
 * operation and should not be used for other purposes.
 *
 * @param  connection        The LDAP connection to be converted to use TLS.
 * @param  sslSocketFactory  The SSL socket factory to use to convert an
 *                           insecure connection into a secure connection.  It
 *                           must not be {@code null}.
 *
 * @throws  LDAPException  If a problem occurs while converting the provided
 *                         connection to use TLS.
 */
@InternalUseOnly()
public static void convertToTLS(final LDAPConnection connection,
                final SSLSocketFactory sslSocketFactory)
    throws LDAPException
{
 connection.convertToTLS(sslSocketFactory);
}

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

/**
 * Converts the provided clear-text connection to one that encrypts all
 * communication using Transport Layer Security.  This method is intended for
 * use as a helper for processing in the course of the StartTLS extended
 * operation and should not be used for other purposes.
 *
 * @param  connection        The LDAP connection to be converted to use TLS.
 * @param  sslSocketFactory  The SSL socket factory to use to convert an
 *                           insecure connection into a secure connection.  It
 *                           must not be {@code null}.
 *
 * @throws  LDAPException  If a problem occurs while converting the provided
 *                         connection to use TLS.
 */
@InternalUseOnly()
public static void convertToTLS(final LDAPConnection connection,
                final SSLSocketFactory sslSocketFactory)
    throws LDAPException
{
 connection.convertToTLS(sslSocketFactory);
}

相关文章

LDAPConnection类方法