gpgme: Support import options
Closed, ResolvedPublic

Assigned To
Authored By
• ikloecker
Jun 12 2024, 9:06 AM
Tags
Subscribers

Description

gpgme needs to allow setting import options for import operations, so that Kleopatra can disable the import of secret keys retrieved via WKD.

Event Timeline

• ikloecker created this task.
• ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
• ikloecker renamed this task from gpgme: Support no-seckeys import option to gpgme: Support import options.Jun 12 2024, 10:53 AM
• ikloecker updated the task description. (Show Details)
• ikloecker changed the task status from Open to Testing.Jun 12 2024, 11:02 AM
• ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

This should probably be tested with T7150.

Trying to import a secret key with the run-import test program I get

./run-import --verbose --import-options only-pubkeys ted.tester-sec.asc 
reading file `ted.tester-sec.asc'
key import summary:
        considered: 1
        no user id: 0
          imported: 0
      imported_rsa: 0
         unchanged: 0
      new user ids: 0
       new subkeys: 0
    new signatures: 0
   new revocations: 0
       secret read: 1
   secret imported: 0
  secret unchanged: 0
  skipped new keys: 0
      not imported: 0
   skipped v3 keys: 0

Diagnostic output:
gpg: importing secret keys not allowed
gpg: Total number processed: 1
gpg:       secret keys read: 1

Note: The actual name of the import option may change. Originally, we wanted to use "no-seckeys", but that turned out to be not that easy (see https://dev.gnupg.org/T7146#187045). I changed the option to "only-pubkeys", but only in my local development build.

• werner moved this task from Backlog to gpgme 1.24.x on the gpgme board.
• werner edited projects, added gpgme (gpgme 1.24.x); removed gpgme.
• werner moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.