ODP: dynamic engine load
Piotr Lobacz
piotr.lobacz at softgent.com
Wed May 26 20:32:00 UTC 2021
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 at gmail.com>
Wysłane: środa, 26 maja 2021 15:52
Do: Piotr Lobacz <piotr.lobacz at softgent.com>
DW: openssl-users at openssl.org <openssl-users at openssl.org>
Temat: Re: dynamic engine load
Hi,
On Wed, May 26, 2021 at 9:25 AM Piotr Lobacz <piotr.lobacz at softgent.com> 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
[https://softgent.com/wp-content/uploads/2020/01/Zasob-14.png]<https://www.softgent.com>
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20210526/b9239519/attachment.html>
More information about the openssl-users
mailing list