Beispiel #1
0
    def __init__(self, binCert, predecessor):
        super(CVCWindow, self).__init__("Zugriffsrechte", predecessor)

        self.successor = PinpadGTK("pin", None)

        # Convert the binary certificate to the internal representation and
        # extract the relative authorization from the chat
        cvc = pace.d2i_CV_CERT(binCert)
        chat = pace.cvc_get_chat(cvc)
        self.chat_oid = pace.get_chat_oid(chat)
        self.chat = pace.get_binary_chat(chat)
        self.rel_auth = []
        for char in self.chat:
            self.rel_auth.append(ord(char))
        self.rel_auth_len = len(self.rel_auth)

        # Extract the access rights from the CHAT and display them in the window
        self.access_rights = []
        j = 0
        for i in range((self.rel_auth_len - 1) * 8 - 2):
            if i % 8 == 0:
                j += 1
            if self.rel_auth[self.rel_auth_len - j] & (1 << (i % 8)):
                chk = customCheckButton(i, self.body)
                self.access_rights.append(chk)
Beispiel #2
0
    def __init__(self, binCert, predecessor):
        super(CVCWindow, self).__init__("Zugriffsrechte", predecessor)

        self.successor = PinpadGTK("pin", None)

        #Convert the binary certificate to the internal representation and
        #extract the relative authorization from the chat
        cvc = pace.d2i_CV_CERT(binCert)
        chat = pace.cvc_get_chat(cvc)
        self.chat_oid = pace.get_chat_oid(chat)
        self.chat = pace.get_binary_chat(chat)
        self.rel_auth = []
        for char in self.chat:
            self.rel_auth.append(ord(char))
        self.rel_auth_len = len(self.rel_auth)

        #Extract the access rights from the CHAT and display them in the window
        self.access_rights = []
        j = 0
        for i in range((self.rel_auth_len - 1) * 8 - 2):
            if (i % 8 == 0):
                j += 1
            if self.rel_auth[self.rel_auth_len - j] & (1 << (i % 8)):
                chk = customCheckButton(i, self.body)
                self.access_rights.append(chk)
Beispiel #3
0
    def __init__(self, binDescription, binCert):
        super(CertificateDescriptionWindow,
              self).__init__("Dienstanbieter", None)

        #binDesciption contains the Certificate Description as a octet string
        desc = pace.d2i_CVC_CERTIFICATE_DESCRIPTION(binDescription)

        self.successor = CVCWindow(binCert, self)

        #Display the validity period:
        cvc = pace.d2i_CV_CERT(binCert)
        effective_date = self.formatDate(pace.get_effective_date(cvc))
        expiration_date = self.formatDate(pace.get_expiration_date(cvc))
        validity_period = effective_date + " - " + expiration_date
        #self.addRow(u"Gültig ab:", effective_date)
        #self.addRow(u"Gültig bis:", expiration_date)
        self.addRow(u"Gültigkeitszeitraum:", validity_period)

        #Display issuer Name and possibly URL and subject name and possibly URL
        issuer_name = pace.get_issuer_name(desc)
        issuer_url = pace.get_issuer_url(desc)
        self.addRow("Zertifikatsaussteller:", issuer_name)
        if issuer_url is not None:
            self.addRow("", issuer_url, True)
        subject_name = pace.get_subject_name(desc)
        subject_url = pace.get_subject_url(desc)
        self.addRow("Zertifikatsinhaber:", subject_name)
        if subject_url is not None:
            self.addRow("", subject_url, True)
        self.set_focus(None)

        #Extract, format and display the terms of usage
        terms = pace.get_termsOfUsage(desc)
        formated_terms = self.formatTOU(terms)
        self.addRow("Beschreibung:", formated_terms)

        self.show_all()
Beispiel #4
0
    def __init__(self, binDescription, binCert):
        super(CertificateDescriptionWindow, self).__init__("Dienstanbieter", None)

        # binDesciption contains the Certificate Description as a octet string
        desc = pace.d2i_CVC_CERTIFICATE_DESCRIPTION(binDescription)

        self.successor = CVCWindow(binCert, self)

        # Display the validity period:
        cvc = pace.d2i_CV_CERT(binCert)
        effective_date = self.formatDate(pace.get_effective_date(cvc))
        expiration_date = self.formatDate(pace.get_expiration_date(cvc))
        validity_period = effective_date + " - " + expiration_date
        # self.addRow(u"Gültig ab:", effective_date)
        # self.addRow(u"Gültig bis:", expiration_date)
        self.addRow(u"Gültigkeitszeitraum:", validity_period)

        # Display issuer Name and possibly URL and subject name and possibly URL
        issuer_name = pace.get_issuer_name(desc)
        issuer_url = pace.get_issuer_url(desc)
        self.addRow("Zertifikatsaussteller:", issuer_name)
        if issuer_url is not None:
            self.addRow("", issuer_url, True)
        subject_name = pace.get_subject_name(desc)
        subject_url = pace.get_subject_url(desc)
        self.addRow("Zertifikatsinhaber:", subject_name)
        if subject_url is not None:
            self.addRow("", subject_url, True)
        self.set_focus(None)

        # Extract, format and display the terms of usage
        terms = pace.get_termsOfUsage(desc)
        formated_terms = self.formatTOU(terms)
        self.addRow("Beschreibung:", formated_terms)

        self.show_all()