SslStream.AuthenticateAsServer Method

System.Net.Security
Authenticates the server end of an SSL/TLS connection.

Overloads

AuthenticateAsServer(X509Certificate serverCertificate)

Parameters

  • serverCertificate
    An X509Certificate that contains the server's public and private keys.
Note: This overload uses default values for client certificate requirements, enabled SSL protocols, and certificate revocation checking. For more control, use other overloads.

AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)

Parameters

  • serverCertificate
    An X509Certificate that contains the server's public and private keys.
  • clientCertificateRequired
    true to require a client certificate; otherwise, false.
  • enabledSslProtocols
    A bitwise combination of the SslProtocols values that specifies the protocols to use for authentication.
  • checkCertificateRevocation
    true to check for certificate revocation; otherwise, false.

AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, RemoteCertificateValidationCallback userCertificateValidationCallback, bool checkCertificateRevocation)

Parameters

  • serverCertificate
    An X509Certificate that contains the server's public and private keys.
  • clientCertificateRequired
    true to require a client certificate; otherwise, false.
  • userCertificateValidationCallback
    A RemoteCertificateValidationCallback delegate that provides a callback method to validate the remote certificate.
  • checkCertificateRevocation
    true to check for certificate revocation; otherwise, false.

AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, CipherSuitesPolicy enabledSslCipherSuites)

Parameters

  • serverCertificate
    An X509Certificate that contains the server's public and private keys.
  • clientCertificateRequired
    true to require a client certificate; otherwise, false.
  • enabledSslProtocols
    A bitwise combination of the SslProtocols values that specifies the protocols to use for authentication.
  • enabledSslCipherSuites
    A CipherSuitesPolicy object that specifies the allowed cipher suites.

AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, RemoteCertificateValidationCallback userCertificateValidationCallback, SslProtocols enabledSslProtocols, CipherSuitesPolicy enabledSslCipherSuites)

Parameters

  • serverCertificate
    An X509Certificate that contains the server's public and private keys.
  • clientCertificateRequired
    true to require a client certificate; otherwise, false.
  • userCertificateValidationCallback
    A RemoteCertificateValidationCallback delegate that provides a callback method to validate the remote certificate.
  • enabledSslProtocols
    A bitwise combination of the SslProtocols values that specifies the protocols to use for authentication.
  • enabledSslCipherSuites
    A CipherSuitesPolicy object that specifies the allowed cipher suites.

Remarks

Requirements

See Also