public class OpenSSLPKCS12
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OPENSSL |
static boolean |
USE_GENERIC_TEMP_DIRECTORY |
| Constructor and Description |
|---|
OpenSSLPKCS12() |
| Modifier and Type | Method and Description |
|---|---|
static void |
filterP12(java.io.File p12,
java.lang.String p12Password)
Recreates a PKCS12 KeyStore using OpenSSL; this is a workaround a BouncyCastle-Firefox compatibility bug
|
static void |
P12toPEM(java.io.File p12,
java.lang.String p12Password,
java.io.File toPEM,
java.lang.String pemPassword) |
static void |
PEMtoP12(java.io.File pem,
java.lang.String pemPassword,
java.io.File toP12,
java.lang.String p12Password) |
public static final java.lang.String OPENSSL
public static final boolean USE_GENERIC_TEMP_DIRECTORY
public static void filterP12(java.io.File p12,
java.lang.String p12Password)
throws java.io.IOException
p12 - The PKCS12 Keystore to filterp12Password - The password for the keystorejava.io.IOException - if a catastrophic unexpected failure occurs during executionjava.lang.IllegalArgumentException - if the PKCS12 keystore doesn't existjava.lang.IllegalStateException - if openssl exits with a failure conditionpublic static void P12toPEM(java.io.File p12,
java.lang.String p12Password,
java.io.File toPEM,
java.lang.String pemPassword)
throws java.io.IOException
p12 - p12Password - toPEM - pemPassword - java.io.IOException - if a catastrophic unexpected failure occurs during executionjava.lang.IllegalArgumentException - if the PKCS12 keystore doesn't existjava.lang.IllegalStateException - if openssl exits with a failure conditionpublic static void PEMtoP12(java.io.File pem,
java.lang.String pemPassword,
java.io.File toP12,
java.lang.String p12Password)
throws java.io.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 keystorejava.io.IOException - if a catastrophic unexpected failure occurs during executionjava.lang.IllegalArgumentException - if the PEM keystore doesn't existjava.lang.IllegalStateException - if openssl exits with a failure conditionCopyright © 2014. All Rights Reserved.