OpenSC/OpenSC — pull request #97 by mtausig (2012-11-09 11:28:20+00:00)
Title: Use Algorithm information from TokenInfo for computing signatures on CardOS cards

There are two ways to calculate a signature on a CardOS card, dependend on the way the key was generated. Currently, both methods are used in a try/error way, which might lead to the loss of authentication and consequently to a failed signature (see this [mailing list discussion here](http://old.nabble.com/PIN-not-sent-to-card-before-signing-tt34577440.html#a34577440)).

This patch parses the information obtained by the AlogorithmInfo entry of the TokenInfo file, sets it in a static variable in set_security_env and uses that information when do_compute_signature is called.