Example #1
0
 public CertificateStore(ILogService log, IIISClient iisClient, CertificateStoreOptions options)
 {
     _log       = log;
     _iisClient = iisClient;
     _options   = options;
     ParseCertificateStore();
     _store = new X509Store(_storeName, StoreLocation.LocalMachine);
 }
Example #2
0
 public CertificateStore(
     ILogService log, IIISClient iisClient,
     ISettingsService settings, UserRoleService userRoleService,
     CertificateStoreOptions options)
 {
     _log             = log;
     _iisClient       = iisClient;
     _options         = options;
     _settings        = settings;
     _userRoleService = userRoleService;
     ParseCertificateStore();
     _store = new X509Store(_storeName, StoreLocation.LocalMachine);
 }
Example #3
0
 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);
 }