Do not change cipherspec while we have buffered handshake fragments pending

This commit is contained in:
Martin Willi
2010-09-09 14:27:41 +02:00
parent 939c4bf2e8
commit 89821331e0
+6 -6
View File
@@ -393,14 +393,14 @@ METHOD(tls_fragmentation_t, build, status_t,
*type = TLS_ALERT;
return NEED_MORE;
}
if (this->handshake->cipherspec_changed(this->handshake))
{
*type = TLS_CHANGE_CIPHER_SPEC;
*data = chunk_clone(chunk_from_chars(0x01));
return NEED_MORE;
}
if (!this->output.len)
{
if (this->handshake->cipherspec_changed(this->handshake))
{
*type = TLS_CHANGE_CIPHER_SPEC;
*data = chunk_clone(chunk_from_chars(0x01));
return NEED_MORE;
}
if (!this->handshake->finished(this->handshake))
{
status = build_handshake(this);