OpenSC/OpenSC — pull request #184 by ttaylor249 (2013-09-24 17:47:19+00:00)
Title: Set output buffer len variable if padding removed.

This patch makes the implementation of sc_pkcs1_strip_02_padding in padding.c actually match the implied behaviour of its signature (and how it was used by the Windows minidirver in the 0.13.0 release). Specifically, on input, *out_len is the length of the buffer pointed to by "out" parameter, and on return, *out_len is set to the length of unpadded data copied to "out" parameter.

It also removes the "fix" for this lack of consistency that was added to minidriver.c in the master branch because with the change described above, pinfo->cbData is already set to the unpadded data len in minidriver.c.