Skip to content

Commit 10d279f

Browse files
authored
Change TLS 1.0 to TLS1.2 for Push notifications (#766)
1 parent e37109b commit 10d279f

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

dotnet/src/dotnetframework/SDNetAPI/IOSNotifications.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
@@ -177,7 +177,7 @@ private static bool DoCall(string server, string p12path, int port, Action<SslSt
177177

178178
try
179179
{
180-
sslStream.AuthenticateAsClient(server, clientCertificateCollection, SslProtocols.Tls, true);
180+
sslStream.AuthenticateAsClient(server, clientCertificateCollection, SslProtocols.Tls12, true);
181181
}
182182
catch (Exception e)
183183
{

dotnet/src/dotnetframework/SDNetAPI/PushSharp/Platforms/Apple/ApplePushChannel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,7 @@ void connect()
384384

385385
try
386386
{
387-
stream.AuthenticateAsClient(this.appleSettings.Host, this.certificates, System.Security.Authentication.SslProtocols.Tls, false);
388-
//stream.AuthenticateAsClient(this.appleSettings.Host);
387+
stream.AuthenticateAsClient(this.appleSettings.Host, this.certificates, System.Security.Authentication.SslProtocols.Tls12, false);
389388
}
390389
catch (System.Security.Authentication.AuthenticationException ex)
391390
{

dotnet/src/dotnetframework/SDNetAPI/PushSharp/Platforms/Apple/FeedbackService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
@@ -44,7 +44,7 @@ public void Run(ApplePushChannelSettings settings/*, CancellationToken cancelTok
4444
(sender, cert, chain, sslErrs) => { return true; },
4545
(sender, targetHost, localCerts, remoteCert, acceptableIssuers) => { return certificate; });
4646

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

4949

5050
//Set up

0 commit comments

Comments
 (0)