Use a single mutex for the certificate generation