[Mono-bugs] [Bug 51322][Maj] Changed - Problems using CryptoStream with NetworkStream

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 21 Dec 2003 07:41:01 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by carlosga@telefonica.net.

http://bugzilla.ximian.com/show_bug.cgi?id=51322

--- shadow/51322	2003-12-15 10:20:53.000000000 -0500
+++ shadow/51322.tmp.30938	2003-12-21 07:41:01.000000000 -0500
@@ -48,6 +48,72 @@
 ------- Additional Comments From spouliot@videotron.ca  2003-12-15 10:20 -------
 There is a patch that eliminates the Position uses in CryptoStream. 
 However I'm not sure how it could affect actual working code as I'm 
 not a big user of CryptoStream and current test coverage is weak.
 
 Carlos, can you try the patch with your TLS implementation.
+
+------- Additional Comments From carlosga@telefonica.net  2003-12-21 07:41 -------
+Hello:
+
+Sorry for the on testing this.
+
+For testing i have used a little test case using the PgSqlClient
+provider in TLS mode against a PostgreSQL DEV server in Fedora core 1
+(mono sources are two days old).
+
+- With the actual CVS version of CryptoStream.cs all runs fine.
+
+- With the patched version (i think i have patched it ok) i got an
+exception, here are the details:
+
+Unhandled Exception:
+System.Security.Cryptography.CryptographicException: invalid block
+lengthin <0x000ef>
+System.Security.Cryptography.SymmetricTransform:FinalEncrypt
+(byte[],int,int)in <0x0005a>
+System.Security.Cryptography.SymmetricTransform:TransformFinalBlock
+(byte[],int,int)in <0x0008e>
+System.Security.Cryptography.CryptoStream:FlushFinalBlock ()
+in <0x0004f> (wrapper remoting-invoke-with-check)
+System.Security.Cryptography.CryptoStream:FlushFinalBlock ()in
+<0x001aa> Mono.Security.Protocol.Tls.CipherSuite:EncryptRecord
+(byte[],byte[])in <0x00078>
+Mono.Security.Protocol.Tls.SslClientStream:encryptRecordFragment
+(Mono.Security.Protocol.Tls.TlsContentType,byte[])
+in <0x0006d> (wrapper remoting-invoke-with-check)
+Mono.Security.Protocol.Tls.SslClientStream:encryptRecordFragment
+(Mono.Security.Protocol.Tls.TlsContentType,byte[])
+in <0x000df> Mono.Security.Protocol.Tls.SslClientStream:sendRecord
+(Mono.Security.Protocol.Tls.TlsContentType,byte[])in <0x0006b>
+(wrapper remoting-invoke-with-check)
+Mono.Security.Protocol.Tls.SslClientStream:sendRecord
+(Mono.Security.Protocol.Tls.TlsContentType,byte[])
+in <0x00031> Mono.Security.Protocol.Tls.SslClientStream:SendAlert
+(Mono.Security.Protocol.Tls.Alerts.TlsAlert)in <0x00056> (wrapper
+remoting-invoke-with-check)
+Mono.Security.Protocol.Tls.SslClientStream:SendAlert
+(Mono.Security.Protocol.Tls.Alerts.TlsAlert)
+in <0x0007d> Mono.Security.Protocol.Tls.SslClientStream:Dispose (bool)
+in <0x00013>
+Mono.Security.Protocol.Tls.SslClientStream:System.IDisposable.Dispose
+()in <0x00010> Mono.Security.Protocol.Tls.SslClientStream:Close ()
+in <0x00016> PostgreSql.Data.NPgClient.PgDbClient:detach ()
+in <0x00353> PostgreSql.Data.NPgClient.PgDbClient:Connect ()
+in <0x00063> PostgreSql.Data.PgSqlClient.PgDbConnection:Connect ()
+in <0x0004f> (wrapper remoting-invoke-with-check)
+PostgreSql.Data.PgSqlClient.PgDbConnection:Connect ()in <0x0011b>
+PostgreSql.Data.PgSqlClient.PgConnection:Open ()
+in <0x0004f> (wrapper remoting-invoke-with-check)
+PostgreSql.Data.PgSqlClient.PgConnection:Open ()in <0x0004a>
+PgTest.Class1:createTables (string)
+in <0x0008c> PgTest.Class1:Main (string[])
+
+
+
+-- 
+Best regards
+
+Carlos Guzmán Álvarez
+Vigo-Spain
+
+