-
- All Implemented Interfaces:
-
org.ice4j.ice.harvest.CandidateHarvester
public class GoogleTurnSSLCandidateHarvester extends GoogleTurnCandidateHarvester
Implements a CandidateHarvester which gathers Google TURN SSLTCP dialect Candidates for a specified 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).
-
-
Field Summary
Fields Modifier and Type Field Description public final static Array<byte>SSL_CLIENT_HANDSHAKE
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
Modifier and Type Method Description static booleansslHandshake(InputStream inputStream, OutputStream outputStream)Do the SSL handshake (send client certificate and wait for receive server certificate). -
Methods inherited from class org.ice4j.ice.harvest.GoogleTurnCandidateHarvester
getPassword -
Methods inherited from class org.ice4j.ice.harvest.StunCandidateHarvester
getStunStack, harvest, toString -
Methods inherited from class org.ice4j.ice.harvest.AbstractCandidateHarvester
getHarvestStatistics, isHostHarvester -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
GoogleTurnSSLCandidateHarvester
GoogleTurnSSLCandidateHarvester(TransportAddress turnServer)
Initializes a new GoogleTurnSSLCandidateHarvester instance which is to work with a specific Google TURN server.- Parameters:
turnServer- the TransportAddress of the TURN server the new instance is to work with
-
GoogleTurnSSLCandidateHarvester
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.- Parameters:
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.
-
-
Method Detail
-
sslHandshake
static boolean sslHandshake(InputStream inputStream, OutputStream outputStream)
Do the SSL handshake (send client certificate and wait for receive server certificate). We explicitly need InputStream and OutputStream because some Socket may redefine getInputStream()/getOutputStream() and we need the original stream.
- Parameters:
inputStream- InputStream of the socketoutputStream- OutputStream of the socket
-
-
-
-