Liking cljdoc? Tell your friends :D

javax.net.ssl.SSLContext

Instances of this class represent a secure socket protocol implementation which acts as a factory for secure socket factories or SSLEngines. This class is initialized with an optional set of key and trust managers and source of secure random bytes.

Every implementation of the Java platform is required to support the following standard SSLContext protocol:

TLSv1

This protocol is described in the SSLContext section of the Java Cryptography Architecture Standard Algorithm Name Documentation. Consult the release documentation for your implementation to see if any other algorithms are supported.

Instances of this class represent a secure socket protocol
implementation which acts as a factory for secure socket
factories or SSLEngines. This class is initialized
with an optional set of key and trust managers and source of
secure random bytes.

 Every implementation of the Java platform is required to support the
following standard SSLContext protocol:

TLSv1

This protocol is described in the
SSLContext section of the
Java Cryptography Architecture Standard Algorithm Name Documentation.
Consult the release documentation for your implementation to see if any
other algorithms are supported.
raw docstring

*get-defaultclj

(*get-default)

Returns the default SSL context.

If a default context was set using the SSLContext.setDefault() method, it is returned. Otherwise, the first call of this method triggers the call SSLContext.getInstance(Default). If successful, that object is made the default SSL context and returned.

The default context is immediately usable and does not require initialization.

returns: the default SSL context - javax.net.ssl.SSLContext

throws: java.security.NoSuchAlgorithmException - if the SSLContext.getInstance() call fails

Returns the default SSL context.

 If a default context was set using the SSLContext.setDefault() method, it is returned. Otherwise, the first
 call of this method triggers the call
 SSLContext.getInstance(`Default`).
 If successful, that object is made the default SSL context and returned.

 The default context is immediately
 usable and does not require initialization.

returns: the default SSL context - `javax.net.ssl.SSLContext`

throws: java.security.NoSuchAlgorithmException - if the SSLContext.getInstance() call fails
raw docstring

*get-instanceclj

(*get-instance protocol)
(*get-instance protocol provider)

Returns a SSLContext object that implements the specified secure socket protocol.

A new SSLContext object encapsulating the SSLContextSpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list.

Note that the list of registered providers may be retrieved via the Security.getProviders() method.

protocol - the standard name of the requested protocol. See the SSLContext section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard protocol names. - java.lang.String provider - the name of the provider. - java.lang.String

returns: the new SSLContext object. - javax.net.ssl.SSLContext

throws: java.security.NoSuchAlgorithmException - if a SSLContextSpi implementation for the specified protocol is not available from the specified provider.

Returns a SSLContext object that implements the
 specified secure socket protocol.

  A new SSLContext object encapsulating the
 SSLContextSpi implementation from the specified provider
 is returned.  The specified provider must be registered
 in the security provider list.

  Note that the list of registered providers may be retrieved via
 the Security.getProviders() method.

protocol - the standard name of the requested protocol. See the SSLContext section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard protocol names. - `java.lang.String`
provider - the name of the provider. - `java.lang.String`

returns: the new SSLContext object. - `javax.net.ssl.SSLContext`

throws: java.security.NoSuchAlgorithmException - if a SSLContextSpi implementation for the specified protocol is not available from the specified provider.
raw docstring

*set-defaultclj

(*set-default context)

Sets the default SSL context. It will be returned by subsequent calls to getDefault(). The default context must be immediately usable and not require initialization.

context - the SSLContext - javax.net.ssl.SSLContext

throws: java.lang.NullPointerException - if context is null

Sets the default SSL context. It will be returned by subsequent calls
 to getDefault(). The default context must be immediately usable
 and not require initialization.

context - the SSLContext - `javax.net.ssl.SSLContext`

throws: java.lang.NullPointerException - if context is null
raw docstring

create-ssl-engineclj

(create-ssl-engine this)
(create-ssl-engine this peer-host peer-port)

Creates a new SSLEngine using this context using advisory peer information.

Applications using this factory method are providing hints for an internal session reuse strategy.

Some cipher suites (such as Kerberos) require remote hostname information, in which case peerHost needs to be specified.

peer-host - the non-authoritative name of the host - java.lang.String peer-port - the non-authoritative port - int

returns: the new SSLEngine object - javax.net.ssl.SSLEngine

throws: java.lang.UnsupportedOperationException - if the underlying provider does not implement the operation.

Creates a new SSLEngine using this context using
 advisory peer information.

 Applications using this factory method are providing hints
 for an internal session reuse strategy.

 Some cipher suites (such as Kerberos) require remote hostname
 information, in which case peerHost needs to be specified.

peer-host - the non-authoritative name of the host - `java.lang.String`
peer-port - the non-authoritative port - `int`

returns: the new SSLEngine object - `javax.net.ssl.SSLEngine`

throws: java.lang.UnsupportedOperationException - if the underlying provider does not implement the operation.
raw docstring

get-client-session-contextclj

(get-client-session-context this)

Returns the client session context, which represents the set of SSL sessions available for use during the handshake phase of client-side SSL sockets.

This context may be unavailable in some environments, in which case this method returns null. For example, when the underlying SSL provider does not provide an implementation of SSLSessionContext interface, this method returns null. A non-null session context is returned otherwise.

returns: client session context bound to this SSL context - javax.net.ssl.SSLSessionContext

Returns the client session context, which represents the set of
 SSL sessions available for use during the handshake phase of
 client-side SSL sockets.

 This context may be unavailable in some environments, in which
 case this method returns null. For example, when the underlying
 SSL provider does not provide an implementation of SSLSessionContext
 interface, this method returns null. A non-null session context
 is returned otherwise.

