IOS/ES: Fix a missing check in ReadCertStore

Without this, some operations can fail when trying to read an existing
cert store, as it may not exist when signature checks are disabled.
This commit is contained in:
Léo Lam 2017-10-01 19:47:12 +02:00
parent 689ed2a0ce
commit 44fc6d878a

View File

@ -791,6 +791,9 @@ bool ES::IsIssuerCorrect(VerifyContainerType type, const IOS::ES::CertReader& is
ReturnCode ES::ReadCertStore(std::vector<u8>* buffer) const
{
if (!SConfig::GetInstance().m_enable_signature_checks)
return IPC_SUCCESS;
const std::string store_path = Common::RootUserPath(Common::FROM_SESSION_ROOT) + "/sys/cert.sys";
File::IOFile store_file{store_path, "rb"};
if (!store_file)