def _get_request_obj(csr):
 text = _text_or_file(csr)
 text = get_pem_entry(text, pem_type='CERTIFICATE REQUEST')
 return M2Crypto.X509.load_request_string(text)

def _get_request_obj ( csr ) : text = _text_or_file ( csr ) text = get_pem_entry ( text , pem_type = 'CERTIFICATE REQUEST' ) return M2Crypto . X509 . load_request_string ( text )
returns a csr object based on pem text .