public class SecureKeysWithoutBouncyCastle
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.security.cert.X509Certificate |
getCanonicalImpl(java.security.cert.X509Certificate inCert)
converts a certificate to the canonical implementation, commonly sun.security.x509.X509CertImpl,
which is required in some places -- the Bouncy Castle X509 impl is not accepted
(e.g.
|
static javax.net.ssl.TrustManager |
getTrustManager(java.security.KeyStore trustStore)
see
getTrustManager(KeyStore, Class) , matching any type |
static <T extends javax.net.ssl.TrustManager> |
getTrustManager(java.security.KeyStore trustStore,
java.lang.Class<T> type)
returns the trust manager inferred from trustStore, matching the type (if not null);
throws exception if there are none, or if there are multiple
|
static javax.net.ssl.X509TrustManager |
getTrustManager(java.security.cert.X509Certificate certificate) |
static javax.security.auth.x500.X500Principal |
getX500PrincipalWithCommonName(java.lang.String commonName) |
static boolean |
isCertificateAuthorizedBy(java.security.cert.X509Certificate candidate,
java.security.cert.X509Certificate authority) |
static java.security.KeyPair |
newKeyPair() |
static java.security.KeyPair |
newKeyPair(java.lang.String algorithm,
int bits) |
static java.security.KeyPairGenerator |
newKeyPairGenerator(java.lang.String algorithm,
int bits) |
static java.security.KeyStore |
newKeyStore()
returns a new keystore, of the default type, and initialized to be empty.
|
static java.security.KeyStore |
newKeyStore(java.io.InputStream source,
java.lang.String passphrase)
returns keystore of default type read from given source
|
public static java.security.KeyPairGenerator newKeyPairGenerator(java.lang.String algorithm, int bits)
public static java.security.KeyPair newKeyPair()
public static java.security.KeyPair newKeyPair(java.lang.String algorithm, int bits)
public static java.security.KeyStore newKeyStore()
public static java.security.KeyStore newKeyStore(java.io.InputStream source, java.lang.String passphrase)
public static javax.net.ssl.TrustManager getTrustManager(java.security.KeyStore trustStore)
getTrustManager(KeyStore, Class)
, matching any typepublic static <T extends javax.net.ssl.TrustManager> T getTrustManager(java.security.KeyStore trustStore, java.lang.Class<T> type)
public static javax.net.ssl.X509TrustManager getTrustManager(java.security.cert.X509Certificate certificate)
public static java.security.cert.X509Certificate getCanonicalImpl(java.security.cert.X509Certificate inCert)
public static boolean isCertificateAuthorizedBy(java.security.cert.X509Certificate candidate, java.security.cert.X509Certificate authority)
public static javax.security.auth.x500.X500Principal getX500PrincipalWithCommonName(java.lang.String commonName)