Avoid unnecessary hashing
@@ -309,11 +309,14 @@ protected DTLSTransport serverHandshake(ServerHandshakeState state, DTLSRecordLa
clientMessage = handshake.receiveMessageDelayedDigest(HandshakeType.certificate_verify);
byte[] certificateVerifyBody = clientMessage.getBody();
processCertificateVerify(state, certificateVerifyBody, handshake.getHandshakeHash());
+ handshake.prepareToFinish();
handshake.updateHandshakeMessagesDigest(clientMessage);
}
-
+ else
+ {
handshake.prepareToFinish();
}
+ }
// NOTE: Calculated exclusive of the actual Finished message from the client
securityParameters.peerVerifyData = TlsUtils.calculateVerifyData(state.serverContext,
