blackbox icon indicating copy to clipboard operation
blackbox copied to clipboard

When using blackbox_addadmin, if the key addition fails, key name still shows in blackbox-admins.txt

Open PeterGrace opened this issue 10 years ago • 3 comments

I ran blackbox_addadmin key.asc thinking I could do that to insert a public key. This failed, but, it still put key.asc in the blackbox-admins.txt file. This causes all further operations to fail because there is no key in the keyring with the name key.asc.

PeterGrace avatar Apr 20 '15 19:04 PeterGrace

Do you have a suggestion of how to check to see if a string is a GPG key name (in bash)?

tlimoncelli avatar Jul 24 '15 14:07 tlimoncelli

Instead of seeing if it's a GPG key via GPG, maybe see if its a public key that was passed?

[ -f $FILE ] && head -n 1 $FILE | grep -q 'PUBLIC KEY' && echo "is public key"

ghost avatar Jul 24 '15 18:07 ghost

The easiest way to fix this would just be to add the key to blackbox-admins.txt AFTER adding it to the keyring via gpg.

jvanasco avatar Apr 25 '16 21:04 jvanasco