[Mono-list] Mono.Security errors.

Sebastien Pouliot sebastien.pouliot at gmail.com
Wed Apr 19 08:05:35 EDT 2006


Hello Matthijs,

On Wed, 2006-04-19 at 13:29 +0200, Matthijs ter Woord wrote:
> Hi,
>  
> For Indy.Sockets, we use Mono.Security to support SSL/TLS in .NET
> build. However, we're having issues. We're getting the following
> exception when connecting to http://adwords.google.com/select/:
>  
> System.IO.IOException: The authentication or decryption has failed.
> ---> System.ArgumentException: Destination array was not long enough.
> Check destIndex and length, and the array's lower bounds.
>    at
> Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord(IAsyncResult asyncResult) in e:\mono\mcs\class\Mono.Security\Mono.Security.Protocol.Tls\RecordProtocol.cs:line 421
>    at Mono.Security.Protocol.Tls.RecordProtocol.ReceiveRecord(Stream
> record) in e:\mono\mcs\class\Mono.Security\Mono.Security.Protocol.Tls
> \RecordProtocol.cs:line 430
>    at
> Mono.Security.Protocol.Tls.SslClientStream.SafeReceiveRecord(Stream s)
> in e:\mono\mcs\class\Mono.Security\Mono.Security.Protocol.Tls
> \SslClientStream.cs:line 257
>    at
> Mono.Security.Protocol.Tls.SslClientStream.OnNegotiateHandshakeCallback(IAsyncResult asyncResult) in e:\mono\mcs\class\Mono.Security\Mono.Security.Protocol.Tls\SslClientStream.cs:line 273
>    at
> Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback(IAsyncResult asyncResult) in e:\mono\mcs\class\Mono.Security\Mono.Security.Protocol.Tls\SslStreamBase.cs:line 94
>    --- End of inner exception stack trace ---
>    at
> Mono.Security.Protocol.Tls.SslStreamBase.EndNegotiateHandshake(InternalAsyncResult asyncResult) in e:\mono\mcs\class\Mono.Security\Mono.Security.Protocol.Tls\SslStreamBase.cs:line 516
>    at Mono.Security.Protocol.Tls.SslStreamBase.NegotiateHandshake() in
> e:\mono\mcs\class\Mono.Security\Mono.Security.Protocol.Tls
> \SslStreamBase.cs:line 168
>    at Mono.Security.Protocol.Tls.SslStreamBase.Write(Byte[] buffer,
> Int32 offset, Int32 count) in e:\mono\mcs\class\Mono.Security
> \Mono.Security.Protocol.Tls\SslStreamBase.cs:line 1084
>    at IdIOHandlerTls.TIdIOHandlerTls.WriteDirect(Byte[]& ABuffer) in
> W:\source\Indy10\Lib\Security\IdIOHandlerTls.pas:line 243
>    at IdIOHandler.TIdIOHandler.WriteBufferFlush(Int32 AByteCount) in
> W:\source\Indy10\Lib\Core\IdIOHandler.pas:line 816
>    at IdIOHandler.TIdIOHandler.WriteBufferFlush() in W:\source\Indy10
> \Lib\Core\IdIOHandler.pas:line 1685
>    at IdIOHandler.TIdIOHandler.WriteBufferClose() in W:\source\Indy10
> \Lib\Core\IdIOHandler.pas:line 802
>    at IdHTTP.TIdHTTPProtocol.BuildAndSendRequest(TIdURI AURI) in W:
> \source\Indy10\Lib\Protocols\IdHTTP.pas:line 1706
>    at IdHTTP.TIdCustomHTTP.ConnectToHost(TIdHTTPRequest ARequest,
> TIdHTTPResponse AResponse) in W:\source\Indy10\Lib\Protocols
> \IdHTTP.pas:line 1237
>    at IdHTTP.TIdCustomHTTP.DoRequest(String AMethod, String AURL,
> TIdNetStream ASource, TIdNetStream AResponseContent, Int16[]
> AIgnoreReplies) in W:\source\Indy10\Lib\Protocols\IdHTTP.pas:line 2023
>    at IdHTTP.TIdCustomHTTP.Get(String AURL, TIdNetStream
> AResponseContent, Int16[] AIgnoreReplies) in W:\source\Indy10\Lib
> \Protocols\IdHTTP.pas:line 1991
>    at IdHTTP.TIdCustomHTTP.Get(String AURL, Int16[] AIgnoreReplies) in
> W:\source\Indy10\Lib\Protocols\IdHTTP.pas:line 1977
>    at IdHTTP.TIdCustomHTTP.Get(String AURL) in W:\source\Indy10\Lib
> \Protocols\IdHTTP.pas:line 812
>    at Project1.Units.Project1.Project1() in D:\projects\Atozed\IX
> \20241\Project1.dpr:line 26
> 
>  
>  
> What could be the problem?

First try to use tlstest.exe between your computer and the server to see
if everything is setup correctly. If this works (a simple get) then fill
a bug in bugzilla.ximian.com and add the following information:

- Operating system
	From the stack trace I deduce you running on Windows, right ?

- Which version of Mono(*) are you using ?

(*) Note that the version number of Mono.Security.dll doesn't change
between releases, it's locked to be the same as the targetted framework
version.

- A network trace, using Ethereal, that (only) shows the connection
between the client and the server.

-- 
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/



More information about the Mono-list mailing list