Example #1
0
 void m_fillproperties(DirectoryEntry entry)
 {
     flags             = (Int32)entry.Properties["flags"].Value;
     Name              = (String)entry.Properties["cn"].Value;
     DisplayName       = (String)entry.Properties["displayName"].Value;
     major             = (Int32)entry.Properties["Revision"].Value;
     minor             = (Int32)entry.Properties["msPKI-Template-Minor-Revision"].Value;
     SchemaVersion     = (Int32)entry.Properties["msPKI-Template-Schema-Version"].Value;
     OID               = new Oid((String)entry.Properties["msPKI-Cert-Template-OID"].Value);
     LastWriteTime     = (DateTime)entry.Properties["WhenChanged"].Value;
     DistinguishedName = (String)entry.Properties["distinguishedName"].Value;
     Settings          = new CertificateTemplateSettings(entry);
 }
        void m_fillproperties(String ldapPath)
        {
            IDictionary <String, Object> props = DsUtils.GetEntryProperties(
                ldapPath,
                DsUtils.PropCN,
                DsUtils.PropDN,
                DsUtils.PropDisplayName,
                DsUtils.PropFlags,
                DsUtils.PropCpsOid,
                DsUtils.PropCertTemplateOid,
                DsUtils.PropLocalizedOid,
                DsUtils.PropPkiTemplateMajorVersion,
                DsUtils.PropPkiTemplateMinorVersion,
                DsUtils.PropPkiSchemaVersion,
                DsUtils.PropWhenChanged,
                DsUtils.PropPkiSubjectFlags,
                DsUtils.PropPkiEnrollFlags,
                DsUtils.PropPkiPKeyFlags,
                DsUtils.PropPkiNotAfter,
                DsUtils.PropPkiRenewalPeriod,
                DsUtils.PropPkiPathLength,
                DsUtils.PropCertTemplateEKU,
                DsUtils.PropPkiCertPolicy,
                DsUtils.PropPkiCriticalExt,
                DsUtils.PropPkiSupersede,
                DsUtils.PropPkiKeyCsp,
                DsUtils.PropPkiKeySize,
                DsUtils.PropPkiKeySpec,
                DsUtils.PropPkiKeySddl,
                DsUtils.PropPkiRaAppPolicy,
                DsUtils.PropPkiRaCertPolicy,
                DsUtils.PropPkiRaSignature,
                DsUtils.PropPkiAsymAlgo,
                DsUtils.PropPkiSymAlgo,
                DsUtils.PropPkiSymLength,
                DsUtils.PropPkiHashAlgo,
                DsUtils.PropPkiKeyUsage,
                DsUtils.PropPkiKeyUsageCng
                );

            flags             = (Int32)props[DsUtils.PropFlags];
            Name              = (String)props[DsUtils.PropCN];
            DistinguishedName = (String)props[DsUtils.PropDN];
            DisplayName       = (String)props[DsUtils.PropDisplayName];
            major             = (Int32)props[DsUtils.PropPkiTemplateMajorVersion];
            minor             = (Int32)props[DsUtils.PropPkiTemplateMinorVersion];
            SchemaVersion     = (Int32)props[DsUtils.PropPkiSchemaVersion];
            OID           = new Oid((String)props[DsUtils.PropCertTemplateOid]);
            LastWriteTime = (DateTime)props[DsUtils.PropWhenChanged];
            Settings      = new CertificateTemplateSettings(props);
        }
 internal CertificateTemplate(IX509CertificateTemplate template)
 {
     initializeCom(template);
     Settings = new CertificateTemplateSettings(template);
 }