モジュール java.naming
パッケージ javax.naming.ldap

クラスStartTlsRequest

java.lang.Object
javax.naming.ldap.StartTlsRequest
すべての実装されたインタフェース:
Serializable, ExtendedRequest

public class StartTlsRequest extends Object implements ExtendedRequest
このクラスは、Lightweight Directory Access Protocol (v3): Extension for Transport Layer Securityで定義された、StartTLSのLDAPv3拡張要求を実装します。StartTLSのオブジェクト識別子は1.3.6.1.4.1.1466.20037です。拡張要求の値は定義されていません。

StartTlsRequest/StartTlsResponseは、extendedOperation()が呼び出されるJNDIコンテキストに関連付けられた既存のLDAP接続を介してTLS接続を確立するために使用されます。 通常、JNDIプログラムでは、これらのクラスを次のように使用します。

 import javax.naming.ldap.*;

 // Open an LDAP association
 LdapContext ctx = new InitialLdapContext();

 // Perform a StartTLS extended operation
 StartTlsResponse tls =
     (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest());

 // Open a TLS connection (over the existing LDAP association) and get details
 // of the negotiated TLS session: cipher suite, peer certificate, etc.
 SSLSession session = tls.negotiate();

 // ... use ctx to perform protected LDAP operations

 // Close the TLS connection (revert back to the underlying LDAP association)
 tls.close();

 // ... use ctx to perform unprotected LDAP operations

 // Close the LDAP association
 ctx.close;
 

導入されたバージョン:
1.4
関連項目: