diff options
author | Justus Winter <[email protected]> | 2017-02-17 16:07:05 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-02-17 16:08:03 +0000 |
commit | 15fbac9e72a4d1bff9a3b9e9822f9175b09fbcd5 (patch) | |
tree | cee4dfffa19f9ad95b51afb3e33b73d2b69fa9da /lang/python/gpg/core.py | |
parent | python: Support quick key signing. (diff) | |
download | gpgme-15fbac9e72a4d1bff9a3b9e9822f9175b09fbcd5.tar.gz gpgme-15fbac9e72a4d1bff9a3b9e9822f9175b09fbcd5.zip |
python: Support manipulating the TOFU policy.
* NEWS: Update.
* doc/gpgme.texi: Fix typos.
* lang/python/gpg/constants/__init__.py: Import new files.
* lang/python/gpg/constants/tofu/__init__.py: New file.
* lang/python/gpg/constants/tofu/policy.py: New file.
* lang/python/gpg/core.py (Context.key_tofu_policy): New function.
* lang/python/gpgme.i: Nice reprs for gpgme_tofu_info_t.
* lang/python/setup.py.in: Install new package.
* lang/python/tests/t-quick-key-manipulation.py: Extend test.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/gpg/core.py')
-rw-r--r-- | lang/python/gpg/core.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lang/python/gpg/core.py b/lang/python/gpg/core.py index cb4ccf73..fe0ba81c 100644 --- a/lang/python/gpg/core.py +++ b/lang/python/gpg/core.py @@ -716,6 +716,18 @@ class Context(GpgmeWrapper): self.op_keysign(key, uids, expires_in, flags) + def key_tofu_policy(self, key, policy): + """Set a keys' TOFU policy + + Set the TOFU policy associated with KEY to POLICY. Calling + this function is only valid for the OpenPGP protocol. + + Raises: + GPGMEError -- as signaled by the underlying library + + """ + self.op_tofu_policy(key, policy) + def assuan_transact(self, command, data_cb=None, inquire_cb=None, status_cb=None): """Issue a raw assuan command |