diff --git a/.gitmodules b/.gitmodules index 6fbd72f2..238645a9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,3 +28,6 @@ [submodule "app/libraries/vkma"] path = app/libraries/vkma url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator +[submodule "app/libraries/mbedtls"] + path = app/libraries/mbedtls + url = https://github.com/ARMmbed/mbedtls diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index c34cbb8c..00000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 759c6d4f..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index e8ce8702..1a65191c 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -53,7 +53,11 @@ include_directories("libraries/pugixml/src") include_directories("libraries/frozen/include") # MbedTLS -find_package(mbedtls REQUIRED CONFIG) +set(ENABLE_TESTING OFF CACHE BOOL "Build mbed TLS tests." FORCE) +set(ENABLE_PROGRAMS OFF CACHE BOOL "Build mbed TLS programs." FORCE) +set(UNSAFE_BUILD ON CACHE BOOL "Allow unsafe builds. These builds ARE NOT SECURE." FORCE) +add_subdirectory("libraries/mbedtls") +include_directories("libraries/mbedtls/include") # Perfetto SDK include_directories(libraries/perfetto/sdk) @@ -213,5 +217,5 @@ add_library(skyline SHARED ${source_DIR}/skyline/services/mmnv/IRequest.cpp ) # target_precompile_headers(skyline PRIVATE ${source_DIR}/skyline/common.h) # PCH will currently break Intellisense -target_link_libraries(skyline android perfetto fmt lz4_static tzcode oboe vkma mbedtls::mbedcrypto) +target_link_libraries(skyline android perfetto fmt lz4_static tzcode oboe vkma mbedcrypto) target_compile_options(skyline PRIVATE -Wall -Wno-unknown-attributes -Wno-c++20-extensions -Wno-c++17-extensions -Wno-c99-designator -Wno-reorder -Wno-missing-braces -Wno-unused-variable -Wno-unused-private-field) diff --git a/app/build.gradle b/app/build.gradle index e9513613..b3dcc5dd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -110,20 +110,17 @@ afterEvaluate { } dependencies { - /* Filetrees */ - implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) - /* Google */ - implementation "androidx.core:core-ktx:1.3.2" - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation "androidx.core:core-ktx:1.6.0" + implementation 'androidx.appcompat:appcompat:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.preference:preference-ktx:1.1.1' - implementation 'com.google.android.material:material:1.3.0' + implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" - implementation 'androidx.fragment:fragment-ktx:1.3.2' + implementation 'androidx.fragment:fragment-ktx:1.3.5' implementation "com.google.dagger:hilt-android:$hilt_version" kapt "com.google.dagger:hilt-android-compiler:$hilt_version" implementation 'com.google.android:flexbox:2.0.1' @@ -133,7 +130,4 @@ dependencies { /* Other Java */ implementation 'info.debatty:java-string-similarity:2.0.0' - - /* NDK */ - implementation files("libraries/mbedtls.aar") } diff --git a/app/libraries/mbedtls b/app/libraries/mbedtls new file mode 160000 index 00000000..8df2f8e7 --- /dev/null +++ b/app/libraries/mbedtls @@ -0,0 +1 @@ +Subproject commit 8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b diff --git a/app/libraries/mbedtls.aar b/app/libraries/mbedtls.aar deleted file mode 100644 index 591757d7..00000000 Binary files a/app/libraries/mbedtls.aar and /dev/null differ diff --git a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp index 8ede8fa5..5424aa3e 100644 --- a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp +++ b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp @@ -47,7 +47,7 @@ namespace skyline::service::am { // On HOS the seed from control.ncap is hashed together with the device specific device ID seed // for us it's enough to just hash the seed from control.nacp as it provides the same guarantees - if (int err{mbedtls_sha1_ret(seedForPseudoDeviceId.data(), seedForPseudoDeviceId.size(), hashBuf.data())}; err < 0) + if (int err{mbedtls_sha1(seedForPseudoDeviceId.data(), seedForPseudoDeviceId.size(), hashBuf.data())}; err < 0) throw exception("Failed to hash device ID, err: {}", err); response.Push(UUID::GenerateUuidV5(hashBuf));