public interface PSKCredentials
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getIdentity(java.lang.String identityHint,
java.lang.String peerAddress,
int peerPort)
Set Identity of the client to identify pre-shared key
This method is called by runtime during TLS/DTLS handshake on the client
side to ask application about PSK identity to use for this connection.
|
java.lang.String |
getIdentityHint(java.lang.String peerAddress,
int peerPort)
Set identity hint to help the client in selecting which identity to use.
|
byte[] |
getPSK(java.lang.String identity)
Set pre-shared key
This method is called by runtime during TLS/DTLS handshake on the client
and server side to ask application about pre-shared key to use for
this connection.
|
java.lang.String getIdentityHint(java.lang.String peerAddress, int peerPort) throws java.net.UnknownHostException
peerAddress
- - the address of the client to which this server
connection is boundpeerPort
- - the port number of the client to which this server
connection is boundjava.net.UnknownHostException
- to decline connection from
specified peer addressjava.lang.String getIdentity(java.lang.String identityHint, java.lang.String peerAddress, int peerPort) throws java.net.UnknownHostException
identityHint
- - identity hint from the server or nullpeerAddress
- - the address of the server to which this
connection is boundpeerPort
- - the port number of the server to which this
connection is boundjava.net.UnknownHostException
- to decline connection from
specified peer addressbyte[] getPSK(java.lang.String identity)
identity
- - psk identity for requested pre-shared keyCopyright (c) 2015, Oracle and/or its affiliates. All rights reserved.