Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
11.9k views
in .NET FTP by (800 points)
Trying to test an application in a test environment which successfully ran in a dev environment. It appears from the log file below that the Mentalis libraries are throwing errors dealing with the length of the public key. I found the link below, which appears to be similar in nature as this test machine is running on an AMD Opteron Processor 254 which is a x64 architecture. According this site, the Forum has been marke obsolete and no more posts can be done to this site. Granted my Dev environment is not the same as my test environment (mainly the x86 vs x64) but not sure on this. I have installed the certs in the same location on both dev and test environment. The FTP Server hasn't changed. Is this an issue that has identified and hopefully resolved somewhere? The environment I am testing under is .NET 2.0

http://www.mentalis.org/forum/thread.qpx/406

INFO [LicenseProperties] 7 May 2007 16:48:55.160 : Licence expiry date: 6/23/2007
INFO [LicenseProperties] 7 May 2007 16:48:55.160 : Trial license
INFO [LicenseProperties] 7 May 2007 16:48:55.160 : Licence expiry date: 6/23/2007
INFO [LicenseProperties] 7 May 2007 16:48:55.160 : Trial license
DEBUG [SSLFTPClient] 7 May 2007 16:48:55.160 : Connecting to 139.158.145.231:989
DEBUG [HostNameResolver] 7 May 2007 16:48:55.160 : 139.158.145.231 resolved to 139.158.145.231
DEBUG [ExFTPControlSocket] 7 May 2007 16:48:55.176 : Connecting directly to ftp-server 139.146.141.231:989
DEBUG [ExFTPControlSocket] 7 May 2007 16:48:55.239 : Created control-socket: SocksContext=, RemoteHost=139.158.145.231, controlPort=989, timeout=0
DEBUG [FTPControlSocket] 7 May 2007 16:48:55.270 : 220 AdConnections secure integration point.
DEBUG [FTPControlSocket] 7 May 2007 16:48:55.301 : ---> AUTH TLS
DEBUG [FTPControlSocket] 7 May 2007 16:48:55.348 : 234 Using authentication type TLS
DEBUG [SSLFTPControlSocket] 7 May 2007 16:48:55.348 : Beginning Tls1 handshake.
ERROR [SocketController] 7 May 2007 16:48:55.535 : OnReceive - caught exception - closing : Org.Mentalis.Security.Ssl.Shared.SslException: The pulic key should be at least 512 bits.
Org.Mentalis.Security.Ssl.Shared.SslException: The pulic key should be at least 512 bits.
at dw.a(dt A_0, Boolean A_1)
at cr.a(dt A_0)
at dw.b(f7 A_0)
at g7.a(Byte[] A_0, Int32 A_1, Int32 A_2)
at ec.b(Byte[] A_0, Int32 A_1, Int32 A_2)
at ec.c(Byte[] A_0, Int32 A_1, Int32 A_2)
at w.g(IAsyncResult A_0)
DEBUG [TransferBuffer] 7 May 2007 16:48:55.551 : Close() called when open
DEBUG [AsyncProcessor] 7 May 2007 16:48:55.551 : Stopping FTP task processor.
DEBUG [AsyncProcessor] 7 May 2007 16:48:55.551 : FTP task processor stopped.
DEBUG [FTPControlSocket] 7 May 2007 16:48:55.551 : ---> QUIT
ERROR [SecureFTPConnection] 7 May 2007 16:48:55.567 : An I/O exception occurred. : System.IO.IOException: An I/O exception occurred.
System.IO.IOException: An I/O exception occurred.
at a8.a(Byte[] A_0, Int32 A_1, Int32 A_2)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at EnterpriseDT.Net.Ftp.FTPControlSocket.WriteCommand(String command)
at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
at EnterpriseDT.Net.Ftp.FTPClient.Quit()
at EnterpriseDT.Net.Ftp.Ssl.SSLFTPClient.Quit()
at EnterpriseDT.Net.Ftp.FTPConnection.Close(Boolean abruptClose)
at EnterpriseDT.Net.Ftp.SecureFTPConnection.Connect()
CAUSED BY:
System.Net.Sockets.SocketException: The operation completed successfully
at er.b(Byte[] A_0, Int32 A_1, Int32 A_2, SocketFlags A_3, AsyncCallback A_4, Object A_5)
at er.b(Byte[] A_0, Int32 A_1, Int32 A_2, SocketFlags A_3)
at a8.a(Byte[] A_0, Int32 A_1, Int32 A_2)

