public class CertificateUtils extends Object
Constructor and Description |
---|
CertificateUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
createCSR(DistinguishedName distingueshedName,
KeyPair keyPair)
Generates a PKCS10 certificate request based on the given
DistinguishedName and the keypair. |
static byte[] |
createCSR(String dn,
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 |
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 byte[] createCSR(String dn, 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
Connector Packaging TECHNICAL 4.3.0-beta-3 API
Copyright © {inceptionYear}-2022 eHealth. All Rights Reserved.