Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Seahorse + PGP keys woes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 189

PostPosted: Wed Apr 29, 2020 3:54 pm    Post subject: Seahorse + PGP keys woes Reply with quote

First off, let me vent: Seahorse is hot garbage. Aside from the issue I'm about to outline, it also does things like crash when you try to generate a GPG key without a password and I'm sure I'd be able to find more things if I looked hard enough. On top of that, it (seemingly) ignores the ${GNUPGHOME} env var and has the path hardcoded to ~/.gnupg, meaning I have to leave the folder cluttering up my ~.

Back to business: Importing keys fails with no GUI error message. Running it in the terminal with debug on gave me a bit of a clue:
Code:
$ LANG=C G_MESSAGES_DEBUG=all seahorse
[snip]
(seahorse:11343): Gcr-DEBUG: 17:09:20.365: starting initialize of registered modules
(seahorse:11343): Gcr-DEBUG: 17:09:20.372: completed initialize of registered modules
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: initialized library
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: initialized library
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: parsing line pub:o:3072:1:6A830538F4508BE6:1588167825:::o:::scSCE:
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: parsing line fpr:::::::::6C8E13380EFA6F72FF6B16BE6A830538F4508BE6:
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: parsing line uid:o::::1588168361::DBAFA38A1E37E254749A4CD3790AA7E0E677A75C::REDACTED_NAME <REDACTED_EMAIL>:
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: parsing line sig:::1:6A830538F4508BE6:1588168361:::::13x:
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: parsing line sub:o:3072:1:5CDD267C14BBC652:1588167827::::::e:
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: parsing line sig:::1:6A830538F4508BE6:1588168362:::::18x:
(seahorse:11343): Gcr-DEBUG: 17:09:20.373: parsing line
(seahorse:11343): Gcr-DEBUG: 17:09:20.374: initialized library
(seahorse:11343): Gcr-DEBUG: 17:09:20.374: initialized library
(seahorse:11343): Gcr-DEBUG: 17:09:20.375: looking for importer for: (2) [ { CKA_CLASS = 0xC7435200 }, { CKA_VALUE =  (350) NOT-PRINTED } ]
(seahorse:11343): Gcr-DEBUG: 17:09:20.375: importer GcrPkcs11Importer didn't match: (2) [ { CKA_CLASS = CKO_CERTIFICATE }, { CKA_CERTIFICATE_TYPE = CKC_X_509 } ]
(seahorse:11343): Gcr-DEBUG: 17:09:20.375: importer GcrPkcs11Importer didn't match: (1) [ { CKA_CLASS = CKO_PRIVATE_KEY } ]
(seahorse:11343): Gcr-DEBUG: 17:09:20.375: importer GcrGnupgImporter matched: (1) [ { CKA_CLASS = 0xC7435200 } ]
(seahorse:11343): Gcr-DEBUG: 17:09:21.616: running command: /usr/bin/gpg --status-fd 24 --import
(seahorse:11343): Gcr-DEBUG: 17:09:21.616: process environment: LOCALE=C
(seahorse:11343): GLib-DEBUG: 17:09:21.616: posix_spawn avoided (fd close requested) (child_setup specified)
(seahorse:11343): Gcr-DEBUG: 17:09:21.617: closing fd: 24
(seahorse:11343): Gcr-DEBUG: 17:09:21.617: process started: 11434
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: process cancelled
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: sending term signal to process: 11434

(seahorse:11343): Gcr-WARNING **: 17:09:21.620: couldn't write output data to gnupg process
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: closing fd: 26
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: closing fd: 18
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: closing fd: 27
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: received error line:
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: received error line: gpg: signal Terminated caught ... exiting
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: closing fd: 29
(seahorse:11343): Gcr-DEBUG: 17:09:21.620: process exited: 11434
(seahorse:11343): Gcr-DEBUG: 17:09:21.621: all fds closed and process exited, completing
(seahorse:11343): Gcr-DEBUG: 17:09:21.621: completed process with error: The operation was cancelled
[snip]

Trying to run the command that Seahorse is trying results in a failure:
Code:
$ /usr/bin/gpg --status-fd 18 --import /path/to/key.asc
gpg: Fatal: status-fd is invalid: Bad file descriptor


Versions of packages:
app-crypt/seahorse-3.32.2
app-crypt/gnupg-2.2.19
app-crypt/gpgme-1.13.0-r1

Let me add that I use Evolution because of evolution-ews and can't use Thunderbird and Enigmail's key manager (which actually works); I need to connect to an Exchange server and authenticate with OAuth2 and I'm not keen on paying a subscription for an addon just to access my work email. Any tips are appreciated.


EDIT: Tested on Ubuntu 19.10, same result when trying to import the key (although when trying to generate a GPG key with an empty passphrase, it at least throws a "General error" in the GUI) so it's not a Gentoo-specific (or my-install-specific) bug:
Code:
me@ubuntu:~$ seahorse --version
seahorse 3.32.2
GNUPG: /usr/bin/gpg (2.2.12)

_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum