1

I'm developing a chat that uses APNS.

To do that I'm using MoonAPNS wrapper in C#.

I've developed an ASP web service that uses this dll.

I've followed all the steps in the tutorial where I found the code.

I'm using the notification over an app with development sign.

I've been debugging and in the method: SendQueueToapple in this line:

_apnsStream.BeginRead(response, 0, 6, ReadResponse, new MyAsyncInfo(response, _apnsStream));

I'm getting this error:

InnerException: Unknown error processing certificate. -2146893017

I've reviewed the certificate, the device token and everything is ok according with the tutorial, but I'm still getting this error.

Anyone has idea what I'm doing wrong?

Thanks.

4

1 回答 1

0

我不知道 2 年后这是否会有所帮助,但我将答案留给 iOS8。

Apple 已更改服务器安全性,您必须从 SSL 更改为 TLS:

原始代码:

_apnsStream.AuthenticateAsClient(host,certificates,System.Security.Authentication.SslProtocols.Ssl3, false); 

新代码:

_apnsStream.AuthenticateAsClient(host,certificates,System.Security.Authentication.SslProtocols.Tls, false);

我希望这些信息对某人有所帮助。

有人在 GIT 论坛上评论了这个

于 2014-10-14T07:35:55.680 回答