I’m writing a client/server solution using CryptoAPI to provide SSL encryption over a TCP socket. In the client I have a global CERT_STORE_PROV_MEMORY certificate store that I share between all connections (i.e. multiple threads).
My question is whether this is thread safe? Can multiple threads call functions (e.g. CertGetIssuerCertificateFromStore()) on the certificate store at the same time?
CertGetIssuerCertificateFromStore()is a reading function. So, concurrent usage of them is safe. TakenCERT_CONTEXTwill be a copy of existing one, so it can be modified as you wish.