Examples of logp()


Examples of java.util.logging.Logger.logp()

                Logger logger = Logger.getLogger(loggerName);
                if (reason instanceof Throwable) {
                    logger.logp(level, cls, method,
                                reason.getClass().getName(), (Throwable)reason);
                } else {
                    logger.logp(level, cls, method, String.valueOf(reason));
                }
            }
        } catch (SecurityException ex) {
            System.err.format((Locale)null, "%s: %s; %s%n",
                              ToolProvider.class.getName(),
View Full Code Here

Examples of java.util.logging.Logger.logp()

   */
  public static synchronized TrustedCAs getInstance()
  {
    if(instance == null) {
      Logger logger = LogManager.getLogger();
      logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Loading trusted root CA certificates from ca-list.dat");
      instance = new TrustedCAs();

      try {
        ClassLoader cl = ClassLoader.getSystemClassLoader();
        InputStream in = cl.getResourceAsStream("hamsam/util/net/ssl/ca-list.dat");
View Full Code Here

Examples of java.util.logging.Logger.logp()

        ZipInputStream zin = new ZipInputStream(in);
        ZipEntry entry = zin.getNextEntry();
        CertificateFactory cf = CertificateFactory.getInstance("X.509");
        while(entry != null) {
          X509Certificate cert = (X509Certificate)cf.generateCertificate(zin);
          logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Added certificate: " + cert);
          instance.rootcas.add(cert);       
          entry = zin.getNextEntry();
        }
        zin.close();
        logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Load completed successfully");
View Full Code Here

Examples of java.util.logging.Logger.logp()

          logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Added certificate: " + cert);
          instance.rootcas.add(cert);       
          entry = zin.getNextEntry();
        }
        zin.close();
        logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Load completed successfully");
      } catch(CertificateException e) {
        logger.logp(Level.WARNING, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Cannot load root certificate", e);
      } catch(IOException e) {
        logger.logp(Level.WARNING, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Cannot load root certificate", e);
      }
View Full Code Here

Examples of java.util.logging.Logger.logp()

          entry = zin.getNextEntry();
        }
        zin.close();
        logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Load completed successfully");
      } catch(CertificateException e) {
        logger.logp(Level.WARNING, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Cannot load root certificate", e);
      } catch(IOException e) {
        logger.logp(Level.WARNING, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Cannot load root certificate", e);
      }
    }
    return instance;
View Full Code Here

Examples of java.util.logging.Logger.logp()

        zin.close();
        logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Load completed successfully");
      } catch(CertificateException e) {
        logger.logp(Level.WARNING, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Cannot load root certificate", e);
      } catch(IOException e) {
        logger.logp(Level.WARNING, "hamsam.util.net.ssl.trustedCAs", "getInstance", "Cannot load root certificate", e);
      }
    }
    return instance;
  }
View Full Code Here

Examples of java.util.logging.Logger.logp()

  }

  public void validate(X509Certificate cert) throws CertificateException
  {
    Logger logger = LogManager.getLogger();
    logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Checking validy of certificate: " + cert);
    if(cert == null)
      throw new CertificateException("Invalid root certificate");

    if(!this.rootcas.contains(cert)) {
      Iterator itr = rootcas.iterator();
View Full Code Here

Examples of java.util.logging.Logger.logp()

        } catch(CertificateException e) {
          continue;
        } catch(GeneralSecurityException e) {
          continue;
        }
        logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Certificate is trusted");
        return;
      }
      logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Certificate is untrusted");
      throw new CertificateException("Untrusted CA");
    }
View Full Code Here

Examples of java.util.logging.Logger.logp()

          continue;
        }
        logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Certificate is trusted");
        return;
      }
      logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Certificate is untrusted");
      throw new CertificateException("Untrusted CA");
    }
    logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Certificate is trusted");
  }
}
View Full Code Here

Examples of java.util.logging.Logger.logp()

        return;
      }
      logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Certificate is untrusted");
      throw new CertificateException("Untrusted CA");
    }
    logger.logp(Level.CONFIG, "hamsam.util.net.ssl.trustedCAs", "validate", "Certificate is trusted");
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.