Skip to content

Commit

Permalink
Change TLS 1.0 to TLS1.2 for Push notifications (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggallotti authored Feb 7, 2023
1 parent e37109b commit 10d279f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dotnet/src/dotnetframework/SDNetAPI/IOSNotifications.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -177,7 +177,7 @@ private static bool DoCall(string server, string p12path, int port, Action<SslSt

try
{
sslStream.AuthenticateAsClient(server, clientCertificateCollection, SslProtocols.Tls, true);
sslStream.AuthenticateAsClient(server, clientCertificateCollection, SslProtocols.Tls12, true);
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ void connect()

try
{
stream.AuthenticateAsClient(this.appleSettings.Host, this.certificates, System.Security.Authentication.SslProtocols.Tls, false);
//stream.AuthenticateAsClient(this.appleSettings.Host);
stream.AuthenticateAsClient(this.appleSettings.Host, this.certificates, System.Security.Authentication.SslProtocols.Tls12, false);
}
catch (System.Security.Authentication.AuthenticationException ex)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -44,7 +44,7 @@ public void Run(ApplePushChannelSettings settings/*, CancellationToken cancelTok
(sender, cert, chain, sslErrs) => { return true; },
(sender, targetHost, localCerts, remoteCert, acceptableIssuers) => { return certificate; });

stream.AuthenticateAsClient(settings.FeedbackHost, certificates, System.Security.Authentication.SslProtocols.Tls, false);
stream.AuthenticateAsClient(settings.FeedbackHost, certificates, System.Security.Authentication.SslProtocols.Tls12, false);


//Set up
Expand Down

0 comments on commit 10d279f

Please sign in to comment.