Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestLengthMismatch: KMIPProtocol read error #718

Open
anilsahu323 opened this issue May 25, 2024 · 0 comments
Open

RequestLengthMismatch: KMIPProtocol read error #718

anilsahu323 opened this issue May 25, 2024 · 0 comments

Comments

@anilsahu323
Copy link

anilsahu323 commented May 25, 2024

/tmp/pykmip.conf looks like:
[client]
host= Key Management Server IP
port=5696
username= ---> The ID is created already in Thales CipherTrust Manager
password=
keyfile=/tmp/key.pem
certfile=/tmp/cert.pem
ca_certs=/tmp/ca.pem

Note: All the pem files i have created in Thales Cipher Trust Manager and copied here to client side from which i am trying to execute my client edb_tde_kmip_client.py .

Created a new key in Tales Cipher Trust manager and the keyID i am using here:

printf secret | python3 /usr/edb/kmip/client/edb_tde_kmip_client.py encrypt --out-file=test.bin --pykmip-config-file=/tmp/pykmip.conf --key-uid='08db8b66a8044f3da2359fa4b1e0729d9f7ee3508ebc4dd2b3bbd620472485ec' --variant=thales

Since the above command failed i tried to create a new key using the following way:
from kmip.pie import client

from kmip import enums
c = client.ProxyKmipClient(config_file='/tmp/pykmip.conf')
c.open()
key_id = c.create(enums.CryptographicAlgorithm.AES, 128, name='edbtestkey')

Both the command failed with the following Error:

Traceback (most recent call last):
File “/home/era/.local/lib/python3.6/site-packages/kmip/services/kmip_protocol.py”, line 44, in read
header = self._recv_all(self.HEADER_SIZE)
File “/home/era/.local/lib/python3.6/site-packages/kmip/services/kmip_protocol.py”, line 70, in _recv_all
raise RequestLengthMismatch(total_bytes_to_be_read, bytes_read)
kmip.services.kmip_protocol.RequestLengthMismatch: KMIPProtocol read error: expected 8, received 0

Python version is : 3.6.8

May i know what could be the issue here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant