From 44fc6d878a6340ce58c280f4d6cfb738c1c3f1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 1 Oct 2017 19:47:12 +0200 Subject: [PATCH] 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. --- Source/Core/Core/IOS/ES/ES.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index eaefd60fef..2cb7ec62b4 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -791,6 +791,9 @@ bool ES::IsIssuerCorrect(VerifyContainerType type, const IOS::ES::CertReader& is ReturnCode ES::ReadCertStore(std::vector* 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)