Code Monkey home page Code Monkey logo

smartcard-pam's People

Contributors

ramann avatar

Stargazers

 avatar

Watchers

 avatar  avatar

smartcard-pam's Issues

signature check fails when key for signing is second

I have a card with keypair #1 used for decryption and keypair #2 used for signing.

I can create a req using something like:
openssl req -new -config etc/email.conf -out certs/me.csr -key slot_1-id_02 -keyform engine -engine pkcs11 # this will expectedly fail if I use -key slot_1-id_01

I then issue the cert, and store it on the card:
pkcs15-init -X certs/me.crt -i 01 -a 01

Signature checking will fail:

verifying certificate
DEBUG:cert_vfy.c:338: Adding hashdir lookup to x509_store
DEBUG:cert_vfy.c:350: Adding hash dir '/etc/pam_pkcs11/cacerts' to CACERT checks
DEBUG:cert_vfy.c:450: certificate is valid
DEBUG:cert_vfy.c:207: crl policy: 0
DEBUG:cert_vfy.c:210: no revocation-check performed
DEBUG:cert_vfy.c:464: certificate has not been revoked
DEBUG:mapper_mgr.c:306: Mapper module digest match() returns -1
DEBUG:mapper_mgr.c:310: Error in module digest
DEBUG:mapper_mgr.c:306: Mapper module cn match() returns -1
DEBUG:mapper_mgr.c:310: Error in module cn
DEBUG:mapper_mgr.c:306: Mapper module pwent match() returns 0
DEBUG:mapper_mgr.c:306: Mapper module uid match() returns -1
DEBUG:mapper_mgr.c:310: Error in module uid
DEBUG:mapper_mgr.c:306: Mapper module mail match() returns 1
DEBUG:pam_pkcs11.c:637: certificate is valid and matches the user
Checking signature
DEBUG:pkcs11_lib.c:1765: reading 128 random bytes from /dev/urandom
DEBUG:pkcs11_lib.c:1784: random-value[128] = [78:25:cd:...:63]
ERROR:pam_pkcs11.c:690: sign_value() failed: Couldn't find private key for certificate
Error 2340: Signing failed

something to try: put the cert on the card with the same id as the corresponding key (02)

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.