[pass] [PATCH] reencrypt_path(): handle encrypting main pubkey
Quentin Minster
quentin at minster.io
Mon Mar 14 00:34:06 CET 2016
Hi there,
Attached is a small patch to handle the 'encrypt' capability on the main
public key instead of on a subkey, when assigning $gpg_keys in function
reencrypt_path().
The subkey case looks like this:
sub:u:2048:1:2EE5CDCE9B368A49:1398223729::::::e::::::
The main pubkey case like this:
pub:u:1024:1:BF619D0D554BAA78:1457908470:::u:::escaESCA:::::::
I've also attached a patch for the test suite, BUT it's only for
consistency (of the regexp) and does not actually test the encrypting
main pubkey case. This would need either adding a sixth test key or
replacing an existing key with 'encrypt' on the main pubkey.
Such a key can be created thusly (with GnuPG 2.1):
gpg2 --batch --gen-key <<- EOF
%no-protection
%transient-key
Key-Type: RSA
Key-Length: 1024
Name-Real: test-key
Name-Comment: DO NOT USE
Name-Email: test-key at example.org
EOF
Please review, and tell me whether that's fit for inclusion or what I
can do to improve/fix it. :)
Thanks,
--
Quentin Minster
GPG Public Key : 0F5F912C
GPG Fingerprint : AA09 29D0 263B E9D6 C260 BDC5 FF79 BF27 0F5F 912C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Handle-encrypt-capability-on-the-main-public-key.patch
Type: text/x-diff
Size: 1407 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160314/f3afdce2/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Update-test-t0300-s-key-regexp.patch
Type: text/x-diff
Size: 1191 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160314/f3afdce2/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160314/f3afdce2/attachment.asc>
More information about the Password-Store
mailing list