From 469d23aa11785c5dbff419040a944955260ad428 Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Wed, 2 Nov 2011 15:28:12 +0000 Subject: [PATCH] removed warnings by sphinx due to invalid formatting git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@608 96b47cad-a561-4643-ad3b-153ac7d7599c --- .../src/vpicc/virtualsmartcard/SEutils.py | 35 ++++++++++--------- .../virtualsmartcard/SmartcardFilesystem.py | 3 +- .../virtualsmartcard/cards/cryptoflex.py | 13 ++++--- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py b/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py index 933be04..33348b2 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/SEutils.py @@ -190,18 +190,21 @@ class Security_Environment(object): P1 specifies the operation to perform, p2 is either the SEID for the referred SE or the tag of a control reference template - P1: - b8 b7 b6 b5 b4 b3 b2 b1 Meaning - - - - 1 - - - - Secure messaging in command data field - - - 1 - - - - - Secure messaging in response data field - - 1 - - - - - - Computation, decipherment, internal - authentication and key agreement - 1 - - - - - - - Verification, encipherment, external - authentication and key agreement - - - - - 0 0 0 1 SET - 1 1 1 1 0 0 1 0 STORE - 1 1 1 1 0 0 1 1 RESTORE - 1 1 1 1 0 1 0 0 ERASE + :param p1: + == == == == == == == == ====================================== + b8 b7 b6 b5 b4 b3 b2 b1 Meaning + == == == == == == == == ====================================== + - - - 1 - - - - Secure messaging in command data field + - - 1 - - - - - Secure messaging in response data field + - 1 - - - - - - Computation, decipherment, internal + authentication and key agreement + 1 - - - - - - - Verification, encipherment, external + authentication and key agreement + - - - - 0 0 0 1 SET + 1 1 1 1 0 0 1 0 STORE + 1 1 1 1 0 0 1 1 RESTORE + 1 1 1 1 0 1 0 0 ERASE + == == == == == == == == ====================================== """ cmd = p1 & 0x0F @@ -658,10 +661,8 @@ class Security_Environment(object): card, or accesses a key pair previously generated in the card. :param p1: should be 0x00 (generate new key) - :param p2:'00' (no information provided) or reference of the key to be \ - generated - :param data: One or more CRTs associated to the key generation if P1-P2 \ - different from '0000' + :param p2: '00' (no information provided) or reference of the key to be generated + :param data: One or more CRTs associated to the key generation if P1-P2 different from '0000' """ from Crypto.PublicKey import RSA, DSA @@ -712,4 +713,4 @@ class Security_Environment(object): #We do not support extended header lists yet raise SwError["ERR_NOTSUPPORTED"] else: - return SW["NORMAL"], result \ No newline at end of file + return SW["NORMAL"], result diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py index 3f1b482..607f9cf 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py @@ -874,8 +874,7 @@ class MF(DF): Function for instruction 0x0e. Takes the parameter bytes 'p1', 'p2' as integers and 'data' as binary string. - :returns: the status bytes as two byte long integer and the response - data as binary string. + :returns: the status bytes as two byte long integer and the response data as binary string. """ ef, offsets, datalist = self.dataUnitsDecodePlain(p1, p2, data) # If INS = '0E', then, if present, the command data field encodes diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/cards/cryptoflex.py b/virtualsmartcard/src/vpicc/virtualsmartcard/cards/cryptoflex.py index 7c68aa3..d2fbc07 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/cards/cryptoflex.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/cards/cryptoflex.py @@ -37,10 +37,13 @@ class CryptoflexSE(Security_Environment): """ In the Cryptoflex card this command only supports RSA keys. - :param data: Contains the public exponent used for key generation - :param p1: The key number. Can be used later to refer to the generated key \ - :param p2: Used to specify the key length. The mapping is: 0x40 => 256 \ - Bit, 0x60 => 512 Bit, 0x80 => 1024 + :param data: + Contains the public exponent used for key generation + :param p1: + The key number. Can be used later to refer to the generated key + :param p2: + Used to specify the key length. The mapping is: 0x40 => 256 Bit, + 0x60 => 512 Bit, 0x80 => 1024 """ from Crypto.PublicKey import RSA from Crypto.Util.randpool import RandomPool @@ -250,4 +253,4 @@ class CryptoflexMF(MF): # {{{ self.current = file return SW["NORMAL"], data -# }}} \ No newline at end of file +# }}}