Exemple #1
0
            public void Add(
                StoreName storeName,
                StoreLocation storeLocation,
                X509FindType findType,
                string findValue,
                X509Certificate2 certificate)
            {
                string key = ClientCertificateCache.GetKey(storeName, storeLocation, findType, findValue);

                lock (this.thisLock)
                {
                    this.cache[key] = certificate;
                }
            }
Exemple #2
0
            public bool TryGet(
                StoreName storeName,
                StoreLocation storeLocation,
                X509FindType findType,
                string findValue,
                out X509Certificate2 certificate)
            {
                string key = ClientCertificateCache.GetKey(storeName, storeLocation, findType, findValue);

                lock (this.thisLock)
                {
                    this.cache.TryGetValue(key, out certificate);
                }

                return(certificate != null);
            }