Branch: refs/heads/master
Home: https://github.com/OpenSC/libp11
Commit: 214b271cdd066b40ad08e15ec3c19581c8dcd149
https://github.com/OpenSC/libp11/commit/214b271cdd066b40ad08e15ec3c19581c8dcd149
Author: Marouene Boubakri <mar...@nx...>
Date: 2024-11-19 (Tue, 19 Nov 2024)
Changed paths:
M src/Makefile.am
Log Message:
-----------
src/Makefile.am: Build static PKCS#11 engine library (libpkcs11.a)
As discussed in issue #551, an application may statically link against
the OpenSSL library. Consequently, using a dynamically loadable engine
may present challenges. This PR proposes modifying the build system to
enable the creation of a static PKCS11 engine library instead
(libpkcs11.a).
The library exposes the `bind_engine()` function, which allows the
application to load and register the engine directly within the
application:
extern int bind_engine(ENGINE *e, const char *id);
Below is a sample code snippet demonstrating how to load and register
the engine:
ENGINE *e = NULL;
e = ENGINE_new();
if (e == NULL) {
error("Error creating new engine instance: %s\n",
ERR_reason_error_string(ERR_get_error()));
return 0;
}
/* Bind the engine using the bind_engine function */
if (!bind_engine(e, "pkcs11")) {
error("Error binding pkcs11 engine: %s\n",
ERR_reason_error_string(ERR_get_error()));
ENGINE_free(e);
return 0;
}
Signed-off-by: Marouene Boubakri <mar...@nx...>
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSC/libp11/settings/notifications
|