pkcs11-tool: Do not use unitialized data when C_GetTokenInfo() failed
This commit is contained in:
parent
7214516547
commit
1ca09b8f10
|
@ -1105,6 +1105,9 @@ static void show_token(CK_SLOT_ID slot)
|
||||||
if (rv == CKR_TOKEN_NOT_RECOGNIZED) {
|
if (rv == CKR_TOKEN_NOT_RECOGNIZED) {
|
||||||
printf(" (token not recognized)\n");
|
printf(" (token not recognized)\n");
|
||||||
return;
|
return;
|
||||||
|
} else if (rv != CKR_OK) {
|
||||||
|
printf("C_GetTokenInfo() failed: rv = %s\n", CKR2Str(rv));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (!(info.flags & CKF_TOKEN_INITIALIZED) && (!verbose)) {
|
if (!(info.flags & CKF_TOKEN_INITIALIZED) && (!verbose)) {
|
||||||
printf(" token state: uninitialized\n");
|
printf(" token state: uninitialized\n");
|
||||||
|
|
Loading…
Reference in New Issue