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
Fields - 
Method Summary
Modifier and TypeMethodDescriptionstatic CertificategenerateX509Certificate(byte[] certFile) static Collection<? extends Certificate> generateX509Certificates(byte[] certFile) static CRLstatic StringgetCertCN(byte[] certFile) static X509CertificategetCertificate(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:
 CRLExceptionCertificateException
 - 
getCrlDistributionPoints
- Throws:
 IOException
 
 -