Skip to content

APNS - Add TLS1.1 and TLS1.2 support #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PushSharp.Apple/ApnsConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,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 @@ -57,7 +57,8 @@ public IEnumerable<ApnsTokeExpirationInfo> GetTokenExpirations()
(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