ocsp_pyasn1.py
def read_cert_bundle(self, ca_bundle_file, storage=None):
        """
        Reads a certificate file including certificates in PEM format
        """
        if storage is None:
            storage = SnowflakeOCSP.ROOT_CERTIFICATES_DICT
        logger.debug('reading certificate bundle: %s', ca_bundle_file)
        all_certs = open(ca_bundle_file, 'rb').read()

        state = 0
        contents = []
        for line in all_certs.split(b'\n'):
            if state == 0 and line.startswith(b'-----BEGIN CERTIFICATE-----'):
                state = 1
                contents.append(line)
            elif state == 1:
                contents.append(line)
                if line.startswith(b'-----END CERTIFICATE-----'):
                    cert_openssl = load_certificate(
                        FILETYPE_PEM,
                        b'\n'.join(contents))
                    cert = self._convert_openssl_to_pyasn1_certificate(
                        cert_openssl)
                    storage[self._get_subject_hash(cert)] = cert
                    state = 0
                    contents = []

        Reads a certificate file including certificates in PEM format
        
Reads a certificate file including certificates in PEM format
Reads a certificate file including certificates in PEM format
def read_cert_bundle(self, ca_bundle_file, storage=None):
        if storage is None:
            storage = SnowflakeOCSP.ROOT_CERTIFICATES_DICT
        logger.debug('reading certificate bundle: %s', ca_bundle_file)
        all_certs = open(ca_bundle_file, 'rb').read()
        state = 0
        contents = []
        for line in all_certs.split(b'\n'):
            if state == 0 and line.startswith(b'-----BEGIN CERTIFICATE-----'):
                state = 1
                contents.append(line)
            elif state == 1:
                contents.append(line)
                if line.startswith(b'-----END CERTIFICATE-----'):
                    cert_openssl = load_certificate(
                        FILETYPE_PEM,
                        b'\n'.join(contents))
                    cert = self._convert_openssl_to_pyasn1_certificate(
                        cert_openssl)
                    storage[self._get_subject_hash(cert)] = cert
                    state = 0
                    contents = []
def read_cert_bundle ( self , ca_bundle_file , storage = None ) : if storage is None : storage = SnowflakeOCSP . ROOT_CERTIFICATES_DICT logger . debug ( 'reading certificate bundle: %s' , ca_bundle_file ) all_certs = open ( ca_bundle_file , 'rb' ) . read ( ) state = 0 contents = [ ] for line in all_certs . split ( b'\n' ) : if state == 0 and line . startswith ( b'-----BEGIN CERTIFICATE-----' ) : state = 1 contents . append ( line ) elif state == 1 : contents . append ( line ) if line . startswith ( b'-----END CERTIFICATE-----' ) : cert_openssl = load_certificate ( FILETYPE_PEM , b'\n' . join ( contents ) ) cert = self . _convert_openssl_to_pyasn1_certificate ( cert_openssl ) storage [ self . _get_subject_hash ( cert ) ] = cert state = 0 contents = [ ]
Reads a certificate file including certificates in PEM format
Reads a certificate file including certificates in PEM format
"""
        Reads a certificate file including certificates in PEM format
        """
self
ca_bundle_file
storage