Git Product home page Git Product logo

Comments (1)

kenh avatar kenh commented on July 24, 2024

I think there are two separate things going wrong.

First, this:

Caused by: java.security.ProviderException: slotListIndex is 0 but token only has 0 slots

I am willing to believe I got something wrong here, but I am not completely sure that I did. I am not sure if I did. It asks for the number of slots available if tokens are present (it first asks for all slots even without tokens, and that count should always be at least 1). And ... well, that leads to problem number two:

2022-09-14 20:55:47.625206+0200 0x25321 Debug 0x0 14552 0 java: (keychain-pkcs11.dylib) [mil.navy.nrl.cmf.pkcs11:general] Looking for identities for token com.apple.setoken
2022-09-14 20:55:47.627565+0200 0x25321 Debug 0x0 14552 0 java: (keychain-pkcs11.dylib) [mil.navy.nrl.cmf.pkcs11:general] No identities found
2022-09-14 20:55:47.627644+0200 0x25321 Debug 0x0 14552 0 java: (keychain-pkcs11.dylib) [mil.navy.nrl.cmf.pkcs11:general] Looking for identities for token com.apple.setoken:aks
2022-09-14 20:55:47.628745+0200 0x25321 Debug 0x0 14552 0 java: (keychain-pkcs11.dylib) [mil.navy.nrl.cmf.pkcs11:general] No identities found
2022-09-14 20:55:47.628858+0200 0x25321 Debug 0x0 14552 0 java: (keychain-pkcs11.dylib) [mil.navy.nrl.cmf.pkcs11:general] C_Initalize returning CKR_OK

This tells me it didn't find any identities.

So this is something not everyone completely understands about Keychain-PKCS11 ... it was designed to work only with HARDWARE tokens. It uses the TkToken interface to only get hardware identities. It doesn't get ALL identities that are found in the Keychain. It is possible by setting a special preferences item to get CERTIFICATES exposed as another slot, but that is certificates only; you don't get a full identity and you can't perform crypto operations on them. That's mostly useful for things like Firefox to get certificates from the Keychain.

I've thought about adding the functionality to create another slot that lets you use any identity found in the Keychain, but I haven't done that yet.

from keychain-pkcs11.

Related Issues (11)

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.