| |
|
| |
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.",
|