diff options
| author | Ben McGinnes <[email protected]> | 2018-03-15 04:16:23 +0000 | 
|---|---|---|
| committer | Ben McGinnes <[email protected]> | 2018-03-15 04:16:23 +0000 | 
| commit | 7ac65b10837740caf68cdade791b8c5ce4eb1b03 (patch) | |
| tree | a532e254da17bc115c4bb8b33d7b889a89f8fd9d /lang/python/docs/GPGMEpythonHOWTOen.org | |
| parent | doc: python bindings howto (diff) | |
| download | gpgme-7ac65b10837740caf68cdade791b8c5ce4eb1b03.tar.gz gpgme-7ac65b10837740caf68cdade791b8c5ce4eb1b03.zip | |
doc: python bindings howto
* Added a new user ID for Danger Mouse.
* Removed the empty entry for key preferences since that is handled
  through gpg.conf and/or editing the key directly.
Diffstat (limited to 'lang/python/docs/GPGMEpythonHOWTOen.org')
| -rw-r--r-- | lang/python/docs/GPGMEpythonHOWTOen.org | 37 | 
1 files changed, 32 insertions, 5 deletions
| diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org index 37318fce..d22efbe2 100644 --- a/lang/python/docs/GPGMEpythonHOWTOen.org +++ b/lang/python/docs/GPGMEpythonHOWTOen.org @@ -1251,16 +1251,43 @@     :CUSTOM_ID: keygen-uids     :END: +   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 +   this is =key_add_uid= and the only arguments it takes are for the +   =key= and the new =uid=. -** Key preferences -   :PROPERTIES: -   :CUSTOM_ID: keygen-prefs -   :END: +   #+begin_src python +     import gpg + +     c = gpg.Context() +     c.home_dir = "/tmp/dmgpg" + +     dmfpr = "177B7C25DB99745EE2EE13ED026D2F19E99E63AA" +     key = c.get_key(dmfpr, secret = True) +     uid = "Danger Mouse <[email protected]>" + +     c.key_add_uid(key, uid) +   #+end_src + +   Unsurprisingly the result of this is: + +   #+begin_src shell +     bash-4.4$ gpg --homedir /tmp/dmgpg -K +     /tmp/dmgpg/pubring.kbx +     ---------------------- +     sec   rsa3072 2018-03-15 [SC] [expires: 2019-03-15] +	   177B7C25DB99745EE2EE13ED026D2F19E99E63AA +     uid           [ultimate] Danger Mouse <[email protected]> +     uid           [ultimate] Danger Mouse <[email protected]> +     ssb   rsa3072 2018-03-15 [E] [expires: 2018-09-13] + +     bash-4.4$ +   #+end_src  ** Key certification     :PROPERTIES: -   :CUSTOM_ID: keygen-certify +   :CUSTOM_ID: key-sign     :END: | 
