Differences From Artifact [7438606333]:
- File
test.c
— part of check-in
[5027cbae9b]
at
2011-08-26 05:29:43
on branch trunk
— Updated to include DoD root CAs as objects in the PKCS#11 module
Updated to include Netscape Trust Objects (https://developer.mozilla.org/index.php?title=en/NSS/PKCS_%2311_Netscape_Trust) in PKCS#11 module
Added more attributes to scan for to test driver (user: rkeene, size: 23112) [annotate] [blame] [check-ins using]
To Artifact [47338c5b52]:
- File test.c — part of check-in [06eb7a2600] at 2013-08-14 03:01:49 on branch protected-auth-path — Made test driver aware of PKCS#11 protected authentication path flag (user: rkeene, size: 23333) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
printf(" Slot %lu:\n", currSlot);
chk_rv = C_GetSlotInfo(slots[currSlot], &slotInfo);
if (chk_rv != CKR_OK) {
return(1);
}
printf(" Desc : %.*s\n", 32, slotInfo.slotDescription);
printf(" ManufID: %.*s\n", 32, slotInfo.manufacturerID);
printf(" HWVers : %i.%i\n", slotInfo.hardwareVersion.major, slotInfo.hardwareVersion.minor);
printf(" FWVers : %i.%i\n", slotInfo.firmwareVersion.major, slotInfo.firmwareVersion.minor);
printf(" Flags : ");
if ((slotInfo.flags & CKF_TOKEN_PRESENT) == CKF_TOKEN_PRESENT) {
printf("CKF_TOKEN_PRESENT ");
| > | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
printf(" Slot %lu:\n", currSlot);
chk_rv = C_GetSlotInfo(slots[currSlot], &slotInfo);
if (chk_rv != CKR_OK) {
return(1);
}
printf(" Id : %lu\n", (unsigned long) slots[currSlot]);
printf(" Desc : %.*s\n", 32, slotInfo.slotDescription);
printf(" ManufID: %.*s\n", 32, slotInfo.manufacturerID);
printf(" HWVers : %i.%i\n", slotInfo.hardwareVersion.major, slotInfo.hardwareVersion.minor);
printf(" FWVers : %i.%i\n", slotInfo.firmwareVersion.major, slotInfo.firmwareVersion.minor);
printf(" Flags : ");
if ((slotInfo.flags & CKF_TOKEN_PRESENT) == CKF_TOKEN_PRESENT) {
printf("CKF_TOKEN_PRESENT ");
|
| ︙ | ︙ | |||
325 326 327 328 329 330 331 |
}
printf("\n");
}
}
chk_rv = C_OpenSession(slots[0], CKF_SERIAL_SESSION, NULL, NULL, &hSession);
if (chk_rv == CKR_OK) {
| > > > > > | | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
}
printf("\n");
}
}
chk_rv = C_OpenSession(slots[0], CKF_SERIAL_SESSION, NULL, NULL, &hSession);
if (chk_rv == CKR_OK) {
chk_rv = C_GetTokenInfo(slots[0], &tokenInfo);
if (chk_rv != CKR_OK) {
return(1);
}
if ((tokenInfo.flags & CKF_LOGIN_REQUIRED) == CKF_LOGIN_REQUIRED && (tokenInfo.flags & CKF_PROTECTED_AUTHENTICATION_PATH) == 0) {
fgets_ret = NULL;
while (fgets_ret == NULL) {
printf("** ENTER PIN: ");
fflush(stdout);
fgets_ret = fgets((char *) user_pin, sizeof(user_pin), stdin);
|
| ︙ | ︙ |