13 Answers

0 votes
by (161k points)
This is almost certainly a 64-bit problem. We use an offset into a memory structure that looks like it will break under 64 bit code. We've got a fix that you can try out - email us at support at enterprisedt dot com. We haven't got a 64-bit test platform but hopefully this will work.
0 votes
by (800 points)
I would tend to agree with you as I just tested this on an Itanium x64 plateform running the IA64 .NET 2.0 Framework and had the same exact error message come out of the log file. With this code fix that you are suggesting, will this be a universal library change which will work on both x86 and x64 architectures or will each require a different library to execute?
0 votes
by (161k points)
This change should work on x86 and 64 bit architectures. We'll get it to you ASAP.
0 votes
by (800 points)
Still a no go. Below is the Debug file. This was tested on an Itanium processor but I was getting the original error on both AMD and Intel x64 chipsets. Do you have another suggestion.

DEBUG [SFTPMessageStore] 8 May 2007 21:24:02.548 : Set timeout=0
INFO [LicenseProperties] 8 May 2007 21:24:02.618 : Licence expiry date: 6/23/2007
INFO [LicenseProperties] 8 May 2007 21:24:02.618 : Trial license
INFO [LicenseProperties] 8 May 2007 21:24:02.628 : Licence expiry date: 6/23/2007
INFO [LicenseProperties] 8 May 2007 21:24:02.628 : Trial license
DEBUG [SSLFTPClient] 8 May 2007 21:24:02.628 : Connecting to abc.acme.com:989
DEBUG [HostNameResolver] 8 May 2007 21:24:02.638 : abe.acme.com resolved to 134.146.184.238
DEBUG [SSLFTPControlSocket] 8 May 2007 21:24:02.648 : waitOnShutdownSSL=True
DEBUG [ExFTPControlSocket] 8 May 2007 21:24:02.678 : Connecting directly to ftp-server 134.146.184.238:989
DEBUG [ExFTPControlSocket] 8 May 2007 21:24:02.738 : Created control-socket: SocksContext=, ProxySettings=EnterpriseDT.Net.Proxy.ProxySettings, RemoteHost=134.146.184.238, controlPort=989, timeout=0
DEBUG [FTPControlSocket] 8 May 2007 21:24:02.768 : 220 secure integration point.
DEBUG [FTPControlSocket] 8 May 2007 21:24:02.818 : ---> AUTH TLS
DEBUG [FTPControlSocket] 8 May 2007 21:24:02.858 : 234 Using authentication type TLS
DEBUG [SSLFTPControlSocket] 8 May 2007 21:24:02.868 : Beginning Tls1 handshake.
DEBUG [SocketController] 8 May 2007 21:24:03.078 : Processing hello
ERROR [SocketController] 8 May 2007 21:24:03.178 : OnReceive - caught exception - closing : System.DataMisalignedException: A datatype misalignment was detected in a load or store instruction.
System.DataMisalignedException: A datatype misalignment was detected in a load or store instruction.
at dd.CertGetPublicKeyLength(Int32 dwCertEncodingType, IntPtr pPublicKey)
at d4.aj()
at dz.a(dw A_0, Boolean A_1)
at cu.a(dw A_0)
at dz.b(f8 A_0)
at g9.a(Byte[] A_0, Int32 A_1, Int32 A_2)
at ef.b(Byte[] A_0, Int32 A_1, Int32 A_2)
at ef.c(Byte[] A_0, Int32 A_1, Int32 A_2)
at z.h(IAsyncResult A_0)
DEBUG [SocketController] 8 May 2007 21:24:03.188 : CloseConnection(e=A datatype misalignment was detected in a load or store instruction.)
DEBUG [TransferBuffer] 8 May 2007 21:24:03.198 : Close() called when open


