public async Task <CertificateGroupConfigurationCollection> GetCertificateConfigurationGroupsAsync(string baseStorePath)
        {
            var groups = await _opcServiceClient.GetCertificateGroupsConfigurationAsync().ConfigureAwait(false);

            var groupCollection = new CertificateGroupConfigurationCollection();

            foreach (var group in groups.Groups)
            {
                var newGroup = new CertificateGroupConfiguration()
                {
                    Id = group.Name,
                    CertificateType            = group.CertificateType,
                    SubjectName                = group.SubjectName,
                    BaseStorePath              = baseStorePath + Path.DirectorySeparatorChar + group.Name,
                    DefaultCertificateHashSize = (ushort)group.DefaultCertificateHashSize,
                    DefaultCertificateKeySize  = (ushort)group.DefaultCertificateKeySize,
                    DefaultCertificateLifetime = (ushort)group.DefaultCertificateLifetime,
                    CACertificateHashSize      = (ushort)group.IssuerCACertificateHashSize,
                    CACertificateKeySize       = (ushort)group.IssuerCACertificateKeySize,
                    CACertificateLifetime      = (ushort)group.IssuerCACertificateLifetime
                };
                groupCollection.Add(newGroup);
            }
            return(groupCollection);
        }
Exemple #2
0
 private OpcVaultCertificateGroup(
     OpcVaultClientHandler opcVaultHandler,
     string authoritiesStorePath,
     CertificateGroupConfiguration certificateGroupConfiguration) :
     base(authoritiesStorePath, certificateGroupConfiguration)
 {
     _opcVaultHandler = opcVaultHandler;
 }
Exemple #3
0
 public override CertificateGroup Create(
     string storePath,
     CertificateGroupConfiguration certificateGroupConfiguration)
 {
     return(new OpcVaultCertificateGroup(_opcVaultHandler, storePath, certificateGroupConfiguration));
 }