From 3b702012c1f881d89b5939387ab7143b790bc7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 23 Oct 2013 13:33:32 +0000 Subject: [PATCH] documentation for card status check and iniialization; refs #28 --- src/suisseid.hxx | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/suisseid.hxx b/src/suisseid.hxx index edd7847..907bfd3 100644 --- a/src/suisseid.hxx +++ b/src/suisseid.hxx @@ -27,6 +27,54 @@ //@{ namespace suisseid { + /** @page init Initialize Card and Check Status + + An idea on how the smart card status could be evaluated is the + following state machine: + + @dot + digraph { + transportState + [URL="\ref cardos::Commands::transportState"]; + transportPinRetries + [URL="\ref cardos::Commands::transportPinRetries"]; + pkcs15PinRetries + [URL="\ref cardos::Commands::pkcs15PinRetries"]; + sigGPinRetries + [URL="\ref cardos::Commands::sigGPinRetries"]; + pukRetries + [URL="\ref cardos::Commands::pukRetries"]; + changePin + [URL="\ref cardos::Commands::changePin"]; + broken [label="replace card"]; + + start -> transportState; + transportPinRetries -> broken [label="-1"]; + certsValid -> broken [label="false"]; + pukRetries -> broken [label="-1"]; + sigGPinRetries -> broken [label="-1"]; + transportState -> transportPinRetries [label="true"]; + transportPinRetries -> changePin [label=">-1"]; + changePin -> transportState; + transportState -> haveCerts [label="false"]; + haveCerts -> installCerts [label="false"]; + installCerts -> transportState; + haveCerts -> certsValid [label="true"]; + certsValid -> pkcs15PinRetries [label="true"]; + pkcs15PinRetries -> sigGPinRetries [label=">-1"]; + pkcs15PinRetries -> pukRetries [label="-1"]; + pukRetries -> changePin [label=">-1"]; + sigGPinRetries -> valid [label=">-1"]; + {valid broken} -> end; + + {rank=same; valid broken} + {rank=same; transportPinRetries haveCerts} + {rank=same; certsValid installCerts changePin} + } + @enddot + + */ + //! Represents a SuisseID Card /*! This is the parent class for special classes for the respecive SuisseID providers. */