Subject: Using two or more smartcard with smartcard enabled ID
I want to know if it’s possible to use two or more smartcards with the smartcard-enabled ID ?
When you smartcard-enable an ID file, information identifying the token is stored in the ID file. Notes will then prompt the user to enter the correct smartcard if a different token is in the reader.
Also, how can I programmatically smartcard enable an ID ?
You can use SECManipulateSC to programatically smartcard-enable an ID file. I’ve included some fairly sloppy pseudocode for SECManipulateSC below. As always, real code should check for errors and actually do something with return values.
SECManipulateSC is well documented in the C API Notes/Domino Reference; you should be able to find more useful details there.
Good luck,
dave
error = SECManipulateSC (SC_manip_GetVersion,
NULLSCMCTX,
NULL,
&Version,
NULL);
/* Initialize the PKCS#11 context.
*/
SCMCTX Context = NULLSCMCTX;
error = SECManipulateSC (SC_manip_InitializeContext,
&Context,
NULL, NULL, NULL);
/* Unlock the smartcard
*/
error = SECManipulateSC (SC_manip_EnterPIN,
&Context,
NULL,
&dwPINLen,
PIN);
/* Note – SC_manip_EnterPIN will use an external authentication path if it exists. If the token doesn’t support a protected authentcation path, SC_manip_EnterPIN will use the supplied PIN if one exists or generate a prompt if a NULL or zero-length PIN was used. */
/* Set up the ID file
*/
error = SECManipulateSC (SC_manip_EnterIDFile,
&Context,
NULL,
&dwIDLen,
IDPath);
/* Smartcard-enable the ID file
*/
error = SECManipulateSC (SC_manip_SCEnableID,
&Context,
NULL,
&dwPasswordLen,
pPassword);
/* Clean up
*/
SECManipulateSC (SC_manip_TerminateContext,
&Context,
NULL, NULL, NULL);