Skip to content

Commit 539bcf1

Browse files
committed
Adding Defaults to SslConfiguration extension method
1 parent f8ea818 commit 539bcf1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/net45/Extensions/WampSharp.RawSocket/RawSocket/SslConfiguration/SslConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ namespace WampSharp.RawSocket
55
public class SslConfiguration
66
{
77
#if NETSTANDARD1_4
8-
protected const SslProtocols DefaultSslProtocols = SslProtocols.Tls | SslProtocols.Ssl3;
8+
public const SslProtocols DefaultSslProtocols = SslProtocols.Tls | SslProtocols.Ssl3;
99
#else
10-
protected const SslProtocols DefaultSslProtocols = SslProtocols.Default;
10+
public const SslProtocols DefaultSslProtocols = SslProtocols.Default;
1111
#endif
1212

1313
public SslProtocols EnabledSslProtocols { get; set; }

src/net45/Extensions/WampSharp.RawSocket/WAMP2/V2/Fluent/RawSocketTransportSyntax.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Security.Authentication;
55
using System.Security.Cryptography.X509Certificates;
66
using WampSharp.RawSocket;
7+
using static WampSharp.RawSocket.SslConfiguration;
78

89
namespace WampSharp.V2.Fluent
910
{
@@ -41,7 +42,7 @@ public IRawSocketTransportSyntax SslConfiguration(ClientSslConfiguration sslConf
4142
return this;
4243
}
4344

44-
public IRawSocketTransportSyntax SslConfiguration(string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
45+
public IRawSocketTransportSyntax SslConfiguration(string targetHost, X509CertificateCollection clientCertificates = null, SslProtocols enabledSslProtocols = DefaultSslProtocols, bool checkCertificateRevocation = false)
4546
{
4647
return SslConfiguration(new ClientSslConfiguration(targetHost, clientCertificates, enabledSslProtocols,
4748
checkCertificateRevocation));

0 commit comments

Comments
 (0)