FileStorage vs MemoryStorage

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
eduard
Posts: 4
Joined: Fri 16 Mar 2007 07:30

FileStorage vs MemoryStorage

Post by eduard » Thu 14 Sep 2017 11:17

Hello,

At this moment i am using the trail version MyDac 9.0.2 and SecureBridge 8.0.2 with Delphi 10.2

Created a Project1 with the following components:
ScSSHClient1
ScFileStorage1
ScMemoryStorage1

During design time i import 2 key files (Private & Public) in ScFileStorage1 and fill the properties in ScSSHClient1 and i can connect to the server (Connected=True)

Doing this with ScMemoryStorage1 i can not connect to the server. No error message is shown during design time. Clicking on the property: Connected and nothing happens.
At run time with ScMemoryStorage1 i get the message: Host key not verified.

That is odd because using the same key files with ScFileStorage1 it works fine both during design and runtime.

Somehow i miss the concept of the component: ScMemoryStorage1

I have read: https://www.devart.com/sbridge/docs/ind ... torage.htm
but that does not give me any clues.

Do you have any suggestions or more detail information (example) on how to use ScMemoryStorage1 properly?


Thank you for your time

Eduard

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: FileStorage vs MemoryStorage

Post by ViktorV » Thu 14 Sep 2017 15:21

The TScMemoryStorage component is designed to store certificates and keys only in RAM. So in runtime the certificates and keys are stored in local memory of the running application, and in designtime they are stored only when working in the TScMemoryStorage properties editor and as soon as you close it they are automatically deleted.
Therefore, to work with keys in your app, you should in runtime every time preload keys into the TScMemoryStorage component, even those you loaded in designtime.

Post Reply