public CertificateStore( ILogService log, IIISClient iisClient, ISettingsService settings, UserRoleService userRoleService, FindPrivateKey keyFinder, CertificateStoreOptions options) { _log = log; _iisClient = iisClient; _options = options; _settings = settings; _userRoleService = userRoleService; _keyFinder = keyFinder; ParseCertificateStore(); _store = new X509Store(_storeName, StoreLocation.LocalMachine); }
public CertificateStore( ILogService log, IIISClient iisClient, ISettingsService settings, IUserRoleService userRoleService, FindPrivateKey keyFinder, CertificateStoreOptions options) { _log = log; _iisClient = iisClient; _options = options; _settings = settings; _userRoleService = userRoleService; _keyFinder = keyFinder; _storeName = options.StoreName ?? DefaultStore(settings, iisClient); if (string.Equals(_storeName, "Personal", StringComparison.InvariantCultureIgnoreCase) || string.Equals(_storeName, "Computer", StringComparison.InvariantCultureIgnoreCase)) { // Users trying to use the "My" store might have set "Personal" in their // config files, because that's what the store is called in mmc _storeName = nameof(StoreName.My); } _log.Debug("Certificate store: {_certificateStore}", _storeName); _store = new X509Store(_storeName !, StoreLocation.LocalMachine); }