AdvancedPskStore instead, or BridgePskStore
until migrated.@Deprecated public abstract class StringPskStore extends Object implements PskStore
May be used for backwards compatibility.
| Constructor and Description |
|---|
StringPskStore()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
PskPublicInformation |
getIdentity(InetSocketAddress inetAddress)
Deprecated.
Gets the identity to use for a PSK based handshake with a given
peer.
|
PskPublicInformation |
getIdentity(InetSocketAddress peerAddress,
ServerNames virtualHost)
Deprecated.
Gets the identity to use for a PSK based handshake with a given
peer.
|
abstract String |
getIdentityAsString(InetSocketAddress inetAddress)
Deprecated.
Gets the identity to use for a PSK based handshake with a given
peer.
|
abstract String |
getIdentityAsString(InetSocketAddress peerAddress,
ServerNames virtualHost)
Deprecated.
Gets the identity to use for a PSK based handshake with a given
peer.
|
SecretKey |
getKey(PskPublicInformation identity)
Deprecated.
Gets the pre-shared key for a given identity.
|
SecretKey |
getKey(ServerNames serverNames,
PskPublicInformation identity)
Deprecated.
Gets the pre-shared key for a given identity in the scope of a server
name.
|
abstract SecretKey |
getKey(ServerNames serverName,
String identity)
Deprecated.
Gets the pre-shared key for a given identity in the scope of a server name.
|
abstract SecretKey |
getKey(String identity)
Deprecated.
Gets the pre-shared key for a given identity.
|
public SecretKey getKey(PskPublicInformation identity)
PskStoreA DTLS server can use this method to look up the pre-shared key for an identity provided by the client as part of a PSK key exchange.
The implementation is intended to normalize the identity by a matching entry, if that entry is not UTF-8 compliant encoded.
The returned key isSecretUtil.destroy(javax.crypto.SecretKey)ed after usage.getKey in interface PskStoreidentity - The identity to look up the key for.null if the given identity is unknown.PskPublicInformation.normalize(String)public SecretKey getKey(ServerNames serverNames, PskPublicInformation identity)
PskStoreA DTLS server can use this method to look up the pre-shared key for an identity provided by the client as part of a PSK key exchange.
The key is looked up in the context of the virtual host that the client has provided in the Server Name Indication extension contained in its CLIENT_HELLO message.
The implementation is intended to normalize the identity by a matching entry, if that entry is not UTF-8 compliant encoded.
The returned key is intended to be be a copy. If the usedSecretKey implements Destroyable, it will be cleaned up
by SecretUtil.destroy(javax.crypto.SecretKey)ed after its usage.getKey in interface PskStoreserverNames - The name of the host that the client wants to connect
to as provided in the Server Name Indication HELLO
extension during the DTLS handshake. The key returned for the
given identity is being looked up in the context of this host
name.identity - The identity to look up the key for.null if no matching identity has been
registered for any of the server name types.PskPublicInformation.normalize(String)public PskPublicInformation getIdentity(InetSocketAddress inetAddress)
PskStoreA DTLS client uses this method to determine the identity to include in its CLIENT_KEY_EXCHANGE message during a PSK based DTLS handshake with the peer.
getIdentity in interface PskStoreinetAddress - The IP address of the peer to perform the handshake
with.null if no peer with the given
address is registered.public PskPublicInformation getIdentity(InetSocketAddress peerAddress, ServerNames virtualHost)
PskStoreA DTLS client uses this method to determine the identity to include in its CLIENT_KEY_EXCHANGE message during a PSK based DTLS handshake with the peer.
getIdentity in interface PskStorepeerAddress - The IP address and port of the peer to perform the
handshake with.virtualHost - The virtual host at the peer to connect to. If
null, the identity will be looked up in the
global scope, yielding the same result as
PskStore.getIdentity(InetSocketAddress).null if no peer with the given
address and virtual host is registered.public abstract SecretKey getKey(String identity)
A DTLS server can use this method to look up the pre-shared key for an identity provided by the client as part of a PSK key exchange.
The returned key is SecretUtil.destroy(javax.crypto.SecretKey)ed after usage.
identity - The identity to look up the key for.null if the given identity is unknown.NullPointerException - if identity is null.public abstract SecretKey getKey(ServerNames serverName, String identity)
A DTLS server can use this method to look up the pre-shared key for an identity provided by the client as part of a PSK key exchange.
The key is looked up in the context of the virtual host that the client has provided in the Server Name Indication extension contained in its CLIENT_HELLO message.
The returned key isSecretUtil.destroy(javax.crypto.SecretKey)ed after usage.serverName - The name of the host that the client wants to connect
to as provided in the Server Name Indication HELLO
extension during the DTLS handshake. The key returned for the
given identity is being looked up in the context of this host
name.identity - The identity to look up the key for.null if no matching identity has been
registered for any of the server name types.NullPointerException - if any of the parameters is null.public abstract String getIdentityAsString(InetSocketAddress inetAddress)
A DTLS client uses this method to determine the identity to include in its CLIENT_KEY_EXCHANGE message during a PSK based DTLS handshake with the peer.
inetAddress - The IP address of the peer to perform the handshake
with.null if no peer with the
given address is registered.NullPointerException - if address is null.public abstract String getIdentityAsString(InetSocketAddress peerAddress, ServerNames virtualHost)
A DTLS client uses this method to determine the identity to include in its CLIENT_KEY_EXCHANGE message during a PSK based DTLS handshake with the peer.
peerAddress - The IP address and port of the peer to perform the
handshake with.virtualHost - The virtual host at the peer to connect to. If
null, the identity will be looked up in the
global scope, yielding the same result as
getIdentity(InetSocketAddress).null if no peer with the
given address and virtual host is registered.NullPointerException - if address or host are null.Copyright © 2023 Eclipse Foundation. All rights reserved.