Package net.bluemind.utils
Class CertificateUtils
java.lang.Object
net.bluemind.utils.CertificateUtils
Crappy utils class to read certificate/ca/pk (we should use BountyCastle but
it is not available in common plugin)
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Certificate
generateX509Certificate
(byte[] certFile) static Collection
<? extends Certificate> generateX509Certificates
(byte[] certFile) static CRL
static String
getCertCN
(byte[] certFile) static X509Certificate
getCertificate
(byte[] certFile) static Optional
<byte[]> pkcs7PemToDer
(String pkcs7) Convert PKCS7 PEM to DERstatic byte[]
readCert
(byte[] certFile) static byte[]
readPrivateKey
(byte[] certFile)
-
Field Details
-
X509
- See Also:
-
-
Method Details
-
getCertificate
- Throws:
ServerFault
-
getCertCN
- Throws:
ServerFault
-
readCert
public static byte[] readCert(byte[] certFile) -
readPrivateKey
public static byte[] readPrivateKey(byte[] certFile) -
generateX509Certificate
- Throws:
CertificateException
-
generateX509Certificates
public static Collection<? extends Certificate> generateX509Certificates(byte[] certFile) throws CertificateException - Throws:
CertificateException
-
pkcs7PemToDer
Convert PKCS7 PEM to DER- Parameters:
pkcs7
-- Returns:
- PKCS7 DER or empty optional if invalid
-
generateX509Crl
- Throws:
CRLException
CertificateException
-
getCrlDistributionPoints
- Throws:
IOException
-