Package org.bouncycastle.est.jcajce
Class JsseESTServiceBuilder
java.lang.Object
org.bouncycastle.est.ESTServiceBuilder
org.bouncycastle.est.jcajce.JsseESTServiceBuilder
Build an RFC7030 (EST) service based on the JSSE.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Long
protected ChannelBindingProvider
protected boolean
protected JsseHostnameAuthorizer
protected SSLSocketFactoryCreator
protected org.bouncycastle.est.jcajce.SSLSocketFactoryCreatorBuilder
protected int
Fields inherited from class org.bouncycastle.est.ESTServiceBuilder
clientProvider, label, server
-
Constructor Summary
ConstructorDescriptionJsseESTServiceBuilder
(String server) Create a builder for a client talking to a server that is not yet trusted.JsseESTServiceBuilder
(String hostName, int portNo, X509TrustManager trustManager) Create a builder for a client talking to a trusted server.JsseESTServiceBuilder
(String hostName, int portNo, X509TrustManager[] trustManagers) Create a builder for a client talking to a trusted server.JsseESTServiceBuilder
(String hostName, int portNo, SSLSocketFactoryCreator socketFactoryCreator) Create a builder for a client using a custom SSLSocketFactoryCreator.JsseESTServiceBuilder
(String server, X509TrustManager trustManager) Create a builder for a client talking to a trusted server.JsseESTServiceBuilder
(String server, X509TrustManager[] trustManagers) Create a builder for a client talking to a trusted server.JsseESTServiceBuilder
(String server, SSLSocketFactoryCreator socketFactoryCreator) Create a builder for a client using a custom SSLSocketFactoryCreator. -
Method Summary
Modifier and TypeMethodDescriptionaddCipherSuites
(String name) addCipherSuites
(String[] names) build()
Build the service.withChannelBindingProvider
(ChannelBindingProvider channelBindingProvider) withClientProvider
(ESTClientProvider clientProvider) Set the client provider.withFilterCipherSuites
(boolean filter) Filter cipher suites with supported before passing to JSSE provider.withHostNameAuthorizer
(JsseHostnameAuthorizer hostNameAuthorizer) withKeyManager
(KeyManager keyManager) withKeyManagers
(KeyManager[] keyManagers) withProvider
(String tlsProviderName) Configure this builder to use the provider with the passed in name.withProvider
(Provider tlsProvider) Configure this builder to use the passed in provider.withReadLimit
(long absoluteLimit) withSecureRandom
(SecureRandom secureRandom) withTimeout
(int timeoutMillis) withTLSVersion
(String tlsVersion) Methods inherited from class org.bouncycastle.est.ESTServiceBuilder
withLabel
-
Field Details
-
socketFactoryCreator
-
hostNameAuthorizer
-
timeoutMillis
protected int timeoutMillis -
bindingProvider
-
supportedSuites
-
absoluteLimit
-
sslSocketFactoryCreatorBuilder
protected org.bouncycastle.est.jcajce.SSLSocketFactoryCreatorBuilder sslSocketFactoryCreatorBuilder -
filterCipherSuites
protected boolean filterCipherSuites
-
-
Constructor Details
-
JsseESTServiceBuilder
public JsseESTServiceBuilder(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
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
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
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
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
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
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 Details
-
withHostNameAuthorizer
-
withClientProvider
Description copied from class:ESTServiceBuilder
Set the client provider.- Overrides:
withClientProvider
in classESTServiceBuilder
- Parameters:
clientProvider
- The client provider.- Returns:
-
withTimeout
-
withReadLimit
-
withChannelBindingProvider
public JsseESTServiceBuilder withChannelBindingProvider(ChannelBindingProvider channelBindingProvider) -
addCipherSuites
-
addCipherSuites
-
withTLSVersion
-
withSecureRandom
-
withProvider
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:
NoSuchProviderException
- if the specified provider does not exist.
-
withProvider
Configure this builder to use the passed in provider.- Parameters:
tlsProvider
- the JSSE Provider to use.- Returns:
- the current builder instance.
-
withKeyManager
-
withKeyManagers
-
withFilterCipherSuites
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
Description copied from class:ESTServiceBuilder
Build the service.- Overrides:
build
in classESTServiceBuilder
- Returns:
- an ESTService.
-