From FileZilla Server
(000234) 5/8/2007 22:24:19 PM - (not logged in) (68.152.27.14)> Connected, sending welcome message...
(000234) 5/8/2007 22:24:19 PM - (not logged in) (68.152.27.14)> 220 secure integration point.
(000234) 5/8/2007 22:24:19 PM - (not logged in) (68.152.27.14)> AUTH TLS
(000234) 5/8/2007 22:24:19 PM - (not logged in) (68.152.27.14)> 234 Using authentication type TLS
(000234) 5/8/2007 22:24:19 PM - (not logged in) (68.152.27.14)> disconnected.
0 votes
by (161k points)
Have sent you another DLL to try ...
0 votes
by (800 points)
It looks like the original error message is back. Let me know when you have another file to test.

INFO [LicenseProperties] 9 May 2007 12:00:18.573 : Licence expiry date: 6/23/2007
INFO [LicenseProperties] 9 May 2007 12:00:18.573 : Trial license
INFO [LicenseProperties] 9 May 2007 12:00:18.573 : Licence expiry date: 6/23/2007
INFO [LicenseProperties] 9 May 2007 12:00:18.573 : Trial license
DEBUG [SSLFTPClient] 9 May 2007 12:00:18.573 : Connecting to abc.acme.com:989
DEBUG [HostNameResolver] 9 May 2007 12:00:18.573 : abc.acme.com resolved to 154.146.241.31
DEBUG [SSLFTPControlSocket] 9 May 2007 12:00:18.573 : waitOnShutdownSSL=True
DEBUG [ExFTPControlSocket] 9 May 2007 12:00:18.573 : Connecting directly to ftp-server 154.146.241.31:989
DEBUG [ExFTPControlSocket] 9 May 2007 12:00:18.703 : Created control-socket: SocksContext=, ProxySettings=EnterpriseDT.Net.Proxy.ProxySettings, RemoteHost=154.146.241.31, controlPort=989, timeout=0
DEBUG [FTPControlSocket] 9 May 2007 12:00:18.743 : 220 secure integration point.
DEBUG [FTPControlSocket] 9 May 2007 12:00:18.743 : ---> AUTH TLS
DEBUG [FTPControlSocket] 9 May 2007 12:00:18.773 : 234 Using authentication type TLS
DEBUG [SSLFTPControlSocket] 9 May 2007 12:00:18.773 : Beginning Tls1 handshake.
DEBUG [SocketController] 9 May 2007 12:00:18.903 : Processing hello
ERROR [SocketController] 9 May 2007 12:00:18.903 : OnReceive - caught exception - closing : Org.Mentalis.Security.Ssl.Shared.SslException: The public key should be at least 512 bits.
Org.Mentalis.Security.Ssl.Shared.SslException: The public key should be at least 512 bits.
at dz.a(dw A_0, Boolean A_1)
at cu.a(dw A_0)
at dz.b(f8 A_0)
at g9.a(Byte[] A_0, Int32 A_1, Int32 A_2)
at ef.b(Byte[] A_0, Int32 A_1, Int32 A_2)
at ef.c(Byte[] A_0, Int32 A_1, Int32 A_2)
at z.h(IAsyncResult A_0)
DEBUG [SocketController] 9 May 2007 12:00:18.903 : CloseConnection(e=The public key should be at least 512 bits.)
DEBUG [TransferBuffer] 9 May 2007 12:00:18.903 : Close() called when open

