public class JarCertVerifier extends java.lang.Object implements CertVerifier
| Constructor and Description |
|---|
JarCertVerifier(AppVerifier verifier)
Create a new jar certificate verifier utility that uses the provided verifier for its strategy pattern.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.util.List<JARDesc> jars,
ResourceTracker tracker)
Update the verifier to consider new jars when verifying.
|
boolean |
allJarsSigned()
Returns if all jars are signed.
|
void |
checkTrustWithUser(JNLPClassLoader.SecurityDelegate securityDelegate,
JNLPFile file) |
boolean |
getAlreadyTrustPublisher()
Return if the publisher is already trusted
|
CertInformation |
getCertInformation(java.security.cert.CertPath cPath)
Find the information the specified cert path has with respect to this application.
|
java.security.cert.CertPath |
getCertPath(java.security.cert.CertPath cPath)
Return a valid certificate path to this certificate being verified
|
java.util.List<java.security.cert.CertPath> |
getCertsList()
Get a list of the cert paths of all signers across the app.
|
java.util.List<java.lang.String> |
getDetails(java.security.cert.CertPath certPath)
Get the details regarding issue with this certificate
|
java.util.Map<java.lang.String,java.lang.Integer> |
getJarSignableEntries() |
java.security.cert.Certificate |
getPublisher(java.security.cert.CertPath cPath)
Returns the application's publisher's certificate.
|
java.security.cert.Certificate |
getRoot(java.security.cert.CertPath cPath)
Returns the application's root's certificate.
|
boolean |
getRootInCacerts()
Return if the root is in CA certs
|
static int |
getTotalJarEntries(java.util.Map<java.lang.String,java.lang.Integer> map)
Get the total number of entries in the provided map.
|
boolean |
hasSigningIssues(java.security.cert.CertPath certPath)
Return if there are signing issues with the certificate being verified
|
boolean |
isFullySigned()
Returns whether or not the app is considered completely signed.
|
static boolean |
isJarSigned(JARDesc jar,
AppVerifier verifier,
ResourceTracker tracker) |
boolean |
isTriviallySigned()
Return true if there are no signable entries in the jar.
|
void |
setCurrentlyUsedCertPath(java.security.cert.CertPath cPath) |
public JarCertVerifier(AppVerifier verifier)
verifier - The application verifier to be used by the new instance.public boolean isTriviallySigned()
public boolean getAlreadyTrustPublisher()
CertVerifiergetAlreadyTrustPublisher in interface CertVerifierpublic boolean getRootInCacerts()
CertVerifiergetRootInCacerts in interface CertVerifierpublic java.security.cert.CertPath getCertPath(java.security.cert.CertPath cPath)
CertVerifiergetCertPath in interface CertVerifierpublic boolean hasSigningIssues(java.security.cert.CertPath certPath)
CertVerifierhasSigningIssues in interface CertVerifierpublic java.util.List<java.lang.String> getDetails(java.security.cert.CertPath certPath)
CertVerifiergetDetails in interface CertVerifierpublic java.util.List<java.security.cert.CertPath> getCertsList()
public CertInformation getCertInformation(java.security.cert.CertPath cPath)
public boolean isFullySigned()
public static boolean isJarSigned(JARDesc jar, AppVerifier verifier, ResourceTracker tracker) throws java.lang.Exception
java.lang.Exceptionpublic void add(java.util.List<JARDesc> jars, ResourceTracker tracker) throws java.lang.Exception
jars - List of new jars to be verified.tracker - Resource tracker used to obtain the the jars from cachejava.lang.Exception - Caused by issues with obtaining the jars' entries or interacting with the tracker.public void setCurrentlyUsedCertPath(java.security.cert.CertPath cPath)
public java.security.cert.Certificate getPublisher(java.security.cert.CertPath cPath)
CertVerifiergetPublisher in interface CertVerifierpublic java.security.cert.Certificate getRoot(java.security.cert.CertPath cPath)
CertVerifiergetRoot in interface CertVerifierpublic boolean allJarsSigned()
public void checkTrustWithUser(JNLPClassLoader.SecurityDelegate securityDelegate, JNLPFile file) throws LaunchException
LaunchExceptionpublic java.util.Map<java.lang.String,java.lang.Integer> getJarSignableEntries()
public static int getTotalJarEntries(java.util.Map<java.lang.String,java.lang.Integer> map)