Bug 17438 - HttpWebRequest SSL Problem when building with Linking: "Sdk Assemblies only"
Summary: HttpWebRequest SSL Problem when building with Linking: "Sdk Assemblies only"
Status: RESOLVED DUPLICATE of bug 17397
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 4.12.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-01-27 04:22 UTC by info
Modified: 2014-01-27 15:40 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 17397

Description info 2014-01-27 04:22:23 UTC
We are using the HttpWebRequest class to access various SSL protected servers from our App. With the current stable Xamarin.Android 4.10.1 release we do not have any problems. With the new 4.12 Alpha release, SSL connections to some servers no longer work in release builds with linking option "Sdk Assemblies only". With linking option "None" the SSL connections still work, as they used to. I guess, that the linking option "Sdk Assemblies only" removes some required code for SSL connections.

The exception that we get with 4.12 builds with linking option "Sdk Assemblies only" is the following:

System.Net.WebException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure ---> System.IO.IOException: The authentication or decryption has failed. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.Security.Protocol.Tls.CipherSuite.createEncryptionCipher () [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.CipherSuite.InitializeCipher () [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.OnNegotiateHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (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 
  --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
  at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0 
  at System.Net.WebClient.GetWebResponse (System.Net.WebRequest request) [0x00000] in <filename unknown>:0 
  at System.Net.WebClient.ReadAll (System.Net.WebRequest request, System.Object userToken) [0x00000] in <filename unknown>:0 
  at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0 

Please fix this problem for the next stable release.

Best regards,

Andreas Selle
Comment 1 Jonathan Pryor 2014-01-27 15:40:38 UTC

*** This bug has been marked as a duplicate of bug 17397 ***