Пример #1
0
 /**
  * Verify if the JAR at URL codeBase is a signed provider JAR file.
  *
  * @throws Exception on error
  */
 static void verifyProviderJar(URL codeBase) throws Exception {
   // Verify the provider JAR file and all
   // supporting JAR files if there are any.
   JarVerifier jv = new JarVerifier(codeBase, false);
   jv.verify();
 }
Пример #2
0
 /**
  * Verify if the JAR at URL codeBase is a signed exempt application JAR file and returns the
  * permissions bundled with the JAR.
  *
  * @throws Exception on error
  */
 static CryptoPermissions verifyExemptJar(URL codeBase) throws Exception {
   JarVerifier jv = new JarVerifier(codeBase, true);
   jv.verify();
   return jv.getPermissions();
 }