eu.emi.security.authn.x509.helpers.trust
Class OpensslTruststoreHelper

java.lang.Object
  extended by 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 Summary
static String CERT_REGEXP
           
 
Constructor Summary
OpensslTruststoreHelper()
           
 
Method Summary
static String getFileHash(String path, String regexp)
           
static Collection<File> getFilesWithRegexp(String regexp, File directory)
           
static RDN[] getNormalizedRDNs(X500Principal name)
           
static String getNsFile(String certLocation, String suffix)
          Returns a proper name of a namespaces or signing policy file for the given base path of CA certificate.
static String getOpenSSLCAHash(X500Principal name, boolean openssl1Mode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CERT_REGEXP

public static final String CERT_REGEXP
See Also:
Constant Field Values
Constructor Detail

OpensslTruststoreHelper

public OpensslTruststoreHelper()
Method Detail

getNsFile

public static String getNsFile(String certLocation,
                               String suffix)
Returns a proper name of a namespaces or signing policy file for the given base path of CA certificate.

Parameters:
certLocation -
suffix - either '.namespaces' or '.signing_policy' (other will work but rather doesn't make sense)
Returns:

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 RDN[] getNormalizedRDNs(X500Principal name)
                               throws IOException
Throws:
IOException


Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.