|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjava.security.cert.CertPathValidator
public class CertPathValidator
증명서 패스 (증명서 체인이라고도 불린다)의 타당성을 검사하기 위한 클래스입니다.
이 클래스는, 프로바이더 베이스의 아키텍쳐(architecture)를 사용합니다. CertPathValidator
를 작성하려면 , static getInstance
메소드 가운데 1 개를 호출해, 작성하는 CertPathValidator
의 알고리즘명과 프로바이더명 (생략 가능)을 건네줍니다.
CertPathValidator
객체가 작성되면(자),validate
메소드를 호출해, 검증 대상의 CertPath
와 알고리즘에 특정의 파라미터 세트를 건네주는 것으로, 증명서 패스가 검사됩니다. 증명서 패스의 검사에 성공하면(자),CertPathValidatorResult
인터페이스를 구현하는 객체에 그 결과가 돌려주어집니다.
병행 액세스
이 클래스의 static 메소드는, thread 세이프인 것이 보증되고 있습니다. 이 클래스에서 정의되고 있는 static 메소드는, 악영향을 주는 일 없이, 복수 thread가 병행해 호출할 수가 있습니다.
그러나 이것은, 이 클래스에서 정의되고 있는 비 static 메소드에는 들어맞지 않습니다. 특정의 프로바이더로 특히 설명이 없는 한, 단일 CertPathValidator
인스턴스에 병행해 액세스 할 필요가 있는 복수 thread는, thread간에 동기를 잡아, 필요에 따라서 잠그지 않으면 안됩니다. 다른 CertPathValidator
인스턴스를 조작하는 복수 thread간으로는, 동기를 잡을 필요는 없습니다.
CertPath
생성자 의 개요 | |
---|---|
protected |
CertPathValidator (CertPathValidatorSpi validatorSpi,
Provider provider,
String algorithm)
지정된 알고리즘의 CertPathValidator 객체를 작성해, 지정된 프로바이더의 구현 (SPI 객체)을 거기에 캡슐화합니다. |
메소드의 개요 | |
---|---|
String |
getAlgorithm ()
이 CertPathValidator 의 알고리즘명을 돌려줍니다. |
static String |
getDefaultType ()
Java 시큐리티 프로퍼티 파일로 지정되고 있는 디폴트의 CertPathValidator 타입을 돌려줍니다. |
static CertPathValidator |
getInstance (String algorithm)
지정한 알고리즘을 구현하는 CertPathValidator 객체를 돌려줍니다. |
static CertPathValidator |
getInstance (String algorithm,
Provider provider)
지정한 알고리즘을 구현하는 CertPathValidator 객체를 돌려줍니다. |
static CertPathValidator |
getInstance (String algorithm,
String provider)
지정한 알고리즘을 구현하는 CertPathValidator 객체를 돌려줍니다. |
Provider |
getProvider ()
이 CertPathValidator 의 Provider 를 돌려줍니다. |
CertPathValidatorResult |
validate (CertPath certPath,
CertPathParameters params)
지정한 알고리즘의 파라미터 세트를 사용해, 지정한 증명서 패스를 검사합니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
protected CertPathValidator(CertPathValidatorSpi validatorSpi, Provider provider, String algorithm)
CertPathValidator
객체를 작성해, 지정된 프로바이더의 구현 (SPI 객체)을 거기에 캡슐화합니다.
validatorSpi
- 프로바이더의 구현provider
- 프로바이더algorithm
- 알고리즘명메소드의 상세 |
---|
public static CertPathValidator getInstance(String algorithm) throws NoSuchAlgorithmException
CertPathValidator
객체를 돌려줍니다.
이 메소드는, 최우선의 Provider 로부터 순서에, 등록을 마친 시큐리티 Provider 의 리스트를 횡단(traverse) 합니다. 지정된 알고리즘을 지원하는 최초의 Provider 의 CertPathValidatorSpi 구현을 캡슐화하는 새로운 CertPathValidator 객체가 돌려주어집니다.
등록이 끝난 프로바이더의 리스트는,Security.getProviders()
메소드 경유로 취득할 수 있습니다.
algorithm
- 요구된 CertPathValidator
알고리즘의 이름.
표준의 알고리즘명에 대해서는,「Java Certification Path API 개발자 안내」 의 부록 A 를 참조
CertPathValidator
객체
NoSuchAlgorithmException
- 지정된 알고리즘의 CertPathValidatorSpi 구현을 지원하는 Provider 가 존재하지 않는 경우Provider
public static CertPathValidator getInstance(String algorithm, String provider) throws NoSuchAlgorithmException , NoSuchProviderException
CertPathValidator
객체를 돌려줍니다.
지정된 프로바이더의 CertPathValidatorSpi 구현을 캡슐화하는 새로운 CertPathValidator 객체가 돌려주어집니다. 지정한 프로바이더는, 시큐리티 프로바이더 리스트에 등록할 필요가 있습니다.
등록이 끝난 프로바이더의 리스트는,Security.getProviders()
메소드 경유로 취득할 수 있습니다.
algorithm
- 요구된 CertPathValidator
알고리즘의 이름.
표준의 알고리즘명에 대해서는,「Java Certification Path API 개발자 안내」 의 부록 A 를 참조provider
- 프로바이더명
CertPathValidator
객체
NoSuchAlgorithmException
- 지정된 프로바이더로 지정된 알고리즘의 CertPathValidatorSpi 구현이 없는 경우
NoSuchProviderException
- 지정된 프로바이더가 시큐리티 프로바이더 리스트에 등록되지 않은 경우
IllegalArgumentException
- provider
가 null 나 빈 상태(empty)의 경우Provider
public static CertPathValidator getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
CertPathValidator
객체를 돌려줍니다.
지정된 Provider 객체의 CertPathValidatorSpi 구현을 캡슐화하는 새로운 CertPathValidator 객체가 돌려주어집니다. 지정된 Provider 객체는, 프로바이더 리스트에 등록할 필요는 없습니다.
algorithm
- 요구된 CertPathValidator
알고리즘의 이름.
표준의 알고리즘명에 대해서는,「Java Certification Path API 개발자 안내」 의 부록 A 를 참조provider
- 프로바이더
CertPathValidator
객체
NoSuchAlgorithmException
- 지정된 Provider 객체로 지정된 알고리즘의 CertPathValidatorSpi 구현이 없는 경우
IllegalArgumentException
- provider
가 null 의 경우Provider
public final Provider getProvider()
CertPathValidator
의 Provider
를 돌려줍니다.
CertPathValidator
의 Provider
public final String getAlgorithm()
CertPathValidator
의 알고리즘명을 돌려줍니다.
CertPathValidator
의 알고리즘명public final CertPathValidatorResult validate(CertPath certPath, CertPathParameters params) throws CertPathValidatorException , InvalidAlgorithmParameterException
지정한 CertPath
는, 검사 알고리즘으로 지원되고 있는 타입이 아니면 안됩니다. 그렇지 않은 경우는,InvalidAlgorithmParameterException
가 throw 됩니다. 예를 들어, PKIX 알고리즘을 구현하는 CertPathValidator
에서는, 타입 X. 509 의 CertPath
객체를 검사합니다.
certPath
- 검사하는 CertPath
params
- 알고리즘 파라미터
CertPathValidatorException
- CertPath
가 유효하지 않은 경우
InvalidAlgorithmParameterException
- 지정된 파라미터인가, 지정된 CertPath
의 타입이, 이 CertPathValidator
에 대해서 올바르지 않은 경우public static final String getDefaultType()
CertPathValidator
타입을 돌려줍니다. 디폴트의 CertPathBuilder
타입을 나타내는 프로퍼티이 없는 경우는, 캐릭터 라인 「PKIX」를 돌려줍니다. Java 시큐리티 프로퍼티 파일은, <JAVA_HOME>/lib/security/java.security 라는 이름의 파일에 포함되고 있습니다. <JAVA_HOME> 는 java.home 시스템 프로퍼티의 값을 참조하고 있어, JRE 의 인스톨 디렉토리를 나타냅니다.
디폴트의 CertPathValidator
타입을 사용하는 것은, 어플리케이션으로 getInstance
메소드를 호출할 때 하드 코드 된 타입을 사용하지 않는 경우, 및 사용자가 독자적인 타입을 지정하지 않을 때에 디폴트의 타입을 제공하는 경우입니다.
디폴트의 CertPathValidator
타입을 변경하려면 , Java 시큐리티 프로퍼티 파일의 certpathvalidator.type 시큐리티 프로퍼티의 값을 목적의 타입으로 설정합니다.
CertPathValidator
타입. 해당하는 프로퍼티이 존재하지 않는 경우는, 캐릭터 라인 「PKIX」
|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.