Skip to content

Commit

Permalink
Merge pull request Redth#861 from narensoni83/master
Browse files Browse the repository at this point in the history
Added support for higher TLS versions
  • Loading branch information
Redth authored Jul 31, 2018
2 parents a0dc0ac + ece23ee commit 8e06914
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PushSharp.Apple/ApnsConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ async Task connect ()
(sender, targetHost, localCerts, remoteCert, acceptableIssuers) => certificate);

try {
stream.AuthenticateAsClient (Configuration.Host, certificates, System.Security.Authentication.SslProtocols.Tls, false);
var tls = System.Security.Authentication.SslProtocols.Tls | System.Security.Authentication.SslProtocols.Tls11 | System.Security.Authentication.SslProtocols.Tls12;
stream.AuthenticateAsClient(Configuration.Host, certificates, tls, false);
} catch (System.Security.Authentication.AuthenticationException ex) {
throw new ApnsConnectionException ("SSL Stream Failed to Authenticate as Client", ex);
}
Expand Down
3 changes: 2 additions & 1 deletion PushSharp.Apple/ApnsFeedbackService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public void Check ()
(sender, cert, chain, sslErrs) => { return true; },
(sender, targetHost, localCerts, remoteCert, acceptableIssuers) => { return certificate; });

stream.AuthenticateAsClient(Configuration.FeedbackHost, certificates, System.Security.Authentication.SslProtocols.Tls, false);
var tls = System.Security.Authentication.SslProtocols.Tls | System.Security.Authentication.SslProtocols.Tls11 | System.Security.Authentication.SslProtocols.Tls12;
stream.AuthenticateAsClient(Configuration.FeedbackHost, certificates, tls, false);


//Set up
Expand Down

0 comments on commit 8e06914

Please sign in to comment.