docs: python bindings howto
* Added section on revoking UIDs.
This commit is contained in:
parent
56bbfd39ac
commit
d65864989c
@ -1214,6 +1214,12 @@
|
|||||||
:CUSTOM_ID: keygen-uids
|
:CUSTOM_ID: keygen-uids
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
|
|
||||||
|
*** Adding User IDs
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: keygen-uids-add
|
||||||
|
:END:
|
||||||
|
|
||||||
By comparison to creating primary keys and subkeys, adding a new
|
By comparison to creating primary keys and subkeys, adding a new
|
||||||
user ID to an existing key is much simpler. The method used to do
|
user ID to an existing key is much simpler. The method used to do
|
||||||
this is =key_add_uid= and the only arguments it takes are for the
|
this is =key_add_uid= and the only arguments it takes are for the
|
||||||
@ -1248,6 +1254,28 @@
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
*** Revokinging User IDs
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: keygen-uids-revoke
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Revoking a user ID is a fairly similar process, except that it
|
||||||
|
uses the =key_revoke_uid= method.
|
||||||
|
|
||||||
|
#+begin_src python
|
||||||
|
import gpg
|
||||||
|
|
||||||
|
c = gpg.Context()
|
||||||
|
c.home_dir = "~/.gnupg-dm"
|
||||||
|
|
||||||
|
dmfpr = "177B7C25DB99745EE2EE13ED026D2F19E99E63AA"
|
||||||
|
key = c.get_key(dmfpr, secret=True)
|
||||||
|
uid = "Danger Mouse <danger.mouse@secret.example.net>"
|
||||||
|
|
||||||
|
c.key_revoke_uid(key, uid)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Key certification
|
** Key certification
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: key-sign
|
:CUSTOM_ID: key-sign
|
||||||
|
Loading…
Reference in New Issue
Block a user