Class CodeSignIdentity

  • All Implemented Interfaces:
    AddsToRuleKey

    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<com.google.common.hash.HashCode> 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 com.google.common.hash.HashCode> fingerPrint,
                                          String subjectCommonName,
                                          boolean useSubjectCommonNameToSign)
      • toFingerprint

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