FileZilla Server
(000382) 5/9/2007 12:59:27 PM - (not logged in) (147.152.17.14)> Connected, sending welcome message...
(000382) 5/9/2007 12:59:27 PM - (not logged in) (147.152.17.14)> 220 secure integration point.
(000381) 5/9/2007 12:59:27 PM - (not logged in) (147.152.17.14)> AUTH TLS
(000381) 5/9/2007 12:59:27 PM - (not logged in) (147.152.17.14)> 234 Using authentication type TLS
(000382) 5/9/2007 12:59:27 PM - (not logged in) (147.152.17.14)> disconnected.
(000383) 5/9/2007 13:00:28 PM - (not logged in) (147.152.17.14)> Connected, sending welcome message...
(000383) 5/9/2007 13:00:28 PM - (not logged in) (147.152.17.14)> 220 secure integration point.
(000383) 5/9/2007 13:00:28 PM - (not logged in) (147.152.17.14)> AUTH TLS
(000383) 5/9/2007 13:00:28 PM - (not logged in) (147.152.17.14)> 234 Using authentication type TLS
(000383) 5/9/2007 13:00:28 PM - (not logged in) (147.152.17.14)> disconnected.
0 votes
by (161k points)
Without 64-bit Windows to test on this is wasting too much of our time and yours.

We plan to get a new machine over the next few weeks with 64 bit Windows installed so that we can ensure everything works correctly.

Until then we don't see much point in making changes that we can't easily test. Stay tuned for news of a version that will run on 64-bit Windows soonish.
0 votes
by (220 points)
Without 64-bit Windows to test on this is wasting too much of our time and yours.

We plan to get a new machine over the next few weeks with 64 bit Windows installed so that we can ensure everything works correctly.

Until then we don't see much point in making changes that we can't easily test. Stay tuned for news of a version that will run on 64-bit Windows soonish.


Hi there,

