public PemFiles( ILogService log, ISettingsService settings, PemService pemService, PemFilesOptions options) { _log = log; _pemService = pemService; _password = !string.IsNullOrWhiteSpace(options.PemPassword?.Value) ? options.PemPassword.Value : settings.Store.PemFiles?.DefaultPassword; var path = options.Path; if (string.IsNullOrWhiteSpace(path)) { path = DefaultPath(settings); } if (!string.IsNullOrWhiteSpace(path) && path.ValidPath(log)) { _log.Debug("Using .pem files path: {path}", path); _path = path; } else { throw new Exception($"Specified .pem files path {path} is not valid."); } }
public PemFiles(ILogService log, PemService pemService, PemFilesOptions options) { _log = log; _pemService = pemService; if (!string.IsNullOrWhiteSpace(options.Path)) { _path = options.Path; } if (_path.ValidPath(log)) { _log.Debug("Using .pem certificate path: {_path}", _path); } else { throw new Exception("Error initializing PemFiles plugin, specified path is not valid."); } }
public PemFiles( ILogService log, ISettingsService settings, PemService pemService, PemFilesOptions options) { _log = log; _pemService = pemService; _path = !string.IsNullOrWhiteSpace(options.Path) ? options.Path : settings.Store.DefaultPemFilesPath; if (_path.ValidPath(log)) { _log.Debug("Using .pem certificate path: {_path}", _path); } else { throw new Exception($"Specified PemFiles path {_path} is not valid."); } }