Share via


SslStream.AuthenticateAsServerAsync 메서드

정의

클라이언트-서버 연결에서 서버를 인증하고 선택적으로 클라이언트를 인증하는 비동기 작업으로 서버에서 호출합니다.

오버로드

AuthenticateAsServerAsync(X509Certificate, Boolean, SslProtocols, Boolean)

지정된 인증서, 요구 사항 및 보안 프로토콜을 사용하여 클라이언트-서버 연결에서 서버 및 필요에 따라 클라이언트를 비동기 작업으로 인증하기 위해 서버에서 호출됩니다.

AuthenticateAsServerAsync(X509Certificate, Boolean, Boolean)

지정된 인증서, 요구 사항 및 보안 프로토콜을 사용하여 클라이언트-서버 연결에서 서버 및 필요에 따라 클라이언트를 비동기 작업으로 인증하기 위해 서버에서 호출됩니다.

AuthenticateAsServerAsync(SslServerAuthenticationOptions, CancellationToken)

클라이언트-서버 연결에서 서버를 인증하고 선택적으로 클라이언트를 인증하는 비동기 작업으로 서버에서 호출합니다. 인증 프로세스는 sslClientAuthenticationOptions 속성 모음에 지정된 정보를 사용합니다.

AuthenticateAsServerAsync(X509Certificate)

클라이언트-서버 연결에서 지정된 인증서를 사용하여 서버를 인증하고 선택적으로 클라이언트를 인증하기 위해 비동기 작업으로 서버에서 호출합니다.

AuthenticateAsServerAsync(ServerOptionsSelectionCallback, Object, CancellationToken)

클라이언트-서버 연결에서 서버를 인증하고 선택적으로 클라이언트를 인증하는 비동기 작업으로 서버에서 호출합니다. 인증 프로세스는 optionsCallback에서 반환된 정보를 사용합니다.

AuthenticateAsServerAsync(X509Certificate, Boolean, SslProtocols, Boolean)

Source:
SslStream.cs
Source:
SslStream.cs
Source:
SslStream.cs

지정된 인증서, 요구 사항 및 보안 프로토콜을 사용하여 클라이언트-서버 연결에서 서버 및 필요에 따라 클라이언트를 비동기 작업으로 인증하기 위해 서버에서 호출됩니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsServerAsync(System::Security::Cryptography::X509Certificates::X509Certificate ^ serverCertificate, bool clientCertificateRequired, System::Security::Authentication::SslProtocols enabledSslProtocols, bool checkCertificateRevocation);
public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation);
abstract member AuthenticateAsServerAsync : System.Security.Cryptography.X509Certificates.X509Certificate * bool * System.Security.Authentication.SslProtocols * bool -> System.Threading.Tasks.Task
override this.AuthenticateAsServerAsync : System.Security.Cryptography.X509Certificates.X509Certificate * bool * System.Security.Authentication.SslProtocols * bool -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsServerAsync (serverCertificate As X509Certificate, clientCertificateRequired As Boolean, enabledSslProtocols As SslProtocols, checkCertificateRevocation As Boolean) As Task

매개 변수

serverCertificate
X509Certificate

서버를 인증하는 데 사용되는 X509 인증서입니다.

clientCertificateRequired
Boolean

인증을 위해 클라이언트에 인증서가 요청되는지 여부를 지정하는 Boolean 값입니다. 이것은 요청일 뿐입니다. 인증서가 제공되지 않아도 서버는 계속 연결 요청을 수락합니다.

enabledSslProtocols
SslProtocols

인증에 사용되는 프로토콜을 나타내는 SslProtocols 값입니다.

checkCertificateRevocation
Boolean

인증 동안 인증서 해지 목록이 확인되는지 여부를 지정하는 Boolean 값입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

serverCertificate이(가) null인 경우

인증이 실패했으며 이 개체가 사용할 수 없는 상태로 유지되는 경우

인증이 이미 발생한 경우

또는

SslStream을 사용하는 클라이언트 인증이 이전에 시도된 경우

또는

인증이 이미 진행 중인 경우

이 개체가 닫힌 경우.

설명

.NET Framework 4.7부터 이 메서드는 None을 통해 인증하여 운영 체제가 최상의 프로토콜을 선택하여 사용하고 안전하지 않은 프로토콜을 차단할 수 있도록 합니다. .NET Framework 4.6(및 최신 보안 패치가 설치된 .NET Framework 4.5)에서 허용된 TLS / SSL 프로토콜 버전은 1.2, 1.1 및 1.0입니다(Windows 레지스트리를 편집하여 강력한 암호화를 비활성화한 경우 제외).

