Merge pull request #15 from LudovicRousseau/master

Fix
Display the ASCII equivalent of a hex dump

The output format of a hex dump has changed from:
    668C045A 1C3A4EF4 CF8550F3 20926525 1E8BF478
to:
    00000000  66 8C 04 5A 1C 3A 4E F4 CF 85 50 F3 20 92 65 25  f..Z.:N...P. .e%
    00000010  1E 8B F4 78                                      ...x

Is it now possible to find text strings inside a hex dump
Merge pull request #18 from LudovicRousseau/spy

Display the ASCII equivalent of a hex dump
Add support for PACE-enabled readers

Implements PC/SC interface to PACE-enabled readers defined in PC/SC
pt. 10 AMD 1 and BSI TR-03119.

PACE can be started using `sc_perform_pace`. This function currently
calls the new `perform_pace` from `struct sc_reader_operations`, if the
reader has the needed capabilities. `sc_perform_pace` could also be
extended with a stand-alone implementation of PACE (code could be
imported from here http://vsmartcard.sourceforge.net/npa/README.html).

Note that the reader's PACE capabilities are correctly determined by
calling GetReaderPACECapabilities.
Add support for PACE-enabled readers

Implements PC/SC interface to PACE-enabled readers defined in PC/SC
pt. 10 AMD 1 and BSI TR-03119.

PACE can be started using `sc_perform_pace`. This function currently
calls the new `perform_pace` from `struct sc_reader_operations`, if the
reader has the needed capabilities. `sc_perform_pace` could also be
extended with a stand-alone implementation of PACE (code could be
imported from here http://vsmartcard.sourceforge.net/npa/README.html).

Note that the reader's PACE capabilities are correctly determined by
calling GetReaderPACECapabilities.

OpenSC's new PACE capabilities can be tested using the `npa-tool` from
the Virtual Smart Card Architecture (see link above).
Merge branch 'master' of github.com:frankmorgner/OpenSC
Merge branch 'master' into staging
Include smart card driver for German ID card (nPA)

The driver is derived from the ISO-7816 driver and is primarily used to
set the correct flags. Note that the driver could in future be used to
do PACE (with SM and so on).
renamed defines for PACE capabilities to be grouped together
removed obsolete reference to BSI TR-03119, which is not part of PC/SC
fixed indentation
Merge branch 'master' into staging
OpenPGP: fix algorithms & key lengths calculation

Also include forgotten DO C3 in keylength calculation.
It contains the parameters for the authentication key.

Signed-off-by: Peter Marschall <peter@adpm.de>
OpenPGP: remove DO info entry for DO FF

DO FF is a "catch-all" DO that returns all the infos contained in the other
DOs in one hierarchy.
It is hence duplicate and not necessary.

Signed-off-by: Peter Marschall <peter@adpm.de>
OpenPGP: immediately quit on allocation errors in init

Signed-off-by: Peter Marschall <peter@adpm.de>
OpenPGP: re-factor gpg_new_blob()

* get file as parameter & fail if it is NULL
* allow parent to be NULL
* do not rely on DO info to be passed as parameter,
  search it yourself using the global DO info list for the card.
* infer file type automatically from DO info matching the file ID.

Signed-off-by: Peter Marschall <peter@adpm.de>
OpenPGP: update pgp_list_files()

* fail if buffer passed as parameter is too small
* only list readable objects

Signed-off-by: Peter Marschall <peter@adpm.de>
OpenPGP: add DO info entries for MF

For consistency, add DO info entries for the MF 3F00.

Signed-off-by: Peter Marschall <peter@adpm.de>
OpenPGP: use pgp_new_blob() to setup MF blob

Use the standard way to create blobs, pgp_new_blob(), also for the MF.

Signed-off-by: Peter Marschall <peter@adpm.de>
OpenPGP: unlink blob from blob tree in pgp_free_blob()

Remove links pointing to the blob to be deleted from other blobs in the
blob tree structure, so that removing a subordinate blob does not hurt
its parent or siblings.

Signed-off-by: Peter Marschall <peter@adpm.de>