@Test public void testClientHelloLacksServerNameExtensionForMessageWithoutVirtualHost() throws Exception { givenAClientHandshaker(null, false); handshaker.startHandshake(); ClientHello clientHello = getClientHello(recordLayer.getSentFlight()); assertNull(clientHello.getServerNameExtension()); }
@Override public void startHandshake() throws HandshakeException { handshakeStarted(); ClientHello startMessage = new ClientHello(maxProtocolVersion, supportedCipherSuites, supportedSignatureAlgorithms, supportedClientCertificateTypes, supportedServerCertificateTypes, supportedGroups, session.getPeer()); clientRandom = startMessage.getRandom(); startMessage.addCompressionMethod(CompressionMethod.NULL); addConnectionId(startMessage); addRecordSizeLimit(startMessage); addMaxFragmentLength(startMessage); addServerNameIndication(startMessage); flightNumber = 1; clientHello = startMessage; DTLSFlight flight = new DTLSFlight(session, flightNumber); wrapMessage(flight, startMessage); sendFlight(flight); states = SEVER_CERTIFICATE; statesIndex = 0; }
ClientHandshaker extends Handshaker { @Override public void startHandshake() throws HandshakeException { handshakeStarted(); ClientHello startMessage = new ClientHello(maxProtocolVersion, supportedCipherSuites, supportedSignatureAlgorithms, supportedClientCertificateTypes, supportedServerCertificateTypes, supportedGroups, session.getPeer()); clientRandom = startMessage.getRandom(); startMessage.addCompressionMethod(CompressionMethod.NULL); addConnectionId(startMessage); addRecordSizeLimit(startMessage); addMaxFragmentLength(startMessage); addServerNameIndication(startMessage); flightNumber = 1; clientHello = startMessage; DTLSFlight flight = new DTLSFlight(session, flightNumber); wrapMessage(flight, startMessage); sendFlight(flight); states = SEVER_CERTIFICATE; statesIndex = 0; } }
ClientHandshaker extends Handshaker { @Override public void startHandshake() throws HandshakeException { handshakeStarted(); ClientHello startMessage = new ClientHello(maxProtocolVersion, supportedCipherSuites, supportedSignatureAlgorithms, supportedClientCertificateTypes, supportedServerCertificateTypes, supportedGroups, session.getPeer()); clientRandom = startMessage.getRandom(); startMessage.addCompressionMethod(CompressionMethod.NULL); addConnectionId(startMessage); addRecordSizeLimit(startMessage); addMaxFragmentLength(startMessage); addServerNameIndication(startMessage); flightNumber = 1; clientHello = startMessage; DTLSFlight flight = new DTLSFlight(session, flightNumber); wrapMessage(flight, startMessage); sendFlight(flight); states = SEVER_CERTIFICATE; statesIndex = 0; } ClientHandshaker(DTLSSession session, RecordLayer recordLayer, ScheduledExecutorService timer, Connection connection,
			DtlsConnectorConfig config, boolean probe); }
ClientHandshaker extends Handshaker { @Override public void startHandshake() throws HandshakeException { handshakeStarted(); ClientHello startMessage = new ClientHello(maxProtocolVersion, supportedCipherSuites, supportedSignatureAlgorithms, supportedClientCertificateTypes, supportedServerCertificateTypes, supportedGroups, session.getPeer()); clientRandom = startMessage.getRandom(); startMessage.addCompressionMethod(CompressionMethod.NULL); addConnectionId(startMessage); addRecordSizeLimit(startMessage); addMaxFragmentLength(startMessage); addServerNameIndication(startMessage); flightNumber = 1; clientHello = startMessage; DTLSFlight flight = new DTLSFlight(session, flightNumber); wrapMessage(flight, startMessage); sendFlight(flight); states = SEVER_CERTIFICATE; statesIndex = 0; } ClientHandshaker(DTLSSession session, RecordLayer recordLayer, ScheduledExecutorService timer, Connection connection,
			DtlsConnectorConfig config, boolean probe); @Override void startHandshake(); @Override boolean isProbing(); @Override void resetProbing(); @Override boolean isRemovingConnection(); }
ClientHandshaker extends Handshaker { @Override public void startHandshake() throws HandshakeException { handshakeStarted(); ClientHello startMessage = new ClientHello(maxProtocolVersion, supportedCipherSuites, supportedSignatureAlgorithms, supportedClientCertificateTypes, supportedServerCertificateTypes, supportedGroups, session.getPeer()); clientRandom = startMessage.getRandom(); startMessage.addCompressionMethod(CompressionMethod.NULL); addConnectionId(startMessage); addRecordSizeLimit(startMessage); addMaxFragmentLength(startMessage); addServerNameIndication(startMessage); flightNumber = 1; clientHello = startMessage; DTLSFlight flight = new DTLSFlight(session, flightNumber); wrapMessage(flight, startMessage); sendFlight(flight); states = SEVER_CERTIFICATE; statesIndex = 0; } ClientHandshaker(DTLSSession session, RecordLayer recordLayer, ScheduledExecutorService timer, Connection connection,
			DtlsConnectorConfig config, boolean probe); @Override void startHandshake(); @Override boolean isProbing(); @Override void resetProbing(); @Override boolean isRemovingConnection();  }