3.1.1.11.2.3 GetCertificateSourcedClaims

 procedure GetCertificateSourcedClaims (
     principalClass : ObjectClass,
     pCertificateStringsArray : set of unicodestring,
     pCertificateSourcedClaims : ADDRESS of CLAIMS_ARRAY)

This procedure is a helper routine that generates certificate-sourced claims (section 3.1.1.11.1.3) from given strings for a given principal type.

principalClass: The object class of the principal for whom the claims are being generated.

pCertificateStringsArray: A set of Unicode strings.

pCertificateSourcedClaims: The address of a CLAIMS_ARRAY structure used for the output certificate-sourced claims.

Return Values: This procedure does not return a value.

Logical Processing:

 bIssueClaim : boolean;
 claim : CLAIM_ENTRY;
 claimConfigContainer : DSName;
  
 bIssueClaim := FALSE;
 claim := null;
 pCertificateSourcedClaims^ := null;
 claimConfigContainer := DescendantObject( ConfigNC(),
     "CN=Claim Types, CN=Claims Configuration, CN=Services");
  
 pCertificateSourcedClaims^.usClaimsSourceType :=
     CLAIMS_SOURCE_TYPE_CERTIFICATE;
  
 for (x in children claimConfigContainer)
     if (x!msDS-ClaimSourceType = "Certificate" &&
        x!msDS-ClaimTypeAppliesToClass in principalClass &&
        ValidateClaimDefinition(x))
       bIssueClaim := TRUE;
     endif
  
     if (bIssueClaim && x!msDS-ClaimSource in pCertificateStringsArray)
       claim.Id := x!msDS-ClaimSource;
       claim.Type := x!msDS-ClaimValueType;
       claim.ValueCount := 1;
       claim.Values := TRUE;
       pCertificateSourcedClaims^.ClaimEntries.Add(claim);
       pCertificateSourcedClaims^.ulClaimsCount :=
           pCertificateSourcedClaims^.ulClaimsCount + 1;
     endif
  
     claim := null;
     bIssueClaim := FALSE;
 endfor
  
 return;