Class OpensslTruststoreHelper
- java.lang.Object
-
- eu.emi.security.authn.x509.helpers.trust.OpensslTruststoreHelper
-
public class OpensslTruststoreHelper extends java.lang.Object
Several static methods helping to mangle truststore file paths in openssl style.- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CERT_REGEXP
-
Constructor Summary
Constructors Constructor Description OpensslTruststoreHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getFileHash(java.lang.String path, java.lang.String regexp)
static java.util.Collection<java.io.File>
getFilesWithRegexp(java.lang.String regexp, java.io.File directory)
static org.bouncycastle.asn1.x500.RDN[]
getNormalizedRDNs(javax.security.auth.x500.X500Principal name)
static java.lang.String
getNsFile(java.lang.String certLocation, java.lang.String suffix)
static java.lang.String
getOpenSSLCAHash(javax.security.auth.x500.X500Principal name, boolean openssl1Mode)
-
-
-
Field Detail
-
CERT_REGEXP
public static final java.lang.String CERT_REGEXP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNsFile
public static java.lang.String getNsFile(java.lang.String certLocation, java.lang.String suffix)
- Parameters:
certLocation
- certificate locationsuffix
- 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 java.lang.String getFileHash(java.lang.String path, java.lang.String regexp)
-
getFilesWithRegexp
public static java.util.Collection<java.io.File> getFilesWithRegexp(java.lang.String regexp, java.io.File directory)
-
getOpenSSLCAHash
public static java.lang.String getOpenSSLCAHash(javax.security.auth.x500.X500Principal name, boolean openssl1Mode)
-
getNormalizedRDNs
public static org.bouncycastle.asn1.x500.RDN[] getNormalizedRDNs(javax.security.auth.x500.X500Principal name) throws java.io.IOException
- Throws:
java.io.IOException
-
-