def parse(self, s):

        start = s.find("-----BEGIN CERTIFICATE-----")
        end = s.find("-----END CERTIFICATE-----")
        if start == -1:
            raise SyntaxError("Missing PEM prefix")
        if end == -1:
            raise SyntaxError("Missing PEM postfix")
        s = s[start+len("-----BEGIN CERTIFICATE-----") : end]

        bytes = base64ToBytes(s)
        self.parseBinary(bytes)
        return self
Parse a PEM-encoded X.509 certificate.
dataset/ETHPy150Open CollabQ/CollabQ/vendor/gdata/tlslite/X509.py/X509.parse