Class OpensslTruststoreHelper

java.lang.Object
eu.emi.security.authn.x509.helpers.trust.OpensslTruststoreHelper

public class OpensslTruststoreHelper extends Object
Several static methods helping to mangle truststore file paths in openssl style.
Author:
K. Benedyczak
  • Field Details

  • Constructor Details

    • OpensslTruststoreHelper

      public OpensslTruststoreHelper()
  • Method Details

    • getNsFile

      public static String getNsFile(String certLocation, String suffix)
      Parameters:
      certLocation - certificate location
      suffix - either '.namespaces' or '.signing_policy' (other will work but rather doesn't make sense)
      Returns:
      A proper name of a namespaces or signing policy file for the given base path of CA certificate.
    • getFileHash

      public static String getFileHash(String path, String regexp)
    • getFilesWithRegexp

      public static Collection<File> getFilesWithRegexp(String regexp, File directory)
    • getOpenSSLCAHash

      public static String getOpenSSLCAHash(X500Principal name, boolean openssl1Mode)
    • getNormalizedRDNs

      public static org.bouncycastle.asn1.x500.RDN[] getNormalizedRDNs(X500Principal name) throws IOException
      Throws:
      IOException