Package org.conscrypt.ct
Class LogInfo
- java.lang.Object
-
- org.conscrypt.ct.LogInfo
-
@Internal public class LogInfo extends java.lang.Object
Properties about a Certificate Transparency Log. This object stores information about a CT log, its public key, description and URL. It allows verification of SCTs against the log's public key.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLogInfo.Builder
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringdescriptionprivate byte[]logIdprivate java.lang.Stringoperatorprivate java.security.PublicKeypublicKeyprivate intstatestatic intSTATE_PENDINGstatic intSTATE_QUALIFIEDstatic intSTATE_READONLYstatic intSTATE_REJECTEDstatic intSTATE_RETIREDstatic intSTATE_UNKNOWNstatic intSTATE_USABLEprivate longstateTimestampprivate java.lang.Stringurl
-
Constructor Summary
Constructors Modifier Constructor Description privateLogInfo(LogInfo.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.lang.StringgetDescription()byte[]getID()Get the log's ID, that is the SHA-256 hash of it's public keyjava.lang.StringgetOperator()java.security.PublicKeygetPublicKey()intgetState()intgetStateAt(long when)longgetStateTimestamp()java.lang.StringgetUrl()inthashCode()VerifiedSCT.StatusverifySingleSCT(SignedCertificateTimestamp sct, CertificateEntry entry)Verify the signature of a signed certificate timestamp for the given certificate entry against the log's public key.
-
-
-
Field Detail
-
STATE_UNKNOWN
public static final int STATE_UNKNOWN
- See Also:
- Constant Field Values
-
STATE_PENDING
public static final int STATE_PENDING
- See Also:
- Constant Field Values
-
STATE_QUALIFIED
public static final int STATE_QUALIFIED
- See Also:
- Constant Field Values
-
STATE_USABLE
public static final int STATE_USABLE
- See Also:
- Constant Field Values
-
STATE_READONLY
public static final int STATE_READONLY
- See Also:
- Constant Field Values
-
STATE_RETIRED
public static final int STATE_RETIRED
- See Also:
- Constant Field Values
-
STATE_REJECTED
public static final int STATE_REJECTED
- See Also:
- Constant Field Values
-
logId
private final byte[] logId
-
publicKey
private final java.security.PublicKey publicKey
-
state
private final int state
-
stateTimestamp
private final long stateTimestamp
-
description
private final java.lang.String description
-
url
private final java.lang.String url
-
operator
private final java.lang.String operator
-
-
Constructor Detail
-
LogInfo
private LogInfo(LogInfo.Builder builder)
-
-
Method Detail
-
getID
public byte[] getID()
Get the log's ID, that is the SHA-256 hash of it's public key
-
getPublicKey
public java.security.PublicKey getPublicKey()
-
getDescription
public java.lang.String getDescription()
-
getUrl
public java.lang.String getUrl()
-
getState
public int getState()
-
getStateAt
public int getStateAt(long when)
-
getStateTimestamp
public long getStateTimestamp()
-
getOperator
public java.lang.String getOperator()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
verifySingleSCT
public VerifiedSCT.Status verifySingleSCT(SignedCertificateTimestamp sct, CertificateEntry entry)
Verify the signature of a signed certificate timestamp for the given certificate entry against the log's public key.- Returns:
- the result of the verification
-
-