Required changes for PyKMIP to work with Activecrypt KMIP EKM

Changes to be applied to PyKMIP 0.10 to enable RSA encryption/decryption:

In engine.py (you can find it in /usr/lib/python2.7/site-packages/PyKMIP-0.10.0-py2.7.egg/kmip/services/server/engine.py) comment the following:

#if managed_object._object_type != enums.ObjectType.SYMMETRIC_KEY:
#    raise exceptions.PermissionDenied(
#"The requested decryption key is not a symmetric key. "
#"Only symmetric decryption is currently supported."
#)
 

and another one

#if managed_object._object_type != enums.ObjectType.SYMMETRIC_KEY:
#    raise exceptions.PermissionDenied(
#    "The requested encryption key is not a symmetric key. "
#    "Only symmetric encryption is currently supported."
#)

Additionally, you need to fix Locate function.

After the string (in the same engine.py):

self._logger.info("Processing operation: Locate")

insert:

self._id_placeholder = None;

and finally, the last change. After the string:

managed_objects_filtered.append(managed_object)

insert:

self._id_placeholder = str(managed_object.unique_identifier)
if payload.maximum_items == len(managed_objects_filtered):
    break
 

That's all.


Questions? Contact support@activecrypt.com