While trying to setup an OpenSC context, the global_locking and detect cards, it is possible that multiple threads may call C_Initialize. The current code tries to prevent this using "if (context == NULL)" but this is not a mutex, and multiple threads may endup overwrite contexts and global locking and cause additional problems, with pcsc and segfault. FireFox appears to do this see #2032 The PR adds a mutex or Critical section to make sure only one thread creates the context sets the global_locking and does the initial detect cards, etc. This allows the global_lock (if requested) to be setup which is then used for other calls. All but the first call to C_Initialize will return with CKR_OK, others will return CKR_CRYPTOKI_ALREADY_INITIALIZED. Date: Mon Jan 11 12:47:12 2021 -0600 Changes to be committed: modified: src/pkcs11/pkcs11-global.c |
||
---|---|---|
.github | ||
MacOSX | ||
doc | ||
etc | ||
m4 | ||
packaging/debian.templates | ||
src | ||
tests | ||
win32 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.travis.yml | ||
COPYING | ||
Makefile.am | ||
Makefile.mak | ||
NEWS | ||
README | ||
README.md | ||
SECURITY.md | ||
appveyor.yml | ||
bootstrap | ||
bootstrap.ci | ||
configure.ac | ||
version.m4 |
README.md
OpenSC documentation
Wiki is available online
Please take a look at the documentation before trying to use OpenSC.
Build and test status of specific cards:
Cards | Status |
---|---|
CAC | |
virt_CACard | |
Coolkey | |
PivApplet | |
OpenPGP Applet | |
GidsApplet | |
IsoApplet | |
OsEID (MyEID) |