Class Cert
java.lang.Object
org.mozilla.jss.netscape.security.util.Cert
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SignatureAlgorithm
mapAlgorithmToJss
(String algname) static X509CertImpl
static X509Certificate[]
mapCertFromPKCS7
(String mime64) static X509CRL
static X509CRL
static String
static String
static byte[]
parseCertificate
(String cert) static X509Certificate[]
sortCertificateChain
(X509Certificate[] certs) Sorts certificate chain from root to leaf.static X509Certificate[]
sortCertificateChain
(X509Certificate[] certs, boolean reverse) static String
static String
static String
-
Field Details
-
logger
private static org.slf4j.Logger logger -
HEADER
- See Also:
-
FOOTER
- See Also:
-
PKCS7_HEADER
- See Also:
-
PKCS7_FOOTER
- See Also:
-
REQUEST_HEADER
- See Also:
-
REQUEST_FOOTER
- See Also:
-
-
Constructor Details
-
Cert
public Cert()
-
-
Method Details
-
mapAlgorithmToJss
-
stripBrackets
-
stripCRLBrackets
-
stripCertBrackets
-
mapCert
- Throws:
IOException
-
mapCertFromPKCS7
- Throws:
IOException
-
mapCRL
- Throws:
IOException
-
mapCRL1
- Throws:
IOException
-
normalizeCertStr
-
normalizeCertStrAndReq
-
parseCertificate
-
sortCertificateChain
Sorts certificate chain from root to leaf. This method sorts an array of certificates (e.g. from a PKCS #7 data) that represents a certificate chain from root to leaf according to the subject DNs and issuer DNs. The input array is a set of certificates that are part of a chain but not in specific order. The result is a new array that contains the certificate chain sorted from root to leaf. The input array is unchanged.- Parameters:
certs
- input array of certificates- Returns:
- new array containing sorted certificates
- Throws:
Exception
-
sortCertificateChain
public static X509Certificate[] sortCertificateChain(X509Certificate[] certs, boolean reverse) throws Exception - Throws:
Exception
-