Closed hannesm closed 7 years ago
Thanks for the patches. I think it's possible to remove the unconditional RTLD_DEEPBIND
and make it an optional argument of load_driver
, I'll have to check if that works with our use cases.
I don't have a linux system to test, but the RTLD_DEEPBIND
may actually not be needed at all...
(NB, with this PR and https://github.com/Yubico/yubico-piv-tool/pull/113 being merged, I can successfully sign using a Yubikey NEO/.. using RSA-PSS. mission accomplished :) Thank you so much for this library and the example application!)
Re. deepbind: that was to work around a bug when using both forwards and reverse binding at the same time. I don't remember what the exact problem was so I'll check whether that works without this flag.
Glad that this library is helpful!
Those lwt test failures are a bit annoying. Restarting the build!
Thanks!
thanks for merging -- btw your review comments (on the uname etc.) just appeared today -- maybe you forgot earlier to finish the review?
That's possible, that's the first time I'm using this feature so I didn't know it was necessary to submit. I'll know it for next time!
any chance you can make a new release of pkcs11?
I have a couple patches I'd like to squeeze into this release, but that should be done by the end of the week.
Pull-requested! https://github.com/ocaml/opam-repository/pull/8976
There are two changes needed to get PKCS11 (and the example application) to work on FreeBSD:
include <dlfcn.h>
RTLD_DEEPBIND
flag on FreeBSD (since it is not defined there, and ctypes will raise an assertion failure otherwise).The second item is done at runtime, after investigating the output of
uname -s
. SincePkcs11.load_driver
is called rarely, I guess spawning a new process which runsuname -s
is ok.