Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- General information -->
<PropertyGroup>
<Authors>Ugo Lattanzi</Authors>
<VersionPrefix>13.0.1</VersionPrefix>
<VersionPrefix>13.1.0</VersionPrefix>
<!--
<VersionSuffix>pre</VersionSuffix>
-->
Expand Down Expand Up @@ -50,6 +50,9 @@ Features:
Serializer packages (pick one): System.Text.Json, Newtonsoft, MemoryPack, MsgPack, Protobuf, ServiceStack, Utf8Json.
</Description>
<PackageReleaseNotes>
v13.1.0:
- Added RedisConfiguration.SslHost to set the target host used when validating the SSL certificate (enables SSL mode when set)

v13.0.1:
- Performance: connection pool selection no longer allocates multiple ServerCounters snapshots per operation (LeastLoaded) and uses a true lock-free round-robin instead of a cryptographic RNG (RoundRobin)
- Performance: RedisDatabase instances are cached per database number instead of being allocated on every Db0..Db16 access
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class RedisConfiguration
private string? password;
private bool allowAdmin;
private bool ssl;
private string? sslHost;
private int connectTimeout = 5000;
private int syncTimeout = 5000;
private bool abortOnConnectFail;
Expand Down Expand Up @@ -271,6 +272,20 @@ public bool Ssl
}
}

/// <summary>
/// The target-host to use when validating SSL certificate; setting a value here enables SSL mode.
/// </summary>
public string? SslHost
{
get => sslHost;

set
{
sslHost = value;
ResetConfigurationOptions();
}
}

/// <summary>
/// Gets or sets the time in milliseconds that should be allowed for connection (defaults to 5 seconds unless SyncTimeout is higher).
/// </summary>
Expand Down Expand Up @@ -485,6 +500,7 @@ public ConfigurationOptions ConfigurationOptions
newOptions = new()
{
Ssl = Ssl,
SslHost = SslHost,
AllowAdmin = AllowAdmin,
Password = Password,
ConnectTimeout = ConnectTimeout,
Expand Down