Questions tagged [opensc]

OpenSC provides a set of libraries and utilities to work with smart cards.

OpenSC provides a set of libraries and utilities to work with smart cards. Its main focus is on cards that support cryptographic operations, and facilitate their use in security applications such as authentication, mail encryption and digital signatures. OpenSC implements the PKCS#11 API so applications supporting this API (such as Mozilla Firefox and Thunderbird) can use it. On the card OpenSC implements the PKCS#15 standard and aims to be compatible with every software/card that does so, too.

More info on OpenSC project wiki.

55 questions
1
vote
1 answer

dlopen() fails loading opensc-pkcs11.so

While trying to dlopen the /usr/lib/x86_64-gnu-linux/opensc-pkcs11.so from within an application, I get a "Cannot open shared object file: no such file or directory" for the library. dlopen("/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so", RTLD_NOW |…
ksoop
  • 165
  • 1
  • 4
  • 16
1
vote
2 answers

Exception "CKR_FUNCTION_NOT_SUPPORTED", PKCS11Interop with OpenSC

I am trying to use PKCS11Interop Library with latest version (0.16) of OpenSC (opensc-pkcs11.dll). I have tried USB tokens from three vendors which are Yubico 4, NitroKey Pro/Start, Fetian ePass2003 but unable to use most of the functions from…
Kamran Khan
  • 23
  • 1
  • 4
1
vote
1 answer

Need help using M2Crypto and USB Token

I am using M2Crypto (0.22.6rc4). I want to use engine_pkcs11 from the OpenSC project and the Aladdin PKI client for token based authentication to encrypt and decrypt data. from M2Crypto import Engine, m2, RSA, BIO slot_id = "slot_01" pin =…
1
vote
1 answer

write driver for opensc unknown card

I'm trying to use opensc for my project, but unfortunately it does not support my java card. I though it will, because it has two drivers called "javacard" and "default" but none is compatible with mine (Kona26 card). Does anybody know how I can…
MJay
  • 987
  • 1
  • 13
  • 36
1
vote
1 answer

OpenSC API documentation, tutorial

In last couple months while learning to develop Java Card applets I managed to develop ISO 7816 compatible file system applet. I successfully implemented most of the standardized APDU commands from 7816-4, -8, -9 standards (I used other available…
Mario Drzic
  • 157
  • 2
  • 10
1
vote
0 answers

Pkcs11 engine opensc loading without command line using code

I would like to load the pkcs11 engine provided by OpenSC using C code instead of the command line. The command line instruction goes as follows: openssl engine dynamic -pre SO_PATH:/usr/lib/engines/engine_pkcs11.so -pre ID:pkcs11 -pre LIST_ADD:1…
user3883991
  • 71
  • 2
  • 6
0
votes
0 answers

how do i create a my own inplementation of pkcs11.h

I have a smart card that i want to use later such that, i can retrieve the certificate inside and use that to sign a PDFs or what not with digital signature. so i was trying to use opensc for that, but turns out the card is not supported there, so i…
0
votes
1 answer

Use libp11 on Windows environment

I want to install all I need to use libp11 and use libp11. What is my environment and needs: I work on Windows 10, 64 bits. I add package with pacman linux command on my mingw32 terminal (msys64 version of 2022/09/04). I work on a Qt Creator editor…
0
votes
1 answer

crypto.X509Store load_locations() do nothing

I want to add trusted certificates from directory. I tried to use: store = crypto.X509Store() store.load_locations(None, ".\\certificates") and then context = crypto.X509StoreContext(self.store, cert) where cert is my certificate which I want to…
0
votes
0 answers

PKCS11 error wile using USB Token vs SmartCard

I am trying to use SafeNet eToken 5300 (manufacturerID: Gemalto; model: ID Prime MD) for client certificate authentication in openconnect VPN client. The connection failed. When the SmartCard (manufacturerID: SafeNet, Inc.; model: eToken) inserted…
Pavel
  • 1
  • 2
0
votes
1 answer

Unable to use pkcs11-tool with custom hsm roles

i am working on a HSM which has a custom user role: crypto user. how can i use pkcs11-tool to login or work with that user on Hsm? it works with user or SO not sure how can i use with custom roles specific to hsm.
Zach
  • 35
  • 6
0
votes
1 answer

PIV digital signature sequence

I am trying to learn the details of using a PIV / smartcard to sign an executable like a jar. Employing this is easy, but I'm curious about what information gets exchanged between my computer and the smartcard. I have searched around but I haven't…
wz2b
  • 1,017
  • 7
  • 24
0
votes
1 answer

Export data object from smartcard with OpenSC

I try to export a data object from a smartcard. For this I am using OpenSC 0.19.0. The command pkcs11-tool.exe --list-objects shows that the following data object resides on the token. Data Object 12345678 label: 'mylabel' application: '' app_id:…
Ronquam
  • 145
  • 2
  • 13
0
votes
1 answer

PKCS#7 signature in PHP using PKCS#11 without a CLI call

Is there a way to create a PKCS#7 (S/MIME) signature with a PKCS#11 compliant HSM device (card reader) using pure PHP, i.e. without explicit shell command call, e.g. using PHP OpenSSL library or some other glue? I can successfully create a PKCS#7…
cprn
  • 1,561
  • 1
  • 19
  • 25
0
votes
1 answer

SC/OPENSC How to write and read

I'm sorting out how to achieve the following, I want to use smart or memory cards in a project. The cards should be read by standardized card readers (for example ACR38). When they are read by the computer ( command line or by a software (processing…
Blckpstv
  • 117
  • 3
  • 17