public class OpenSSLPKCS12 extends Object
Modifier and Type | Field | Description |
---|---|---|
static String |
OPENSSL |
|
static boolean |
USE_GENERIC_TEMP_DIRECTORY |
Constructor | Description |
---|---|
OpenSSLPKCS12() |
Modifier and Type | Method | Description |
---|---|---|
static void |
filterP12(File p12,
String p12Password) |
Recreates a PKCS12 KeyStore using OpenSSL; this is a workaround a BouncyCastle-Firefox compatibility bug
|
static void |
P12toPEM(File p12,
String p12Password,
File toPEM,
String pemPassword) |
|
static void |
PEMtoP12(File pem,
String pemPassword,
File toP12,
String p12Password) |
public static final String OPENSSL
public static final boolean USE_GENERIC_TEMP_DIRECTORY
public static void filterP12(File p12, String p12Password) throws IOException
p12
- The PKCS12 Keystore to filterp12Password
- The password for the keystoreIOException
- if a catastrophic unexpected failure occurs during executionIllegalArgumentException
- if the PKCS12 keystore doesn't existIllegalStateException
- if openssl exits with a failure conditionpublic static void P12toPEM(File p12, String p12Password, File toPEM, String pemPassword) throws IOException
p12
- p12Password
- toPEM
- pemPassword
- IOException
- if a catastrophic unexpected failure occurs during executionIllegalArgumentException
- if the PKCS12 keystore doesn't existIllegalStateException
- if openssl exits with a failure conditionpublic static void PEMtoP12(File pem, String pemPassword, File toP12, String p12Password) throws IOException
pem
- the PEM file containing the keys & certificates to put in a P12pemPassword
- The password for any encrypted keys in the PEMtoP12
- The PKCS12 filep12Password
- the password to put on the PKCS12 keystoreIOException
- if a catastrophic unexpected failure occurs during executionIllegalArgumentException
- if the PEM keystore doesn't existIllegalStateException
- if openssl exits with a failure conditionCopyright © 2018. All rights reserved.