Package org.keycloak.crypto.fips
Class BCFIPSCertificateUtilsProvider
- java.lang.Object
-
- org.keycloak.crypto.fips.BCFIPSCertificateUtilsProvider
-
- All Implemented Interfaces:
org.keycloak.common.crypto.CertificateUtilsProvider
public class BCFIPSCertificateUtilsProvider extends Object implements org.keycloak.common.crypto.CertificateUtilsProvider
The Class CertificateUtils provides utility functions for generation of V1 and V3X509Certificate- Version:
- $Revision: 2 $
- Author:
- Bill Burke, Giriraj Sharma
-
-
Constructor Summary
Constructors Constructor Description BCFIPSCertificateUtilsProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X509CertificatecreateServicesTestCertificate(String dn, Date startDate, Date expiryDate, KeyPair keyPair, String... certificatePolicyOid)X509CertificategenerateV1SelfSignedCertificate(KeyPair caKeyPair, String subject)Generate version 1 self signedX509Certificate..X509CertificategenerateV1SelfSignedCertificate(KeyPair caKeyPair, String subject, BigInteger serialNumber)X509CertificategenerateV3Certificate(KeyPair keyPair, PrivateKey caPrivateKey, X509Certificate caCert, String subject)Generates version 3X509Certificate.List<String>getCertificatePolicyList(X509Certificate cert)List<String>getCRLDistributionPoints(X509Certificate cert)Retrieves a list of CRL distribution points from CRLDP v3 certificate extension See CRL validation
-
-
-
Method Detail
-
generateV3Certificate
public X509Certificate generateV3Certificate(KeyPair keyPair, PrivateKey caPrivateKey, X509Certificate caCert, String subject) throws Exception
Generates version 3X509Certificate.- Specified by:
generateV3Certificatein interfaceorg.keycloak.common.crypto.CertificateUtilsProvider- Parameters:
keyPair- the key paircaPrivateKey- the CA private keycaCert- the CA certificatesubject- the subject name- Returns:
- the x509 certificate
- Throws:
Exception- the exception
-
generateV1SelfSignedCertificate
public X509Certificate generateV1SelfSignedCertificate(KeyPair caKeyPair, String subject)
Generate version 1 self signedX509Certificate..- Specified by:
generateV1SelfSignedCertificatein interfaceorg.keycloak.common.crypto.CertificateUtilsProvider- Parameters:
caKeyPair- the CA key pairsubject- the subject name- Returns:
- the x509 certificate
- Throws:
Exception- the exception
-
generateV1SelfSignedCertificate
public X509Certificate generateV1SelfSignedCertificate(KeyPair caKeyPair, String subject, BigInteger serialNumber)
- Specified by:
generateV1SelfSignedCertificatein interfaceorg.keycloak.common.crypto.CertificateUtilsProvider
-
getCertificatePolicyList
public List<String> getCertificatePolicyList(X509Certificate cert) throws GeneralSecurityException
- Specified by:
getCertificatePolicyListin interfaceorg.keycloak.common.crypto.CertificateUtilsProvider- Throws:
GeneralSecurityException
-
getCRLDistributionPoints
public List<String> getCRLDistributionPoints(X509Certificate cert) throws IOException
Retrieves a list of CRL distribution points from CRLDP v3 certificate extension See CRL validation- Specified by:
getCRLDistributionPointsin interfaceorg.keycloak.common.crypto.CertificateUtilsProvider- Parameters:
cert-- Returns:
- Throws:
IOException
-
-