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

Key Derivation throwing struct.error: unpack requires a buffer of 4 bytes #701

Open
ns-saurabh opened this issue Aug 7, 2023 · 4 comments

Comments

@ns-saurabh
Copy link

ns-saurabh commented Aug 7, 2023

pykmip version is 0.10.0

super(Integer, self).read(istream, kmip_version=kmip_version)
File "/XXX/app-env/lib/python3.8/site-packages/kmip/core/primitives.py", line 105, in read
self.read_tag(istream) File "/XXX/app-env/lib/python3.8/site-packages/kmip/core/primitives.py", line 50, in read_tag
tag = unpack('!I', b'\x00' + tts[0:self.TAG_SIZE])[0]
struct.error: unpack requires a buffer of 4 bytes

Can somebody please help with the above issue?

I am using kmip version 1.2

and ssl version

ssl_version=PROTOCOL_SSLv23

@RickT256
Copy link

I am seeing this as an issue as well.

@ns-saurabh
Copy link
Author

In my case the issue was that the CTM vault did not support key derivation via KMIP. Hence this error.
KMIP supports key derivation, and our CTM supports KMIP partially, but doesn't support key derivation using KMIP.

@RickT256
Copy link

Although I am working with CTM as well, I am seeing this issue crop up even if I am supplying the keys. The python code (which uses PyKMIP) that I wrote last year is now failing because of this ... bug. It is not clear to me what specifically has changed. I am going to investigate using versions of Python that prior to the latest release.

@RickT256
Copy link

Old versions of python are exhibiting the same behavior. Trying to figure out what has changed in the pykmip code that should cause this problem to now appear (but not appear earlier in the year).

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

2 participants