Prune commentary and stale Rust port notes
This commit is contained in:
1 parent
5428cd75c9
commit
25370731d0
193 files changed
+693
-16219
No files matched your search
@@ -1,9 +1,3 @@
|
||||
//! The signing key. Mirrors `app/build-apk.sh`'s exact logic for the
|
||||
//! release key -- same env vars, same path, same generation recipe -- so
|
||||
//! the two tools sign with the *same* key and their outputs can
|
||||
//! `adb install -r` over each other. That is the whole point of E5's pass
|
||||
//! condition: the key has to be identical, not merely present.
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
@@ -15,10 +9,6 @@ pub struct Signer {
|
||||
pub alias: String,
|
||||
}
|
||||
|
||||
/// The release key at `$AI_APP_KEYSTORE` or
|
||||
/// `$XDG_CONFIG_HOME/ai-app/release.jks` (`~/.config/ai-app/release.jks` by
|
||||
/// default) -- generated with `keytool` if it doesn't exist yet, exactly as
|
||||
/// `build-apk.sh` does, so either tool can run first on a fresh machine.
|
||||
pub fn release_signer() -> Result<Signer, Fail> {
|
||||
let keystore = std::env::var_os("AI_APP_KEYSTORE")
|
||||
.map(PathBuf::from)
|
||||
@@ -188,9 +178,6 @@ fn which_keytool() -> Result<PathBuf, Fail> {
|
||||
}
|
||||
|
||||
fn random_password() -> String {
|
||||
// No dependency on `rand`: /dev/urandom is what build-apk.sh's `head -c
|
||||
// 24 /dev/urandom | base64` reads too, so this reproduces exactly the
|
||||
// same recipe without shelling out to head/base64/tr for it.
|
||||
let mut bytes = [0u8; 24];
|
||||
std::fs::File::open("/dev/urandom")
|
||||
.and_then(|mut f| std::io::Read::read_exact(&mut f, &mut bytes))
|
||||
|
||||
Reference in new issue
Block a user