diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fbd0ffb..d237f046 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ if(APPLE) endif() set(_3DSTOOL_MAJOR 1) set(_3DSTOOL_MINOR 2) -set(_3DSTOOL_PATCHLEVEL 1) +set(_3DSTOOL_PATCHLEVEL 2) if(NOT MSVC_IDE AND NOT XCODE_VERSION AND NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) endif() diff --git a/README.md b/README.md index 4aad444f..54274bba 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ An all-in-one tool for extracting/creating 3ds roms. - v1.2.0 @ 2018.06.03 - Support auto encryption fully - v1.2.1 @ 2018.07.26 - Support openssl 1.1.0 +- v1.2.2 @ 2018.08.27 - Fix not encrypt bug ### v1.1 diff --git a/bin/ext_key.txt b/bin/ext_key.txt index f121c6ab..4d9bfbfc 100644 --- a/bin/ext_key.txt +++ b/bin/ext_key.txt @@ -1315,6 +1315,7 @@ 00040000001C5200 6E7E08FF45671BB67418D31FD8A8EF29 00040000001C5300 CBEEFD99454240A4460273C9CB95EBD9 00040000001C5500 E395A144FEF2F71010D14CFAAF25B72A +00040000001C5600 E01D928F9AC7DF9A6EAA72F28051CB34 00040000001C5B00 CA03C03C612D0F1BCA39FA9807B92F1C 00040000001C6100 A3950BE92FC669E9A7FDD81BD4FDCA16 00040000001C6400 B67EC87DAAFA48AC4BD6B790A19E212F @@ -1352,6 +1353,7 @@ 00040000001CA000 7792718ECA6439E1FBA7E295C2F7B241 00040000001CA100 A188F1E33E0E40E22961D997BEA3F4D4 00040000001CA200 D3A31A447A81425C4308D2D99310E502 +00040000001CA300 6F179DF0E355AB23414208BAFAD065DB 00040000001CA400 53D071EFCB252B0C246765A17498E458 00040000001CA800 BC766C1AAA7AD881F3705B894240D727 00040000001CAA00 8FAE83DA2D9C9569F27603EB5272103E @@ -1389,6 +1391,8 @@ 00040000001CE000 B9C2D4CFDD33FEC7A65A5BC474A7AE1D 00040000001CE100 71D654EAA1A6B322D23D36B8A91A4201 00040000001CE800 BA12D61C0947FE59A22CC94EB32D3B5A +00040000001CEC00 FD82BA4BDA0D4746B68094BD7CFFEB9B +00040000001CF000 888CE18D78792D602193157C6AFA1B06 00040000001CF300 36DFFFEE9A7DFCAC75384E1E6A8C84A2 00040000001CF400 92B2CAD88DD7FC96A71115B1FFB4CED4 00040000001CF500 E484CE8576A4B3F73EB5879623792866 @@ -1403,6 +1407,7 @@ 00040000001D0300 86477FDF105F8B31D157BBA50AD6B92D 00040000001D0400 77EC6CAB68491322D125D171BAC36C67 00040000001D0500 191175DBB9FC093454B50CF5A1A3F1C1 +00040000001D0600 67455478122D3EB0A8539D6492DAD510 00040000001D0700 863C695C3DFD2644C85D73F151500C57 00040000001D0900 E9D344283411C3C4EE702EBF98DB6F85 00040000001D0C00 9ACF1243D40F4E79C75F3CC0B7254736 @@ -1411,9 +1416,12 @@ 00040000001D1100 B561A912C0A3631CFA7FE5E8597690BD 00040000001D1300 09E9B2205D3DDFB05E9E440804B08E30 00040000001D1700 2B96FE16B49BDC862A17DFA0D449E43E +00040000001D1C00 07F366441872A944EF83E9E1F78F0805 00040000001D1D00 A25E54024200B2CBB261FE47DE3A92D6 00040000001D2100 B0A550FACE9B99AFC9910A578C9C7865 00040000001D2300 46D91E9C044DD75B854703026B85E169 +00040000001D2400 A5F5AA0FBE6505649980012251C533B9 +00040000001D2500 BC9243370D77A84CAC5DC3DC9C482859 00040000001D2900 464AB26F2E87E980A5C7292B4E8E50DC 00040000001D2A00 5FB90283DE9DB528AC91BCA44428C355 00040000001D2B00 CE2F69DD4FCFFF021AE75FA77C52900D @@ -1421,6 +1429,7 @@ 00040000001D2F00 38F661D511341EFA239826B403385E83 00040000001D3000 F460868B270250808A56CC5E96485313 00040000001D3100 26852E4E55E7524E907F317CA4491EDB +00040000001D3200 BEA057914ED08ADE66495EDF381AEE3A 00040000001D3400 24B0CF214481EEF76A7A2F10B56E5EF5 00040000001D3500 06157406D199D1CEF9CFD89F82660BD2 00040000001D3800 960160100ACA5C0E53E0CFDFCC021484 @@ -1429,6 +1438,9 @@ 00040000001D3F00 1A82A36C84C2ECF1933D6156D7E3F333 00040000001D4000 80CA8BB3E11F631F01E7540AA3454CAE 00040000001D4500 9F62F7E161D51974F2CCE8B860CE749F +00040000001D5100 A17EC76A9967D1BDB177FC5EF59357D6 +00040000001D5300 255CDFBE6A1C3972C38D459363BBAB6C +00040000001D5400 49D45E1F8210ADAF2239F00B5B2987B2 00040000001D5500 3571D703D2A9B0B3FBE2465B6944EDC1 000400000F700400 0D65CBD40F2728586CA4DAE3B8681313 000400000F700700 C6EE84F157E15E8B7E716090D2ED5DE4 diff --git a/src/ncch.cpp b/src/ncch.cpp index e8dfa2f3..9492a738 100644 --- a/src/ncch.cpp +++ b/src/ncch.cpp @@ -962,13 +962,13 @@ bool CNcch::createRomFs() delete[] pBuffer; m_NcchHeader.Ncch.RomFsOffset = m_NcchHeader.Ncch.ContentSize; m_NcchHeader.Ncch.RomFsSize = static_cast(Align(nFileSize, m_nMediaUnitSize) / m_nMediaUnitSize); - calculateCounter(kAesCtrTypeRomFs); - if (m_nEncryptMode == kEncryptModeNone) + if (m_nEncryptMode == kEncryptModeNotEncrypt) { CopyFile(m_fpNcch, fp, 0, nFileSize); } else { + calculateCounter(kAesCtrTypeRomFs); FEncryptAesCtrCopyFile(m_fpNcch, fp, m_Key[kEncryptKeyIndexNew], m_Counter, 0, nFileSize); } fclose(fp);