From 88b8727d02d9951f21d5f11c8a481d2716ac5dd9 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Fri, 17 Jul 2015 23:54:23 +0200 Subject: [PATCH] fixed broken pointers in documentation --- virtualsmartcard/doc/api.txt | 15 +++++++-------- virtualsmartcard/doc/api/virtualsmartcard.txt | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/virtualsmartcard/doc/api.txt b/virtualsmartcard/doc/api.txt index 633b6db..1328fdc 100644 --- a/virtualsmartcard/doc/api.txt +++ b/virtualsmartcard/doc/api.txt @@ -66,26 +66,25 @@ the |vpcd|. In :class:`~virtualsmartcard.VirtualSmartcard.VirtualICC` an |APDU| is only a buffer that is forwarded to the smart card OS. First we modify :class:`~virtualsmartcard.VirtualSmartcard.VirtualICC` to recognize a new type ``"cryptoflex"`` and to load -:class:`~virtualsmartcard.VirtualSmartcard.CryptoflexOS`. The +:class:`~virtualsmartcard.cards.cryptoflex.CryptoflexOS`. The :class:`~virtualsmartcard.CardGenerator` is used to create a file system and a |SAM| specific to the cryptoflex (we come back to this later). .. literalinclude:: virtualsmartcard/VirtualSmartcard.py :pyobject: VirtualICC.__init__ - :emphasize-lines: 20,28-29 + :emphasize-lines: 35-37 Responses from our cryptoflex card look the same as for the 7816 card. But when a command was successfull (or not) there is a little difference in what is returned. So we need to edit -:class:`~virtualsmartcard.VirtualSmartcard.CryptoflexOS.formatResult`, which is +:class:`~virtualsmartcard.cards.cryptoflex.CryptoflexOS.formatResult`, which is called to encode the |SWs| and the resulting data. -.. literalinclude:: virtualsmartcard/VirtualSmartcard.py +.. literalinclude:: virtualsmartcard/cards/cryptoflex.py :pyobject: CryptoflexOS.formatResult Note that this also requires some insight knowledge about how -:class:`~virtualsmartcard.VirtualSmartcard.Iso7816OS` works (see `above -`_). +:class:`~virtualsmartcard.VirtualSmartcard.Iso7816OS` works. The previously created |SAM| handles keys, encryption, secure messaging and so on (we will not go into more details here). The file system creates, selects @@ -116,12 +115,12 @@ connect to an other smart card using PC/SC and forward it to |vpcd|. As before with the cryptoflex card, we let :class:`~virtualsmartcard.VirtualSmartcard.VirtualICC` recognize the new type -``"relay"``. :class:`~virtualsmartcard.VirtualSmartcard.RelayOS` overwrites all +``"relay"``. :class:`~virtualsmartcard.cards.Relay.RelayOS` overwrites all main functions from the template :class:`~virtualsmartcard.VirtualSmartcard.SmartcardOS`. Its functions correspond to the :ref:`commands sent by vpcd `. If you know how to use `pyscard `_ then the rest is pretty straight forward, but see yourself... -.. literalinclude:: virtualsmartcard/VirtualSmartcard.py +.. literalinclude:: virtualsmartcard/cards/Relay.py :pyobject: RelayOS diff --git a/virtualsmartcard/doc/api/virtualsmartcard.txt b/virtualsmartcard/doc/api/virtualsmartcard.txt index ed13558..d9e1d02 100644 --- a/virtualsmartcard/doc/api/virtualsmartcard.txt +++ b/virtualsmartcard/doc/api/virtualsmartcard.txt @@ -4,7 +4,6 @@ virtualsmartcard Package .. toctree:: virtualsmartcard.cards - virtualsmartcard.tests virtualsmartcard.CardGenerator virtualsmartcard.ConstantDefinitions virtualsmartcard.CryptoUtils