EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to implement TElSimpleSFTPClient object

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#26541
Posted: 09/20/2013 04:34:33
by Jacob jvandiermen (Standard support level)
Joined: 08/09/2013
Posts: 55

Hello Eldos,


I'm building a class for an object that can connect to a sftp server. I want to use the TElSimpleSFTPClient type for the object to connect to the sftp server.

In the private part of the class I've
Code
memoryKeyStorage: TElSSHMemoryKeyStorage;
sftpSimpleClient: TElSimpleSFTPClient;


In the constructor of the class I use this
Code

memoryKeyStorage:= TElSSHMemoryKeyStorage.Create(nil);
sftpSimpleClient.KeyStorage := memoryKeyStorage;

As in the sample projectSimpleSftpDemo.

In the SampleSftpDemo project this code works fine.
But in my constructor the code
Code
sftpSimpleClient.KeyStorage := memoryKeyStorage;

causes the application to crash.

I tried to instantiate the sftpSimpleClient like
Code
sftpSimpleClient:=  TElSimpleSFTPClient.create(nil);

before assigning the memoryKeyStorage to the property KeyStorage.
But that didn't work either.

How can I use a TElSimpleSFTPClient object in my class.

Regards,

Jacob
#26542
Posted: 09/20/2013 04:40:22
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Code
But that didn't work either.

Could you clarify what do you mean by "didn't work". It should work this way. The difference is that in the sample project an instance of TElSimpleSFTPClient is created in design time, but in your case you should create it manually using TElSimpleSFTPClient.Create constructor.
#26543
Posted: 09/20/2013 05:03:53
by Jacob jvandiermen (Standard support level)
Joined: 08/09/2013
Posts: 55

Hello Vsevolod Ievgiienko,

Thanks. Mistyped a letter in my source code!!!

Regards,

Jacob

Reply

Statistics

Topic viewed 948 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!