# OrleansConnectionSecurityHostingExtensions.UseTls(ISiloBuilder, StoreName, string, bool, StoreLocation, Action&lt;TlsOptions&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.hosting.orleansconnectionsecurityhostingextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.hosting.orleansconnectionsecurityhostingextensions/methods/)

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

```csharp
public static ISiloBuilder UseTls(this ISiloBuilder builder, StoreName storeName, string subject, bool allowInvalid, StoreLocation location, Action<TlsOptions> configureOptions)
```

Configures TLS.

### Parameters

- `builder` (`ISiloBuilder`): The builder to configure.
- `storeName` (`StoreName`): The certificate store to load the certificate from.
- `subject` (`string`): The subject name for the certificate to load.
- `allowInvalid` (`bool`): Indicates if invalid certificates should be considered, such as self-signed certificates.
- `location` (`StoreLocation`): The store location to load the certificate from.
- `configureOptions` (`Action<TlsOptions>`): An Action to configure the [TlsOptions](/orleans/docs/api/csharp/microsoft.orleans.connections.security/orleans.connections.security.tlsoptions/).

### Returns

The builder.