인증에 실패하면 를 AuthenticationException받게 되며 SslStream 더 이상 사용할 수 없습니다. 가비지 수집기에서 수집할 수 있도록 이 개체를 닫고 모든 참조를 제거해야 합니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsServer(X509Certificate, Boolean, SslProtocols, Boolean)된 예외를 참조하세요.

적용 대상

AuthenticateAsServerAsync(X509Certificate, Boolean, Boolean)

Source:
SslStream.cs
Source:
SslStream.cs
Source:
SslStream.cs

지정된 인증서, 요구 사항 및 보안 프로토콜을 사용하여 클라이언트-서버 연결에서 서버 및 필요에 따라 클라이언트를 비동기 작업으로 인증하기 위해 서버에서 호출됩니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsServerAsync(System::Security::Cryptography::X509Certificates::X509Certificate ^ serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation);
public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation);
abstract member AuthenticateAsServerAsync : System.Security.Cryptography.X509Certificates.X509Certificate * bool * bool -> System.Threading.Tasks.Task
override this.AuthenticateAsServerAsync : System.Security.Cryptography.X509Certificates.X509Certificate * bool * bool -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsServerAsync (serverCertificate As X509Certificate, clientCertificateRequired As Boolean, checkCertificateRevocation As Boolean) As Task

매개 변수

serverCertificate
X509Certificate

서버를 인증하는 데 사용되는 X509 인증서입니다.

clientCertificateRequired
Boolean

인증을 위해 클라이언트에 인증서가 요청되는지 여부를 지정하는 Boolean 값입니다. 이것은 요청일 뿐입니다. 인증서가 제공되지 않아도 서버는 계속 연결 요청을 수락합니다.

checkCertificateRevocation
Boolean

인증 동안 인증서 해지 목록이 확인되는지 여부를 지정하는 Boolean 값입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

serverCertificate이(가) null인 경우

인증이 실패했으며 이 개체가 사용할 수 없는 상태로 유지되는 경우

인증이 이미 발생한 경우

또는

SslStream을 사용하는 클라이언트 인증이 이전에 시도된 경우

또는

인증이 이미 진행 중인 경우

이 개체가 닫힌 경우.

설명

.NET Framework 4.7부터 이 메서드는 None을 통해 인증하여 운영 체제가 최상의 프로토콜을 선택하여 사용하고 안전하지 않은 프로토콜을 차단할 수 있도록 합니다. .NET Framework 4.6(및 최신 보안 패치가 설치된 .NET Framework 4.5)에서 허용된 TLS / SSL 프로토콜 버전은 1.2, 1.1 및 1.0입니다(Windows 레지스트리를 편집하여 강력한 암호화를 비활성화한 경우 제외).

인증에 실패하면 를 AuthenticationException받게 되며 SslStream 더 이상 사용할 수 없습니다. 가비지 수집기에서 수집할 수 있도록 이 개체를 닫고 모든 참조를 제거해야 합니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsServer(X509Certificate, Boolean, Boolean)된 예외를 참조하세요.

적용 대상

AuthenticateAsServerAsync(SslServerAuthenticationOptions, CancellationToken)

Source:
SslStream.cs
Source:
SslStream.cs
Source:
SslStream.cs

클라이언트-서버 연결에서 서버를 인증하고 선택적으로 클라이언트를 인증하는 비동기 작업으로 서버에서 호출합니다. 인증 프로세스는 sslClientAuthenticationOptions 속성 모음에 지정된 정보를 사용합니다.

public:
 System::Threading::Tasks::Task ^ AuthenticateAsServerAsync(System::Net::Security::SslServerAuthenticationOptions ^ sslServerAuthenticationOptions, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions, System.Threading.CancellationToken cancellationToken);
member this.AuthenticateAsServerAsync : System.Net.Security.SslServerAuthenticationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AuthenticateAsServerAsync (sslServerAuthenticationOptions As SslServerAuthenticationOptions, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Function AuthenticateAsServerAsync (sslServerAuthenticationOptions As SslServerAuthenticationOptions, cancellationToken As CancellationToken) As Task

매개 변수

sslServerAuthenticationOptions
SslServerAuthenticationOptions

SSL 연결의 속성 모음입니다.

cancellationToken
CancellationToken

취소 요청을 모니터링할 토큰입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

ServerCertificateSelectionCallback, ServerCertificate 또는 ServerCertificateContextnull이고 LocalCertificateSelectionCallbackSslStream 생성자에 설정되어 있지 않습니다.

sslServerAuthenticationOptions이(가) null인 경우

인증이 실패했으며 이 개체가 사용할 수 없는 상태로 유지되는 경우

인증이 이미 발생한 경우

또는

SslStream을 사용하는 클라이언트 인증이 이전에 시도된 경우

또는

인증이 이미 진행 중인 경우

이 개체가 닫힌 경우.

취소 토큰이 취소되었습니다. 이 예외는 반환된 작업에 저장됩니다.

설명

인증에 실패하면 를 AuthenticationException받게 되며 SslStream 더 이상 사용할 수 없습니다. 가비지 수집기에서 수집할 수 있도록 이 개체를 닫고 모든 참조를 제거해야 합니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsServer(SslServerAuthenticationOptions)된 예외를 참조하세요.

적용 대상

AuthenticateAsServerAsync(X509Certificate)

Source:
SslStream.cs
Source:
SslStream.cs
Source:
SslStream.cs

클라이언트-서버 연결에서 지정된 인증서를 사용하여 서버를 인증하고 선택적으로 클라이언트를 인증하기 위해 비동기 작업으로 서버에서 호출합니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsServerAsync(System::Security::Cryptography::X509Certificates::X509Certificate ^ serverCertificate);
public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate);
abstract member AuthenticateAsServerAsync : System.Security.Cryptography.X509Certificates.X509Certificate -> System.Threading.Tasks.Task
override this.AuthenticateAsServerAsync : System.Security.Cryptography.X509Certificates.X509Certificate -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsServerAsync (serverCertificate As X509Certificate) As Task

