2016-12-30 4 views
1

Letsnecrypt証明書でSSLを使用してWebApiバックエンドと通信するXamarin PCLクライアントがあります。ポート番号443を使用するとすべて正常に動作します(URLに443はなく、httpsのみ)。Xamarin PCL、RESTと通信する443以外のポートを使用Api

私はこのポートをさまざまな理由で使用することができないため、代わりに8082に切り替えました。クライアントで次のエラーが表示されます。

Error: SecureChannelFailure (The authentication or decryption has failed.)

at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x00051] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:883 at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00011] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:475 at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00000] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:445 at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x0001e] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:99

クライアントでブラウザを使用してURLを開くと、すべて正常に動作します。証明書が承認されました。 https://www.digicert.com/help/を試して証明書をチェックしてください。すべて正常に動作します。

私はModernHttpClientを使用しています:私は間違って

client = new HttpClient(new NativeMessageHandler()); 

何をしているのですか?

答えて

0

これは修正されたMonoバグ[1]だと思われますが、この修正はAlphaチャンネルにのみリリースされています。 Alphaチャンネル[2]にアップデートして問題が解決したかどうか確認できますか?

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=46549

[2]に切り替え更新チャネル:

In Xamarin Studio, you can switch the update channel with the Xamarin Studio->Check for Updates… menu, choosing Stable, Beta, or Alpha in the drop down next to Update Channel and then clicking the Switch Channel button.

In Visual Studio, navigate to menu Tools->Options and scroll down to expand the Xamarin section and select "Other". Choose Stable, Beta, or Alpha from the drop down menu and click Check Now. If updates to that channel are available, you will get a dialog similar to the above for Xamarin Studio. Proceed as above.

関連する問題