diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-01-06 13:10:11 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-01-21 10:21:32 +0100 |
commit | 500ee7e2b1fdaa9669cf136a380907cfe4f0f225 (patch) | |
tree | 79b5f3ce0c8d0d6caa68512b468d96c76b2daebf /ipapython/dnssec | |
parent | f5f5c8c603e95d246d2cde92f56959fedba4666d (diff) | |
download | freeipa-500ee7e2b1fdaa9669cf136a380907cfe4f0f225.tar.gz freeipa-500ee7e2b1fdaa9669cf136a380907cfe4f0f225.tar.xz freeipa-500ee7e2b1fdaa9669cf136a380907cfe4f0f225.zip |
ipapython: port p11helper C code to Python
This replaces the binary _ipap11helper module with cffi-based Python code.
https://fedorahosted.org/freeipa/ticket/5596
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipapython/dnssec')
-rw-r--r-- | ipapython/dnssec/abshsm.py | 2 | ||||
-rw-r--r-- | ipapython/dnssec/ldapkeydb.py | 2 | ||||
-rwxr-xr-x | ipapython/dnssec/localhsm.py | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ipapython/dnssec/abshsm.py b/ipapython/dnssec/abshsm.py index 156bcf32c..1533892f8 100644 --- a/ipapython/dnssec/abshsm.py +++ b/ipapython/dnssec/abshsm.py @@ -2,7 +2,7 @@ # Copyright (C) 2014 FreeIPA Contributors see COPYING for license # -import _ipap11helper +from ipapython import p11helper as _ipap11helper attrs_id2name = { #_ipap11helper.CKA_ALLOWED_MECHANISMS: 'ipk11allowedmechanisms', diff --git a/ipapython/dnssec/ldapkeydb.py b/ipapython/dnssec/ldapkeydb.py index 0ee309525..55c09c040 100644 --- a/ipapython/dnssec/ldapkeydb.py +++ b/ipapython/dnssec/ldapkeydb.py @@ -18,7 +18,7 @@ from ipapython.dnssec.abshsm import ( AbstractHSM, bool_attr_names, populate_pkcs11_metadata) -import _ipap11helper +from ipapython import p11helper as _ipap11helper import uuid def uri_escape(val): diff --git a/ipapython/dnssec/localhsm.py b/ipapython/dnssec/localhsm.py index 76ab00444..8f18a45be 100755 --- a/ipapython/dnssec/localhsm.py +++ b/ipapython/dnssec/localhsm.py @@ -13,7 +13,7 @@ from pprint import pprint from ipaplatform.paths import paths -import _ipap11helper +from ipapython import p11helper as _ipap11helper from ipapython.dnssec.abshsm import (attrs_name2id, attrs_id2name, AbstractHSM, keytype_id2name, keytype_name2id, ldap2p11helper_api_params) @@ -65,7 +65,7 @@ class Key(collections.MutableMapping): return self.p11.set_attribute(self.handle, attrs_name2id[key], value) def __delitem__(self, key): - raise _ipap11helper.Exception('__delitem__ is not supported') + raise _ipap11helper.P11HelperException('__delitem__ is not supported') def __iter__(self): """generates list of ipa names of all attributes present in the object""" |