Life : A simple advice

A thoughtful advice given to me long back, just posting it here for general reference, should work for you too 😉

Stand strong always, may the sun always shine brightly for you after heavy rain.

Anger is paralyzing, its just the absence of control, You will have no use of it whatsoever.

So be patient and calm, make people quiet wid your skills, mindset and behavior if these three don’t work then don’t think ur words would matter.

Anonymous, June 2014

PDF Signing using hardware token (DSC) in Python

Hardware based tokens are widely used in India to generate signed PDF’s like invoices and agreement. We wrote small Python code to sign the invoices automatically where token was attached to a local server.

Windows drives are widely available but rare to find linux drivers are listed

You can uncomment to get the token name print(self.pkcs11.getSlotList(tokenPresent=True))
print(self.pkcs11.getTokenInfo(1)) to get token name, for PROXKey the name "WD PROXKey" was generated.

.dll/.so path for common tokens

  • For Windows the file will be in Windows\SysWOW64″ or “WINDOWS\system32” or “WINNT\system32”
  • For Linux machine the file will be in /usr/local/lib/ or /usr/lib/
Hardware Token TypeLibrary file (Windows)Library file (Linux)
eMudhraeMudhra\eMudhra CSPV1.0\wdpkcs.dll1. WatchData/eMudhra_3.4.3/lib/
2. WatchData/eMudhra_3.4.3/lib/
Trust Key1. TRUST KEY\TRUST KEY CSP V1.0\wdpkcs.dll
2. C:\Windows\System32\TRUSTKEYP11_ND_v34.dll
1. WatchData/TRUSTKEY/lib/
2. WatchData/TRUSTKEY/lib/
Belgium eID
Gemalto Cryptocard
Aladdin eTokeneTPKCS11.dll
Safenet iKeydkck201.dll
Watchdata PROXkeySignatureP11.dllWatchData/ProxKey/lib/
.DLL or .so path’s for linux.