Discussion:
C_Initialize frozen into the called CardAcquireContext function
(too old to reply)
Mongri
2008-04-14 22:58:01 UTC
Permalink
I'm implementing a smart card minidriver. I develop Windows 2k with Visual
Studio. In the part of CardAcquireContext, I load the module opensc-pkcs11
and I initializes with CK_RV CK_FUNC (C_Initialize). C_Initialize initializes
the Cryptoki library

I have also developed a test program that loads correctly the minidriver and
properly execute the function CardAcquireContext.

However, during the Certificate enrolment phase on the smartcard from the
Web Certsrv service (activex), the 'Base CSP' executes the CardAcquireContext
from my cardmodule. With the Softice tools, I notice that the function
'C_Initialze' remains frozen. The smartcard removed of reader allows to
unlock the function.
I tried to use other modules pkcs11/ smart cards. I have the same problem.
Do you know of this problem ?
lelteto
2008-04-15 18:04:03 UTC
Permalink
First of all please noet that this is a MS CAPI forum, not dedicated to
PKCS#11 problems. Cryptoki has its own mailing list, you should post PKCS#11
questions there.

But to try to help you:
Are you sure you are passing valid parameter to C_Initialize? Please note
that most implementations need a valid (non-NULL) CK_C_INITIALIZE_ARGS
struct. Within the struct you can se the mutex functions to NULL, but then
you need to set the flag to CKF_OS_LOCKING_OK. (This is despite that the spec
say the pInitArgs parameter can be NULL.)
Please review the function and struct definition and notes in the PKCS#11
standard.

Laszlo Elteto
SafeNet, Inc.
Post by Mongri
I'm implementing a smart card minidriver. I develop Windows 2k with Visual
Studio. In the part of CardAcquireContext, I load the module opensc-pkcs11
and I initializes with CK_RV CK_FUNC (C_Initialize). C_Initialize initializes
the Cryptoki library
I have also developed a test program that loads correctly the minidriver and
properly execute the function CardAcquireContext.
However, during the Certificate enrolment phase on the smartcard from the
Web Certsrv service (activex), the 'Base CSP' executes the CardAcquireContext
from my cardmodule. With the Softice tools, I notice that the function
'C_Initialze' remains frozen. The smartcard removed of reader allows to
unlock the function.
I tried to use other modules pkcs11/ smart cards. I have the same problem.
Do you know of this problem ?
e***@gmail.com
2014-05-03 17:00:39 UTC
Permalink
Hello,
I want to implement minidriver based on PKCS#11, But I don't know how?
Actually, I don't know whether I should Open a session in every CardCreatFile, CardReadFile Function, . . . or not? When I should open a session to do operations on object? could you please explain about your implementation? I would be very appreciated.
Loading...