public class CertInformation
extends java.lang.Object
Constructor and Description |
---|
CertInformation() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getDetailsAsStrings()
Get the details regarding issue(s) with this certificate.
|
int |
getNumJarEntriesSigned(java.lang.String jarName)
Find the number of entries this cert has signed in the specified jar.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getSignedJars()
Get all the jars this cert has signed along with the number of entries
in each jar.
|
boolean |
hasExpiringCert()
Get whether or not this cert will expire within 6 months.
|
boolean |
hasSigningIssues()
Return if there are signing issues with this certificate.
|
boolean |
isPublisherAlreadyTrusted()
Return whether or not the publisher is already trusted.
|
boolean |
isRootInCacerts()
Return whether or not the root is in the list of trusted CA certificates.
|
boolean |
isSignerOfJar(java.lang.String jarName)
Check if this cert is the signer of a jar.
|
void |
resetForReverification()
Resets any trust of the root and publisher.
|
void |
setAlreadyTrustPublisher()
Set whether or not the publisher is already trusted.
|
void |
setBadExtendedKeyUsage()
Set that this cert has bad extended key usage
and add this issue to the list of details.
|
void |
setBadKeyUsage()
Set that this cert has bad key usage
and add this issue to the list of details.
|
void |
setBadNetscapeCertType()
Set that this cert has a bad netscape cert type
and add this issue to the list of details.
|
void |
setHasExpiredCert()
Set that this cert is expired and add this issue to the list of details.
|
void |
setHasExpiringCert()
Set that this cert is expiring within 6 months and add this issue to
the list of details.
|
void |
setNotYetValidCert()
Set that this cert is not yet valid
and add this issue to the list of details.
|
void |
setNumJarEntriesSigned(java.lang.String jarName,
int signedEntriesCount)
Add a jar to the list of jars this certificate has signed along with the
number of entries it has signed in the jar.
|
void |
setRootInCacerts()
Set that this cert's root CA is to be trusted.
|
void |
setUntrusted()
Set that this cert and all of its CAs are untrusted so far.
|
public boolean hasSigningIssues()
true
if there are any issues with expiry, validity or bad key usage.public boolean isPublisherAlreadyTrusted()
true
if the publisher is trusted already.public void setAlreadyTrustPublisher()
public boolean isRootInCacerts()
true
if the root is in the list of CA certificates.public void setRootInCacerts()
public void resetForReverification()
public boolean isSignerOfJar(java.lang.String jarName)
jarName
- The absolute path of the jar this certificate has signed.true
if this cert has signed the jar found at jarName
.public void setNumJarEntriesSigned(java.lang.String jarName, int signedEntriesCount)
jarName
- The absolute path of the jar this certificate has signed.signedEntriesCount
- The number of entries this cert has signed in jarName
.public int getNumJarEntriesSigned(java.lang.String jarName)
jarName
- The absolute path of the jar this certificate has signed.jarName
.public java.util.Map<java.lang.String,java.lang.Integer> getSignedJars()
public java.util.List<java.lang.String> getDetailsAsStrings()
public void setHasExpiredCert()
public void setHasExpiringCert()
public boolean hasExpiringCert()
true
if the cert will be expired after 6 months.public void setNotYetValidCert()
public void setBadKeyUsage()
public void setBadExtendedKeyUsage()
public void setBadNetscapeCertType()
public void setUntrusted()