hos: Automate some eks and bis checks

This commit is contained in:
CTCaer
2020-10-20 11:53:28 +03:00
parent 94235dd005
commit ce156ab4e7
5 changed files with 26 additions and 12 deletions

View File

@@ -269,6 +269,10 @@ void hos_eks_save(u32 kb)
u8 *keys = (u8 *)calloc(0x1000, 1);
se_get_aes_keys(keys + 0x800, keys, 0x10);
// Set SBK back.
if (FUSE(FUSE_PRIVATE_KEY0) == 0xFFFFFFFF)
se_aes_key_set(14, keys + 14 * 0x10, 0x10);
// Set magic and personalized info.
h_cfg.eks->magic = HOS_EKS_MAGIC;
h_cfg.eks->enabled[key_idx] = kb;