LudovicRousseau / CCID

CCID driver
https://ccid.apdu.fr/
GNU Lesser General Public License v2.1
235 stars 79 forks source link

Add in the ability to dynamically adjust module path at run-time via system environmental exports #103

Closed timesys-nathan closed 2 years ago

timesys-nathan commented 2 years ago

Add in the ability to dynamically adjust module path at run-time via system environmental exports

Background: While trying to integrate PKCS11+HSM into a build system (Yocto Project), we wanted the build system to be able to use the HSM directly. However, The Yocto Project creates a sandboxed environment for each package which uses CCID during compilation. This means that the CCID modules cannot be found from within these sandboxed directories, as their paths are non-determinable at compile time. OpenSSL appears to use OPENSSL_CONF for this sort of dynamic configuration, so I've followed their lead and incorporated a similar ccid_getenv() method.

LudovicRousseau commented 2 years ago

Fixed in https://github.com/LudovicRousseau/CCID/commit/209f459de46952e3387e47b9758c4d77cddd1caf

Thanks

timesys-nathan commented 2 years ago

Fixed in 209f459

Thanks

I was just making your suggested changes and you beat me to it. Looks good! Thanks