if (reassembly.length == totalLength) {
// the reassembled fragment has the expected length
FragmentedHandshakeMessage wholeMessage = new FragmentedHandshakeMessage(type, totalLength, messageSeq, 0, reassembly);
reassembly = wholeMessage.toByteArray();
KeyExchangeAlgorithm keyExchangeAlgorithm = KeyExchangeAlgorithm.NULL;
boolean receiveRawPublicKey = false;
if (session != null) {
keyExchangeAlgorithm = session.getKeyExchange();
receiveRawPublicKey = session.receiveRawPublicKey();
}