Set output buffer len variable if padding removed.
Added some more debugging statements.
Extract public key from cert if no object on card
Use reader pin pad if available and allowed