# TlsOptions Properties

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/)

## CheckCertificateRevocation {#checkcertificaterevocation-63729ff2}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/checkcertificaterevocation-63729ff2/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public bool CheckCertificateRevocation
```

Specifies whether the certificate revocation list is checked during authentication.

## ClientCertificateMode {#clientcertificatemode-27ddeefc}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/clientcertificatemode-27ddeefc/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public RemoteCertificateMode ClientCertificateMode
```

Specifies the client authentication certificate requirements for a TLS connection to Silo. Defaults to [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.remotecertificatemode/).

## HandshakeTimeout {#handshaketimeout-6941b930}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/handshaketimeout-6941b930/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public TimeSpan HandshakeTimeout
```

Specifies the maximum amount of time allowed for the TLS/SSL handshake. This must be positive and finite.

## LocalCertificate {#localcertificate-97b76a8c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/localcertificate-97b76a8c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public X509Certificate2 LocalCertificate
```

Specifies the local certificate used to authenticate TLS connections. This is ignored on server if LocalCertificateSelector is set.

To omit client authentication set to `null` on client and set [TlsOptions](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/) to [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.remotecertificatemode/) or [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.remotecertificatemode/) on server.

If the certificate has an Extended Key Usage extension, the usages must include Server Authentication (OID 1.3.6.1.5.5.7.3.1) for server and Client Authentication (OID 1.3.6.1.5.5.7.3.2) for client.

## LocalClientCertificateSelector {#localclientcertificateselector-95a015e5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/localclientcertificateselector-95a015e5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public Func<object, string, X509CertificateCollection, X509Certificate, string[], X509Certificate2> LocalClientCertificateSelector
```

A callback that will be invoked to dynamically select a local client certificate. This is higher priority than LocalCertificate.

If the certificate has an Extended Key Usage extension, the usages must include Client Authentication (OID 1.3.6.1.5.5.7.3.2).

## LocalServerCertificateSelector {#localservercertificateselector-b6cd940c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/localservercertificateselector-b6cd940c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public Func<ConnectionContext, string, X509Certificate2> LocalServerCertificateSelector
```

A callback that will be invoked to dynamically select a local server certificate. This is higher priority than LocalCertificate. If SNI is not available then the name parameter will be null.

If the certificate has an Extended Key Usage extension, the usages must include Server Authentication (OID 1.3.6.1.5.5.7.3.1).

## OnAuthenticateAsClient {#onauthenticateasclient-87c5413f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/onauthenticateasclient-87c5413f/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public Action<ConnectionContext, TlsClientAuthenticationOptions> OnAuthenticateAsClient
```

Provides direct configuration of the [TlsClientAuthenticationOptions](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsclientauthenticationoptions/) on a per-connection basis. This is called after all of the other settings have already been applied. Use this to set the target host name for SNI (Server Name Indication) via [TlsClientAuthenticationOptions](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsclientauthenticationoptions/).

## OnAuthenticateAsServer {#onauthenticateasserver-8f8a73cf}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/onauthenticateasserver-8f8a73cf/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public Action<ConnectionContext, TlsServerAuthenticationOptions> OnAuthenticateAsServer
```

Provides direct configuration of the [TlsServerAuthenticationOptions](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsserverauthenticationoptions/) on a per-connection basis. This is called after all of the other settings have already been applied.

## RemoteCertificateMode {#remotecertificatemode-494be61f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/remotecertificatemode-494be61f/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public RemoteCertificateMode RemoteCertificateMode
```

Specifies the remote endpoint certificate requirements for a TLS connection. Defaults to [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.remotecertificatemode/).

## RemoteCertificateValidation {#remotecertificatevalidation-b81db77a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/remotecertificatevalidation-b81db77a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public RemoteCertificateValidator RemoteCertificateValidation
```

Specifies a callback for additional remote certificate validation that will be invoked during authentication. This will be ignored if [TlsOptions](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/) is called after this callback is set.

## SslProtocols {#sslprotocols-45998e95}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/properties/sslprotocols-45998e95/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Connections.Security/Security/TlsOptions.cs)

```csharp
public SslProtocols SslProtocols
```

Specifies allowable SSL protocols. Defaults to `System.Security.Authentication.SslProtocols.Tls13` and `System.Security.Authentication.SslProtocols.Tls12`.
