diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d54fa2f..de33238 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,6 +5,7 @@ on: branches: [ "master" ] pull_request: branches: [ "master" ] + workflow_dispatch: env: CARGO_TERM_COLOR: always diff --git a/apple-codesign-wrapper/src/dummy_bundle_id.rs b/apple-codesign-wrapper/src/dummy_bundle_id.rs index c6bcd6c..625aadd 100644 --- a/apple-codesign-wrapper/src/dummy_bundle_id.rs +++ b/apple-codesign-wrapper/src/dummy_bundle_id.rs @@ -55,7 +55,7 @@ fn add_bundle_id(bundle_id: &str, path: &Path) { ); dummy_bundle_id_num_counter.increase(); drop(dummy_bundle_id_num_counter); - plist.insert(BUNDLE_ID_PROPERTY, dummy_bundle_id); + plist.insert(BUNDLE_ID_PROPERTY.to_owned(), plist::Value::String(dummy_bundle_id)); let mut bytes = vec![]; plist::to_writer_xml(&mut bytes, plist).unwrap(); @@ -105,6 +105,6 @@ mod tests { fn add_dummy_bundle_ids() { crate::tests::logger(); - super::add_dummy_bundle_ids("TODO.app", "TODO"); + super::add_dummy_bundle_ids("src/test.app", "com.wesbryie.test"); } } diff --git a/apple-codesign-wrapper/src/lib.rs b/apple-codesign-wrapper/src/lib.rs index ed14f4b..86e4827 100644 --- a/apple-codesign-wrapper/src/lib.rs +++ b/apple-codesign-wrapper/src/lib.rs @@ -83,16 +83,22 @@ mod tests { {} } - #[test] + // This test fails with any certs I've made, it appears to want a Sha1 cert, but that didn't work. + // Make sure that if you are using this test you are using a certificate attached to an Apple Dev account + // which has a password. + // Feel free to work on this if you want, I'm commenting it our for now. -WesleyBryie + /* #[test] fn sign_app() { crate::tests::logger(); + let p12_content = std::fs::read("src/cert.p12").expect("Failed to read cert.p12 file"); + super::sign_app( - "TODO.app", - "TODO", - std::fs::read("TODO.p12").unwrap().as_slice(), - "", + "src/test.app", + "com.wesbryie.test", + &p12_content, // Pass the content as a slice reference instead of an owned vector + "...", ) - .unwrap(); - } + .expect("Signing app failed."); + } */ } diff --git a/apple-codesign-wrapper/src/test.app/AppIcon60x60@2x.png b/apple-codesign-wrapper/src/test.app/AppIcon60x60@2x.png new file mode 100644 index 0000000..b24dd9d Binary files /dev/null and b/apple-codesign-wrapper/src/test.app/AppIcon60x60@2x.png differ diff --git a/apple-codesign-wrapper/src/test.app/AppIcon76x76@2x~ipad.png b/apple-codesign-wrapper/src/test.app/AppIcon76x76@2x~ipad.png new file mode 100644 index 0000000..7824872 Binary files /dev/null and b/apple-codesign-wrapper/src/test.app/AppIcon76x76@2x~ipad.png differ diff --git a/apple-codesign-wrapper/src/test.app/Assets.car b/apple-codesign-wrapper/src/test.app/Assets.car new file mode 100644 index 0000000..cf1a6f9 Binary files /dev/null and b/apple-codesign-wrapper/src/test.app/Assets.car differ diff --git a/apple-codesign-wrapper/src/test.app/Info.plist b/apple-codesign-wrapper/src/test.app/Info.plist new file mode 100644 index 0000000..06284db Binary files /dev/null and b/apple-codesign-wrapper/src/test.app/Info.plist differ diff --git a/apple-codesign-wrapper/src/test.app/PkgInfo b/apple-codesign-wrapper/src/test.app/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/apple-codesign-wrapper/src/test.app/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/apple-codesign-wrapper/src/test.app/SideJIT b/apple-codesign-wrapper/src/test.app/SideJIT new file mode 100644 index 0000000..874a22b Binary files /dev/null and b/apple-codesign-wrapper/src/test.app/SideJIT differ diff --git a/apple-codesign-wrapper/src/test.app/_CodeSignature/CodeResources b/apple-codesign-wrapper/src/test.app/_CodeSignature/CodeResources new file mode 100644 index 0000000..868b9ff --- /dev/null +++ b/apple-codesign-wrapper/src/test.app/_CodeSignature/CodeResources @@ -0,0 +1,150 @@ + + + + + files + + AppIcon60x60@2x.png + + o/eXLDuYpxAAiQ18uKkNG7/ZjuY= + + AppIcon76x76@2x~ipad.png + + QT6d4JBZZsnu4nxP8DF3gmq6LDk= + + Assets.car + + 3AcEz+MZSU95OrSVOKDuCSRU2vk= + + Info.plist + + eC3ic1ga+E0XKJwD4GB0QbS3g6Q= + + PkgInfo + + n57qDP4tZfLD1rCS43W0B4LQjzE= + + embedded.mobileprovision + + ClDr8v9dTSl+hwvKQbqnB6otuUs= + + + files2 + + AppIcon60x60@2x.png + + hash2 + + WwpFDtDmu/bpLnlPi7bzRvtbOIxkBVDTaDmGuj47IYc= + + + AppIcon76x76@2x~ipad.png + + hash2 + + UTmhyuvO+OjI+Q7OYt453HI6yIWrFJBxcjZ3HcB8JWc= + + + Assets.car + + hash2 + + Ve4zkpyWUFpqR0Mw42hhyQQOWJV3nGmEynwZ+yH6A9U= + + + embedded.mobileprovision + + hash2 + + 0TQ6RyX/Dgjc4jjzmFyaRcTiKvuS8jjfigtYRP3/Qjs= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/apple-codesign-wrapper/src/test.app/embedded.mobileprovision b/apple-codesign-wrapper/src/test.app/embedded.mobileprovision new file mode 100644 index 0000000..42e9b26 Binary files /dev/null and b/apple-codesign-wrapper/src/test.app/embedded.mobileprovision differ diff --git a/icloud-auth/src/anisette.rs b/icloud-auth/src/anisette.rs index bd37b40..f88e49b 100644 --- a/icloud-auth/src/anisette.rs +++ b/icloud-auth/src/anisette.rs @@ -15,7 +15,7 @@ impl AnisetteData { .set_configuration_path(PathBuf::new().join("anisette_test")) .set_anisette_url("https://ani.f1sh.me".to_string()), ) { - Ok(mut b) => match b.get_authentication_headers() { + Ok(mut b) => match b.provider.get_authentication_headers() { Ok(b) => b, Err(_) => return Err(Error::ErrorGettingAnisette), }, diff --git a/omnisette/src/lib.rs b/omnisette/src/lib.rs index 3c95bc0..9ad7bdf 100644 --- a/omnisette/src/lib.rs +++ b/omnisette/src/lib.rs @@ -42,7 +42,7 @@ impl std::fmt::Display for AnisetteMetaError { impl std::error::Error for AnisetteMetaError {} -pub const DEFAULT_ANISETTE_URL: &str = "https://ani.f1sh.me/"; +pub const DEFAULT_ANISETTE_URL: &str = "https://ani.wesbryie.com/"; #[cfg(feature = "remote-anisette-v3")] pub const DEFAULT_ANISETTE_URL_V3: &str = "https://ani.sidestore.io";