Page MenuHome GnuPG

gpg: factor out secret key deletion function
Needs ReviewPublic

Authored by matheusmoreira on Apr 30 2019, 3:17 PM.
This revision needs review, but there are no reviewers specified.

Details

Summary
  • g10/delkey.c (agent_delete_secret_key): New.

(do_delete_key): Use the new secret key deletion function.

The new key deletion function asks the gpg agent to delete
the secret key associated with the specified public key.
It returns GPG_ERR_NO_SECKEY if there is no secret key
associated with the given public key.

Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>

Test Plan

There should be no change in the behavior of --delete-secret-key following this change.

Diff Detail

Repository
rG GnuPG
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

matheusmoreira retitled this revision from gpg: factor out function that deletes secret keys to Factor out secret key deletion function.Apr 30 2019, 3:20 PM
matheusmoreira retitled this revision from Factor out secret key deletion function to gpg: avoid deletion of keys not specified by user.
matheusmoreira edited the summary of this revision. (Show Details)

Fix missing curly brace.

matheusmoreira retitled this revision from gpg: avoid deletion of keys not specified by user to gpg: factor out function that deletes secret keys.May 2 2019, 3:43 AM
matheusmoreira edited the summary of this revision. (Show Details)
matheusmoreira retitled this revision from gpg: factor out function that deletes secret keys to gpg: factor out secret key deletion function.May 2 2019, 4:09 AM
matheusmoreira edited the summary of this revision. (Show Details)

Remove gpg_ prefix from function.