Пример #1
0
        private async Task InitCertificateRequestAndGroup()
        {
            await _certificateRequest.Initialize();

            string[] groups = await _certificateGroup.GetCertificateGroupIds();

            foreach (var group in groups)
            {
                await _certificateGroup.CreateIssuerCACertificateAsync(group);

                var chain = await _certificateGroup.GetIssuerCACertificateChainAsync(group);

                Assert.NotNull(chain);
                Assert.True(chain.Count > 0);
            }
        }
Пример #2
0
 public void Start()
 {
     Task.Run(async() =>
     {
         try
         {
             await _repository.CreateRepositoryIfNotExistsAsync();
             await _applicationDatabase.Initialize();
             await _certificateRequest.Initialize();
             _logger.Information("Database warm start successful.");
         }
         catch (Exception ex)
         {
             _logger.Error("Failed to warm start databases.", ex);
         }
     });
 }