If you use a smartcard, you should use a class2/class3 card reader with pin-pad and never enter the pin on you computer. So the machine can replace the hash that is to be signed, but cannot intercept and replay the PIN.
Example for other readers on p4 under Luna PCI and Igenico reader that looks like it's a kid's pocket calculator haha:
https://www.keyon.ch/de/Produkte-Loesungen/SafeNet-HSM/HSM_T...
http://www.smartcardsource.com/contents/en-ca/Ingenico_myleo...