def __getitem__(self, item):
        """
        Returns extension by index, creating a copy
        """
        ext_ptr = libcrypto.X509_get_ext(self.cert.cert, item)
        if ext_ptr is None:
            raise IndexError
        return X509_EXT(ext_ptr, True)
def __getitem__ ( self , item ) : ext_ptr = libcrypto . X509_get_ext ( self . cert . cert , item ) if ext_ptr is None : raise IndexError return X509_EXT ( ext_ptr , True )
Returns extension by index, creating a copy