private void ConfigureSigner(ISigner signer, string basePath)
        {
            signer.Init();
            var signerPath = Path.Combine(basePath, _configuration.RegistrationFilename);

            if (File.Exists(signerPath))
            {
                _logger.Information("Loading signer from file {signerPath}", signerPath);
                using (var signerStream = File.OpenRead(signerPath))
                    signer.Load(signerStream);
            }
            else
            {
                _logger.Information("Saving signer to {signerPath}", signerPath);
                using (var signerStream = File.OpenWrite(signerPath))
                    signer.Save(signerStream);
            }
        }
 private static void LoadSignerFromFile(ISigner signer, string signerPath)
 {
     _log.Debug("Loading signer from {signerPath}", signerPath);
     using (var signerStream = File.OpenRead(signerPath))
         signer.Load(signerStream);
 }
Beispiel #3
0
 private static void LoadSignerFromFile(ISigner signer, string signerPath)
 {
     Log.Information("Loading Signer from {signerPath}", signerPath);
     using (var signerStream = File.OpenRead(signerPath))
         signer.Load(signerStream);
 }