|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.fgov.ehealth.technicalconnector.ra.utils.CertificateUtils
public class CertificateUtils
Utility class containing facilitators for certificate generation.
Constructor Summary | |
---|---|
CertificateUtils()
|
Method Summary | |
---|---|
static byte[] |
createCSR(DistinguishedName distingueshedName,
KeyPair keyPair)
Generates a PKCS10 certificate request based on the given DistinguishedName and the keypair. |
static X509Certificate |
generateCert(KeyPair pair)
Generates a self signed certificte with a C=Dummy as subject. |
static X509Certificate |
generateCert(PublicKey rqPubKey,
BigInteger serialNr,
Credential cred)
Generates a self signed certificate based on the given Credential |
static KeyPair |
generateKeyPair()
Generates a RSA 2048 keypair. |
static BigInteger |
obtainSerialNumber(PrivateKey key,
byte[] challenge)
Extract the serialnumber from the challenge. |
static X509Certificate |
toX509Certificate(byte[] cert)
Convert a byte array to a X509Certificate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CertificateUtils()
Method Detail |
---|
public static KeyPair generateKeyPair()
public static byte[] createCSR(DistinguishedName distingueshedName, KeyPair keyPair)
DistinguishedName
and the keypair.
The DistinguishedName
is used for subject generation.
public static X509Certificate generateCert(PublicKey rqPubKey, BigInteger serialNr, Credential cred) throws TechnicalConnectorException
Credential
TechnicalConnectorException
public static X509Certificate generateCert(KeyPair pair)
public static BigInteger obtainSerialNumber(PrivateKey key, byte[] challenge) throws TechnicalConnectorException
TechnicalConnectorException
public static X509Certificate toX509Certificate(byte[] cert)
X509Certificate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |