连接到Apple推送通知服务时,“身份验证或解密失败”异常

时间:2011-12-29 14:01:28

标签: c# macos mono apple-push-notifications

连接到APNS时,我一直收到“身份验证或解密失败”错误。我在C#中有简单的控制台应用程序试图连接到gateway.sandbox.push.apple.com抛出异常:

Unhandled Exception: System.IO.IOException: The authentication or decryption has failed. --->     Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0

连接certmgr时,我也遇到异常:

certmgr -ssl ssl://gateway.sandbox.push.apple.com:2195

我手动将Enrtust根证书导入到Trust存储,但它没有帮助。

OSX 10.7,Mono 2.10.8

0 个答案:

没有答案