Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: comment and questions about fingerprint
Fintan Halpenny committed 8 months ago
commit 8fcabd244dc2f70790d0d279a273f41d0853f746
parent cac7d4d81bc5547b085f5dd8b5168a103d43967f
1 file changed +13 -0
modified crates/radicle-node/src/main.rs
@@ -142,6 +142,19 @@ fn execute() -> anyhow::Result<()> {

    match Fingerprint::read(&home)? {
        Some(fp) => {
+
            // REVIEW: Just to make sure I'm clear on the behaviour here, this
+
            // will ensure that the Radicle home in use only ever matches one
+
            // secret key, correct?
+
            //
+
            // That is, we're allowing you to move or start with a secret key
+
            // file somewhere else other than `.radicle/keys`, but then
+
            // `.radicle/fingerprint` will always have to match this.
+
            //
+
            // If this is the case, some questions:
+
            //  1. Should we make the below error more explicit about the
+
            //  configured secret path, if any, mismatching?
+
            //  2. What happens if I delete the fingerprint, and start with a
+
            //  different key?
            if fp.verify(&keystore, passphrase.as_ref())? != FingerprintVerification::Match {
                anyhow::bail!(
                    "Fingerprint mismatch. Expected '{}' to have fingerprint '{}', which is not the case. Refusing operation.",