Package org.conscrypt
Class DuckTypedPSKKeyManager
java.lang.Object
org.conscrypt.DuckTypedPSKKeyManager
- All Implemented Interfaces:
KeyManager
,PSKKeyManager
Deprecated.
This abstraction is deprecated because it does not work with TLS 1.3.
Reflection-based
PSKKeyManager
adaptor for objects which expose all the methods of the
PSKKeyManager
interface but do not implement the interface.
This is expected to be useful on platforms where there are multiple instances of the
PSKKeyManager
interface.
Visible for testing only.
-
Field Summary
FieldsFields inherited from interface org.conscrypt.PSKKeyManager
MAX_IDENTITY_HINT_LENGTH_BYTES, MAX_IDENTITY_LENGTH_BYTES, MAX_KEY_LENGTH_BYTES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchooseClientKeyIdentity
(String identityHint, Socket socket) Deprecated.Gets the PSK identity to report to the server to help agree on the PSK for the provided socket.chooseClientKeyIdentity
(String identityHint, SSLEngine engine) Deprecated.Gets the PSK identity to report to the server to help agree on the PSK for the provided engine.chooseServerKeyIdentityHint
(Socket socket) Deprecated.Gets the PSK identity hint to report to the client to help agree on the PSK for the provided socket.chooseServerKeyIdentityHint
(SSLEngine engine) Deprecated.Gets the PSK identity hint to report to the client to help agree on the PSK for the provided engine.(package private) static DuckTypedPSKKeyManager
getInstance
(Object obj) Deprecated.Gets an instance ofDuckTypedPSKKeyManager
which delegates all invocations of methods of thePSKKeyManager
interface to the same methods of the provided object.Deprecated.Gets the PSK to use for the provided socket.Deprecated.Gets the PSK to use for the provided engine.
-
Field Details
-
mDelegate
Deprecated.
-
-
Constructor Details
-
DuckTypedPSKKeyManager
Deprecated.
-
-
Method Details
-
getInstance
Deprecated.Gets an instance ofDuckTypedPSKKeyManager
which delegates all invocations of methods of thePSKKeyManager
interface to the same methods of the provided object.- Throws:
NoSuchMethodException
- ifobj
does not implement a method of thePSKKeyManager
interface.
-
chooseServerKeyIdentityHint
Deprecated.Description copied from interface:PSKKeyManager
Gets the PSK identity hint to report to the client to help agree on the PSK for the provided socket.- Specified by:
chooseServerKeyIdentityHint
in interfacePSKKeyManager
- Returns:
- PSK identity hint to be provided to the client or
null
to provide no hint.
-
chooseServerKeyIdentityHint
Deprecated.Description copied from interface:PSKKeyManager
Gets the PSK identity hint to report to the client to help agree on the PSK for the provided engine.- Specified by:
chooseServerKeyIdentityHint
in interfacePSKKeyManager
- Returns:
- PSK identity hint to be provided to the client or
null
to provide no hint.
-
chooseClientKeyIdentity
Deprecated.Description copied from interface:PSKKeyManager
Gets the PSK identity to report to the server to help agree on the PSK for the provided socket.- Specified by:
chooseClientKeyIdentity
in interfacePSKKeyManager
- Parameters:
identityHint
- identity hint provided by the server ornull
if none provided.- Returns:
- PSK identity to provide to the server.
null
is permitted but will be converted into an empty string.
-
chooseClientKeyIdentity
Deprecated.Description copied from interface:PSKKeyManager
Gets the PSK identity to report to the server to help agree on the PSK for the provided engine.- Specified by:
chooseClientKeyIdentity
in interfacePSKKeyManager
- Parameters:
identityHint
- identity hint provided by the server ornull
if none provided.- Returns:
- PSK identity to provide to the server.
null
is permitted but will be converted into an empty string.
-
getKey
Deprecated.Description copied from interface:PSKKeyManager
Gets the PSK to use for the provided socket.- Specified by:
getKey
in interfacePSKKeyManager
- Parameters:
identityHint
- identity hint provided by the server to help select the key ornull
if none provided.identity
- identity provided by the client to help select the key.- Returns:
- key or
null
to signal to peer that no suitable key is available and to abort the handshake.
-
getKey
Deprecated.Description copied from interface:PSKKeyManager
Gets the PSK to use for the provided engine.- Specified by:
getKey
in interfacePSKKeyManager
- Parameters:
identityHint
- identity hint provided by the server to help select the key ornull
if none provided.identity
- identity provided by the client to help select the key.- Returns:
- key or
null
to signal to peer that no suitable key is available and to abort the handshake.
-