Package org.bouncycastle.est.jcajce
Class JsseESTServiceBuilder
- java.lang.Object
-
- org.bouncycastle.est.ESTServiceBuilder
-
- org.bouncycastle.est.jcajce.JsseESTServiceBuilder
-
public class JsseESTServiceBuilder extends ESTServiceBuilder
Build an RFC7030 (EST) service based on the JSSE.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Long
absoluteLimit
protected ChannelBindingProvider
bindingProvider
protected boolean
filterCipherSuites
protected JsseHostnameAuthorizer
hostNameAuthorizer
protected SSLSocketFactoryCreator
socketFactoryCreator
protected org.bouncycastle.est.jcajce.SSLSocketFactoryCreatorBuilder
sslSocketFactoryCreatorBuilder
protected java.util.Set<java.lang.String>
supportedSuites
protected int
timeoutMillis
-
Fields inherited from class org.bouncycastle.est.ESTServiceBuilder
clientProvider, label, server
-
-
Constructor Summary
Constructors Constructor Description JsseESTServiceBuilder(java.lang.String server)
Create a builder for a client talking to a server that is not yet trusted.JsseESTServiceBuilder(java.lang.String hostName, int portNo, javax.net.ssl.X509TrustManager trustManager)
Create a builder for a client talking to a trusted server.JsseESTServiceBuilder(java.lang.String hostName, int portNo, javax.net.ssl.X509TrustManager[] trustManagers)
Create a builder for a client talking to a trusted server.JsseESTServiceBuilder(java.lang.String hostName, int portNo, SSLSocketFactoryCreator socketFactoryCreator)
Create a builder for a client using a custom SSLSocketFactoryCreator.JsseESTServiceBuilder(java.lang.String server, javax.net.ssl.X509TrustManager trustManager)
Create a builder for a client talking to a trusted server.JsseESTServiceBuilder(java.lang.String server, javax.net.ssl.X509TrustManager[] trustManagers)
Create a builder for a client talking to a trusted server.JsseESTServiceBuilder(java.lang.String server, SSLSocketFactoryCreator socketFactoryCreator)
Create a builder for a client using a custom SSLSocketFactoryCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsseESTServiceBuilder
addCipherSuites(java.lang.String name)
JsseESTServiceBuilder
addCipherSuites(java.lang.String[] names)
ESTService
build()
Build the service.JsseESTServiceBuilder
withChannelBindingProvider(ChannelBindingProvider channelBindingProvider)
JsseESTServiceBuilder
withClientProvider(ESTClientProvider clientProvider)
Set the client provider.JsseESTServiceBuilder
withFilterCipherSuites(boolean filter)
Filter cipher suites with supported before passing to JSSE provider.JsseESTServiceBuilder
withHostNameAuthorizer(JsseHostnameAuthorizer hostNameAuthorizer)
JsseESTServiceBuilder
withKeyManager(javax.net.ssl.KeyManager keyManager)
JsseESTServiceBuilder
withKeyManagers(javax.net.ssl.KeyManager[] keyManagers)
JsseESTServiceBuilder
withProvider(java.lang.String tlsProviderName)
Configure this builder to use the provider with the passed in name.JsseESTServiceBuilder
withProvider(java.security.Provider tlsProvider)
Configure this builder to use the passed in provider.JsseESTServiceBuilder
withReadLimit(long absoluteLimit)
JsseESTServiceBuilder
withSecureRandom(java.security.SecureRandom secureRandom)
JsseESTServiceBuilder
withTimeout(int timeoutMillis)
JsseESTServiceBuilder
withTLSVersion(java.lang.String tlsVersion)
-
Methods inherited from class org.bouncycastle.est.ESTServiceBuilder
withLabel
-
-
-
-
Field Detail
-
socketFactoryCreator
protected SSLSocketFactoryCreator socketFactoryCreator
-
hostNameAuthorizer
protected JsseHostnameAuthorizer hostNameAuthorizer
-
timeoutMillis
protected int timeoutMillis
-
bindingProvider
protected ChannelBindingProvider bindingProvider
-
supportedSuites
protected java.util.Set<java.lang.String> supportedSuites
-
absoluteLimit
protected java.lang.Long absoluteLimit
-
sslSocketFactoryCreatorBuilder
protected org.bouncycastle.est.jcajce.SSLSocketFactoryCreatorBuilder sslSocketFactoryCreatorBuilder
-
filterCipherSuites
protected boolean filterCipherSuites
-
-
Constructor Detail
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(java.lang.String hostName, int portNo, SSLSocketFactoryCreator socketFactoryCreator)
Create a builder for a client using a custom SSLSocketFactoryCreator.- Parameters:
hostName
- hostName to talk to.socketFactoryCreator
- a custom creator of socket factories.
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(java.lang.String server, SSLSocketFactoryCreator socketFactoryCreator)
Create a builder for a client using a custom SSLSocketFactoryCreator.- Parameters:
server
- name of the server to talk to (URL format).socketFactoryCreator
- a custom creator of socket factories.
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(java.lang.String server)
Create a builder for a client talking to a server that is not yet trusted.- Parameters:
server
- name of the server to talk to (URL format).
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(java.lang.String hostName, int portNo, javax.net.ssl.X509TrustManager trustManager)
Create a builder for a client talking to a trusted server.- Parameters:
hostName
- name of the server to talk to.portNo
- port number to connect on.trustManager
- trust manager to be used for validating the connection.
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(java.lang.String server, javax.net.ssl.X509TrustManager trustManager)
Create a builder for a client talking to a trusted server.- Parameters:
server
- name of the server to talk to (URL format).trustManager
- trust manager to be used for validating the connection.
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(java.lang.String hostName, int portNo, javax.net.ssl.X509TrustManager[] trustManagers)
Create a builder for a client talking to a trusted server.- Parameters:
hostName
- name of the server to talk to.portNo
- port number to connect on.trustManagers
- trust managers that can be used for validating the connection.
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(java.lang.String server, javax.net.ssl.X509TrustManager[] trustManagers)
Create a builder for a client talking to a trusted server.- Parameters:
server
- name of the server to talk to (URL format).trustManagers
- trust managers that can be used for validating the connection.
-
-
Method Detail
-
withHostNameAuthorizer
public JsseESTServiceBuilder withHostNameAuthorizer(JsseHostnameAuthorizer hostNameAuthorizer)
-
withClientProvider
public JsseESTServiceBuilder withClientProvider(ESTClientProvider clientProvider)
Description copied from class:ESTServiceBuilder
Set the client provider.- Overrides:
withClientProvider
in classESTServiceBuilder
- Parameters:
clientProvider
- The client provider.- Returns:
-
withTimeout
public JsseESTServiceBuilder withTimeout(int timeoutMillis)
-
withReadLimit
public JsseESTServiceBuilder withReadLimit(long absoluteLimit)
-
withChannelBindingProvider
public JsseESTServiceBuilder withChannelBindingProvider(ChannelBindingProvider channelBindingProvider)
-
addCipherSuites
public JsseESTServiceBuilder addCipherSuites(java.lang.String name)
-
addCipherSuites
public JsseESTServiceBuilder addCipherSuites(java.lang.String[] names)
-
withTLSVersion
public JsseESTServiceBuilder withTLSVersion(java.lang.String tlsVersion)
-
withSecureRandom
public JsseESTServiceBuilder withSecureRandom(java.security.SecureRandom secureRandom)
-
withProvider
public JsseESTServiceBuilder withProvider(java.lang.String tlsProviderName) throws java.security.NoSuchProviderException
Configure this builder to use the provider with the passed in name.- Parameters:
tlsProviderName
- the name JSSE Provider to use.- Returns:
- the current builder instance.
- Throws:
java.security.NoSuchProviderException
- if the specified provider does not exist.
-
withProvider
public JsseESTServiceBuilder withProvider(java.security.Provider tlsProvider)
Configure this builder to use the passed in provider.- Parameters:
tlsProvider
- the JSSE Provider to use.- Returns:
- the current builder instance.
-
withKeyManager
public JsseESTServiceBuilder withKeyManager(javax.net.ssl.KeyManager keyManager)
-
withKeyManagers
public JsseESTServiceBuilder withKeyManagers(javax.net.ssl.KeyManager[] keyManagers)
-
withFilterCipherSuites
public JsseESTServiceBuilder withFilterCipherSuites(boolean filter)
Filter cipher suites with supported before passing to JSSE provider.- Parameters:
filter
- true, supplied cipher suites will be filtered with supported before passing to the JSSE provider.- Returns:
- this;
-
build
public ESTService build()
Description copied from class:ESTServiceBuilder
Build the service.- Overrides:
build
in classESTServiceBuilder
- Returns:
- an ESTService.
-
-