매개 변수

serverCertificate
X509Certificate

서버를 인증하는 데 사용되는 인증서입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

serverCertificate이(가) null인 경우

인증이 실패했으며 이 개체가 사용할 수 없는 상태로 유지되는 경우

인증이 이미 발생한 경우

또는

SslStream을 사용하는 클라이언트 인증이 이전에 시도된 경우

또는

인증이 이미 진행 중인 경우

이 개체가 닫힌 경우.

Windows 95, Windows 98 또는 Windows Millennium Edition에서는 AuthenticateAsServerAsync 메서드가 지원되지 않습니다.

설명

.NET Framework 4.7부터 이 메서드는 None을 통해 인증하여 운영 체제가 최상의 프로토콜을 선택하여 사용하고 안전하지 않은 프로토콜을 차단할 수 있도록 합니다. .NET Framework 4.6(및 최신 보안 패치가 설치된 .NET Framework 4.5)에서 허용된 TLS / SSL 프로토콜 버전은 1.2, 1.1 및 1.0입니다(Windows 레지스트리를 편집하여 강력한 암호화를 비활성화한 경우 제외).

이 메서드는 를 사용하여 Default인증합니다. 인증 중에 인증서 해지 목록을 확인하지 않습니다. 클라이언트는 인증을 위해 인증서를 제공할 필요가 없습니다.

인증에 실패하면 를 AuthenticationException받게 되며 SslStream 더 이상 사용할 수 없습니다. 가비지 수집기에서 수집할 수 있도록 이 개체를 닫고 모든 참조를 제거해야 합니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsServer(X509Certificate)된 예외를 참조하세요.

적용 대상

AuthenticateAsServerAsync(ServerOptionsSelectionCallback, Object, CancellationToken)

Source:
SslStream.cs
Source:
SslStream.cs
Source:
SslStream.cs

클라이언트-서버 연결에서 서버를 인증하고 선택적으로 클라이언트를 인증하는 비동기 작업으로 서버에서 호출합니다. 인증 프로세스는 optionsCallback에서 반환된 정보를 사용합니다.

public System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Net.Security.ServerOptionsSelectionCallback optionsCallback, object? state, System.Threading.CancellationToken cancellationToken = default);
member this.AuthenticateAsServerAsync : System.Net.Security.ServerOptionsSelectionCallback * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AuthenticateAsServerAsync (optionsCallback As ServerOptionsSelectionCallback, state As Object, Optional cancellationToken As CancellationToken = Nothing) As Task

매개 변수

optionsCallback
ServerOptionsSelectionCallback

콜백 대리자입니다.

state
Object

콜백이 호출될 때 optionsCallback에 전달할 상태 개체입니다.

cancellationToken
CancellationToken

취소 요청을 모니터링할 토큰입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

ServerCertificateSelectionCallback, ServerCertificate 또는 ServerCertificateContextnull이고 LocalCertificateSelectionCallbackSslStream 생성자에 설정되어 있지 않습니다.

인증이 실패했으며 이 개체가 사용할 수 없는 상태로 유지되는 경우

인증이 이미 발생한 경우

또는

SslStream을 사용하는 클라이언트 인증이 이전에 시도된 경우

또는

인증이 이미 진행 중인 경우

이 개체가 닫힌 경우.

취소 토큰이 취소되었습니다. 이 예외는 반환된 작업에 저장됩니다.

설명

인증에 실패하면 를 AuthenticationException받게 되며 SslStream 더 이상 사용할 수 없습니다. 가비지 수집기에서 수집할 수 있도록 이 개체를 닫고 모든 참조를 제거해야 합니다.

적용 대상