diff --git a/src/CommonLib/Processors/LDAPPropertyProcessor.cs b/src/CommonLib/Processors/LDAPPropertyProcessor.cs index 61047f43..4e91150d 100644 --- a/src/CommonLib/Processors/LDAPPropertyProcessor.cs +++ b/src/CommonLib/Processors/LDAPPropertyProcessor.cs @@ -426,8 +426,12 @@ public static Dictionary ReadRootCAProperties(ISearchResultEntry public static Dictionary ReadAIACAProperties(ISearchResultEntry entry) { var props = GetCommonProps(entry); - props.Add("crosscertificatepair", entry.GetByteArrayProperty(LDAPProperties.CrossCertificatePair)); - + var crossCertificatePair = entry.GetByteArrayProperty((LDAPProperties.CrossCertificatePair)); + var hasCrossCertificatePair = crossCertificatePair.Length > 0; + + props.Add("crosscertificatepair", crossCertificatePair); + props.Add("hascrosscertificatepair", hasCrossCertificatePair) + // Certificate var rawCertificate = entry.GetByteProperty(LDAPProperties.CACertificate); if (rawCertificate != null) @@ -446,10 +450,10 @@ public static Dictionary ReadAIACAProperties(ISearchResultEntry public static Dictionary ReadEnterpriseCAProperties(ISearchResultEntry entry) { var props = GetCommonProps(entry); - if (entry.GetIntProperty("flags", out var flags)) props.Add("flags", (PKIEnrollmentFlag) flags); + if (entry.GetIntProperty("flags", out var flags)) props.Add("flags", (PKIEnrollmentFlag)flags); props.Add("caname", entry.GetProperty(LDAPProperties.Name)); props.Add("dnshostname", entry.GetProperty(LDAPProperties.DNSHostName)); - + // Certificate var rawCertificate = entry.GetByteProperty(LDAPProperties.CACertificate); if (rawCertificate != null) @@ -721,7 +725,7 @@ public ParsedCertificate(byte[] rawCertificate) switch (certificateExtension.Oid.Value) { case CAExtensionTypes.BasicConstraints: - X509BasicConstraintsExtension ext = (X509BasicConstraintsExtension) extension; + X509BasicConstraintsExtension ext = (X509BasicConstraintsExtension)extension; HasBasicConstraints = ext.HasPathLengthConstraint; BasicConstraintPathLength = ext.PathLengthConstraint; break;