[Mono-bugs] [Bug 634817] New: HttpWebRequest fails on HTTPS resources
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Aug 26 13:19:03 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=634817
https://bugzilla.novell.com/show_bug.cgi?id=634817#c0
Summary: HttpWebRequest fails on HTTPS resources
Classification: Mono
Product: MonoDroid
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Class Libraries
AssignedTo: mkestner at novell.com
ReportedBy: mbaxterreynolds at amxsoftware.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=385709)
--> (http://bugzilla.novell.com/attachment.cgi?id=385709)
Solution that demonstrates problem
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.8)
Gecko/20100722 Firefox/3.6.8
I have an application that will fail if asked to download from an HTTPS
resource, but which works when asked to download an an HTTP resource, i.e.
change these two lines around you get something that works and something that
doesn't:
private string ServiceUrl
{
get
{
return
"https://gateway-uat.simplehostedservices.co.uk/amxpanic/webservices/" +
this.ServiceName;
//return "http://192.168.1.105/amxpanic/webservices/" +
this.ServiceName;
}
}
The exception details are as follows:
The thread 'Thread @2' (0x2) has exited with code 0 (0x0).
The thread 'Thread @5' (0x5) has exited with code 0 (0x0).
Stacktrace:
at (wrapper managed-to-native) System.Environment.internalGetHome () <IL
0x00020, 0xffffffff>
at System.Environment.InternalGetFolderPath
(System.Environment/SpecialFolder) [0x00000] in
/home/jon/Development/mono-droid/mono/mcs/class/corlib/System/Environment.cs:505
at System.Environment.GetFolderPath (System.Environment/SpecialFolder)
[0x00018] in
/home/jon/Development/mono-droid/mono/mcs/class/corlib/System/Environment.cs:449
at Mono.Security.X509.X509StoreManager.get_CurrentUser () [0x0000a] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.X509/X509StoreManager.cs:56
at System.Security.Cryptography.X509Certificates.X509Store.get_Factory ()
[0x0000c] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs:128
at System.Security.Cryptography.X509Certificates.X509Store.Open
(System.Security.Cryptography.X509Certificates.OpenFlags) [0x00095] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs:222
at System.Security.Cryptography.X509Certificates.X509Chain.get_Roots ()
[0x0001d] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs:237
at
System.Security.Cryptography.X509Certificates.X509Chain.get_CertificateCollection
() [0x00021] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs:263
at System.Security.Cryptography.X509Certificates.X509Chain.FindParent
(System.Security.Cryptography.X509Certificates.X509Certificate2) [0x00000] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs:343
at System.Security.Cryptography.X509Certificates.X509Chain.BuildChainFrom
(System.Security.Cryptography.X509Certificates.X509Certificate2) [0x00011] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs:285
at System.Security.Cryptography.X509Certificates.X509Chain.Build
(System.Security.Cryptography.X509Certificates.X509Certificate2) [0x00017] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs:113
at System.Net.ServicePointManager/ChainValidationHelper.ValidateChain
(Mono.Security.X509.X509CertificateCollection) [0x0008d] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Net/ServicePointManager.cs:427
at Mono.Security.Protocol.Tls.SslClientStream.OnRemoteCertificateValidation2
(Mono.Security.X509.X509CertificateCollection) [0x0000d] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs:419
at Mono.Security.Protocol.Tls.SslStreamBase.RaiseRemoteCertificateValidation2
(Mono.Security.X509.X509CertificateCollection) [0x00000] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:215
at
Mono.Security.Protocol.Tls.SslClientStream.RaiseServerCertificateValidation2
(Mono.Security.X509.X509CertificateCollection) [0x00000] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs:444
at
Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates
(Mono.Security.X509.X509CertificateCollection) [0x0001f] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs:198
at
Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1
() [0x00054] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs:105
at Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process () [0x00037]
in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs:105
at Mono.Security.Protocol.Tls.ClientRecordProtocol.ProcessHandshakeMessage
(Mono.Security.Protocol.Tls.TlsStream) [0x00039] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs:81
at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback
(System.IAsyncResult) [0x00127] in
/home/jon/Development/mono-droid/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:397
at System.Net.Sockets.Socket/SocketAsyncResult.Complete () [0x00117] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Net.Sockets/Socket.cs:205
at System.Net.Sockets.Socket/Worker.Receive () [0x00000] in
/home/jon/Development/mono-droid/mono/mcs/class/System/System.Net.Sockets/Socket.cs:483
at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <IL 0x0001c, 0x00143>
In mgmain JNI_OnLoad
Reproducible: Always
Steps to Reproduce:
Download the attachment and run.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list