Use HashForSystemEncryption to check if the algorithm is supported for system partition encryption because we have now two supported algorithms.

This commit is contained in:
Mounir IDRASSI 2014-10-14 17:20:44 +02:00
parent f043e6cbf0
commit 922a09b634

View File

@ -1712,7 +1712,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
int new_hash_algo_id = SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA,
SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
if (new_hash_algo_id != 0 && new_hash_algo_id != DEFAULT_HASH_ALGORITHM_BOOT)
if (new_hash_algo_id != 0 && !HashForSystemEncryption(new_hash_algo_id))
{
int new_hash_algo_id = DEFAULT_HASH_ALGORITHM_BOOT;
Info ("ALGO_NOT_SUPPORTED_FOR_SYS_ENCRYPTION");