|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.crypto.SecureKeys
public class SecureKeys
Utility methods for generating and working with keys
Method Summary | |
---|---|
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. where certs are chained, passed to trust manager) |
static javax.net.ssl.TrustManager
|
getTrustManager(java.security.KeyStore trustStore)
see getTrustManager(KeyStore, Class), matching any type |
static java.lang.Object
|
getTrustManager(java.security.KeyStore trustStore, java.lang.Class 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 X509Principal
|
getX509PrincipalWithCommonName(java.lang.String commonName)
RFC1773 order, with None for other values. |
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 |
static java.security.KeyPair
|
readPem(java.io.InputStream input, java.lang.String passphrase)
|
static java.lang.String
|
stringPem(java.security.KeyPair key)
returns the PEM (base64, ie for id_rsa) string for the private key / key pair |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
public static java.security.cert.X509Certificate getCanonicalImpl(java.security.cert.X509Certificate inCert)
public static javax.net.ssl.TrustManager getTrustManager(java.security.KeyStore trustStore)
@SuppressWarnings("unchecked") public static java.lang.Object getTrustManager(java.security.KeyStore trustStore, java.lang.Class type)
public static javax.net.ssl.X509TrustManager getTrustManager(java.security.cert.X509Certificate certificate)
public static javax.security.auth.x500.X500Principal getX500PrincipalWithCommonName(java.lang.String commonName)
public static X509Principal getX509PrincipalWithCommonName(java.lang.String commonName)
public static boolean isCertificateAuthorizedBy(java.security.cert.X509Certificate candidate, java.security.cert.X509Certificate authority)
public static java.security.KeyPair newKeyPair()
public static java.security.KeyPair newKeyPair(java.lang.String algorithm, int bits)
public static java.security.KeyPairGenerator newKeyPairGenerator(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 java.security.KeyPair readPem(java.io.InputStream input, java.lang.String passphrase)
public static java.lang.String stringPem(java.security.KeyPair key)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.