ClaimUtils

public class ClaimUtils

Utility methods for retrieving stored claims.

  • Load all claims from the local key chain that match the default registry.

    Declaration

    Swift

    public static func loadKeychainClaims() -> [Claim]

    Return Value

    Array of parsed Claim objects.

  • Delete all claims from the local key chain.

    Declaration

    Swift

    public static func deleteAllClaims()
  • Retreive a tuple of claims and issuers as Der.

    Declaration

    Swift

    public static func getClaimsDer(claims certificates: [Claim]) -> ([Data], [Data])

    Parameters

    claims

    Which claims to Der

    Return Value

    An tubple of der claims and issuers.

  • List of Der Claims to List of PEMs.

    Declaration

    Swift

    public static func derToPem(_ ders: [Data]) -> [String]

    Parameters

    ders

    List of DERs

    Return Value

    List of PEMS.

  • Der Claim to PEM.

    Declaration

    Swift

    public static func derToPem(_ der: Data) -> String

    Parameters

    der

    Claim der

    Return Value

    List of pems.

  • Base64 encode a list of claim ders.

    Declaration

    Swift

    public static func derToBase64(_ ders: [Data]) -> [String]

    Parameters

    ders

    List of ders

    Return Value

    List of base64 encoded claims.

  • Delete the specified claim from the local key chain.

    Declaration

    Swift

    public static func deleteClaim(_ claim: Claim) -> Bool

    Parameters

    claim

    the Claim to delete from the key chain.

    Return Value

    true iff the claim was successfully deleted.

  • Match objectIDs in issued claims. This may return multiple certificate for the same OID, from different issuers.

    Declaration

    Swift

    public static func matchClaims(objectIds: [OIDs.Dotted], preferredValue: String?, issuerIDs: [OIDs.Dotted:String]) -> [Claim]

    Parameters

    objectIds

    Dotted object IDs

    preferredValue

    Prefer claims with this value, if found.

    issuerIDs

    Prefer claims from this issuer, if found.

    Return Value

    Matching claims

  • Undocumented

    Declaration

    Swift

    public static func isEssentialClaim (searchClaim: String, claims: NSMutableDictionary?) -> Bool
  • Undocumented

    Declaration

    Swift

    public static func getEssentialClaimNames(claims: String) -> [String]