It's been a while since this was posted, but I'm currently having this issue on an x64 based Windows Server 2003 SP2 machine with edtFTPNetPro 6.3.0.20. My development machine is Windows Server 2003 (x86) SP2 and it works fine on there. The FTP service is the new IIS 7 ftp service (http://www.iis.net/downloads/default.as ... g=6&i=1620) running on a completely separate machine. The certificate is 1024 bits SHA1 issued from VeriSign.

I've searched around various forums and haven't found an answer to this yet. Could you please provide some updates to this problem?

Thanks for your help!

Here's the program's output:

DEBUG [SecureFTPConnection] 12 May 2009 19:05:25.418 : Setting useUnencryptedCommands=True
INFO [LicenseProperties] 12 May 2009 19:05:25.434 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 12 May 2009 19:05:25.434 : Production license
DEBUG [FTPConnection] 12 May 2009 19:05:25.434 : Set LocalDirectory='E:\KBSTEst'
DEBUG [SecureFTPConnection] 12 May 2009 19:05:25.449 : Set LocalDirectory to E:\KBSTEst
INFO [LicenseProperties] 12 May 2009 19:05:25.449 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 12 May 2009 19:05:25.449 : Production license
DEBUG [SSLFTPClient] 12 May 2009 19:05:25.449 : Connecting to XXXXXX:21
DEBUG [HostNameResolver] 12 May 2009 19:05:25.528 : XXXXXX resolved to xxx.xx.x.xx
DEBUG [SSLFTPControlSocket] 12 May 2009 19:05:25.528 : waitOnShutdownSSL=True
DEBUG [ExFTPControlSocket] 12 May 2009 19:05:25.543 : Connecting directly to ftp-server xxx.xx.x.xx:21
DEBUG [FTPControlSocket] 12 May 2009 19:05:25.621 : Setting socket timeout=120000
DEBUG [SecureSocket] 12 May 2009 19:05:25.621 : Set timeout=120000
DEBUG [SecureSocket] 12 May 2009 19:05:25.621 : Set timeout=120000
DEBUG [FTPControlSocket] 12 May 2009 19:05:25.621 : Command encoding=System.Text.ASCIIEncoding
DEBUG [ExFTPControlSocket] 12 May 2009 19:05:25.621 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=xxx.xx.x.xx, controlPort=21, timeout=120000
DEBUG [FTPControlSocket] 12 May 2009 19:05:25.637 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 12 May 2009 19:05:25.699 : 220-Microsoft FTP Service
DEBUG [FTPControlSocket] 12 May 2009 19:05:26.293 : Welcome to the XXXX Site.
DEBUG [FTPControlSocket] 12 May 2009 19:05:26.293 : This FTP Server is the property of XXXXXX.
DEBUG [FTPControlSocket] 12 May 2009 19:05:26.293 : Unauthorized access is strictly prohibited.
DEBUG [FTPControlSocket] 12 May 2009 19:05:26.293 : 220 * Access to the XXXX server is limited. *
[INFO] The FTP connection is being secure by SSL.
DEBUG [FTPControlSocket] 12 May 2009 19:05:26.324 : ---> AUTH TLS
DEBUG [FTPControlSocket] 12 May 2009 19:05:26.418 : 234 AUTH command ok. Expecting TLS Negotiation.
DEBUG [SSLFTPControlSocket] 12 May 2009 19:05:26.418 : Beginning Ssl3, Tls1 handshake.
DEBUG [SocketController] 12 May 2009 19:05:27.184 : Processing hello
ERROR [SocketController] 12 May 2009 19:05:27.559 : OnReceive - caught exception - closing : Org.Mentalis.Security.Ssl.Shared.SslException: The public key should be at least 512 bits.
ERROR [SocketController] 12 May 2009 19:05:27.559 : ERROR [SocketController] 12 May 2009 19:05:27.559 : at ade9Z18KYQuyFZJZhXR.yZG3mr8m6lyFkwAhqLv.jeMN3jvrR(qBTbnv8fstcOUtPIHQi , Boolean )
ERROR [SocketController] 12 May 2009 19:05:27.559 : ERROR [SocketController] 12 May 2009 19:05:27.559 : at 41SLZ68t7WQHE84uRGS.6w3Y7F8ZCpD3kQ9pM8n.ProcessMessage(qBTbnv8fstcOUtPIHQi )
ERROR [SocketController] 12 May 2009 19:05:27.559 : ERROR [SocketController] 12 May 2009 19:05:27.559 : at ade9Z18KYQuyFZJZhXR.yZG3mr8m6lyFkwAhqLv.wEmYMqIUS(1RjEOLTxTynbXM640VG )
ERROR [SocketController] 12 May 2009 19:05:27.559 : ERROR [SocketController] 12 May 2009 19:05:27.559 : at xlBUcfTU8mM2Cja7L3g.oHy016TRcg7LMimqVVD.wP48Ll9tY(Byte[] , Int32 , Int32 )
ERROR [SocketController] 12 May 2009 19:05:27.559 : ERROR [SocketController] 12 May 2009 19:05:27.559 : at pi7QhaT58RaCmZxXufB.Gg99GcT4AmIsVyFoi5m.wEmYMqIUS(IAsyncResult )
DEBUG [SocketController] 12 May 2009 19:05:27.559 : CloseConnection(e=The public key should be at least 512 bits.)
DEBUG [SocketController] 12 May 2009 19:05:27.559 : Shut down socket
DEBUG [SocketController] 12 May 2009 19:05:27.559 : Closed socket
DEBUG [TransferBuffer] 12 May 2009 19:05:27.559 : Close() called when open
DEBUG [SecureSocket] 12 May 2009 19:05:27.559 : OnHandshakeComplete(False,The public key should be at least 512 bits.)
ERROR [SecureSocket] 12 May 2009 19:05:27.559 : Exception during handshake: The public key should be at least 512 bits.
0 votes
by (161k points)
Hmm, we've tested 6.3.0 successfully on an x64 Vista machine. We don't have an x64 Windows 2003 machine handy to try out right now.
0 votes
by (220 points)
Thanks for responding. We're a paid customer, so I've submitted a formal support request for this. FTPnetPro has been great, so far, except for this snag. The application this is being used in needs to run on Windows Server 2003 x64 since that is what we and our clients are running. If you could load Windows Server 2003 x64 SP2 on a machine (you can always dual-boot, even with a trial copy) and take a look into this for me, that would be great. Thanks in advance for your help.

- B

Categories

...