mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-24 06:40:05 +00:00
6524501: inconsistency with PKCS#11 spec - 0-value flags in CK_SLOT_INFO struct returned by C_GetSlotInfo()
Reviewed-by: mullan
This commit is contained in:
parent
f1e72f0012
commit
bd6eb33b2a
@ -720,9 +720,13 @@ public final class SunPKCS11 extends AuthProvider {
|
||||
}
|
||||
|
||||
private boolean hasValidToken() {
|
||||
/* Commented out to work with Solaris softtoken impl which
|
||||
returns 0-value flags, e.g. both REMOVABLE_DEVICE and
|
||||
TOKEN_PRESENT are false, when it can't access the token.
|
||||
if (removable == false) {
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
Token token = this.token;
|
||||
return (token != null) && token.isValid();
|
||||
}
|
||||
@ -752,7 +756,7 @@ public final class SunPKCS11 extends AuthProvider {
|
||||
if (slotInfo == null) {
|
||||
slotInfo = p11.C_GetSlotInfo(slotID);
|
||||
}
|
||||
if ((slotInfo.flags & CKF_TOKEN_PRESENT) == 0) {
|
||||
if (removable && (slotInfo.flags & CKF_TOKEN_PRESENT) == 0) {
|
||||
createPoller();
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user