Darren J Moffat wrote: > Dan McDonald wrote: >> Hello. >> >> I *know* that one is suppoed to have one open PKCS#11 session per slot >> and >> per thread if you have a multithreaded PKCS#11 app. What's less clear >> to me >> is if: >> >> - C_Initialize() is done per-thread or prior to thread creation. >> (I'd suspect once prior to threads, but I'm not sure, hence I'm >> asking.) > > It is once per process. > >> - What about C_GetSlotList()? My inituition says this is safe either >> way, but there are no clear docs. > > It is safe either way and the output can only grow, never shrink, unless > you call C_Finalize() and C_Initalize() again. Prior to v2.20 it could > never change - the v2.20 revision was one I asked for.
The additions for v2.20 C_GetSlotList fell below the the line when we implemented v2.20 changes.. Today the list is still locked to when C_Initialize is first called. Tony