private void continueHandshake(SSLEngine client, SSLEngine server, ByteBuffer unencrPacket, ByteBuffer encPacket) throws SSLException {
		SSLEngineResult result;
		encPacket.clear();
		result = client.wrap(unencrPacket, encPacket);
		assertEquals(HandshakeStatus.NEED_WRAP, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());
		
		encPacket.flip();
		result = server.unwrap(encPacket, unencrPacket);
		assertEquals(HandshakeStatus.NEED_UNWRAP, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());
		
		encPacket.clear();
		result = client.wrap(unencrPacket, encPacket);
		assertEquals(HandshakeStatus.NEED_UNWRAP, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());
		
		encPacket.flip();
		result = server.unwrap(encPacket, unencrPacket);
		assertEquals(HandshakeStatus.NEED_WRAP, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());
		
		encPacket.clear();
		result = server.wrap(unencrPacket, encPacket);
		assertEquals(HandshakeStatus.NEED_WRAP, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());		
		
		encPacket.flip();
		result = client.unwrap(encPacket, unencrPacket);		
		assertEquals(HandshakeStatus.NEED_UNWRAP, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());
		
		encPacket.clear();
		result = server.wrap(unencrPacket, encPacket);
		assertEquals(HandshakeStatus.FINISHED, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());	
		
		encPacket.flip();
		result = client.unwrap(encPacket, unencrPacket);		
		assertEquals(HandshakeStatus.FINISHED, result.getHandshakeStatus());
		assertEquals(Status.OK, result.getStatus());
	}