| Previous | Next |
| SCARD_W_REMOVED_CARD | SCARD_W_WRONG_CHV |
SCARD_W_SECURITY_VIOLATION
A policy or access condition stopped the operation
SCARD_W_SECURITY_VIOLATION means access was denied because a security condition was violated. The exact condition depends on the card application and middleware: it can involve card access rules, an authentication prerequisite, a prohibited command in the current lifecycle state, a secure-messaging requirement, or a policy imposed by the resource manager.
This status is not interchangeable with SCARD_W_WRONG_CHV or SCARD_W_CHV_BLOCKED. Those codes identify PIN-related outcomes. A generic security violation should be diagnosed from the operation, selected application, card profile, and any APDU status information that the middleware exposes.
Safe investigation
- Record the exact operation and active card application; do not log PINs, cryptographic material, or full protected APDUs.
- Check whether the card expects prior authentication, an exclusive connection, or a secure channel.
- Avoid broad permission changes or repeated privileged commands; the card issuer's policy may be intentionally blocking them.
References
- Microsoft: Smart Card return values
- PCSC-lite: error codes
- GlobalPlatform Card Specification
- PC/SC Workgroup: specifications
Looking for a different code? Search another status or error code.