Package net.sourceforge.jnlp.security
Class JNLPAppVerifier
java.lang.Object
net.sourceforge.jnlp.security.JNLPAppVerifier
- All Implemented Interfaces:
AppVerifier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkTrustWithUser
(JNLPClassLoader.SecurityDelegate securityDelegate, JarCertVerifier jcv, JNLPFile file) Prompt the user with requests for trusting the certificates used by this appboolean
hasAlreadyTrustedPublisher
(Map<CertPath, CertInformation> certs, Map<String, Integer> signedJars) Checks if the app has already found trust in its publisher(s).boolean
hasCompletelySignedApp
(CertInformation info, int sumOfSignableEntries) Find out if the CertPath with the given info has fully signed the app.boolean
hasRootInCacerts
(Map<CertPath, CertInformation> certs, Map<String, Integer> signedJars) Checks if the app has signer(s) whose certs along their chains are in CA certs.boolean
isFullySigned
(Map<CertPath, CertInformation> certs, Map<String, Integer> signedJars) Checks if the app's jars are covered by the provided certificates, enough to consider the app fully signed.
-
Constructor Details
-
JNLPAppVerifier
public JNLPAppVerifier()
-
-
Method Details
-
hasAlreadyTrustedPublisher
public boolean hasAlreadyTrustedPublisher(Map<CertPath, CertInformation> certs, Map<String, Integer> signedJars) Description copied from interface:AppVerifier
Checks if the app has already found trust in its publisher(s).- Specified by:
hasAlreadyTrustedPublisher
in interfaceAppVerifier
- Parameters:
certs
- The certs to search through and their cert informationsignedJars
- A map of all the jars of this app and the number of signed entries each one has.- Returns:
- True if the app trusts its publishers.
-
hasRootInCacerts
public boolean hasRootInCacerts(Map<CertPath, CertInformation> certs, Map<String, Integer> signedJars) Description copied from interface:AppVerifier
Checks if the app has signer(s) whose certs along their chains are in CA certs.- Specified by:
hasRootInCacerts
in interfaceAppVerifier
- Parameters:
certs
- The certs to search through and their cert informationsignedJars
- A map of all the jars of this app and the number of signed entries each one has.- Returns:
- True if the app has a root in the CA certs store.
-
isFullySigned
Description copied from interface:AppVerifier
Checks if the app's jars are covered by the provided certificates, enough to consider the app fully signed.- Specified by:
isFullySigned
in interfaceAppVerifier
- Parameters:
certs
- Any possible signer and their respective information regarding this app.signedJars
- A map of all the jars of this app and the number of signed entries each one has.- Returns:
- true if jar is fully signed
-
checkTrustWithUser
public void checkTrustWithUser(JNLPClassLoader.SecurityDelegate securityDelegate, JarCertVerifier jcv, JNLPFile file) throws LaunchException Description copied from interface:AppVerifier
Prompt the user with requests for trusting the certificates used by this app- Specified by:
checkTrustWithUser
in interfaceAppVerifier
- Parameters:
securityDelegate
- parental securityjcv
- jar verifierfile
- jnlp fiel to provide information- Throws:
LaunchException
- if it fails to verify
-
hasCompletelySignedApp
Find out if the CertPath with the given info has fully signed the app.- Parameters:
info
- The information regarding the CertPath in questionsumOfSignableEntries
- The total number of signable entries in the app.- Returns:
- True if the signer has fully signed this app.
-