public class X509Utilities extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BEGIN_CERT |
static String |
BEGIN_KEY |
static String |
END_CERT |
static String |
END_KEY |
Constructor and Description |
---|
X509Utilities() |
Modifier and Type | Method and Description |
---|---|
static X509Certificate |
getCertificate(byte[] der) |
static byte[] |
getDER(String pem) |
static byte[] |
getDER(String combinedKeyAndCertPem,
String begin,
String end) |
static RSAPrivateKey |
getPrivateKey(byte[] der,
String algorithm) |
static String |
keyCleanup(String pem) |
static PrivateKey |
readPrivateKey(String pem,
String passphrase) |
public static final String BEGIN_CERT
public static final String END_CERT
public static final String BEGIN_KEY
public static final String END_KEY
public static byte[] getDER(String pem)
public static X509Certificate getCertificate(byte[] der) throws CertificateException
CertificateException
public static RSAPrivateKey getPrivateKey(byte[] der, String algorithm) throws InvalidKeySpecException, NoSuchAlgorithmException
public static PrivateKey readPrivateKey(String pem, String passphrase)