public class CertificateFactory extends Object
| Constructor and Description |
|---|
CertificateFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ICertificate |
load(File file,
String storeType,
String alias,
char[] password) |
static ICertificate |
load(InputStream in,
String storeType,
String alias,
char[] password) |
static ICertificate |
loadCertificate(String certChain)
Create a certificate from the given PEM format cert chain.
|
static IOpenCertificate |
loadOpenCertificate(String certChain,
String encryptedKey,
char[] passPhrase)
Create an open certificate from the given PEM format cert chain, KeyPair and passPhrase.
|
static ICertificate |
typedCertificate(org.symphonyoss.s2.common.crypto.cert.Certificate cert) |
public static ICertificate loadCertificate(String certChain) throws CertificateException, UnknownCipherSuiteException
certChain - A sequence of X509Certificate objects in PEM format.CertificateException - If the input is invalid.UnknownCipherSuiteException - If the certificate is not a supported type.public static ICertificate typedCertificate(org.symphonyoss.s2.common.crypto.cert.Certificate cert)
public static IOpenCertificate loadOpenCertificate(String certChain, String encryptedKey, @Nullable char[] passPhrase) throws CertificateException, UnknownCipherSuiteException
certChain - A sequence of X509Certificate objects in PEM format.encryptedKey - A KeyPair in PEM format.passPhrase - A passPhrase to decrypt the KeyPair. May be null if the KeyPair is unencrypted.CertificateException - If the input is invalid or cannot be read or processed.UnknownCipherSuiteException - If the certificate is not a supported type.public static ICertificate load(File file, String storeType, @Nullable String alias, char[] password) throws IOException, GeneralSecurityException, UnknownCipherSuiteException
public static ICertificate load(InputStream in, String storeType, @Nullable String alias, char[] password) throws IOException, GeneralSecurityException, UnknownCipherSuiteException
Copyright © 2018 Symphony Software Foundation. All rights reserved.