From 81d79ca11b5f6ea79a8e5bc075f9b034245717ec Mon Sep 17 00:00:00 2001 From: nab138 Date: Sat, 14 Feb 2026 01:10:01 -0500 Subject: [PATCH] Sign and install apps --- Cargo.lock | 1717 ++++++++++++++++++++++- README.md | 11 +- examples/minimal/src/main.rs | 2 +- isideload/Cargo.toml | 5 +- isideload/src/lib.rs | 4 + isideload/src/sideload/application.rs | 57 +- isideload/src/sideload/builder.rs | 56 +- isideload/src/sideload/bundle.rs | 46 +- isideload/src/sideload/cert_identity.rs | 41 +- isideload/src/sideload/install.rs | 95 ++ isideload/src/sideload/mod.rs | 2 + isideload/src/sideload/sideloader.rs | 161 ++- 12 files changed, 2096 insertions(+), 101 deletions(-) create mode 100644 isideload/src/sideload/install.rs diff --git a/Cargo.lock b/Cargo.lock index bba36e8..7371123 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,6 +54,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -63,19 +84,217 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + [[package]] name = "anyhow" version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +[[package]] +name = "apple-bundles" +version = "0.21.0" +dependencies = [ + "anyhow", + "plist", + "simple-file-manifest", + "walkdir", +] + +[[package]] +name = "apple-codesign" +version = "0.29.0" +dependencies = [ + "anyhow", + "apple-bundles", + "apple-flat-package", + "apple-xar", + "base64", + "bcder", + "bitflags", + "bytes", + "chrono", + "clap", + "cryptographic-message-syntax", + "der 0.7.10", + "dialoguer", + "difference", + "digest 0.10.7", + "dirs", + "elliptic-curve", + "env_logger", + "figment", + "filetime", + "glob", + "goblin", + "hex", + "log", + "md-5", + "minicbor", + "num-traits", + "object", + "oid-registry 0.7.1", + "once_cell", + "p12", + "p256", + "pem", + "pkcs1 0.7.5", + "pkcs8 0.10.2", + "plist", + "rand 0.8.5", + "rasn", + "rayon", + "regex", + "reqwest 0.12.28", + "ring", + "rsa 0.9.10", + "scroll", + "security-framework 2.11.1", + "security-framework-sys", + "semver", + "serde", + "serde_json", + "serde_yaml", + "sha2 0.10.9", + "signature 2.2.0", + "simple-file-manifest", + "spake2", + "spki 0.7.3", + "subtle", + "tempfile", + "thiserror 2.0.18", + "tokio", + "uuid", + "walkdir", + "widestring", + "windows-sys 0.59.0", + "x509", + "x509-certificate", + "xml-rs", + "yasna", + "zeroize", + "zip", + "zip_structs", +] + +[[package]] +name = "apple-flat-package" +version = "0.20.0" +dependencies = [ + "apple-xar", + "cpio-archive", + "flate2", + "scroll", + "serde", + "serde-xml-rs", + "thiserror 2.0.18", +] + +[[package]] +name = "apple-xar" +version = "0.20.0" +dependencies = [ + "base64", + "bcder", + "bzip2", + "chrono", + "cryptographic-message-syntax", + "digest 0.10.7", + "flate2", + "log", + "md-5", + "rand 0.8.5", + "reqwest 0.12.28", + "scroll", + "serde", + "serde-xml-rs", + "sha1", + "sha2 0.10.9", + "signature 2.2.0", + "thiserror 2.0.18", + "url", + "x509-certificate", + "xml-rs", + "xz2", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "asn1-rs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +dependencies = [ + "asn1-rs-derive 0.5.1", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 1.0.69", +] + [[package]] name = "asn1-rs" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" dependencies = [ - "asn1-rs-derive", + "asn1-rs-derive 0.6.0", "asn1-rs-impl", "displaydoc", "nom", @@ -85,6 +304,18 @@ dependencies = [ "time", ] +[[package]] +name = "asn1-rs-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "asn1-rs-derive" version = "0.6.0" @@ -116,6 +347,7 @@ checksum = "d10e4f991a553474232bc0a31799f6d24b034a84c0971d80d2e2f78b2e576e40" dependencies = [ "compression-codecs", "compression-core", + "futures-io", "pin-project-lite", "tokio", ] @@ -131,6 +363,30 @@ dependencies = [ "syn", ] +[[package]] +name = "async_zip" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c50d65ce1b0e0cb65a785ff615f78860d7754290647d3b983208daa4f85e6" +dependencies = [ + "async-compression", + "crc32fast", + "futures-lite", + "pin-project", + "thiserror 2.0.18", + "tokio", + "tokio-util", +] + +[[package]] +name = "atomic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -166,6 +422,12 @@ dependencies = [ "fs_extra", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base16ct" version = "1.0.0" @@ -200,6 +462,28 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "bitvec-nom2" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d988fcc40055ceaa85edc55875a08f8abd29018582647fd82ad6128dba14a5f0" +dependencies = [ + "bitvec", + "nom", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -242,6 +526,12 @@ version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + [[package]] name = "byteorder" version = "1.5.0" @@ -254,6 +544,32 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +[[package]] +name = "bytesize" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "cbc" version = "0.1.2" @@ -320,7 +636,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ "iana-time-zone", + "js-sys", "num-traits", + "serde", + "wasm-bindgen", "windows-link", ] @@ -345,6 +664,46 @@ dependencies = [ "inout 0.2.2", ] +[[package]] +name = "clap" +version = "4.5.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" + [[package]] name = "cmake" version = "0.1.57" @@ -372,6 +731,12 @@ dependencies = [ "x509-cert", ] +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "combine" version = "4.6.7" @@ -399,6 +764,19 @@ version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.59.0", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -411,6 +789,24 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" +[[package]] +name = "const_panic" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e262cdaac42494e3ae34c43969f9cdeb7da178bdb4b66fa6a1ea2edb4c8ae652" +dependencies = [ + "typewit", +] + +[[package]] +name = "cookie-factory" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" +dependencies = [ + "futures", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -437,6 +833,16 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpio-archive" +version = "0.10.0" +dependencies = [ + "chrono", + "is_executable", + "simple-file-manifest", + "thiserror 2.0.18", +] + [[package]] name = "cpubits" version = "0.1.0" @@ -470,6 +876,43 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-bigint" version = "0.7.0-rc.25" @@ -512,11 +955,28 @@ version = "0.7.0-pre.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "334a79c97c0b7fa536716dc132fd417d0afbf471440a41fc25a5d9f66d8771cd" dependencies = [ - "crypto-bigint", + "crypto-bigint 0.7.0-rc.25", "libm", "rand_core 0.10.0", ] +[[package]] +name = "cryptographic-message-syntax" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c67889c5743b5987961460fbc999dbfa1bb4c7a8e5bfe37eb4d5e678ccb6d1" +dependencies = [ + "bcder", + "bytes", + "chrono", + "hex", + "pem", + "reqwest 0.12.28", + "ring", + "signature 2.2.0", + "x509-certificate", +] + [[package]] name = "ctr" version = "0.10.0-rc.3" @@ -535,6 +995,32 @@ dependencies = [ "cmov", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "curve25519-dalek-derive", + "fiat-crypto", + "rand_core 0.6.4", + "rustc_version", + "subtle", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "data-encoding" version = "2.10.0" @@ -592,7 +1078,7 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" dependencies = [ - "asn1-rs", + "asn1-rs 0.7.1", "displaydoc", "nom", "num-bigint", @@ -629,6 +1115,25 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "dialoguer" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" +dependencies = [ + "console", + "shell-words", + "tempfile", + "thiserror 1.0.69", + "zeroize", +] + +[[package]] +name = "difference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" + [[package]] name = "digest" version = "0.10.7" @@ -636,6 +1141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid 0.9.6", "crypto-common 0.1.7", "subtle", ] @@ -652,6 +1158,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -669,6 +1196,50 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.10", + "digest 0.10.7", + "elliptic-curve", + "signature 2.2.0", + "spki 0.7.3", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.5", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -678,12 +1249,92 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "env_filter" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "figment" +version = "0.10.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cb01cd46b0cf372153850f4c6c272d9cbea2da513e07538405148f95bd789f3" +dependencies = [ + "atomic", + "pear", + "serde", + "toml", + "uncased", + "version_check", +] + +[[package]] +name = "filetime" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" +dependencies = [ + "cfg-if", + "libc", + "libredox", +] + [[package]] name = "find-msvc-tools" version = "0.1.9" @@ -734,6 +1385,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" version = "0.3.31" @@ -782,6 +1439,19 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.31" @@ -831,6 +1501,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -883,6 +1554,34 @@ dependencies = [ "polyval", ] +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "goblin" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa0a64d21a7eb230583b4c5f4e23b7e4e57974f96620f42a7e75e08ae66d745" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "h2" version = "0.4.13" @@ -902,6 +1601,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.15.5" @@ -929,6 +1637,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.12.1" @@ -1027,10 +1744,12 @@ dependencies = [ "hyper", "hyper-util", "rustls", + "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", + "webpki-roots 1.0.6", ] [[package]] @@ -1175,7 +1894,9 @@ version = "0.1.52" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4031af51250d2f22f61a0d7fb7ea71ba8b6144b2b9dd3b7ee4a931fccbd1ec0" dependencies = [ + "async_zip", "base64", + "chrono", "futures", "plist", "plist-macro", @@ -1220,6 +1941,12 @@ dependencies = [ "serde_core", ] +[[package]] +name = "inlinable_string" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" + [[package]] name = "inout" version = "0.1.4" @@ -1256,12 +1983,28 @@ dependencies = [ "serde", ] +[[package]] +name = "is_executable" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baabb8b4867b26294d818bf3f651a454b6901431711abb96e296245888d6e8c4" +dependencies = [ + "windows-sys 0.60.2", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "isideload" version = "0.2.0" dependencies = [ "aes 0.9.0-rc.4", "aes-gcm", + "apple-codesign", "async-trait", "base64", "cbc 0.2.0-rc.3", @@ -1276,9 +2019,9 @@ dependencies = [ "plist-macro", "rand 0.10.0", "rcgen", - "reqwest", + "reqwest 0.13.2", "rootcause", - "rsa", + "rsa 0.10.0-rc.15", "serde", "serde_json", "sha2 0.11.0-rc.5", @@ -1292,12 +2035,45 @@ dependencies = [ "zip", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +[[package]] +name = "jiff" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c867c356cc096b33f4981825ab281ecba3db0acefe60329f044c1789d94c6543" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-static" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7946b4325269738f270bb55b3c19ab5c5040525f83fd625259422a9d25d9be5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "jni" version = "0.21.1" @@ -1356,11 +2132,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "konst" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4381b9b00c55f251f2ebe9473aef7c117e96828def1a7cb3bd3f0f903c6894e9" +dependencies = [ + "const_panic", + "konst_kernel", + "typewit", +] + +[[package]] +name = "konst_kernel" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4b1eb7788f3824c629b1116a7a9060d6e898c358ebff59070093d51103dcc3c" +dependencies = [ + "typewit", +] + [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] [[package]] name = "leb128fmt" @@ -1389,6 +2188,17 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" +[[package]] +name = "libredox" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" +dependencies = [ + "bitflags", + "libc", + "redox_syscall", +] + [[package]] name = "linux-keyutils" version = "0.2.4" @@ -1399,6 +2209,12 @@ dependencies = [ "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + [[package]] name = "litemap" version = "0.8.1" @@ -1417,6 +2233,27 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +[[package]] +name = "lzma-sys" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.7.6" @@ -1429,6 +2266,26 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minicbor" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0452a60c1863c1f50b5f77cd295e8d2786849f35883f0b9e18e7e6e1b5691b0" +dependencies = [ + "minicbor-derive", +] + +[[package]] +name = "minicbor-derive" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd2209fff77f705b00c737016a48e73733d7fbccb8b007194db148f03561fb70" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "minimal" version = "0.1.0" @@ -1498,6 +2355,22 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + [[package]] name = "num-conv" version = "0.2.0" @@ -1513,6 +2386,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1520,6 +2404,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "crc32fast", + "flate2", + "hashbrown 0.15.5", + "indexmap", + "memchr", + "ruzstd", +] + +[[package]] +name = "oid-registry" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +dependencies = [ + "asn1-rs 0.6.2", ] [[package]] @@ -1528,7 +2436,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" dependencies = [ - "asn1-rs", + "asn1-rs 0.7.1", ] [[package]] @@ -1537,12 +2445,41 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "openssl-probe" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "p12" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224" +dependencies = [ + "cbc 0.1.2", + "cipher 0.4.4", + "des", + "getrandom 0.2.17", + "hmac 0.12.1", + "lazy_static", + "rc2", + "sha1", + "yasna", +] + [[package]] name = "p12-keystore" version = "0.2.0" @@ -1566,6 +2503,23 @@ dependencies = [ "x509-parser 0.17.0", ] +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -1586,6 +2540,29 @@ dependencies = [ "hmac 0.13.0-rc.5", ] +[[package]] +name = "pear" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" +dependencies = [ + "inlinable_string", + "pear_codegen", + "yansi", +] + +[[package]] +name = "pear_codegen" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" +dependencies = [ + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn", +] + [[package]] name = "pem" version = "3.0.6" @@ -1620,6 +2597,26 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pin-project-lite" version = "0.2.16" @@ -1632,6 +2629,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der 0.7.10", + "pkcs8 0.10.2", + "spki 0.7.3", +] + [[package]] name = "pkcs1" version = "0.8.0-rc.4" @@ -1672,6 +2680,16 @@ dependencies = [ "spki 0.7.3", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.10", + "spki 0.7.3", +] + [[package]] name = "pkcs8" version = "0.11.0-rc.10" @@ -1688,6 +2706,12 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "plist" version = "1.8.0" @@ -1721,6 +2745,21 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "portable-atomic-util" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" +dependencies = [ + "portable-atomic", +] + [[package]] name = "potential_utf" version = "0.1.4" @@ -1755,6 +2794,15 @@ dependencies = [ "syn", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -1764,6 +2812,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "version_check", + "yansi", +] + [[package]] name = "quick-xml" version = "0.38.4" @@ -1844,13 +2905,30 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + [[package]] name = "rand" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "rand_chacha", + "rand_chacha 0.9.0", "rand_core 0.9.5", ] @@ -1865,6 +2943,16 @@ dependencies = [ "rand_core 0.10.0", ] +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + [[package]] name = "rand_chacha" version = "0.9.0" @@ -1899,6 +2987,65 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" +[[package]] +name = "rasn" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e442690f86da40561d5548e7ffb4a18af90d1c1b3536090de847ca2d5a3a6426" +dependencies = [ + "arrayvec", + "bitvec", + "bitvec-nom2", + "bytes", + "chrono", + "either", + "hashbrown 0.14.5", + "konst", + "nom", + "num-bigint", + "num-integer", + "num-traits", + "once_cell", + "rasn-derive", + "serde_json", + "snafu", +] + +[[package]] +name = "rasn-derive" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0d374c7e4e985e6bc97ca7e7ad1d9642a8415db2017777d6e383002edaab2" +dependencies = [ + "either", + "itertools", + "proc-macro2", + "quote", + "rayon", + "syn", + "uuid", +] + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "rc2" version = "0.8.1" @@ -1922,6 +3069,97 @@ dependencies = [ "yasna", ] +[[package]] +name = "redox_syscall" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 1.0.6", +] + [[package]] name = "reqwest" version = "0.13.2" @@ -1998,6 +3236,26 @@ dependencies = [ "triomphe", ] +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid 0.9.6", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1 0.7.5", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "signature 2.2.0", + "spki 0.7.3", + "subtle", + "zeroize", +] + [[package]] name = "rsa" version = "0.10.0-rc.15" @@ -2005,11 +3263,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b342b99544549f37509ed7fd42b0cea04bfd9ce07c16ca56094cf0fbeefbbcd" dependencies = [ "const-oid 0.10.2", - "crypto-bigint", + "crypto-bigint 0.7.0-rc.25", "crypto-primes", "digest 0.11.0-rc.11", - "pkcs1", - "pkcs8", + "pkcs1 0.8.0-rc.4", + "pkcs8 0.11.0-rc.10", "rand_core 0.10.0", "signature 3.0.0-rc.10", "spki 0.8.0-rc.4", @@ -2022,6 +3280,15 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rusticata-macros" version = "4.1.0" @@ -2031,6 +3298,19 @@ dependencies = [ "nom", ] +[[package]] +name = "rustix" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + [[package]] name = "rustls" version = "0.23.36" @@ -2039,6 +3319,7 @@ checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ "aws-lc-rs", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -2110,6 +3391,21 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +[[package]] +name = "ruzstd" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f" +dependencies = [ + "twox-hash", +] + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + [[package]] name = "salsa20" version = "0.10.2" @@ -2137,6 +3433,26 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "scrypt" version = "0.11.0" @@ -2148,6 +3464,20 @@ dependencies = [ "sha2 0.10.9", ] +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.10", + "generic-array", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "2.11.1" @@ -2200,6 +3530,18 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-xml-rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782" +dependencies = [ + "log", + "serde", + "thiserror 1.0.69", + "xml-rs", +] + [[package]] name = "serde_core" version = "1.0.228" @@ -2233,13 +3575,47 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serdect" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9af4a3e75ebd5599b30d4de5768e00b5095d518a79fefc3ecbaf77e665d1ec06" dependencies = [ - "base16ct", + "base16ct 1.0.0", "serde", ] @@ -2285,6 +3661,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shell-words" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + [[package]] name = "shlex" version = "1.3.0" @@ -2297,6 +3679,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ + "digest 0.10.7", "rand_core 0.6.4", ] @@ -2316,6 +3699,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +[[package]] +name = "simple-file-manifest" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd19be0257552dd56d1bb6946f89f193c6e5b9f13cc9327c4bc84a357507c74" + [[package]] name = "slab" version = "0.4.12" @@ -2328,6 +3717,27 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "snafu" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" +dependencies = [ + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "socket2" version = "0.6.2" @@ -2338,6 +3748,24 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "spake2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5482afe85a0b6ce956c945401598dbc527593c77ba51d0a87a586938b1b893a" +dependencies = [ + "curve25519-dalek", + "hkdf", + "rand_core 0.6.4", + "sha2 0.10.9", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.7.3" @@ -2364,7 +3792,7 @@ version = "0.7.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0b7d0b0d27b2475e779315c09af698ac9f6d40016bc011bf3fa0f0054ce38ed" dependencies = [ - "crypto-bigint", + "crypto-bigint 0.7.0-rc.25", "crypto-common 0.2.0", "digest 0.11.0-rc.11", "subtle", @@ -2376,6 +3804,18 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" version = "2.6.1" @@ -2434,6 +3874,25 @@ dependencies = [ "libc", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +dependencies = [ + "fastrand", + "getrandom 0.4.1", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -2599,11 +4058,53 @@ checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "pin-project-lite", "tokio", ] +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + [[package]] name = "tower" version = "0.5.3" @@ -2742,6 +4243,16 @@ dependencies = [ "utf-8", ] +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + [[package]] name = "typed-path" version = "0.12.2" @@ -2754,12 +4265,42 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +[[package]] +name = "typewit" +version = "1.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c1ae7cc0fdb8b842d65d127cb981574b0d2b249b74d1c7a2986863dc134f71" +dependencies = [ + "typewit_proc_macros", +] + +[[package]] +name = "typewit_proc_macros" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36a83ea2b3c704935a01b4642946aadd445cea40b10935e3f8bd8052b8193d6" + +[[package]] +name = "uncased" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-ident" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -2776,6 +4317,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.7.1" @@ -2812,6 +4359,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.20.0" @@ -3018,6 +4571,12 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + [[package]] name = "winapi-util" version = "0.1.11" @@ -3106,6 +4665,15 @@ dependencies = [ "windows-targets 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -3157,6 +4725,21 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -3196,6 +4779,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -3214,6 +4803,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -3232,6 +4827,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3262,6 +4863,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -3280,6 +4887,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -3298,6 +4911,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -3316,6 +4935,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -3328,6 +4953,15 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen" version = "0.51.0" @@ -3422,6 +5056,25 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "x509" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3cec94c3999f31341553f358ef55f65fc031291a022cd42ec0ce7219560c76" +dependencies = [ + "chrono", + "cookie-factory", +] + [[package]] name = "x509-cert" version = "0.2.5" @@ -3458,12 +5111,12 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460" dependencies = [ - "asn1-rs", + "asn1-rs 0.7.1", "data-encoding", "der-parser", "lazy_static", "nom", - "oid-registry", + "oid-registry 0.8.1", "rusticata-macros", "thiserror 2.0.18", "time", @@ -3475,18 +5128,39 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d43b0f71ce057da06bc0851b23ee24f3f86190b07203dd8f567d0b706a185202" dependencies = [ - "asn1-rs", + "asn1-rs 0.7.1", "aws-lc-rs", "data-encoding", "der-parser", "lazy_static", "nom", - "oid-registry", + "oid-registry 0.8.1", "rusticata-macros", "thiserror 2.0.18", "time", ] +[[package]] +name = "xml-rs" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" + +[[package]] +name = "xz2" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" +dependencies = [ + "lzma-sys", +] + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "yasna" version = "0.5.2" @@ -3627,6 +5301,17 @@ dependencies = [ "zopfli", ] +[[package]] +name = "zip_structs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce824a6bfffe8942820fa36d24973b7c83a40896749a42e33de0abdd11750ee5" +dependencies = [ + "byteorder", + "bytesize", + "thiserror 1.0.69", +] + [[package]] name = "zlib-rs" version = "0.6.0" diff --git a/README.md b/README.md index 77069b0..520cad3 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,11 @@ This branch is home to isideload-next, the next major version of isideload. It f Things left todo before the rewrite is considered finished -- Download provisioning profiles -- Signing apps -- Installing apps -(will superceed the original isideload at this point) -- Remove dependency on ring -- More parallelism/cachng for better performance +- Proper entitlement handling + - actually parse macho files and stuff, right now it just uses the bare minimum and applies extra entitlements for livecontainer +- Remove dependency on ring and reduce duplicate dependencies + - partially just need to wait for the rust crypto ecosystem to get through another release cycle +- More parallelism/caching for better performance ## Licensing diff --git a/examples/minimal/src/main.rs b/examples/minimal/src/main.rs index 6d740de..a38ff98 100644 --- a/examples/minimal/src/main.rs +++ b/examples/minimal/src/main.rs @@ -19,7 +19,7 @@ use tracing_subscriber::FmtSubscriber; async fn main() { isideload::init().expect("Failed to initialize error reporting"); let subscriber = FmtSubscriber::builder() - .with_max_level(Level::INFO) + .with_max_level(Level::DEBUG) .finish(); tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 5cb6fc9..28433ac 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -19,7 +19,7 @@ keyring-storage = ["keyring"] # Once that becomes stable, hopefuly duplicate dependencies should clean up.\ # Until then, I will wince in pain every time I see how long the output of cargo tree -d is. [dependencies] -idevice = { version = "0.1.52", optional = true } +idevice = { version = "0.1.52", optional = true, features = ["afc", "installation_proxy"]} plist = "1.8" plist-macro = "0.1.4" reqwest = { version = "0.13.2", features = ["json", "gzip"] } @@ -49,4 +49,5 @@ keyring = { version = "3.6.3", features = ["apple-native", "linux-native-sync-pe x509-certificate = "0.25" rcgen = { version = "0.14.7", default-features = false, features = ["aws_lc_rs", "pem"] } p12-keystore = "0.2.0" -zip = { version = "7.4", default-features = false, features = ["deflate"] } \ No newline at end of file +zip = { version = "7.4", default-features = false, features = ["deflate"] } +apple-codesign = { path = "../../plume-apple-platform-rs/apple-codesign", default-features = false} diff --git a/isideload/src/lib.rs b/isideload/src/lib.rs index 13d7121..be251c1 100644 --- a/isideload/src/lib.rs +++ b/isideload/src/lib.rs @@ -1,3 +1,4 @@ +use idevice::IdeviceError; use rootcause::{ hooks::{Hooks, context_formatter::ContextFormatterHook}, prelude::*, @@ -25,6 +26,9 @@ pub enum SideloadError { #[error("Invalid bundle: {0}")] InvalidBundle(String), + + #[error(transparent)] + IdeviceError(#[from] IdeviceError), } // The default reqwest error formatter sucks and provides no info diff --git a/isideload/src/sideload/application.rs b/isideload/src/sideload/application.rs index 692d37f..8cf531c 100644 --- a/isideload/src/sideload/application.rs +++ b/isideload/src/sideload/application.rs @@ -5,7 +5,6 @@ use crate::SideloadError; use crate::dev::app_ids::{AppId, AppIdsApi}; use crate::dev::developer_session::DeveloperSession; use crate::dev::teams::DeveloperTeam; -use crate::sideload::builder::ExtensionsBehavior; use crate::sideload::bundle::Bundle; use crate::sideload::cert_identity::CertificateIdentity; use rootcause::option_ext::OptionExt; @@ -13,6 +12,7 @@ use rootcause::prelude::*; use std::fs::File; use std::path::PathBuf; use tokio::io::AsyncWriteExt; +use tracing::info; use zip::ZipArchive; pub struct Application { @@ -81,7 +81,8 @@ impl Application { } pub fn get_special_app(&self) -> Option { - let special_app = match self.bundle.bundle_identifier().unwrap_or("") { + let bundle_id = self.bundle.bundle_identifier().unwrap_or(""); + let special_app = match bundle_id { "com.rileytestut.AltStore" => Some(SpecialApp::AltStore), "com.SideStore.SideStore" => Some(SpecialApp::SideStore), _ => None, @@ -99,6 +100,10 @@ impl Application { return Some(SpecialApp::SideStoreLc); } + if bundle_id == "com.kdt.livecontainer" { + return Some(SpecialApp::LiveContainer); + } + None } @@ -154,7 +159,7 @@ impl Application { pub async fn register_app_ids( &self, - mode: &ExtensionsBehavior, + //mode: &ExtensionsBehavior, dev_session: &mut DeveloperSession, team: &DeveloperTeam, ) -> Result, Report> { @@ -166,19 +171,16 @@ impl Application { .list_app_ids(&team, None) .await .context("Failed to list app IDs for the developer team")?; - let app_ids_to_register = match mode { - ExtensionsBehavior::RegisterAll => bundles_with_app_id - .iter() - .filter(|bundle| { - let bundle_id = bundle.bundle_identifier().unwrap_or(""); - !list_app_ids_response - .app_ids - .iter() - .any(|app_id| app_id.identifier == bundle_id) - }) - .collect::>(), - _ => todo!(), - }; + let app_ids_to_register = bundles_with_app_id + .iter() + .filter(|bundle| { + let bundle_id = bundle.bundle_identifier().unwrap_or(""); + !list_app_ids_response + .app_ids + .iter() + .any(|app_id| app_id.identifier == bundle_id) + }) + .collect::>(); if let Some(available) = list_app_ids_response.available_quantity && app_ids_to_register.len() > available.try_into().unwrap() @@ -220,10 +222,11 @@ impl Application { } let special = special.as_ref().unwrap(); - if special == &SpecialApp::SideStoreLc - || special == &SpecialApp::SideStore - || special == &SpecialApp::AltStore - { + if matches!( + special, + SpecialApp::SideStoreLc | SpecialApp::SideStore | SpecialApp::AltStore + ) { + info!("Injecting certificate for {}", special); self.bundle.app_info.insert( "ALTAppGroups".to_string(), plist::Value::Array(vec![plist::Value::String(group_identifier.to_string())]), @@ -265,6 +268,20 @@ impl Application { pub enum SpecialApp { SideStore, SideStoreLc, + LiveContainer, AltStore, StikStore, } + +// impl display +impl std::fmt::Display for SpecialApp { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + SpecialApp::SideStore => write!(f, "SideStore"), + SpecialApp::SideStoreLc => write!(f, "SideStore+LiveContainer"), + SpecialApp::LiveContainer => write!(f, "LiveContainer"), + SpecialApp::AltStore => write!(f, "AltStore"), + SpecialApp::StikStore => write!(f, "StikStore"), + } + } +} diff --git a/isideload/src/sideload/builder.rs b/isideload/src/sideload/builder.rs index fa70169..096601e 100644 --- a/isideload/src/sideload/builder.rs +++ b/isideload/src/sideload/builder.rs @@ -49,34 +49,34 @@ pub enum ExtensionsBehaviorChoice { RemoveExtensions, } -/// Behavior used when an app contains sub bundles -pub enum ExtensionsBehavior { - /// Use the main app id/profile for all sub-bundles - ReuseMain, - /// Create separate app ids/profiles for each sub-bundle - RegisterAll, - /// Remove all sub-bundles - RemoveExtensions, - /// Prompt the user to choose one of the above behaviors - Prompt(fn(&Vec) -> ExtensionsBehaviorChoice), -} +// /// Behavior used when an app contains sub bundles +// pub enum ExtensionsBehavior { +// /// Use the main app id/profile for all sub-bundles +// ReuseMain, +// /// Create separate app ids/profiles for each sub-bundle +// RegisterAll, +// /// Remove all sub-bundles +// RemoveExtensions, +// /// Prompt the user to choose one of the above behaviors +// Prompt(fn(&Vec) -> ExtensionsBehaviorChoice), +// } -impl From for ExtensionsBehavior { - fn from(choice: ExtensionsBehaviorChoice) -> Self { - match choice { - ExtensionsBehaviorChoice::ReuseMain => ExtensionsBehavior::ReuseMain, - ExtensionsBehaviorChoice::RegisterAll => ExtensionsBehavior::RegisterAll, - ExtensionsBehaviorChoice::RemoveExtensions => ExtensionsBehavior::RemoveExtensions, - } - } -} +// impl From for ExtensionsBehavior { +// fn from(choice: ExtensionsBehaviorChoice) -> Self { +// match choice { +// ExtensionsBehaviorChoice::ReuseMain => ExtensionsBehavior::ReuseMain, +// ExtensionsBehaviorChoice::RegisterAll => ExtensionsBehavior::RegisterAll, +// ExtensionsBehaviorChoice::RemoveExtensions => ExtensionsBehavior::RemoveExtensions, +// } +// } +// } pub struct SideloaderBuilder { developer_session: DeveloperSession, apple_email: String, team_selection: Option, max_certs_behavior: Option, - extensions_behavior: Option, + //extensions_behavior: Option, storage: Option>, machine_name: Option, } @@ -90,7 +90,7 @@ impl SideloaderBuilder { machine_name: None, apple_email, max_certs_behavior: None, - extensions_behavior: None, + // extensions_behavior: None, } } @@ -128,10 +128,10 @@ impl SideloaderBuilder { self } - pub fn extensions_behavior(mut self, behavior: ExtensionsBehavior) -> Self { - self.extensions_behavior = Some(behavior); - self - } + // pub fn extensions_behavior(mut self, behavior: ExtensionsBehavior) -> Self { + // self.extensions_behavior = Some(behavior); + // self + // } /// Build the `Sideloader` instance with the provided configuration pub fn build(self) -> Sideloader { @@ -143,8 +143,8 @@ impl SideloaderBuilder { self.machine_name.unwrap_or_else(|| "isideload".to_string()), self.storage .unwrap_or_else(|| Box::new(crate::util::storage::new_storage())), - self.extensions_behavior - .unwrap_or(ExtensionsBehavior::RegisterAll), + // self.extensions_behavior + // .unwrap_or(ExtensionsBehavior::RegisterAll), ) } } diff --git a/isideload/src/sideload/bundle.rs b/isideload/src/sideload/bundle.rs index 62f9732..fdee936 100644 --- a/isideload/src/sideload/bundle.rs +++ b/isideload/src/sideload/bundle.rs @@ -10,7 +10,7 @@ use std::{ use crate::SideloadError; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Bundle { pub app_info: Dictionary, pub bundle_dir: PathBuf, @@ -134,6 +134,50 @@ impl Bundle { )?; Ok(()) } + + fn from_dylib_path(dylib_path: PathBuf) -> Self { + Self { + app_info: Dictionary::new(), + bundle_dir: dylib_path, + app_extensions: Vec::new(), + frameworks: Vec::new(), + _libraries: Vec::new(), + } + } + + fn collect_dylib_bundles(&self) -> Vec { + self._libraries + .iter() + .map(|relative| Self::from_dylib_path(self.bundle_dir.join(relative))) + .collect() + } + + fn collect_nested_bundles_into(&self, bundles: &mut Vec) { + for bundle in &self.app_extensions { + bundles.push(bundle.clone()); + bundle.collect_nested_bundles_into(bundles); + } + + for bundle in &self.frameworks { + bundles.push(bundle.clone()); + bundle.collect_nested_bundles_into(bundles); + } + } + + pub fn collect_nested_bundles(&self) -> Vec { + let mut bundles = Vec::new(); + self.collect_nested_bundles_into(&mut bundles); + bundles.extend(self.collect_dylib_bundles()); + bundles + } + + pub fn collect_bundles_sorted(&self) -> Vec { + let mut bundles = self.collect_nested_bundles(); + bundles.push(self.clone()); + bundles.sort_by_key(|b| b.bundle_dir.components().count()); + bundles.reverse(); + bundles + } } fn assert_bundle(condition: bool, msg: &str) -> Result<(), Report> { diff --git a/isideload/src/sideload/cert_identity.rs b/isideload/src/sideload/cert_identity.rs index 58b605d..c8c80be 100644 --- a/isideload/src/sideload/cert_identity.rs +++ b/isideload/src/sideload/cert_identity.rs @@ -1,3 +1,7 @@ +use apple_codesign::{ + SigningSettings, + cryptography::{InMemoryPrivateKey, PrivateKey}, +}; use hex::ToHex; use rcgen::{CertificateParams, DistinguishedName, DnType, KeyPair, PKCS_RSA_SHA256}; use rootcause::prelude::*; @@ -9,7 +13,7 @@ use rsa::{ use sha2::{Digest, Sha256}; use tracing::{error, info}; -use x509_certificate::X509Certificate; +use x509_certificate::CapturedX509Certificate; use crate::{ SideloadError, @@ -25,8 +29,9 @@ use crate::{ pub struct CertificateIdentity { pub machine_id: String, pub machine_name: String, - pub certificate: X509Certificate, + pub certificate: CapturedX509Certificate, pub private_key: RsaPrivateKey, + pub signing_key: InMemoryPrivateKey, } impl CertificateIdentity { @@ -63,7 +68,7 @@ impl CertificateIdentity { pub fn get_serial_number(&self) -> String { let serial: String = self.certificate.serial_number_asn1().encode_hex(); - serial.trim_start_matches('0').to_string() + serial.trim_start_matches('0').to_string().to_uppercase() } pub async fn retrieve( @@ -75,6 +80,7 @@ impl CertificateIdentity { max_certs_behavior: &MaxCertsBehavior, ) -> Result { let pr = Self::retrieve_private_key(apple_email, storage).await?; + let signing_key = Self::build_signing_key(&pr)?; let found = Self::find_matching(&pr, machine_name, developer_session, team).await; if let Ok(Some((cert, x509_cert))) = found { @@ -84,6 +90,7 @@ impl CertificateIdentity { machine_name: cert.machine_name.clone().unwrap_or_default(), certificate: x509_cert, private_key: pr, + signing_key, }); } @@ -107,6 +114,7 @@ impl CertificateIdentity { machine_name: cert.machine_name.clone().unwrap_or_default(), certificate: x509_cert, private_key: pr, + signing_key, }) } @@ -139,7 +147,7 @@ impl CertificateIdentity { machine_name: &str, developer_session: &mut DeveloperSession, team: &DeveloperTeam, - ) -> Result, Report> { + ) -> Result, Report> { let public_key_der = private_key .to_public_key() .to_pkcs1_der()? @@ -156,7 +164,7 @@ impl CertificateIdentity { }) { let x509_cert = - X509Certificate::from_der(cert.cert_content.as_ref().unwrap().as_ref())?; + CapturedX509Certificate::from_der(cert.cert_content.as_ref().unwrap().as_ref())?; if public_key_der == x509_cert.public_key_data().as_ref() { return Ok(Some((cert.clone(), x509_cert))); @@ -172,7 +180,7 @@ impl CertificateIdentity { developer_session: &mut DeveloperSession, team: &DeveloperTeam, max_certs_behavior: &MaxCertsBehavior, - ) -> Result<(DevelopmentCertificate, X509Certificate), Report> { + ) -> Result<(DevelopmentCertificate, CapturedX509Certificate), Report> { let csr = Self::build_csr(private_key).context("Failed to generate CSR")?; let mut i = 0; @@ -196,7 +204,7 @@ impl CertificateIdentity { report!("Failed to find certificate after submitting CSR") })?; - let x509_cert = X509Certificate::from_der( + let x509_cert = CapturedX509Certificate::from_der( apple_cert .cert_content .as_ref() @@ -264,6 +272,11 @@ impl CertificateIdentity { Ok(params.serialize_request(&subject_key)?.pem()?) } + fn build_signing_key(private_key: &RsaPrivateKey) -> Result { + let pkcs8 = private_key.to_pkcs8_der()?; + Ok(InMemoryPrivateKey::from_pkcs8_der(pkcs8.as_bytes())?) + } + async fn revoke_others( developer_session: &mut DeveloperSession, team: &DeveloperTeam, @@ -310,4 +323,18 @@ impl CertificateIdentity { } } } + + pub fn setup_signing_settings<'a>( + &'a self, + settings: &mut SigningSettings<'a>, + ) -> Result<(), Report> { + settings.set_signing_key( + self.signing_key.as_key_info_signer(), + self.certificate.clone(), + ); + settings.chain_apple_certificates(); + settings.set_team_id_from_signing_certificate(); + + Ok(()) + } } diff --git a/isideload/src/sideload/install.rs b/isideload/src/sideload/install.rs new file mode 100644 index 0000000..a9557d0 --- /dev/null +++ b/isideload/src/sideload/install.rs @@ -0,0 +1,95 @@ +use idevice::{ + IdeviceService, afc::AfcClient, installation_proxy::InstallationProxyClient, + provider::IdeviceProvider, +}; +use plist_macro::plist; +use rootcause::prelude::*; + +use crate::SideloadError as Error; +use std::pin::Pin; +use std::{future::Future, path::Path}; + +/// Installs an ***already signed*** app onto your device. +/// To sign and install an app, see [`crate::sideload::sideload_app`] +pub async fn install_app( + provider: &impl IdeviceProvider, + app_path: &Path, + progress_callback: impl Fn(u64), +) -> Result<(), Report> { + let mut afc_client = AfcClient::connect(provider) + .await + .map_err(Error::IdeviceError)?; + + let dir = format!( + "PublicStaging/{}", + app_path.file_name().unwrap().to_string_lossy() + ); + afc_upload_dir(&mut afc_client, app_path, &dir).await?; + + let mut instproxy_client = InstallationProxyClient::connect(provider) + .await + .map_err(Error::IdeviceError)?; + + let options = plist!(dict { + "PackageType": "Developer" + }); + + instproxy_client + .install_with_callback( + dir, + Some(plist::Value::Dictionary(options)), + async |(percentage, _)| { + progress_callback(percentage); + }, + (), + ) + .await + .map_err(Error::IdeviceError)?; + + Ok(()) +} + +fn afc_upload_dir<'a>( + afc_client: &'a mut AfcClient, + path: &'a Path, + afc_path: &'a str, +) -> Pin> + Send + 'a>> { + Box::pin(async move { + let entries = std::fs::read_dir(path)?; + afc_client + .mk_dir(afc_path) + .await + .map_err(Error::IdeviceError)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + if path.is_dir() { + let new_afc_path = format!( + "{}/{}", + afc_path, + path.file_name().unwrap().to_string_lossy() + ); + afc_upload_dir(afc_client, &path, &new_afc_path).await?; + } else { + let mut file_handle = afc_client + .open( + format!( + "{}/{}", + afc_path, + path.file_name().unwrap().to_string_lossy() + ), + idevice::afc::opcode::AfcFopenMode::WrOnly, + ) + .await + .map_err(Error::IdeviceError)?; + let bytes = std::fs::read(&path)?; + file_handle + .write_entire(&bytes) + .await + .map_err(Error::IdeviceError)?; + file_handle.close().await.map_err(Error::IdeviceError)?; + } + } + Ok(()) + }) +} diff --git a/isideload/src/sideload/mod.rs b/isideload/src/sideload/mod.rs index c194dc1..d0258ed 100644 --- a/isideload/src/sideload/mod.rs +++ b/isideload/src/sideload/mod.rs @@ -2,5 +2,7 @@ pub mod application; pub mod builder; pub mod bundle; pub mod cert_identity; +#[cfg(feature = "install")] +pub mod install; pub mod sideloader; pub use builder::{SideloaderBuilder, TeamSelection}; diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index f8ded2a..377ecf8 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -9,16 +9,19 @@ use crate::{ sideload::{ TeamSelection, application::{Application, SpecialApp}, - builder::{ExtensionsBehavior, MaxCertsBehavior}, + builder::MaxCertsBehavior, cert_identity::CertificateIdentity, }, - util::{device::IdeviceInfo, storage::SideloadingStorage}, + util::{device::IdeviceInfo, plist::PlistDataExtract, storage::SideloadingStorage}, }; use std::path::PathBuf; +use apple_codesign::{SigningSettings, UnifiedSigner}; use idevice::provider::IdeviceProvider; -use rootcause::prelude::*; +use plist::Dictionary; +use plist_macro::plist_to_xml_string; +use rootcause::{option_ext::OptionExt, prelude::*}; use tracing::info; pub struct Sideloader { @@ -28,7 +31,7 @@ pub struct Sideloader { machine_name: String, apple_email: String, max_certs_behavior: MaxCertsBehavior, - extensions_behavior: ExtensionsBehavior, + //extensions_behavior: ExtensionsBehavior, } impl Sideloader { @@ -42,7 +45,7 @@ impl Sideloader { max_certs_behavior: MaxCertsBehavior, machine_name: String, storage: Box, - extensions_behavior: ExtensionsBehavior, + //extensions_behavior: ExtensionsBehavior, ) -> Self { Sideloader { team_selection, @@ -51,24 +54,20 @@ impl Sideloader { machine_name, apple_email, max_certs_behavior, - extensions_behavior, + //extensions_behavior, } } /// Sign and install an app - pub async fn install_app( + pub async fn sign_app( &mut self, - device_provider: &impl IdeviceProvider, app_path: PathBuf, - ) -> Result<(), Report> { - let device_info = IdeviceInfo::from_device(device_provider).await?; - - let team = self.get_team().await?; - - self.dev_session - .ensure_device_registered(&team, &device_info.name, &device_info.udid, None) - .await?; - + team: Option, + ) -> Result { + let team = match team { + Some(t) => t, + None => self.get_team().await?, + }; let cert_identity = CertificateIdentity::retrieve( &self.machine_name, &self.apple_email, @@ -87,7 +86,10 @@ impl Sideloader { let main_app_id_str = format!("{}.{}", main_bundle_id, team.team_id); app.update_bundle_id(&main_bundle_id, &main_app_id_str)?; let mut app_ids = app - .register_app_ids(&self.extensions_behavior, &mut self.dev_session, &team) + .register_app_ids( + /*&self.extensions_behavior, */ &mut self.dev_session, + &team, + ) .await?; let main_app_id = match app_ids .iter() @@ -130,7 +132,8 @@ impl Sideloader { } app.apply_special_app_behavior(&special, &group_identifier, &cert_identity) - .await?; + .await + .context("Failed to modify app bundle")?; let provisioning_profile = self .dev_session @@ -145,9 +148,67 @@ impl Sideloader { ext.write_info()?; } - Ok(()) + tokio::fs::write( + app.bundle.bundle_dir.join("embedded.mobileprovision"), + provisioning_profile.encoded_profile.as_ref(), + ) + .await?; + + let mut settings = Self::signing_settings(&cert_identity)?; + let entitlements: Dictionary = Self::entitlements_from_prov( + provisioning_profile.encoded_profile.as_ref(), + &special, + &team, + )?; + + settings + .set_entitlements_xml( + apple_codesign::SettingsScope::Main, + plist_to_xml_string(&entitlements), + ) + .context("Failed to set entitlements XML")?; + let signer = UnifiedSigner::new(settings); + + for bundle in app.bundle.collect_bundles_sorted() { + info!("Signing bundle {}", bundle.bundle_dir.display()); + signer + .sign_path_in_place(&bundle.bundle_dir) + .context(format!( + "Failed to sign bundle: {}", + bundle.bundle_dir.display() + ))?; + } + + info!("App signed!"); + + Ok(app.bundle.bundle_dir.clone()) } + #[cfg(feature = "install")] + pub async fn install_app( + &mut self, + device_provider: &impl IdeviceProvider, + app_path: PathBuf, + ) -> Result<(), Report> { + let device_info = IdeviceInfo::from_device(device_provider).await?; + + let team = self.get_team().await?; + self.dev_session + .ensure_device_registered(&team, &device_info.name, &device_info.udid, None) + .await?; + + let signed_app_path = self.sign_app(app_path, Some(team)).await?; + + info!("Installing..."); + + crate::sideload::install::install_app(device_provider, &signed_app_path, |progress| { + info!("Installing: {}%", progress); + }) + .await + .context("Failed to install app on device")?; + + Ok(()) + } /// Get the developer team according to the configured team selection behavior pub async fn get_team(&mut self) -> Result { let teams = self.dev_session.list_teams().await?; @@ -175,4 +236,64 @@ impl Sideloader { } }) } + + pub fn signing_settings<'a>( + cert: &'a CertificateIdentity, + ) -> Result, Report> { + let mut settings = SigningSettings::default(); + + cert.setup_signing_settings(&mut settings)?; + settings.set_for_notarization(false); + settings.set_shallow(true); + + Ok(settings) + } + + fn entitlements_from_prov( + data: &[u8], + special: &Option, + team: &DeveloperTeam, + ) -> Result { + let start = data + .windows(6) + .position(|w| w == b"") + .ok_or_report()? + + 8; + let plist_data = &data[start..end]; + let plist = plist::Value::from_reader_xml(plist_data)?; + + let mut entitlements = plist + .as_dictionary() + .ok_or_report()? + .get_dict("Entitlements")? + .clone(); + + if matches!( + special, + Some(SpecialApp::SideStoreLc) | Some(SpecialApp::LiveContainer) + ) { + let mut keychain_access = vec![plist::Value::String(format!( + "{}.com.kdt.livecontainer.shared", + team.team_id + ))]; + + for number in 1..128 { + keychain_access.push(plist::Value::String(format!( + "{}.com.kdt.livecontainer.shared.{}", + team.team_id, number + ))); + } + + entitlements.insert( + "keychain-access-groups".to_string(), + plist::Value::Array(keychain_access), + ); + } + + Ok(entitlements) + } }