OpenSC
OpenSC is a set of software tools and libraries to work with smart cards, with the focus on smart cards with cryptographic capabilities. OpenSC facilitate the use of smart cards in security applications such as authentication, encryption and digital signatures. OpenSC implements the PKCS #15 standard and the PKCS #11 API.

It also provides some support for Common Data Security Architecture (CDSA) on Mac OS X and Microsoft CryptoAPI on Windows, but it is still work in progress.

References

External links 
 
 Driver for Spanish National Card

Free software
Programming libraries