public class X509Generator extends Object
Constructor and Description |
---|
X509Generator(MockServerLogger mockServerLogger) |
Modifier and Type | Method and Description |
---|---|
static String |
certToPEM(byte[]... x509Certificates) |
static String |
certToPEM(X509Certificate... x509Certificates) |
X509AndPrivateKey |
generateLeafX509AndPrivateKey(CertificateSigningRequest csr,
String issuerDistinguishingName,
String caPrivateKey,
X509Certificate caCertificate) |
X509AndPrivateKey |
generateRootX509AndPrivateKey(CertificateSigningRequest csr) |
static KeySpec |
keySpecFromPEM(String pem) |
static RSAPrivateKey |
privateKeyFromPEM(String pem) |
static RSAPrivateKey |
privateKeyFromPEMFile(String filename) |
static boolean |
validX509PEMFileExists(String filename) |
static List<X509Certificate> |
x509ChainFromPEM(String pem) |
static List<X509Certificate> |
x509ChainFromPEMFile(String filename) |
static X509Certificate |
x509FromPEM(String pem) |
static X509Certificate |
x509FromPEMFile(String filename) |
public X509Generator(MockServerLogger mockServerLogger)
public X509AndPrivateKey generateRootX509AndPrivateKey(CertificateSigningRequest csr) throws IOException, NoSuchAlgorithmException, CertificateException, InvalidKeyException, NoSuchProviderException, SignatureException
public X509AndPrivateKey generateLeafX509AndPrivateKey(CertificateSigningRequest csr, String issuerDistinguishingName, String caPrivateKey, X509Certificate caCertificate) throws IOException, NoSuchAlgorithmException, CertificateException, InvalidKeyException, NoSuchProviderException, SignatureException, InvalidKeySpecException
public static String certToPEM(X509Certificate... x509Certificates) throws CertificateEncodingException
CertificateEncodingException
public static String certToPEM(byte[]... x509Certificates)
public static RSAPrivateKey privateKeyFromPEMFile(String filename)
public static RSAPrivateKey privateKeyFromPEM(String pem)
public static X509Certificate x509FromPEMFile(String filename)
public static X509Certificate x509FromPEM(String pem)
public static List<X509Certificate> x509ChainFromPEMFile(String filename)
public static List<X509Certificate> x509ChainFromPEM(String pem)
public static boolean validX509PEMFileExists(String filename)
Copyright © 2020. All rights reserved.