md: protect MD entry points with CriticalSection
CardDeleteContext may be called at any time, interrupting any ongoing operation with the same PCARD_DATA. This leads to a race condition when CardDeleteContext deletes, for example, the sc_context_t which the interrupted call still wants to access. We have seen and fixed this problem in https://github.com/OpenSC/OpenSC/issues/973 specifically for the PIN entry process, however, it also applies to all other calls to the md. The new implementation removes the need for global data in the md.
This commit is contained in:
parent
9583d3b650
commit
d0d9b974a7