public class GoogleTurnSSLCandidateHarvester extends GoogleTurnCandidateHarvester
Component
.
This dialect exchanges a SSL v2.0 client-hello answered by a TLS v1.0
server-hello, before TURN data is exchanged. The data is SSL-spec compliant,
but use hard-coded values for data that typically aught to be generated
(for example: challenge, session-id and random fields).Modifier and Type | Field and Description |
---|---|
static byte[] |
SSL_CLIENT_HANDSHAKE
Data for the SSL message sent by the client (client-hello).
|
(package private) static byte[] |
SSL_SERVER_HANDSHAKE
Data for the SSL message sent by the server ('server-hello').
|
stunServer
Constructor and Description |
---|
GoogleTurnSSLCandidateHarvester(TransportAddress turnServer)
Initializes a new GoogleTurnSSLCandidateHarvester instance which
is to work with a specific Google TURN server.
|
GoogleTurnSSLCandidateHarvester(TransportAddress turnServer,
String shortTermCredentialUsername,
String password)
Initializes a new GoogleTurnSSLCandidateHarvester instance which is
to work with a specific TURN server using a specific username for the
purposes of the STUN short-term credential mechanism.
|
Modifier and Type | Method and Description |
---|---|
protected GoogleTurnCandidateHarvest |
createHarvest(HostCandidate hostCandidate)
Creates a new GoogleTurnSSLCandidateHarvest instance which is to
perform TURN harvesting of a specific HostCandidate.
|
protected HostCandidate |
getHostCandidate(HostCandidate hostCand)
Returns the host candidate.
|
static boolean |
sslHandshake(InputStream inputStream,
OutputStream outputStream)
Do the SSL handshake (send client certificate and wait for receive server
certificate).
|
getPassword
completedResolvingCandidate, createLongTermCredential, getShortTermCredentialUsername, getStunStack, harvest, toString
getHarvestStatistics, isHostHarvester
static final byte[] SSL_SERVER_HANDSHAKE
public static final byte[] SSL_CLIENT_HANDSHAKE
public GoogleTurnSSLCandidateHarvester(TransportAddress turnServer)
turnServer
- the TransportAddress of the TURN server the
new instance is to work withpublic GoogleTurnSSLCandidateHarvester(TransportAddress turnServer, String shortTermCredentialUsername, String password)
turnServer
- the TransportAddress of the TURN server the
new instance is to work withshortTermCredentialUsername
- the username to be used by the new
instance for the purposes of the STUN short-term credential mechanism or
null if the use of the STUN short-term credential mechanism is
not determined at the time of the construction of the new instancepassword
- The gingle candidates password necessary to use this TURN
server.protected GoogleTurnCandidateHarvest createHarvest(HostCandidate hostCandidate)
createHarvest
in class GoogleTurnCandidateHarvester
hostCandidate
- the HostCandidate for which harvesting is
to be performed by the new TurnCandidateHarvest instanceStunCandidateHarvester.createHarvest(HostCandidate)
protected HostCandidate getHostCandidate(HostCandidate hostCand)
getHostCandidate
in class StunCandidateHarvester
hostCand
- HostCandidatepublic static boolean sslHandshake(InputStream inputStream, OutputStream outputStream) throws IOException
inputStream
- InputStream of the socketoutputStream
- OutputStream of the socketIOException
- if something goes wrongCopyright © 2018. All rights reserved.