aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/sca/target
diff options
context:
space:
mode:
authorJ08nY2023-02-17 17:42:43 +0100
committerJ08nY2023-02-17 17:42:43 +0100
commite575b24819b3025839ebee83d6a65bbf2874cf0c (patch)
treefc491b6f7e42a7a431a51064ab8412dd9fbe94e3 /pyecsca/sca/target
parentb299b2653d5ace75b71e6089efbd808ba5850030 (diff)
downloadpyecsca-e575b24819b3025839ebee83d6a65bbf2874cf0c.tar.gz
pyecsca-e575b24819b3025839ebee83d6a65bbf2874cf0c.tar.zst
pyecsca-e575b24819b3025839ebee83d6a65bbf2874cf0c.zip
Diffstat (limited to 'pyecsca/sca/target')
-rw-r--r--pyecsca/sca/target/ISO7816.py6
-rw-r--r--pyecsca/sca/target/ectester.py2
-rw-r--r--pyecsca/sca/target/leia.py2
3 files changed, 9 insertions, 1 deletions
diff --git a/pyecsca/sca/target/ISO7816.py b/pyecsca/sca/target/ISO7816.py
index d0e2118..63326ca 100644
--- a/pyecsca/sca/target/ISO7816.py
+++ b/pyecsca/sca/target/ISO7816.py
@@ -11,6 +11,7 @@ from .base import Target
@public
class CardConnectionException(Exception):
+ """Card could not be connected."""
pass
@@ -105,6 +106,11 @@ class ISO7816Target(Target, ABC):
@abstractmethod
def connect(self, protocol: Optional[CardProtocol] = None):
+ """
+ Connect to the card.
+
+ :param protocol: CardProtocol to use.
+ """
raise NotImplementedError
@property
diff --git a/pyecsca/sca/target/ectester.py b/pyecsca/sca/target/ectester.py
index f1a3639..1ba162d 100644
--- a/pyecsca/sca/target/ectester.py
+++ b/pyecsca/sca/target/ectester.py
@@ -989,6 +989,7 @@ if has_pyscard:
@public
class ECTesterTargetPCSC(ECTesterTarget, PCSCTarget):
+ """An ECTester-applet-based target that is connected via a PCSC-compatible reader."""
pass
if has_leia:
@@ -996,4 +997,5 @@ if has_leia:
@public
class ECTesterTargetLEIA(ECTesterTarget, LEIATarget):
+ """An ECTester-applet-based target that is connected via the LEIA board."""
pass
diff --git a/pyecsca/sca/target/leia.py b/pyecsca/sca/target/leia.py
index 00f784c..cb72955 100644
--- a/pyecsca/sca/target/leia.py
+++ b/pyecsca/sca/target/leia.py
@@ -6,7 +6,7 @@ from smartleia import LEIA, create_APDU_from_bytes, T
from .ISO7816 import ISO7816Target, CommandAPDU, ResponseAPDU, ISO7816, CardProtocol, CardConnectionException
-class LEIATarget(ISO7816Target):
+class LEIATarget(ISO7816Target): # pragma: no cover
"""Smartcard target communicating via LEIA in solo mode."""
def __init__(self, leia: LEIA):