edit in pijul-remote/src/lib.rs at line 72
replacement in pijul-remote/src/lib.rs at line 109
[18.1222]→[18.1222:1257](∅→∅) − .decrypt(&identity.name)?;
+ .decrypt(&identity.name, use_keyring)?;
replacement in pijul-identity/src/repair.rs at line 42
[6.3347]→[19.338:399](∅→∅) − pub async fn fix_identities() -> Result<(), anyhow::Error> {
+ pub async fn fix_identities(use_keyring: bool) -> Result<(), anyhow::Error> {
replacement in pijul-identity/src/repair.rs at line 53
[6.3880]→[8.365:426](∅→∅) − let extraction_result = Complete::from_old_format();
+ let extraction_result = Complete::from_old_format(use_keyring);
replacement in pijul-identity/src/repair.rs at line 63
[6.4220]→[19.400:458](∅→∅) − old_identity.clone().create(true).await?;
+ old_identity.clone().create(true, use_keyring).await?;
replacement in pijul-identity/src/repair.rs at line 89
[6.6256]→[19.459:525](∅→∅) − Complete::default()?.create(true).await?;
+ Complete::default()?.create(true, use_keyring).await?;
replacement in pijul-identity/src/repair.rs at line 101
[6.6618]→[6.6618:6650](∅→∅) − identity.valid_keys()?;
+ identity.valid_keys(use_keyring)?;
replacement in pijul-identity/src/repair.rs at line 109
[6.6735]→[6.6735:6793](∅→∅) − fn valid_keys(&self) -> Result<bool, anyhow::Error> {
+ fn valid_keys(&self, use_keyring: bool) -> Result<bool, anyhow::Error> {
replacement in pijul-identity/src/repair.rs at line 111
− let decryped_public_key = self.decrypt()?.0.public_key();
+ let decryped_public_key = self.decrypt(use_keyring)?.0.public_key();
replacement in pijul-identity/src/repair.rs at line 173
[6.9995]→[8.1053:1116](∅→∅) − fn from_old_format() -> Result<Self, IdentityParseError> {
+ fn from_old_format(use_keyring: bool) -> Result<Self, IdentityParseError> {
replacement in pijul-identity/src/repair.rs at line 295
[6.15446]→[6.15446:15482](∅→∅) − if identity.valid_keys()? {
+ if identity.valid_keys(use_keyring)? {
replacement in pijul-identity/src/load.rs at line 68
[6.24577]→[19.526:597](∅→∅) − pub async fn choose_identity_name() -> Result<String, anyhow::Error> {
+ pub async fn choose_identity_name(use_keyring: bool) -> Result<String, anyhow::Error> {
replacement in pijul-identity/src/load.rs at line 75
[6.24848]→[19.598:631](∅→∅) − fix_identities().await?;
+ fix_identities(use_keyring).await?;
replacement in pijul-identity/src/lib.rs at line 114
[8.3255]→[8.3255:3348](∅→∅) − pub fn decrypt(&mut self, name: &str) -> Result<(SKey, Option<String>), anyhow::Error> {
+ pub fn decrypt(
+ &mut self,
+ name: &str,
+ use_keyring: bool,
+ ) -> Result<(SKey, Option<String>), anyhow::Error> {
replacement in pijul-identity/src/lib.rs at line 136
[8.4106]→[14.683:797](∅→∅),
[14.797]→[21.2:2](∅→∅),
[21.2]→[8.4192:4237](∅→∅),
[15.140]→[8.4192:4237](∅→∅),
[12.382]→[8.4192:4237](∅→∅),
[14.797]→[8.4192:4237](∅→∅),
[8.4192]→[8.4192:4237](∅→∅) − if let Ok(password) = keyring::Entry::new("pijul", name).and_then(|x| x.get_password())
− {
−
− password_attempt = password;
+ if use_keyring {
+ if let Ok(password) =
+ keyring::Entry::new("pijul", name).and_then(|x| x.get_password())
+ {
+ password_attempt = password;
+ }
replacement in pijul-identity/src/lib.rs at line 261
[8.6972]→[8.6972:7111](∅→∅) − pub fn decrypt(&self) -> Result<(SKey, Option<String>), anyhow::Error> {
− self.credentials.clone().unwrap().decrypt(&self.name)
+ pub fn decrypt(&self, use_keyring: bool) -> Result<(SKey, Option<String>), anyhow::Error> {
+ self.credentials
+ .clone()
+ .unwrap()
+ .decrypt(&self.name, use_keyring)
replacement in pijul-identity/src/lib.rs at line 268
[8.7118]→[8.7118:7232](∅→∅) − fn change_password(&mut self) -> Result<(), anyhow::Error> {
− let (decryped_key, _) = self.decrypt()?;
+ fn change_password(&mut self, use_keyring: bool) -> Result<(), anyhow::Error> {
+ let (decryped_key, _) = self.decrypt(use_keyring)?;
edit in pijul-identity/src/create.rs at line 23
replacement in pijul-identity/src/create.rs at line 96
[8.10379]→[8.10379:10424](∅→∅) − new_identity.change_password()?;
+ new_identity.change_password(use_keyring)?;
replacement in pijul-identity/src/create.rs at line 269
[6.38529]→[19.632:713](∅→∅) − pub async fn create(&self, link_remote: bool) -> Result<(), anyhow::Error> {
+ pub async fn create(&self, link_remote: bool, use_keyring: bool) -> Result<(), anyhow::Error> {
replacement in pijul-identity/src/create.rs at line 271
[8.14076]→[19.714:794](∅→∅) − let confirmed_identity = self.prompt_changes(None, link_remote).await?;
+ let confirmed_identity = self.prompt_changes(None, link_remote, use_keyring).await?;
edit in pijul/src/commands/tag.rs at line 43
+ #[clap(long = "no-keyring")]
+ no_keyring: bool,
edit in pijul/src/commands/tag.rs at line 87
replacement in pijul/src/commands/tag.rs at line 114
− let header = header(author.as_deref(), message, timestamp).await?;
+ let header = header(author.as_deref(), message, timestamp, !no_keyring).await?;
edit in pijul/src/commands/tag.rs at line 241
replacement in pijul/src/commands/tag.rs at line 249
[16.788]→[20.157:250](∅→∅) − let k = pijul_identity::public_key(&pijul_identity::choose_identity_name().await?)?;
+ let k =
+ pijul_identity::public_key(&pijul_identity::choose_identity_name(use_keyring).await?)?;
edit in pijul/src/commands/record.rs at line 60
+ /// Use Histogram diff algorithm instead of the default
+ #[clap(long = "no-keyring")]
+ pub no_keyring: bool,
replacement in pijul/src/commands/record.rs at line 143
− let complete =
− pijul_identity::Complete::load(&pijul_identity::choose_identity_name().await?)?;
+ let complete = pijul_identity::Complete::load(
+ &pijul_identity::choose_identity_name(!self.no_keyring).await?,
+ )?;
replacement in pijul/src/commands/record.rs at line 147
[21.169]→[21.169:216](∅→∅) − let (secret, _) = complete.decrypt()?;
+ let (secret, _) = complete.decrypt(!self.no_keyring)?;
replacement in pijul/src/commands/record.rs at line 219
[21.387]→[21.387:462](∅→∅) − .unwrap_or(pijul_identity::choose_identity_name().await?);
+ .unwrap_or(pijul_identity::choose_identity_name(!self.no_keyring).await?);
edit in pijul/src/commands/identity.rs at line 105
+ /// Disable the use of the system keyring.
+ #[clap(long = "no-keyring")]
+ pub no_keyring: bool,
edit in pijul/src/commands/identity.rs at line 152
+ /// Disable the use of the system keyring.
+ #[clap(long = "no-keyring")]
+ pub no_keyring: bool,
replacement in pijul/src/commands/identity.rs at line 163
[6.46167]→[19.1067:1079](∅→∅) + Repair { no_keyring: bool },
edit in pijul/src/commands/identity.rs at line 171
+ /// Disable the use of the system keyring
+ no_keyring: bool,
edit in pijul/src/commands/identity.rs at line 187
+ /// Disable the use of the system keyring.
+ #[clap(long = "no-keyring")]
+ no_keyring: bool,
replacement in pijul/src/commands/identity.rs at line 264
[6.49307]→[19.1080:1138](∅→∅) − identity.create(!options.no_link).await?;
+ identity
+ .create(!options.no_link, !options.no_keyring)
+ .await?;
replacement in pijul/src/commands/identity.rs at line 268
[18.1972]→[18.1972:2063](∅→∅) − if let Err(_) = remote::prove(&identity, None, self.no_cert_check).await {
+ if let Err(_) =
+ remote::prove(&identity, None, self.no_cert_check, !options.no_keyring).await
+ {
replacement in pijul/src/commands/identity.rs at line 279
[6.49398]→[19.1139:1198](∅→∅) − SubCommand::Repair => fix_identities().await?,
+ SubCommand::Repair { no_keyring } => fix_identities(!no_keyring).await?,
edit in pijul/src/commands/identity.rs at line 283
replacement in pijul/src/commands/identity.rs at line 285
[6.49589]→[19.1199:1292](∅→∅) − let identity_name = &identity_name.unwrap_or(choose_identity_name().await?);
+ let identity_name =
+ &identity_name.unwrap_or(choose_identity_name(!no_keyring).await?);
replacement in pijul/src/commands/identity.rs at line 288
[18.2726]→[18.2726:2821](∅→∅) − remote::prove(&loaded_identity, server.as_deref(), self.no_cert_check).await?;
+ remote::prove(
+ &loaded_identity,
+ server.as_deref(),
+ self.no_cert_check,
+ !no_keyring,
+ )
+ .await?;
replacement in pijul/src/commands/identity.rs at line 409
[6.54509]→[19.1293:1343](∅→∅) − choose_identity_name().await?
+ choose_identity_name(!options.no_keyring).await?
replacement in pijul/src/commands/identity.rs at line 429
[9.1054]→[17.2866:2957](∅→∅) − .prompt_changes(Some(old_identity.name.clone()), !options.no_link)
+ .prompt_changes(
+ Some(old_identity.name.clone()),
+ !options.no_link,
+ !options.no_keyring,
+ )
replacement in pijul/src/commands/identity.rs at line 446
[18.3260]→[18.3260:3393](∅→∅) − let prove_result =
− remote::prove(&new_identity, None, self.no_cert_check).await;
+ let prove_result = remote::prove(
+ &new_identity,
+ None,
+ self.no_cert_check,
+ !options.no_keyring,
+ )
+ .await;
edit in pijul/src/commands/identity.rs at line 470
replacement in pijul/src/commands/identity.rs at line 478
[11.176]→[19.1344:1469](∅→∅) − let identity =
− Complete::load(&identity_name.unwrap_or(choose_identity_name().await?))?;
+ let identity = Complete::load(
+ &identity_name.unwrap_or(choose_identity_name(!no_keyring).await?),
+ )?;