italia / cie-nis-python-sdk

SDK for reading the NIS code from an Italian Electronic Identity Card (CIE) using Python
BSD 3-Clause "New" or "Revised" License
30 stars 10 forks source link

Cosa verifica verifyChild0 e verifyChild1 #14

Open paoloros97 opened 1 year ago

paoloros97 commented 1 year ago

Salve, Cosa viene verificato qui (vedere codice sotto) con "verifyChild0" e "verifyChild1" ?

CIEinterface.py :

 def extractData(self):
        """
        Extracts the personal data from a CIE after the EAC authentication
        :return: The parsed data
        """

        mainDGData = self.readDg(30)
        mainDG = ASN1(mainDGData)

        verifyChild0 = mainDG.root['children'][0]['verify']([0x30, 0x31, 0x30, 0x37])
        verifyChild1 = mainDG.root['children'][1]['verify']([0x30, 0x34, 0x30, 0x30, 0x30, 0x30])

        if not verifyChild0 or not verifyChild1:
            raise Exception('extractData: Invalid DG 30')
...