|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.net.ssl.X509ExtendedKeyManager
com.unboundid.util.ssl.WrapperKeyManager
@NotExtensible @ThreadSafety(level=INTERFACE_THREADSAFE) public abstract class WrapperKeyManager
This class provides an SSL key manager that may be used to wrap a provided set of key managers. It provides the ability to select the desired certificate based on a given nickname.
Constructor Summary | |
---|---|
protected |
WrapperKeyManager(javax.net.ssl.KeyManager[] keyManagers,
java.lang.String certificateAlias)
Creates a new instance of this wrapper key manager with the provided information. |
protected |
WrapperKeyManager(javax.net.ssl.X509KeyManager[] keyManagers,
java.lang.String certificateAlias)
Creates a new instance of this wrapper key manager with the provided information. |
Method Summary | |
---|---|
java.lang.String |
chooseClientAlias(java.lang.String[] keyType,
java.security.Principal[] issuers,
java.net.Socket socket)
Retrieves the nickname of the certificate that a client should use to authenticate to a server. |
java.lang.String |
chooseEngineClientAlias(java.lang.String[] keyType,
java.security.Principal[] issuers,
javax.net.ssl.SSLEngine engine)
Retrieves the nickname of the certificate that a client should use to authenticate to a server. |
java.lang.String |
chooseEngineServerAlias(java.lang.String keyType,
java.security.Principal[] issuers,
javax.net.ssl.SSLEngine engine)
Retrieves the nickname of the certificate that a server should use to authenticate to a client. |
java.lang.String |
chooseServerAlias(java.lang.String keyType,
java.security.Principal[] issuers,
java.net.Socket socket)
Retrieves the nickname of the certificate that a server should use to authenticate to a client. |
java.lang.String |
getCertificateAlias()
Retrieves the nickname of the certificate that should be selected. |
java.security.cert.X509Certificate[] |
getCertificateChain(java.lang.String alias)
Retrieves the certificate chain for the certificate with the given nickname. |
java.lang.String[] |
getClientAliases(java.lang.String keyType,
java.security.Principal[] issuers)
Retrieves the nicknames of the client certificates of the specified type contained in the key store. |
java.security.PrivateKey |
getPrivateKey(java.lang.String alias)
Retrieves the private key for the specified certificate. |
java.lang.String[] |
getServerAliases(java.lang.String keyType,
java.security.Principal[] issuers)
Retrieves the nicknames of the server certificates of the specified type contained in the key store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected WrapperKeyManager(javax.net.ssl.KeyManager[] keyManagers, java.lang.String certificateAlias)
keyManagers
- The set of key managers to be wrapped. It must
not be null
or empty, and it must contain
only X509KeyManager instances.certificateAlias
- The nickname of the certificate that should be
selected. It may be null
if any
acceptable certificate found may be used.protected WrapperKeyManager(javax.net.ssl.X509KeyManager[] keyManagers, java.lang.String certificateAlias)
keyManagers
- The set of key managers to be wrapped. It must
not be null
or empty.certificateAlias
- The nickname of the certificate that should be
selected. It may be null
if any
acceptable certificate found may be used.Method Detail |
---|
public java.lang.String getCertificateAlias()
null
if any acceptable certificate found in the key store
may be used.public final java.lang.String[] getClientAliases(java.lang.String keyType, java.security.Principal[] issuers)
keyType
- The key algorithm name for which to retrieve the available
certificate nicknames.issuers
- The list of acceptable issuer certificate subjects. It
may be null
if any issuer may be used.
null
if none
were found in the key store.public final java.lang.String chooseClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, java.net.Socket socket)
keyType
- The list of key algorithm names that may be used.issuers
- The list of acceptable issuer certificate subjects. It
may be null
if any issuer may be used.socket
- The socket to be used. It may be null
if the
certificate may be for any socket.
null
if no
appropriate certificate is found.public final java.lang.String chooseEngineClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
chooseEngineClientAlias
in class javax.net.ssl.X509ExtendedKeyManager
keyType
- The list of key algorithm names that may be used.issuers
- The list of acceptable issuer certificate subjects. It
may be null
if any issuer may be used.engine
- The SSL engine to be used. It may be null
if the
certificate may be for any engine.
null
if no
appropriate certificate is found.public final java.lang.String[] getServerAliases(java.lang.String keyType, java.security.Principal[] issuers)
keyType
- The key algorithm name for which to retrieve the available
certificate nicknames.issuers
- The list of acceptable issuer certificate subjects. It
may be null
if any issuer may be used.
null
if none
were found in the key store.public final java.lang.String chooseServerAlias(java.lang.String keyType, java.security.Principal[] issuers, java.net.Socket socket)
keyType
- The key algorithm name that may be used.issuers
- The list of acceptable issuer certificate subjects. It
may be null
if any issuer may be used.socket
- The socket to be used. It may be null
if the
certificate may be for any socket.
null
if no
appropriate certificate is found.public final java.lang.String chooseEngineServerAlias(java.lang.String keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
chooseEngineServerAlias
in class javax.net.ssl.X509ExtendedKeyManager
keyType
- The key algorithm name that may be used.issuers
- The list of acceptable issuer certificate subjects. It
may be null
if any issuer may be used.engine
- The SSL engine to be used. It may be null
if the
certificate may be for any engine.
null
if no
appropriate certificate is found.public final java.security.cert.X509Certificate[] getCertificateChain(java.lang.String alias)
alias
- The nickname of the certificate for which to retrieve the
certificate chain.
null
if the requested certificate cannot be found.public final java.security.PrivateKey getPrivateKey(java.lang.String alias)
alias
- The nickname of the certificate for which to retrieve the
private key.
null
if
the requested certificate cannot be found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |