Class CertInformation

java.lang.Object
net.sourceforge.jnlp.tools.CertInformation

public class CertInformation extends Object
Maintains information about a CertPath that has signed at least one of the entries provided by a jar of the app.
  • Constructor Details

    • CertInformation

      public CertInformation()
  • Method Details

    • hasSigningIssues

      public boolean hasSigningIssues()
      Return if there are signing issues with this certificate.
      Returns:
      true if there are any issues with expiry, validity or bad key usage.
    • isPublisherAlreadyTrusted

      public boolean isPublisherAlreadyTrusted()
      Return whether or not the publisher is already trusted.
      Returns:
      true if the publisher is trusted already.
    • setAlreadyTrustPublisher

      public void setAlreadyTrustPublisher()
      Set whether or not the publisher is already trusted.
    • isRootInCacerts

      public boolean isRootInCacerts()
      Return whether or not the root is in the list of trusted CA certificates.
      Returns:
      true if the root is in the list of CA certificates.
    • setRootInCacerts

      public void setRootInCacerts()
      Set that this cert's root CA is to be trusted.
    • resetForReverification

      public void resetForReverification()
      Resets any trust of the root and publisher. Also removes unnecessary details from the list of issues.
    • isSignerOfJar

      public boolean isSignerOfJar(String jarName)
      Check if this cert is the signer of a jar.
      Parameters:
      jarName - The absolute path of the jar this certificate has signed.
      Returns:
      true if this cert has signed the jar found at jarName.
    • setNumJarEntriesSigned

      public void setNumJarEntriesSigned(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.
      Parameters:
      jarName - The absolute path of the jar this certificate has signed.
      signedEntriesCount - The number of entries this cert has signed in jarName.
    • getNumJarEntriesSigned

      public int getNumJarEntriesSigned(String jarName)
      Find the number of entries this cert has signed in the specified jar.
      Parameters:
      jarName - The absolute path of the jar this certificate has signed.
      Returns:
      The number of entries this cert has signed in jarName.
    • getSignedJars

      public Map<String,Integer> getSignedJars()
      Get all the jars this cert has signed along with the number of entries in each jar.
      Returns:
      a {link Map} of jars and their number of entries this cert has signed
    • getDetailsAsStrings

      public List<String> getDetailsAsStrings()
      Get the details regarding issue(s) with this certificate.
      Returns:
      A list of all the details/issues with this app.
    • setHasExpiredCert

      public void setHasExpiredCert()
      Set that this cert is expired and add this issue to the list of details.
    • setHasExpiringCert

      public void setHasExpiringCert()
      Set that this cert is expiring within 6 months and add this issue to the list of details.
    • hasExpiringCert

      public boolean hasExpiringCert()
      Get whether or not this cert will expire within 6 months.
      Returns:
      true if the cert will be expired after 6 months.
    • setNotYetValidCert

      public void setNotYetValidCert()
      Set that this cert is not yet valid and add this issue to the list of details.
    • setBadKeyUsage

      public void setBadKeyUsage()
      Set that this cert has bad key usage and add this issue to the list of details.
    • setBadExtendedKeyUsage

      public void setBadExtendedKeyUsage()
      Set that this cert has bad extended key usage and add this issue to the list of details.
    • setBadNetscapeCertType

      public void setBadNetscapeCertType()
      Set that this cert has a bad netscape cert type and add this issue to the list of details.
    • setUntrusted

      public void setUntrusted()
      Set that this cert and all of its CAs are untrusted so far.