Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 5b3cfa5

Browse files
committed
Add fix for .NET Core
1 parent 3a9b7db commit 5b3cfa5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ServiceStack.Redis/RedisNativeClient_Utils.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ private void Connect()
120120
}
121121
else
122122
{
123+
#if NETSTANDARD1_3
124+
sslStream = new SslStream(networkStream,
125+
leaveInnerStreamOpen: false,
126+
userCertificateValidationCallback: RedisConfig.CertificateValidationCallback,
127+
userCertificateSelectionCallback: RedisConfig.CertificateSelectionCallback,
128+
encryptionPolicy: EncryptionPolicy.RequireEncryption);
129+
#else
123130
var ctor = typeof(SslStream).GetAllConstructors()
124131
.First(x => x.GetParameters().Length == 5);
125132

@@ -133,6 +140,7 @@ private void Connect()
133140
RedisConfig.CertificateSelectionCallback,
134141
policyValue,
135142
});
143+
#endif
136144
}
137145

138146
#if NETSTANDARD1_3

0 commit comments

Comments
 (0)