returns: client session context bound to this SSL context - `javax.net.ssl.SSLSessionContext`
raw docstring

get-default-ssl-parametersclj

(get-default-ssl-parameters this)

Returns a copy of the SSLParameters indicating the default settings for this SSL context.

The parameters will always have the ciphersuites and protocols arrays set to non-null values.

returns: a copy of the SSLParameters object with the default settings - javax.net.ssl.SSLParameters

throws: java.lang.UnsupportedOperationException - if the default SSL parameters could not be obtained.

Returns a copy of the SSLParameters indicating the default
 settings for this SSL context.

 The parameters will always have the ciphersuites and protocols
 arrays set to non-null values.

returns: a copy of the SSLParameters object with the default settings - `javax.net.ssl.SSLParameters`

throws: java.lang.UnsupportedOperationException - if the default SSL parameters could not be obtained.
raw docstring

get-protocolclj

(get-protocol this)

Returns the protocol name of this SSLContext object.

This is the same name that was specified in one of the getInstance calls that created this SSLContext object.

returns: the protocol name of this SSLContext object. - java.lang.String

Returns the protocol name of this SSLContext object.

 This is the same name that was specified in one of the
 getInstance calls that created this
 SSLContext object.

returns: the protocol name of this SSLContext object. - `java.lang.String`
raw docstring

get-providerclj

(get-provider this)

Returns the provider of this SSLContext object.

returns: the provider of this SSLContext object - java.security.Provider

Returns the provider of this SSLContext object.

returns: the provider of this SSLContext object - `java.security.Provider`
raw docstring

get-server-session-contextclj

(get-server-session-context this)

Returns the server session context, which represents the set of SSL sessions available for use during the handshake phase of server-side SSL sockets.

This context may be unavailable in some environments, in which case this method returns null. For example, when the underlying SSL provider does not provide an implementation of SSLSessionContext interface, this method returns null. A non-null session context is returned otherwise.

returns: server session context bound to this SSL context - javax.net.ssl.SSLSessionContext

Returns the server session context, which represents the set of
 SSL sessions available for use during the handshake phase of
 server-side SSL sockets.

 This context may be unavailable in some environments, in which
 case this method returns null. For example, when the underlying
 SSL provider does not provide an implementation of SSLSessionContext
 interface, this method returns null. A non-null session context
 is returned otherwise.

returns: server session context bound to this SSL context - `javax.net.ssl.SSLSessionContext`
raw docstring

get-server-socket-factoryclj

(get-server-socket-factory this)

Returns a ServerSocketFactory object for this context.

returns: the ServerSocketFactory object - javax.net.ssl.SSLServerSocketFactory

throws: java.lang.IllegalStateException - if the SSLContextImpl requires initialization and the init() has not been called

Returns a ServerSocketFactory object for
 this context.

returns: the ServerSocketFactory object - `javax.net.ssl.SSLServerSocketFactory`

throws: java.lang.IllegalStateException - if the SSLContextImpl requires initialization and the init() has not been called
raw docstring

get-socket-factoryclj

(get-socket-factory this)

Returns a SocketFactory object for this context.

returns: the SocketFactory object - javax.net.ssl.SSLSocketFactory

throws: java.lang.IllegalStateException - if the SSLContextImpl requires initialization and the init() has not been called

Returns a SocketFactory object for this
 context.

returns: the SocketFactory object - `javax.net.ssl.SSLSocketFactory`

throws: java.lang.IllegalStateException - if the SSLContextImpl requires initialization and the init() has not been called
raw docstring

get-supported-ssl-parametersclj

(get-supported-ssl-parameters this)

Returns a copy of the SSLParameters indicating the supported settings for this SSL context.

The parameters will always have the ciphersuites and protocols arrays set to non-null values.

returns: a copy of the SSLParameters object with the supported settings - javax.net.ssl.SSLParameters

throws: java.lang.UnsupportedOperationException - if the supported SSL parameters could not be obtained.

Returns a copy of the SSLParameters indicating the supported
 settings for this SSL context.

 The parameters will always have the ciphersuites and protocols
 arrays set to non-null values.

returns: a copy of the SSLParameters object with the supported
   settings - `javax.net.ssl.SSLParameters`

throws: java.lang.UnsupportedOperationException - if the supported SSL parameters could not be obtained.
raw docstring

initclj

(init this km tm random)

Initializes this context. Either of the first two parameters may be null in which case the installed security providers will be searched for the highest priority implementation of the appropriate factory. Likewise, the secure random parameter may be null in which case the default implementation will be used.

Only the first instance of a particular key and/or trust manager implementation type in the array is used. (For example, only the first javax.net.ssl.X509KeyManager in the array will be used.)

km - the sources of authentication keys or null - javax.net.ssl.KeyManager[] tm - the sources of peer authentication trust decisions or null - javax.net.ssl.TrustManager[] random - the source of randomness for this generator or null - java.security.SecureRandom

throws: java.security.KeyManagementException - if this operation fails

Initializes this context. Either of the first two parameters
 may be null in which case the installed security providers will
 be searched for the highest priority implementation of the
 appropriate factory. Likewise, the secure random parameter may
 be null in which case the default implementation will be used.

 Only the first instance of a particular key and/or trust manager
 implementation type in the array is used.  (For example, only
 the first javax.net.ssl.X509KeyManager in the array will be used.)

km - the sources of authentication keys or null - `javax.net.ssl.KeyManager[]`
tm - the sources of peer authentication trust decisions or null - `javax.net.ssl.TrustManager[]`
random - the source of randomness for this generator or null - `java.security.SecureRandom`

throws: java.security.KeyManagementException - if this operation fails
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close