다음을 통해 공유


X509ClientCertificateAuthentication 클래스

정의

클라이언트 인증서의 유효성 검사에 필요한 인증 속성을 지정합니다.

public ref class X509ClientCertificateAuthentication
public class X509ClientCertificateAuthentication
type X509ClientCertificateAuthentication = class
Public Class X509ClientCertificateAuthentication
상속
X509ClientCertificateAuthentication

예제

다음 코드에서는 이 속성을 설정하는 방법을 보여 줍니다.

// Create a service host.
Uri httpUri = new Uri("http://localhost/Calculator");
ServiceHost sh = new ServiceHost(typeof(Calculator), httpUri);

// Get a reference to the authentication object.
X509ClientCertificateAuthentication myAuthProperties =
    sh.Credentials.ClientCertificate.Authentication;

// Configure peer trust.
myAuthProperties.CertificateValidationMode =
    X509CertificateValidationMode.PeerTrust;
// Configure chain trust.
myAuthProperties.CertificateValidationMode =
    X509CertificateValidationMode.ChainTrust;
// Configure custom certificate validation.
myAuthProperties.CertificateValidationMode =
    X509CertificateValidationMode.Custom;

// Specify a custom certificate validator (not shown here) that inherits
// from the X509CertificateValidator class.
// creds.ClientCertificate.Authentication.CustomCertificateValidator =
//    new MyCertificateValidator();
' Create a service host.
Dim httpUri As New Uri("http://localhost/Calculator")
Dim sh As New ServiceHost(GetType(Calculator), httpUri)

' Get a reference to the authentication object.
Dim myAuthProperties As X509ClientCertificateAuthentication = _
sh.Credentials.ClientCertificate.Authentication

' Configure peer trust.
myAuthProperties.CertificateValidationMode = X509CertificateValidationMode.PeerTrust
' Configure chain trust.
myAuthProperties.CertificateValidationMode = X509CertificateValidationMode.ChainTrust
' Configure custom certificate validation.
myAuthProperties.CertificateValidationMode = X509CertificateValidationMode.Custom
' Specify a custom certificate validator (not shown here) that inherits 
' from the X509CertificateValidator class. 
' creds.ClientCertificate.Authentication.CustomCertificateValidator = _
'    new MyCertificateValidator()

구성 파일에서도 속성을 설정할 수 있습니다.

<serviceCredentials>  
  <clientCertificate>  
     <authentication certificateValidationMode='ChainTrust' />  
  </clientCertificate>  
</serviceCredentials>  

설명

CertificateValidationModeCustom으로 설정하면 X509CertificateValidator 클래스에서 상속되는 사용자 지정 인증서 유효성 검사기를 만들어야 합니다. 자세한 내용은 방법: 사용자 지정 인증서 유효성 검사기를 사용 하는 서비스 만들기합니다.

속성

CertificateValidationMode

인증서 유효성 검사 모드를 가져오거나 설정합니다.

CustomCertificateValidator

사용자 지정 클라이언트 인증서 유효성 검사기를 가져오거나 설정합니다.

IncludeWindowsGroups

Windows 그룹을 인증 컨텍스트에 포함할지 여부를 나타내는 값을 가져오거나 설정합니다.

MapClientCertificateToWindowsAccount

인증서가 Windows 계정에 매핑되는지 여부를 나타내는 값을 가져오거나 설정합니다.

RevocationMode

ChainTrust 및 PeerOrChainTrust X.509 인증서 유효성 검사를 위한 인증서 해지 모드를 가져오거나 설정합니다.

TrustedStoreLocation

클라이언트 인증서 체인의 유효성을 검사하는 신뢰할 수 있는 저장소 위치를 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보