Corrected output length for SHA256 algorithm
This commit is contained in:
committed by
Andreas Steffen
parent
aab0c587db
commit
08a7bd530e
@@ -316,15 +316,15 @@ TNC_Result TNC_IMC_ReceiveMessage(TNC_IMCID imc_id,
|
|||||||
/* Send File Measurement attribute */
|
/* Send File Measurement attribute */
|
||||||
selected_algorithm = pts->get_meas_algorithm(pts);
|
selected_algorithm = pts->get_meas_algorithm(pts);
|
||||||
meas_len = HASH_SIZE_SHA1;
|
meas_len = HASH_SIZE_SHA1;
|
||||||
if (selected_algorithm & PTS_MEAS_ALGO_SHA384)
|
if(selected_algorithm & PTS_MEAS_ALGO_SHA256)
|
||||||
|
{
|
||||||
|
meas_len = HASH_SIZE_SHA256;
|
||||||
|
}
|
||||||
|
else if (selected_algorithm & PTS_MEAS_ALGO_SHA384)
|
||||||
{
|
{
|
||||||
meas_len = HASH_SIZE_SHA384;
|
meas_len = HASH_SIZE_SHA384;
|
||||||
}
|
}
|
||||||
else if(selected_algorithm & PTS_MEAS_ALGO_SHA256)
|
|
||||||
{
|
|
||||||
meas_len = HASH_SIZE_SHA512;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hash the file or directory and add them as attribute
|
* Hash the file or directory and add them as attribute
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user