# TlsOptions Properties

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

## CheckCertificateRevocation {#checkcertificaterevocation-63729ff2}

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

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/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.core/orleans.connections.transport.security.tlsoptions/properties/clientcertificatemode-27ddeefc/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public RemoteCertificateMode ClientCertificateMode
```

Controls selection of the local client certificate when Orleans initiates a TLS connection. Defaults to [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.remotecertificatemode/).

## HandshakeTimeout {#handshaketimeout-6941b930}

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

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public TimeSpan HandshakeTimeout
```

Specifies the maximum amount of time allowed for the TLS/SSL handshake. This must be positive and no greater than 4,294,967,294 milliseconds (approximately 49.7 days), or `System.Threading.Timeout.InfiniteTimeSpan` to disable the timeout.

## LocalCertificate {#localcertificate-46ec40cb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/properties/localcertificate-46ec40cb/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public X509Certificate2? LocalCertificate
```

Specifies the local certificate used to authenticate TLS connections. This is ignored on server if [TlsOptions](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/) is set.

To omit client authentication set to `null` on client and set [TlsOptions](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/) to [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.remotecertificatemode/) or [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.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-4857f10a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/properties/localclientcertificateselector-4857f10a/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/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. Returning `null` omits the client certificate when [TlsOptions](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/) is [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.remotecertificatemode/) or [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.remotecertificatemode/). When the mode is [RemoteCertificateMode](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.remotecertificatemode/), a null result fails authentication.

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-7907a3cc}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/properties/localservercertificateselector-7907a3cc/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public Func<MessageTransport, 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).

## MemoryPool {#memorypool-394f11c9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/properties/memorypool-394f11c9/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public MemoryPool<byte> MemoryPool
```

Gets or sets the memory pool.

## OnAuthenticateAsClient {#onauthenticateasclient-c420c32b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/properties/onauthenticateasclient-c420c32b/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public Action<MessageTransport, TlsClientAuthenticationOptions>? OnAuthenticateAsClient
```

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

## OnAuthenticateAsServer {#onauthenticateasserver-d1b1a41b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.security.tlsoptions/properties/onauthenticateasserver-d1b1a41b/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public Action<MessageTransport, TlsServerAuthenticationOptions>? OnAuthenticateAsServer
```

Provides direct configuration of the [TlsServerAuthenticationOptions](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.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.core/orleans.connections.transport.security.tlsoptions/properties/remotecertificatemode-494be61f/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/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.core/orleans.connections.transport.security.remotecertificatemode/).

## RemoteCertificateValidation {#remotecertificatevalidation-b4491387}

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

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/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.core/orleans.connections.transport.security.tlsoptions/) is called after this callback is set.

## SslProtocols {#sslprotocols-45998e95}

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

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Core/Networking/Transport/Security/TlsOptions.cs)

```csharp
public SslProtocols SslProtocols
```

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