[Mono-devel-list] WebRequest/HTTPS CA Issue

Johnny Luong johnny at trustcommerce.com
Wed Mar 30 15:09:39 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am using WebRequest with a HTTPS URI.  I receive the following
exception trace (and before that is some print statements illustrating
where it stopped):

Clear Context
Support Ciphers
Hello Client!
Read Server Response
Read Server Response
Clear Context
Support Ciphers
Hello Client!
Read Server Response
Client Key Exchange
System.Net.WebException: Not connected ---> System.IO.IOException: Write
failure ---> System.Net.Sockets.SocketException: The descriptor is not a
socket
in <0x0007e> System.Net.Sockets.Socket:Send_nochecks (System.Byte[] buf,
Int32 offset, Int32 size, SocketFlags flags)
in <0x0005b> System.Net.Sockets.Socket:Send (System.Byte[] buf, Int32
offset, Int32 size, SocketFlags flags)
in <0x00080> System.Net.Sockets.NetworkStream:Write (System.Byte[]
buffer, Int32 offset, Int32 size)--- End of inner exception stack trace ---

in <0x000d4> System.Net.Sockets.NetworkStream:Write (System.Byte[]
buffer, Int32 offset, Int32 size)
in <0x00042> Mono.Security.Protocol.Tls.RecordProtocol:SendRecord
(ContentType contentType, System.Byte[] recordData)
in <0x0007e> Mono.Security.Protocol.Tls.RecordProtocol:SendAlert
(Mono.Security.Protocol.Tls.Alert alert)
in <0x00031> Mono.Security.Protocol.Tls.RecordProtocol:SendAlert
(AlertDescription description)
in <0x0028e>
Mono.Security.Protocol.Tls.SslClientStream:NegotiateHandshake ()
in (wrapper remoting-invoke-with-check)
Mono.Security.Protocol.Tls.SslClientStream:NegotiateHandshake ()
in <0x000a9> Mono.Security.Protocol.Tls.SslClientStream:BeginWrite
(System.Byte[] buffer, Int32 offset, Int32 count, System.AsyncCallback
callback, System.Object state)
in <0x0001b> Mono.Security.Protocol.Tls.SslClientStream:Write
(System.Byte[] buffer, Int32 offset, Int32 count)
in <0x0002e> System.Net.WebConnection:Write (System.Byte[] buffer, Int32
offset, Int32 size)--- End of inner exception stack trace ---

in <0x000d6> System.Net.WebConnection:Write (System.Byte[] buffer, Int32
offset, Int32 size)
in <0x00116> System.Net.WebConnectionStream:WriteRequest ()
in (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:WriteRequest ()
in <0x00129> System.Net.WebConnectionStream:Close ()

Ethereal reports the following:
192.168.1.83 <URI ip> TLS Client Hello
<URI ip> TLS Server Hello, Certificate[Unreassembled Packet]
<URI ip> TLS Continuation Data, [Unreassembled Packet]
192.168.1.83 <URI ip> TLS Alert (Level: Warning, Description: Unknown CA)
192.168.1.83 <URI ip> TLS Client Hello
<URI ip> 192.168.1.83 TLS Server Hello, Certificate[Unreassembled Packet]

What I would like it to do is not throw an exception on the close and
process it normally.  I am able to successfully negotiate an SSL
connection via openssl s_client.  So I tried importing the certificate
via certmgr (certmgr -ssl <URI>) and I still receive the same error.
Any ideas?

Here's the CA:

[johnny at skuld ~]$ certmgr -list -c -v CA
Mono Certificate Manager - version 1.1.5.0
Manage X.509 certificates and CRL from stores.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2005 Novell. BSD
licensed.

X.509 v3 Certificate
  Serial Number: A46E22AEDDC5F858E3CC4238858A4B25
  Issuer Name:   C=US, O="VeriSign, Inc.", OU=Class 3 Public Primary
Certification Authority
  Subject Name:  O=VeriSign Trust Network, OU="VeriSign, Inc.",
OU=VeriSign International Server CA - Class 3, OU=www.verisign.com/CPS
Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
  Valid From:    4/16/1997 5:00:00 PM
  Valid Until:   10/24/2011 4:59:59 PM
  Unique Hash:   FF47BBA16D221954CC3C1D892F41EE0E505F7C84
  Key Algorithm:        1.2.840.113549.1.1.1
  Algorithm Parameters: 0500
  Public Key:
30818902818100D88280E8D619027D1F85183925A2652BE1BFD405D3BCE6363BAAF04C6C5BB6E7AA3C734555B2F1BDEA9742ED9A340A15D4A95CF54025DDD907C132B2756CC4CABBA3FE56277143AA63F5303E9328E5FAF1093BF3B74D4E39F75C495AB8C11DD3B28AFE70309542CBFE2B518B5A3C3AF9224F90B202A7539C4F34E7AB04B27B6F0203010001
  Signature Algorithm:  1.2.840.113549.1.1.5
  Algorithm Parameters: 0500
  Signature:
0801ECE468940342F173F123A23ADEE9F1DAC654C4233E86EACF6A3A33ABEA9C04140736060BF9886FD513EE292BC3E4728D44EDD1AC20092DE1F6E1190538B03D0F9F7FF89E02DC860286614E265F5E9F921E0C24A4F5D07013CF26C3433D491D9E822E525FBC3EC66629018E4E922CBC46750382AC73E9D97E0B67EF54521A



- --
_________________________________
JOHNNY LUONG

Software Engineer
TrustCommerce
2 Park Plaza, Suite 350
Irvine, CA 92614
Office (949) 387-3747 x828
Fax (949) 266-0359
Johnny.Luong at TrustCommerce.com
www.TrustCommerce.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFCSweBReQmLPS9HccRAlF9AKCWJVi/yzzTOVcT5PRFhltSw8LP3ACfXxhY
fmJwMT3J4VXCBQmc/RcQO5s=
=3e86
-----END PGP SIGNATURE-----



More information about the Mono-devel-list mailing list