ODP: dynamic engine load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yeah,
that is what i have figured it out and written it in my previous message:] but big thx for help.

BR
Piotr Lobacz

Od: Selva Nair <selva.nair@xxxxxxxxx>
Wysłane: środa, 26 maja 2021 15:52
Do: Piotr Lobacz <piotr.lobacz@xxxxxxxxxxxx>
DW: openssl-users@xxxxxxxxxxx <openssl-users@xxxxxxxxxxx>
Temat: Re: dynamic engine load
 
Hi,

On Wed, May 26, 2021 at 9:25 AM Piotr Lobacz <piotr.lobacz@xxxxxxxxxxxx> wrote:
>
> Hi all,
> I am trying to write a function which will load dynamic engine for pkcs11. What i intendt to do is not to use engine id pkcs11 but dynamic. The problem is that i get an error for ENGINE_ctrl_cmd_string with MODULE_PATH parameter. My function currently looks like this:
>
>         public void Initialize()
>         {
>             if (null == engine)
>             {
>                 engine = SafeNativeMethods.ENGINE_by_id("dynamic");
>                 if (engine.IsInvalid)
>                 {
>                     throw new InvalidOperationException($"Unable to load dynamic engine");
>                 }
>
>                 if (!File.Exists(EnginePath))
>                 {
>                     throw new InvalidOperationException($"Unable to find engine library path");
>                 }
>
>                 if (1 != SafeNativeMethods.ENGINE_ctrl_cmd_string(engine, "SO_PATH", EnginePath, 0))
>                 {
>                     throw new InvalidOperationException("dynamic: setting so_path <= '{EnginePath}'");
>                 }

At this point you should do the "LOAD" control to get the dynamic
engine shell replaced by pkcs11. Then set the ID and the MODULE_PATH.

So its dynamic --> set SO_PATH --> LOAD and then set all parameters of
the engine that SO_PATH implements.

Selva


Selva

Softgent Sp. z o.o., Budowlanych 31d, 80-298 Gdansk, POLAND

KRS: 0000674406, NIP: 9581679801, REGON: 367090912

www.softgent.com

Sąd Rejonowy Gdańsk-Północ w Gdańsku, VII Wydział Gospodarczy Krajowego Rejestru Sądowego

KRS 0000674406, Kapitał zakładowy: 25 000,00 zł wpłacony w całości.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux