I am trying to talk to a (Activcard1.0 ) Common Access Card on macosx, and noticed
the following anomaly when trying to list the available keys. It would seem that I
cant reliably get the keyPolicy bits. any ideas what is going on?
is this an issue with muscle or the card?
For example if I get the following output, when using the snippet below. (not the mode/dir).
MSCListKeys() Key Type Bits mode dir READ WRITE USE --- -------------- ---- ---- ---- ------ ----- ------ 3 RSA Private 1024 0000 0000 NEVER NEVER PIN #1 5 RSA Private 1024 0000 0000 NEVER NEVER PIN #1 7 RSA Private 1024 0000 0000 NEVER NEVER PIN #1
MSCGetKeyAttributes() Key Type Bits mode dir READ WRITE USE --- -------------- ---- ---- ---- ------ ----- ------ 3 RSA Private 1024 0040 bfff NEVER NEVER PIN #1 5 RSA Private 1024 bad4 0000 NEVER NEVER PIN #1 7 RSA Private 1024 bad4 0000 NEVER NEVER PIN #1
--------
for(seqOption =MSC_SEQUENCE_RESET, rv = MSC_SUCCESS; rv== MSC_SUCCESS; seqOption=MSC_SEQUENCE_NEXT)
{
MSCKeyInfo key;
rv = MSCListKeys(&connID, seqOption, &key);
if(isMSErr(rv)) break;
keyTable[keyCount++] = key;
}
printf("MSCListKeys()\n"); printf("Key Type Bits mode dir READ WRITE USE\n"); printf("--- -------------- ---- ---- ---- ------ ----- ------\n"); for(i = 0; i< keyCount; i++) { MSCKeyInfo *keyInfo = &keyTable[i];
printf("%3d %-15s %d %04x %04x ",
keyInfo->keyNum,
keytype2str(keyInfo->keyType),
keyInfo->keySize,
keyInfo->keyPolicy.cipherMode,
keyInfo->keyPolicy.cipherDirection); doPrintAUT(keyInfo->keyACL.readPermission);
doPrintAUT(keyInfo->keyACL.writePermission);
doPrintAUT(keyInfo->keyACL.usePermission);
printf("\n");
}
printf("MSCGetKeyAttributes()\n"); printf("Key Type Bits mode dir READ WRITE USE\n"); printf("--- -------------- ---- ---- ---- ------ ----- ------\n"); for(i = 0; i< keyCount; i++) { MSCKeyInfo keyInfo;
rv = MSCGetKeyAttributes(&connID, keyTable[i].keyNum, & keyInfo);MCKERR;
printf("%3d %-15s %d %04x %04x ",
keyInfo.keyNum,
keytype2str(keyInfo.keyType),
keyInfo.keySize,
keyInfo.keyPolicy.cipherMode,
keyInfo.keyPolicy.cipherDirection); doPrintAUT(keyInfo.keyACL.readPermission);
doPrintAUT(keyInfo.keyACL.writePermission);
doPrintAUT(keyInfo.keyACL.usePermission);
printf("\n");
}
-- Vinnie Moscaritolo ITCB-IMSH PGP: 3F903472C3AF622D5D918D9BD8B100090B3EF042 -------------------------------------------------------
"When the pin is pulled, Mr. Grenade is not our friend."
- USMC training bulletin._______________________________________________ Muscle mailing list [EMAIL PROTECTED] http://lists.drizzle.com/mailman/listinfo/muscle
