Class CodeSignIdentity

  • All Implemented Interfaces:

    public abstract class CodeSignIdentity
    extends Object
    implements AddsToRuleKey
    Represents a identity used in code signing.
    • Field Detail

      • AD_HOC

        public static final CodeSignIdentity AD_HOC
        A pseudo-identity for ad hoc code signing.

        See the codesign man page.

        Binaries signed with this identity will not be installable on real devices. This is only intended for Buck unit tests.

    • Constructor Detail

      • CodeSignIdentity

        public CodeSignIdentity()
    • Method Detail

      • ofAdhocSignedWithSubjectCommonName

        public static CodeSignIdentity ofAdhocSignedWithSubjectCommonName​(String commonName)
      • getFingerprint

        public abstract Optional<> getFingerprint()
        Returns the identity's certificate hash, defined to be unique for each identity.

        If absent, this identity represents an ad-hoc signing identity.

      • getSubjectCommonName

        public abstract String getSubjectCommonName()
        Returns the full name of the identity. e.g. "iPhone Developer: John Doe (ABCDE12345)"

        Not guaranteed to be unique.

      • of

        public static CodeSignIdentity of​(Optional<? extends> fingerPrint,
                                          String subjectCommonName,
                                          boolean useSubjectCommonNameToSign)
      • toFingerprint

        public static Optional<> toFingerprint​(String identifier)
        Convert a String into a fingerprint HashCode if it's in the correct format.