EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Custom Server comment To Client HowTo??

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#32666
Posted: 03/19/2015 12:57:31
by Rafael Hernandez (Standard support level)
Joined: 02/04/2015
Posts: 21

I am currently evaluating the SFTP portion of SecureBlackbox and currently have my own working version of the sample Sftp Server. I am currently exploring how to send custom messages back to the client for error handling purposes but I am having zero luck doing so.
For example, in the openFileEvent I manipulate the comment.value and errCode.value fields as per the documentation but still no luck. This is one example.
Code
errCode.value = SBSftpCommon.SSH_ERROR_FILE_ALREADY_EXISTS;
comment.value = "my custom error message";


Using various error codes and/or custom comments and three different clients (FileZilla, OpenSSH, Transmit), my error codes and server comments never get outputted. What is the best way to get this working? Thanks.
#32667
Posted: 03/19/2015 13:29:54
by Ken Ivanov (EldoS Corp.)

Hi Rafael,

Thank you for your interest in our products. Basing on the details of your question, I assume that it's Java edition you are evaluating, isn't it?

I've just re-checked the code and haven't found anything that might prevent it from sending your custom error codes and messages. Could you please check if TElSimpleSFTPClient (another SBB class) reports the custom values?

Cheers,

Ken
#32764
Posted: 03/25/2015 12:14:43
by Rafael Hernandez (Standard support level)
Joined: 02/04/2015
Posts: 21

Yes, I am evaluating the Java version.

I tried the following:
Code
errCode.value = SBSftpCommon.SSH_ERROR_FILE_ALREADY_EXISTS;
comment.value = "The File Already Exists";


Result:
FAILED: writeFile_
SecureBlackbox.SFTPCommon.EElSFTPError: The File Already Exists
at SecureBlackbox.SFTPClient.TElSftpClient.openFileSync(SBSftp.pas:1843)
at SecureBlackbox.SFTPClient.TElSimpleSFTPClient.openFile(SBSimpleSftp.pas:4470)
at SecureBlackbox.SFTPClient.TElSimpleSFTPClient.uploadStream(SBSimpleSftp.pas:3195)
at SecureBlackbox.SFTPClient.TElSimpleSFTPClient.uploadStream(SBSimpleSftp.pas:3297)
at com.test.script.SftpClientScript.writeFile_(SftpClientScript.java:41)


Looks like the SecureBlackBox client spits out the message on the other end but the question is how to do I get other clients (FileZilla, OpenSSH, Transmit etc.) to do this? Thanks.
#32765
Posted: 03/25/2015 12:19:04
by Eugene Mayevski (EldoS Corp.)

If the client doesn't take the error text and uses its own code-to-text mappings, then the only option is to ask the vendors of the clients to care about the text being sent by the server.


Sincerely yours
Eugene Mayevski
#32773
Posted: 03/25/2015 17:35:13
by Rafael Hernandez (Standard support level)
Joined: 02/04/2015
Posts: 21

Thanks for the reply. Can you point me to one or more SFTP clients you are aware of that handles the BlackBox SFTP Server custom message just fine and does not implement code-to-text mappings? Thanks.
#32796
Posted: 03/26/2015 15:50:55
by Ken Ivanov (EldoS Corp.)

Rafael,

You might wish to try SimpleSFTPDemo, it should work just fine here (as an illustration and the way to check the correctness of the custom messages).

Cheers,

Ken
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 618 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!