OpenSC/OpenSC — pull request #114 by puccia (2012-12-22 23:44:03+00:00)
Title: Regression in e35febe: compute cert length

Apparently, a regression was introduced in e35febe.

The change breaks the cases where the certificate is stored in the card in a fixed-size EF (e.g. a 2048 byte file) and is padded with zeros in the end.

While we should try to use the available content before reading the file, if we do read it, then we should keep looking at the certificate length as computed by `parse_x509_cert()`.