예제 #1
0
        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.");
            }
        }
예제 #2
0
파일: PemFiles.cs 프로젝트: jtv5/win-acme
 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.");
     }
 }
예제 #3
0
 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.");
     }
 }