public class DefaultSslContextBuilder extends SslContextAutoRefreshBuilder<SSLContext>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
tlsAllowInsecureConnection |
protected FileModifiedTimeUpdater |
tlsCertificateFilePath |
protected FileModifiedTimeUpdater |
tlsKeyFilePath |
protected boolean |
tlsRequireTrustedClientCertOnConnect |
protected FileModifiedTimeUpdater |
tlsTrustCertsFilePath |
lastRefreshTime, refreshTime| Constructor and Description |
|---|
DefaultSslContextBuilder(boolean allowInsecure,
String trustCertsFilePath,
String certificateFilePath,
String keyFilePath,
boolean requireTrustedClientCertOnConnect,
long certRefreshInSec) |
| Modifier and Type | Method and Description |
|---|---|
SSLContext |
getSslContext()
Returns cached SSLContext.
|
boolean |
needUpdate()
Returns whether the key files modified after a refresh time, and context need update.
|
SSLContext |
update()
updates and returns cached SSLContext.
|
getprotected final boolean tlsAllowInsecureConnection
protected final FileModifiedTimeUpdater tlsTrustCertsFilePath
protected final FileModifiedTimeUpdater tlsCertificateFilePath
protected final FileModifiedTimeUpdater tlsKeyFilePath
protected final boolean tlsRequireTrustedClientCertOnConnect
public DefaultSslContextBuilder(boolean allowInsecure,
String trustCertsFilePath,
String certificateFilePath,
String keyFilePath,
boolean requireTrustedClientCertOnConnect,
long certRefreshInSec)
throws SSLException,
FileNotFoundException,
GeneralSecurityException,
IOException
public SSLContext update() throws GeneralSecurityException
SslContextAutoRefreshBuilderupdate in class SslContextAutoRefreshBuilder<SSLContext>GeneralSecurityExceptionpublic SSLContext getSslContext()
SslContextAutoRefreshBuildergetSslContext in class SslContextAutoRefreshBuilder<SSLContext>public boolean needUpdate()
SslContextAutoRefreshBuilderneedUpdate in class SslContextAutoRefreshBuilder<SSLContext>Copyright © 2017–2021 Apache Software Foundation. All rights reserved.