tls-crypto: Rename methods to calculate finished message
Instead of the version number use "legacy" for the one for earlier TLS versions.
This commit is contained in:
@@ -874,8 +874,8 @@ static status_t process_finished(private_tls_peer_t *this, bio_reader_t *reader)
|
||||
this->alert->add(this->alert, TLS_FATAL, TLS_DECODE_ERROR);
|
||||
return NEED_MORE;
|
||||
}
|
||||
if (!this->crypto->calculate_finished(this->crypto, "server finished",
|
||||
buf))
|
||||
if (!this->crypto->calculate_finished_legacy(this->crypto,
|
||||
"server finished", buf))
|
||||
{
|
||||
DBG1(DBG_TLS, "calculating server finished failed");
|
||||
this->alert->add(this->alert, TLS_FATAL, TLS_INTERNAL_ERROR);
|
||||
@@ -897,7 +897,7 @@ static status_t process_finished(private_tls_peer_t *this, bio_reader_t *reader)
|
||||
this->alert->add(this->alert, TLS_FATAL, TLS_DECODE_ERROR);
|
||||
return NEED_MORE;
|
||||
}
|
||||
if (!this->crypto->calculate_finished_tls13(this->crypto, true,
|
||||
if (!this->crypto->calculate_finished(this->crypto, true,
|
||||
&verify_data))
|
||||
{
|
||||
DBG1(DBG_TLS, "calculating server finished failed");
|
||||
@@ -1469,7 +1469,8 @@ static status_t send_finished(private_tls_peer_t *this,
|
||||
{
|
||||
char buf[12];
|
||||
|
||||
if (!this->crypto->calculate_finished(this->crypto, "client finished", buf))
|
||||
if (!this->crypto->calculate_finished_legacy(this->crypto,
|
||||
"client finished", buf))
|
||||
{
|
||||
DBG1(DBG_TLS, "calculating client finished data failed");
|
||||
this->alert->add(this->alert, TLS_FATAL, TLS_INTERNAL_ERROR);
|
||||
@@ -1480,8 +1481,7 @@ static status_t send_finished(private_tls_peer_t *this,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!this->crypto->calculate_finished_tls13(this->crypto, false,
|
||||
&verify_data))
|
||||
if (!this->crypto->calculate_finished(this->crypto, FALSE, &verify_data))
|
||||
{
|
||||
DBG1(DBG_TLS, "calculating client finished data failed");
|
||||
this->alert->add(this->alert, TLS_FATAL, TLS_INTERNAL_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user