Diff

Differences From Artifact [7438606333]:

To Artifact [86bd0fe2e2]:


   234    234   		printf("  Slot %lu:\n", currSlot);
   235    235   
   236    236   		chk_rv = C_GetSlotInfo(slots[currSlot], &slotInfo);
   237    237   		if (chk_rv != CKR_OK) {
   238    238   			return(1);
   239    239   		}
   240    240   
          241  +		printf("    Id     : %lu\n", (unsigned long) slots[currSlot]);
   241    242   		printf("    Desc   : %.*s\n", 32, slotInfo.slotDescription);
   242    243   		printf("    ManufID: %.*s\n", 32, slotInfo.manufacturerID);
   243    244   		printf("    HWVers : %i.%i\n", slotInfo.hardwareVersion.major, slotInfo.hardwareVersion.minor);
   244    245   		printf("    FWVers : %i.%i\n", slotInfo.firmwareVersion.major, slotInfo.firmwareVersion.minor);
   245    246   		printf("    Flags  : ");
   246    247   		if ((slotInfo.flags & CKF_TOKEN_PRESENT) == CKF_TOKEN_PRESENT) {
   247    248   			printf("CKF_TOKEN_PRESENT ");
................................................................................
   325    326   			}
   326    327   			printf("\n");
   327    328   		}
   328    329   	}
   329    330   
   330    331   	chk_rv = C_OpenSession(slots[0], CKF_SERIAL_SESSION, NULL, NULL, &hSession);
   331    332   	if (chk_rv == CKR_OK) {
          333  +		chk_rv = C_GetTokenInfo(slots[0], &tokenInfo);
          334  +		if (chk_rv != CKR_OK) {
          335  +			return(1);
          336  +		}
          337  +
   332    338   		if ((tokenInfo.flags & CKF_LOGIN_REQUIRED) == CKF_LOGIN_REQUIRED) {
   333    339   			fgets_ret = NULL;
   334    340   
   335    341   			while (fgets_ret == NULL) {
   336    342   				printf("** ENTER PIN: ");
   337    343   				fflush(stdout);
   338    344