Windows Phone 7上的TLS - 在Bouncy Castle中发送客户端证书

时间:2013-09-19 13:55:48

标签: security ssl windows-phone-7.1 bouncycastle client-certificates

我在使用Bouncy Castle向Window Phone 7上的服务器发送客户端证书时遇到问题。

我创建了自己的TlsAuthentication和继承自接口的TlsCredential类。但是方法

public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest)
    {
        return this.TlsCredentials;
    }

发生异常。

以下是我的例外:

An exception of type 'Org.BouncyCastle.Crypto.Tls.TlsFatalAlert' occurred in bouncywp71.DLL and wasn't handled before a managed/native boundary

A first chance exception of type 'System.IO.IOException' occurred in bouncywp71.DLL

An exception of type 'System.IO.IOException' occurred in bouncywp71.DLL and wasn't handled before a managed/native boundary

Internal TLS error, this could be an attack
at Org.BouncyCastle.Crypto.Tls.TlsProtocolHandler.FailWithError(AlertLevel alertLevel, AlertDescription alertDescription)
at Org.BouncyCastle.Crypto.Tls.TlsProtocolHandler.SafeReadData()
at Org.BouncyCastle.Crypto.Tls.TlsProtocolHandler.Connect(TlsClient tlsClient)
at MYAPP.MyTest2.Network.Security.MyTestSecureClient.HandleConnectionReady()
at SocketEx.TcpClient.InnerConnect(EndPoint myEndpoint)
at MYAPP.MyTest2.Network.Security.MyTestSecureClient..ctor(String host, Int32 port, TlsClient tlsClient)
at MYAPP.MyTest2.Network.Security.MyTestSecureClient..ctor(String host, Int32 port)
at MYAPP.MyTest2.Network.ConnectionManager.CreateConnection(String host, Int32 port)
at MYAPP.MyTest2.Network.ConnectionManager..ctor(String host, Int32 port)
at MYAPP.MyTest2.Network.MyTestService.CreateConnectionManager(String host, Int32 port)
at MYAPP.MyTest2.Network.MyTestService.Login(LoginRequestModel request)
at MYAPP.MyTest2.ViewModel.LoginViewModel.<Login>b__1()
at MYAPP.MyTest2.Common.Helpers.ThreadHandler.<>c__DisplayClass3`1.<Execute>b__0(Object x)

如果有人知道如何解决这个问题,请帮助我!

此致 阿图尔

0 个答案:

没有答案