|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.naming.ldap.StartTlsResponse
public abstract class StartTlsResponse
이 클래스는,Lightweight Directory Access Protocol (v3) :Extension for Transport Layer Security 에 정의되고 있는, LDAPv3 의 StartTLS 확장 요구를 구현합니다. StartTLS 의 객체 식별자는 1.3. 6.1. 4.1. 1466.20037 입니다. 확장 응답의 값은 정의되고 있지 않습니다.
StartTLS 의 확장 요구와 확장 응답은, TLS 접속을 확립할 경우에 사용합니다. TLS 접속은,extendedOperation() 를 호출한 JNDI 문맥에 관련지을 수 있었던 기존의 LDAP 접속상에 확립됩니다. 일반적으로, JNDI 프로그램에서는, StartTLS 의 확장 요구와 확장 응답의 클래스를 다음과 같이 사용합니다.
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, ... 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;
StartTlsRequest
,
직렬화 된 형식 필드의 개요 | |
---|---|
static String |
OID
StartTLS 확장 응답에 할당할 수 있고 있는 객체 식별자는 1.3. 6.1. 4.1. 1466.20037 입니다. |
생성자 의 개요 | |
---|---|
protected |
StartTlsResponse ()
StartTLS 확장 응답을 구축합니다. |
메소드의 개요 | |
---|---|
abstract void |
close ()
TLS 접속을 정상적으로 닫아 기본이 되는 접속하러 돌아옵니다. |
byte[] |
getEncodedValue ()
StartTLS 응답의 ASN. 1 BER 로 encode 된 값을 가져옵니다. |
String |
getID ()
StartTLS 응답의 객체 식별자의 캐릭터 라인을 가져옵니다. |
abstract SSLSession |
negotiate ()
디폴트의 SSL 소켓 팩토리를 사용해, TLS 세션의 협상을 실시합니다. |
abstract SSLSession |
negotiate (SSLSocketFactory factory)
디폴트의 SSL 소켓 팩토리를 사용해, TLS 세션의 협상을 실시합니다. |
abstract void |
setEnabledCipherSuites (String [] suites)
이 TLS 접속에 대해서 사용 가능하게 되어 있는 디폴트의 encode 방식을 오버라이드(override) 합니다. |
abstract void |
setHostnameVerifier (HostnameVerifier verifier)
TLS 핸드 쉐이크가 완료했을 때에, 디폴트의 호스트명 검증이 실패하고 있는 경우는,negotiate() 에 의해 사용되는 호스트명 검증자를 설정합니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
public static final String OID
생성자 의 상세 |
---|
protected StartTlsResponse()
메소드의 상세 |
---|
public String getID()
ExtendedResponse
내의 getID
public byte[] getEncodedValue()
ExtendedResponse
내의 getEncodedValue
public abstract void setEnabledCipherSuites(String [] suites)
suites
- 사용 가능하게 하는 encode 방식의 이름의 리스트. null 는 지정할 수 없는negotiate()
public abstract void setHostnameVerifier(HostnameVerifier verifier)
verifier
- null 이외의 호스트명 검증자의 콜백negotiate()
public abstract SSLSession negotiate() throws IOException
이 메소드는 negotiate(null) 와 등가입니다.
IOException
- TLS 세션의 확립중에 입출력 에러가
발생했을 경우setEnabledCipherSuites(java.lang.String[])
,
setHostnameVerifier(javax.net.ssl.HostnameVerifier)
public abstract SSLSession negotiate(SSLSocketFactory factory) throws IOException
지정된 SSL 소켓 팩토리를 사용해 SSL 소켓을 작성해, 기존의 접속에 접속합니다. TLS 핸드 쉐이크를 실시해, 네고시에이트 된 세션의 정보를 돌려줍니다.
setEnabledCipherSuites 를 사용해 encode 방식이 설정되어 있는 경우, encode 방식은 TLS 핸드 쉐이크가 시작되기 전에 유효하게 됩니다.
호스트명 검증은, TLS 핸드 쉐이크의 완료 후에 행해집니다. 디폴트의 호스트명 검증에서는, 서버의 호스트명이 서버의 증명서내의 호스트명 정보에 대해서 조합됩니다. 검증에 실패했을 때에,setHostnameVerifier 에 의해 콜백이 설정되어 있지 않은 경우는, 협상은 실패합니다. 검증에 실패했을 때에,setHostnameVerifier 에 의해 콜백이 설정되어 있는 경우는, 그 콜백을 사용해 협상이 성공하고 있는지 어떤지가 판정됩니다.
에러가 발생하면(자), SSL 소켓이 닫아 IOException 가 throw 됩니다. 기본이 되는 접속은 보관 유지됩니다.
factory
- 사용하는 SSL 소켓 팩토리. null 의 경우도 있다.
null 의 경우는, 디폴트의 SSL 소켓 팩토리가 사용된다
IOException
- TLS 세션의 확립중에 입출력 에러가
발생했을 경우setEnabledCipherSuites(java.lang.String[])
,
setHostnameVerifier(javax.net.ssl.HostnameVerifier)
public abstract void close() throws IOException
IOException
- TLS 접속의 종료중에 입출력 에러가
발생했을 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.