public abstract class CodeSignIdentity extends Object implements AddsToRuleKey
Modifier and Type | Field and Description |
---|---|
static CodeSignIdentity |
AD_HOC
A pseudo-identity for ad hoc code signing.
|
Constructor and Description |
---|
CodeSignIdentity() |
Modifier and Type | Method and Description |
---|---|
abstract Optional<com.google.common.hash.HashCode> |
getFingerprint()
Returns the identity's certificate hash, defined to be unique for each identity.
|
abstract String |
getSubjectCommonName()
Returns the full name of the identity.
|
static CodeSignIdentity |
of(Optional<? extends com.google.common.hash.HashCode> fingerPrint,
String subjectCommonName,
boolean useSubjectCommonNameToSign) |
static CodeSignIdentity |
of(Optional<com.google.common.hash.HashCode> fingerPrint,
String subjectCommonName) |
static CodeSignIdentity |
ofAdhocSignedWithSubjectCommonName(String commonName) |
abstract boolean |
shouldUseSubjectCommonNameToSign() |
static Optional<com.google.common.hash.HashCode> |
toFingerprint(String identifier)
Convert a
String into a fingerprint HashCode if it's in the correct format. |
public static final CodeSignIdentity AD_HOC
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.
public static CodeSignIdentity ofAdhocSignedWithSubjectCommonName(String commonName)
public abstract Optional<com.google.common.hash.HashCode> getFingerprint()
If absent, this identity represents an ad-hoc signing identity.
public abstract String getSubjectCommonName()
Not guaranteed to be unique.
public abstract boolean shouldUseSubjectCommonNameToSign()
getSubjectCommonName()
can be used to sign if getFingerprint()
is empty.public static CodeSignIdentity of(Optional<com.google.common.hash.HashCode> fingerPrint, String subjectCommonName)
public static CodeSignIdentity of(Optional<? extends com.google.common.hash.HashCode> fingerPrint, String subjectCommonName, boolean useSubjectCommonNameToSign)