feat: update patch manager to check signature on boot (#171)

* feat: store patch signature on disk with patch metadata

* add note about explicit lifetime

* fix tests

* feat: update patch manager to check signature on boot

* remove unused imports

* fix tests

* add log when no public key detected

* clean up log message

* pr feedback

* rename test

* rename tests null -> none

* change signature field name to hash_signature

* Add comment

* update print statements for clearer device logs

* fix test

* improve docs

* cleanup of signing error handling
This commit is contained in:
Bryan Oltman
2024-05-23 14:41:02 -04:00
committed by GitHub
parent 908e231539
commit 390aa49cba
9 changed files with 422 additions and 87 deletions
Generated
+14 -5
View File
@@ -107,6 +107,12 @@ version = "0.21.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
[[package]]
name = "base64"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "bidiff"
version = "1.0.0"
@@ -1220,7 +1226,7 @@ version = "0.11.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
dependencies = [
"base64",
"base64 0.21.5",
"bytes",
"encoding_rs",
"futures-core",
@@ -1256,16 +1262,17 @@ dependencies = [
[[package]]
name = "ring"
version = "0.17.7"
version = "0.17.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74"
checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
dependencies = [
"cc",
"cfg-if",
"getrandom",
"libc",
"spin",
"untrusted",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -1305,7 +1312,7 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
dependencies = [
"base64",
"base64 0.21.5",
]
[[package]]
@@ -1755,6 +1762,7 @@ version = "0.1.0"
dependencies = [
"android_logger",
"anyhow",
"base64 0.22.1",
"bipatch",
"cbindgen",
"comde",
@@ -1770,6 +1778,7 @@ dependencies = [
"oslog",
"pipe",
"reqwest",
"ring",
"serde",
"serde_json",
"serde_yaml",