public class SecurityUtility extends Object
| Constructor and Description |
|---|
SecurityUtility() |
| Modifier and Type | Method and Description |
|---|---|
static io.netty.handler.ssl.SslContext |
createNettySslContextForClient(boolean allowInsecureConnection,
String trustCertsFilePath) |
static io.netty.handler.ssl.SslContext |
createNettySslContextForClient(boolean allowInsecureConnection,
String trustCertsFilePath,
Certificate[] certificates,
PrivateKey privateKey) |
static io.netty.handler.ssl.SslContext |
createNettySslContextForClient(boolean allowInsecureConnection,
String trustCertsFilePath,
String certFilePath,
String keyFilePath) |
static io.netty.handler.ssl.SslContext |
createNettySslContextForServer(boolean allowInsecureConnection,
String trustCertsFilePath,
String certFilePath,
String keyFilePath,
Set<String> ciphers,
Set<String> protocols,
boolean requireTrustedClientCertOnConnect) |
static SSLContext |
createSslContext(boolean allowInsecureConnection,
Certificate[] trustCertificates) |
static SSLContext |
createSslContext(boolean allowInsecureConnection,
Certificate[] trustCertficates,
Certificate[] certificates,
PrivateKey privateKey) |
static SSLContext |
createSslContext(boolean allowInsecureConnection,
String trustCertsFilePath,
String certFilePath,
String keyFilePath) |
static org.eclipse.jetty.util.ssl.SslContextFactory |
createSslContextFactory(boolean tlsAllowInsecureConnection,
String tlsTrustCertsFilePath,
String tlsCertificateFilePath,
String tlsKeyFilePath,
boolean tlsRequireTrustedClientCertOnConnect) |
static X509Certificate[] |
loadCertificatesFromPemFile(String certFilePath) |
static PrivateKey |
loadPrivateKeyFromPemFile(String keyFilePath) |
public static SSLContext createSslContext(boolean allowInsecureConnection, Certificate[] trustCertificates) throws GeneralSecurityException
GeneralSecurityExceptionpublic static io.netty.handler.ssl.SslContext createNettySslContextForClient(boolean allowInsecureConnection,
String trustCertsFilePath)
throws GeneralSecurityException,
SSLException,
FileNotFoundException,
IOException
public static SSLContext createSslContext(boolean allowInsecureConnection, String trustCertsFilePath, String certFilePath, String keyFilePath) throws GeneralSecurityException
GeneralSecurityExceptionpublic static io.netty.handler.ssl.SslContext createNettySslContextForClient(boolean allowInsecureConnection,
String trustCertsFilePath,
String certFilePath,
String keyFilePath)
throws GeneralSecurityException,
SSLException,
FileNotFoundException,
IOException
public static io.netty.handler.ssl.SslContext createNettySslContextForClient(boolean allowInsecureConnection,
String trustCertsFilePath,
Certificate[] certificates,
PrivateKey privateKey)
throws GeneralSecurityException,
SSLException,
FileNotFoundException,
IOException
public static io.netty.handler.ssl.SslContext createNettySslContextForServer(boolean allowInsecureConnection,
String trustCertsFilePath,
String certFilePath,
String keyFilePath,
Set<String> ciphers,
Set<String> protocols,
boolean requireTrustedClientCertOnConnect)
throws GeneralSecurityException,
SSLException,
FileNotFoundException,
IOException
public static SSLContext createSslContext(boolean allowInsecureConnection, Certificate[] trustCertficates, Certificate[] certificates, PrivateKey privateKey) throws GeneralSecurityException
GeneralSecurityExceptionpublic static X509Certificate[] loadCertificatesFromPemFile(String certFilePath) throws KeyManagementException
KeyManagementExceptionpublic static PrivateKey loadPrivateKeyFromPemFile(String keyFilePath) throws KeyManagementException
KeyManagementExceptionpublic static org.eclipse.jetty.util.ssl.SslContextFactory createSslContextFactory(boolean tlsAllowInsecureConnection,
String tlsTrustCertsFilePath,
String tlsCertificateFilePath,
String tlsKeyFilePath,
boolean tlsRequireTrustedClientCertOnConnect)
throws GeneralSecurityException
GeneralSecurityExceptionCopyright © 2017–2018 Apache Software Foundation. All rights reserved.