remove encryption lock

This commit is contained in:
Masamune3210 2026-05-11 22:54:14 -05:00
parent dbe7fd979f
commit f3728258ba

View file

@ -571,14 +571,6 @@ ResultVal<std::size_t> CIAFile::WriteContentData(u64 offset, std::size_t length,
buffer + (range_min - offset) + available_to_write);
if ((tmd.GetContentTypeByIndex(i) & FileSys::TMDContentTypeFlag::Encrypted) != 0) {
if (!decryption_authorized) {
LOG_ERROR(Service_AM, "Blocked unauthorized encrypted CIA installation.");
current_content_install_result.result =
Result(ErrorDescription::NotAuthorized, ErrorModule::AM,
ErrorSummary::InvalidState, ErrorLevel::Permanent);
install_results.push_back(current_content_install_result);
return current_content_install_result.result;
}
decryption_state->content[i].ProcessData(temp.data(), temp.data(), temp.size());
}
@ -702,11 +694,7 @@ Result CIAFile::PrepareToImportContent(const FileSys::TitleMetadata& tmd) {
if (container.GetTitleMetadata().HasEncryptedContent(from_cdn ? nullptr
: container.GetHeader())) {
if (!decryption_authorized) {
LOG_ERROR(Service_AM, "Blocked unauthorized encrypted CIA installation.");
return {ErrorDescription::NotAuthorized, ErrorModule::AM, ErrorSummary::InvalidState,
ErrorLevel::Permanent};
} else {
{
if (auto title_key = container.GetTicket().GetTitleKey()) {
decryption_state->content.resize(content_count);
for (std::size_t i = 0; i < content_count; ++i) {
@ -807,14 +795,6 @@ ResultVal<std::size_t> CIAFile::WriteContentDataIndexed(u16 content_index, u64 o
std::vector<u8> temp(buffer, buffer + std::min(static_cast<u64>(length), remaining_to_write));
if ((tmd.GetContentTypeByIndex(content_index) & FileSys::TMDContentTypeFlag::Encrypted) != 0) {
if (!decryption_authorized) {
LOG_ERROR(Service_AM, "Blocked unauthorized encrypted CIA installation.");
current_content_install_result.result =
Result(ErrorDescription::NotAuthorized, ErrorModule::AM, ErrorSummary::InvalidState,
ErrorLevel::Permanent);
install_results.push_back(current_content_install_result);
return current_content_install_result.result;
}
decryption_state->content[content_index].ProcessData(temp.data(), temp.data(), temp.size());
}