diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-03-27 09:51:11 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-03-27 09:51:11 +0000 |
commit | 3b2e8a7328f00b217c72a5e479b50ebc0ab507d9 (patch) | |
tree | a9001479cb9366f0021cee53126cc99418437041 | |
parent | 03838fd2c82a1705de26f4396eee774c9d46b5b7 (diff) | |
download | obnam-3b2e8a7328f00b217c72a5e479b50ebc0ab507d9.tar.gz |
Separate adding to share and owner steps
-rw-r--r-- | yarns/0060-encryption.yarn | 6 | ||||
-rw-r--r-- | yarns/9000-implements.yarn | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/yarns/0060-encryption.yarn b/yarns/0060-encryption.yarn index 454e48a0..f0a95ced 100644 --- a/yarns/0060-encryption.yarn +++ b/yarns/0060-encryption.yarn @@ -74,7 +74,7 @@ only the first client's key, meaning the second client has no access to the client list, and thus can't add itself. WHEN user U1 imports public key "Test Key Two" from test-data/keyring-2 - AND user U1 adds key "Test Key Two" to repository R + AND user U1 adds key "Test Key Two" to repository R only Then we make a backup as the second client. @@ -133,7 +133,7 @@ First, backup using the old key. Then, replace the old key with the new one and get rid of the old key. GIVEN user U uses encryption key "Test Key Two" from test-data/keyring-2 - WHEN user U adds key "Test Key Two" to repository R + WHEN user U adds key "Test Key Two" to repository R and self AND user U removes key "Test Key One" from repository R WHEN user U no longer has key "Test Key One" @@ -169,6 +169,6 @@ remain. WHEN user U1 backs up directory L to repository R THEN user U1 uses key "Test Key One" in repository R WHEN user U1 imports public key "Test Key Two" from test-data/keyring-2 - AND user U1 adds key "Test Key Two" to repository R + AND user U1 adds key "Test Key Two" to repository R only AND user U2 removes user U1 from repository R THEN user U2 can't see user U1 in repository R diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 108795fc..364c6bb9 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -397,9 +397,16 @@ Import a key into one user's keyring from another keyring. GNUPGHOME="$SRCDIR/$MATCH_3" gpg --export --armor "$MATCH_2" | GNUPGHOME="$DATADIR/$MATCH_1.gnupg" gpg --import -Add a public key to a repository. +Add a public key to a repository, but not to the calling user, only to +the shared parts. - IMPLEMENTS WHEN user (\S+) adds key "(.+)" to repository (\S+) + IMPLEMENTS WHEN user (\S+) adds key "(.+)" to repository (\S+) only + run_obnam "$MATCH_1" -r "$DATADIR/$MATCH_3" \ + add-key --keyid "$MATCH_2" + +Add a public key to a repository, and the calling user. + + IMPLEMENTS WHEN user (\S+) adds key "(.+)" to repository (\S+) and self run_obnam "$MATCH_1" -r "$DATADIR/$MATCH_3" \ add-key --keyid "$MATCH_2" "$MATCH_1" |