EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to use SecureBox Units with Lazaurs and Freepascal

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.
#32413
Posted: 03/02/2015 10:20:12
by T SMITH (Standard support level)
Joined: 03/02/2015
Posts: 18

Hi

I use Lazarus 1.2.6 and Freepascal 2.6.4.

I have battled for weeks trying to implement an encrypted FTP system for sFTP or FTPS servers without success (using Cryptlib, Synapse, OpenSSL etc).

Found this and it looks promising. I have just downloaded it to try it out but it seems not possible to add any of the Units as 'uses' clauses. I can't add them as units to my project and there is not package file to add to Lazarus either.

Searched the site and reference is made to "packages will be available with version 11 which is in beta" dated last year sometime. I have downloaded v12 (https://www.eldos.com/files/sbb_current/secbboxvclfpc_linux_x86.tar.gz) of SecureBox for Lazarus\Freepascal and no package seems to there.

So my question is how to I add this toolbox so I can use it with Lazarus?

Thanks
#32414
Posted: 03/02/2015 10:37:58
by Eugene Mayevski (EldoS Corp.)

Thank you for your interest in our products.

Quote
T SMITH wrote:
I have just downloaded it to try it out but it seems not possible to add any of the Units as 'uses' clauses. I can't add them as units to my project and there is not package file to add to Lazarus either.


The package includes all units in Units directory. What exactly problem are you having with using those units via uses clause?

Quote
T SMITH wrote:
So my question is how to I add this toolbox so I can use it with Lazarus?


Looks like package files for lazarus didn't get to the archive. We'll include them in the next build which is to be released in a couple of days.


Sincerely yours
Eugene Mayevski
#32415
Posted: 03/02/2015 10:54:42
by T SMITH (Standard support level)
Joined: 03/02/2015
Posts: 18

Thanks for replying so quickly.

I expect it is my error. Usually, when I use a library, the library contains pas files that, when added as units to the project, can then have their classes called.

e.g MyUnit.pas would be :

uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, MyUnit;

With SB, there are no pas files - all of them are o, ppu files which I think are compiled versions of pas files (correct me if I am wrong)?

So, in Lazarus, I created a new project, navigated to the Project Inspector, clicked 'Options' --> Compiler Options --> Paths and I added '/home/myuserfolder/MyDownloads/securebox/Units' to the 'Libraries' path. I then tried to add a couple of the units to the uses clause:

uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
sbsftp, ElSimpleSFTPClient;

The sbsftp is a unit for what I assume is for sFTP connections and the ElSimpleSFTPClient is a unit that securebox/Help/documentation/ref_cl_simplesftpclient.html refers to having to use. But when I try to compile, before even doing anything with them, it (Lazarus) says the units are not found.

I also tried "Adding files in a Directory" via Project Inspector --> Add --> Add files --> Add files in a directory. I navigated to the same unit path but it doesn't list them as added units. The inspector remains empty.

Sorry if I have mis-understood.
#32416
Posted: 03/02/2015 11:32:06
by Eugene Mayevski (EldoS Corp.)

Quote
T SMITH wrote:
sbsftp, ElSimpleSFTPClient;


Here lies the error. The units to be referenced are SBSftpCommon and SBSimpleSFftp. TElSimpleSFTPClient is the name of the class (component).

For FTPS the class/component is TElSimpleFTPSClient and the unit to reference is SBSimpleFTPS.


Sincerely yours
Eugene Mayevski
#32417
Posted: 03/02/2015 11:37:47
by T SMITH (Standard support level)
Joined: 03/02/2015
Posts: 18

uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
SBSftpCommon, SBSimpleSFftp;

"unit1.pas(9,3) Fatal: Can not find unit SBSftpCommon used by Unit1 of the project inspector."


Screenshot attached - still unable to find it...

To my knowledge, .rst, .o, .ppu or .rst files can't be called as units. But then I am not especially experienced.


#32418
Posted: 03/02/2015 11:42:07
by Eugene Mayevski (EldoS Corp.)

There was a typo in the unit name. It must be SBSimpleSftp .


Sincerely yours
Eugene Mayevski
#32419
Posted: 03/02/2015 11:45:31
by T SMITH (Standard support level)
Joined: 03/02/2015
Posts: 18

It can't find either of them.

I think I'll give up for now and look at other options or wait for the packages to be included so that it is part of the Lazarus IDE.
#32420
Posted: 03/02/2015 12:06:30
by T SMITH (Standard support level)
Joined: 03/02/2015
Posts: 18

There must be something obvious I am missing here.

I just tried the Windows version instead.

Opened one of the demo's. All of the following units cannot be found:

SBSimpleSftp, SBSftpCommon, SBSSHConstants, SBSSHKeyStorage, SBTypes, SBUtils, SBStrUtils

My installation is in C:\Program Files\EldoS\ and my units are in C:\Program Files\EldoS\SecureBlackbox.VCL\Units\FreePascalWin32 and if I open one of the demo files (SimpleSFTPDemo) all of those units are referenced in the demo code of course but my Lazarus system can't find any of them. But in order to make the demo, someone must have created them with Lazarus. So how did they do it?

As SecureBox is a commercial library, there must be something I am just doing wrong here.
#32421
Posted: 03/02/2015 12:15:58
by Eugene Mayevski (EldoS Corp.)

I am sorry for misleading you but the packages are only for source files. They won't work with evaluation units.


Sincerely yours
Eugene Mayevski
#32422
Posted: 03/02/2015 12:21:04
by T SMITH (Standard support level)
Joined: 03/02/2015
Posts: 18

OK. So can I not evaluate the library to see if it is what I need? It looks very promising, but given the frustration I have had with the various open-source solutions I am reluctant to buy a license if it does not work as I need.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

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