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

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.silotlshostingextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.silotlshostingextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/fbe240c34e9a1389ca5ab2d52f292ed8749ea530/src/Orleans.Runtime/Hosting/SiloTlsHostingExtensions.ISiloBuilder.cs#L34-L38)

```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.core/orleans.connections.transport.security.tlsoptions/).

### Returns

The builder.
