2016-12-30 1 views
1

Letsnecrypt 인증서로 SSL을 사용하여 WebApi 백엔드와 통신하는 Xamarin PCL 클라이언트가 있습니다. 포트 번호 443 (no : URL에서 443, 단지 https)을 사용하면 모든 것이 잘 작동합니다.Xamarin PCL이 REST API와 통신하는 443 이외의 포트 사용

여러 가지 이유로이 포트를 사용할 수 없으므로 대신 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/을 시도하고 모든 것이 정상적으로 작동합니다.

client = new HttpClient(new NativeMessageHandler()); 

내가 잘못 뭐하는 거지 :

은 내가 ModernHttpClient를 사용하고?

답변

0

이 버그는 수정 된 Mono bug 일지 모르지만 수정 사항은 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.