镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Open

Description

@ns-saurabh

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

Activity

  1. RickT256 commented on Sep 14, 2023

    @RickT256

    I am seeing this as an issue as well.

  2. ns-saurabh commented on Sep 15, 2023

    @ns-saurabh
    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.

  3. RickT256 commented on Sep 15, 2023

    @RickT256

    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.

  4. RickT256 commented on Sep 15, 2023

    @RickT256

    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).

  5. karolke99 commented on Apr 29, 2025

    @karolke99

    Hello guys,
    Any updates on this issue? I am facing the same problem when integration Openstack Barbican with CTM KMIP. Wondering if you managed to find any solution.
    Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions