Git Product home page Git Product logo

Comments (4)

ueno avatar ueno commented on August 23, 2024

While in theory the protocol should work with both 32-bit and 64-bit systems, it might need to assume the same data model, in which GNU/Linux (LP64) and Windows (LLP64) have some differences. That's one of the reasons why we don't enable building p11-kit-client.dll on Windows by default.

from p11-kit.

abarisani avatar abarisani commented on August 23, 2024

I've experienced the following command differs whether executed on a 32-bit client or 64-bit client against the same token (with forwarded socket).

On a 32-bit the data object IDs are truncated and do not match the corresponding 64-bit value.

For example one of these objects (converted to hex) is 4159ea64efdded8d while the pkcs11-tool client looks for efdded8d (4024298893).

This makes all clients unusable on a 32-bit platform.

$ pkcs11-tool --module /usr/lib/arm-linux-gnueabihf/pkcs11/p11-kit-client.so --list-objects
Using slot 0 with a present token (0x1)
warning: PKCS11 function C_GetAttributeValue(CLASS) failed: rv = CKR_OBJECT_HANDLE_INVALID (0x82)

Data object 4024298893
  label:          <empty>
  application:    <empty>
  app_id:         <empty>
  flags:          <empty>
warning: PKCS11 function C_GetAttributeValue(CLASS) failed: rv = CKR_OBJECT_HANDLE_INVALID (0x82)

Data object 763047029
  label:          <empty>
  application:    <empty>
  app_id:         <empty>
  flags:          <empty>
warning: PKCS11 function C_GetAttributeValue(CLASS) failed: rv = CKR_OBJECT_HANDLE_INVALID (0x82)

Data object 4086046842
  label:          <empty>
  application:    <empty>
  app_id:         <empty>
  flags:          <empty>

from p11-kit.

LMattsson avatar LMattsson commented on August 23, 2024

@abarisani Out of curiosity, is the issue you see a recent problem or have you seen it for a longer time?

from p11-kit.

abarisani avatar abarisani commented on August 23, 2024

@abarisani Out of curiosity, is the issue you see a recent problem or have you seen it for a longer time?

I am experiencing this as we speak while integrating p11-kit on a 32-bit installation using https://github.com/google/go-p11-kit as RPC server.

I think the 32-bit client is requesting a ulValueLen of 4 while the RPC server responds with 8, then the p11-kit client library is hitting CKR_BUFFER_TOO_SMALL and the object class is not being parsed correctly.

from p11-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.