/// <summary> /// Get an instance of SslCertificateProviderService /// </summary> public SslCertificateProviderService( ILoggerInterface logger, string appId, EnvironmentSettings globalSettings, Deployment deployment) { this.AppPoolUtils = new UtilsAppPool(logger); this.UtilsHosts = new UtilsHosts(logger); this.MockEnvironment = UtilsSystem.RunningInContinuousIntegration() || UnitTestDetector.IsRunningInTests || Debugger.IsAttached; // Everything performed against the staging API needs to be kept apart, including signer, etc... this.StoragePath = Path.Combine(globalSettings.GetDefaultContentStorage().path, "letsencrypt" + (this.MockEnvironment ? "_mock" : null)); UtilsSystem.EnsureDirectoryExists(this.StoragePath, true); // If CCS is available, use that, otherwise use the central content storage string sslRenewalStateStorePath = UtilsIis.CentralStoreEnabled() ? UtilsIis.CentralStorePath(logger) : globalSettings.GetDefaultContentStorage().path; this.SimpleStoreRenewalStatus = new SimpleStore(Path.Combine(sslRenewalStateStorePath, "_ssl_renewal_state_store"), true); this.Logger = logger; this.AppId = appId; this.Deployment = deployment; this.GlobalSettings = globalSettings; }