code: private void loadCertificateFromFile(File file) {
  
      certificateFileSanityChecks(file);
  
      try {
  
        X509Certificate aaCert = CertificateUtils.loadCertificate(
          new FileInputStream(file), Encoding.PEM);
  
        // Get certificate subject hash, using the CANL implementation for CA
        // files
        String aaCertHash = getOpensslCAHash(aaCert.getSubjectX500Principal());
  
        // Store certificate in the local map
        localAACertificatesByHash.put(aaCertHash, aaCert);
  
        synchronized (listenerLock) {
          listener.notifyCertificateLoadEvent(aaCert, file);
        }
  
      } catch (IOException e) {
        String errorMessage = String.format(
          "Error parsing VOMS trusted certificate from %s. Reason: %s",
          file.getAbsolutePath(), e.getMessage());
        throw new VOMSError(errorMessage, e);
      }
  
    }
docs: Loads a VOMS AA certificate from a given file and stores this certificate
  in the local map of trusted VOMS AA certificate.
  
  @param file