2018-05-15 03:13:16 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
|
2018-05-15 03:50:14 +00:00
|
|
|
<dita xml:lang="en-GB">
|
2018-05-15 03:13:16 +00:00
|
|
|
<topic id="topic_fbb_lyz_5db">
|
|
|
|
<title>Revoking a User ID</title>
|
|
|
|
<body>
|
|
|
|
<p>Revoking a user ID is a fairly similar process, except that it uses the
|
|
|
|
<codeph>key_revoke_uid</codeph> method.</p>
|
|
|
|
<p>
|
|
|
|
<codeblock id="revuid" outputclass="language-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)
|
|
|
|
</codeblock>
|
|
|
|
</p>
|
|
|
|
</body>
|
|
|
|
</topic>
|
|
|
|
</dita>
|