示例#1
0
  /**
   * Initializes the PSE environment.
   *
   * @throws KeyStoreException When the wrong keystore has been provided.
   * @throws IOException For errors related to processing the keystore.
   */
  public void initialize() throws KeyStoreException, IOException {

    Logging.logCheckedInfo(LOG, "Initializing new PSE keystore...");

    synchronized (keystore_manager) {
      try {

        if (keystore_manager.isInitialized(keystore_password)) return;

        keystore_manager.createKeyStore(keystore_password);

      } catch (KeyStoreException failed) {

        Logging.logCheckedSevere(LOG, "Failure accessing or creating keystore.\n", failed);
        keystore_manager.eraseKeyStore();
        throw failed;
      }
    }
  }