def dump_certificate_request(type, req):
 bio = _new_mem_buf()
 if (type == FILETYPE_PEM):
  result_code = _lib.PEM_write_bio_X509_REQ(bio, req._req)
 elif (type == FILETYPE_ASN1):
  result_code = _lib.i2d_X509_REQ_bio(bio, req._req)
 elif (type == FILETYPE_TEXT):
  result_code = _lib.X509_REQ_print_ex(bio, req._req, 0, 0)
 else:
  raise ValueError('type argument must be FILETYPE_PEM, FILETYPE_ASN1, or FILETYPE_TEXT')
 _openssl_assert((result_code != 0))
 return _bio_to_string(bio)

def dump_certificate_request ( type , req ) : bio = _new_mem_buf ( ) if ( type == FILETYPE_PEM ) : result_code = _lib . PEM_write_bio_X509_REQ ( bio , req . _req ) elif ( type == FILETYPE_ASN1 ) : result_code = _lib . i2d_X509_REQ_bio ( bio , req . _req ) elif ( type == FILETYPE_TEXT ) : result_code = _lib . X509_REQ_print_ex ( bio , req . _req , 0 , 0 ) else : raise ValueError ( 'type argument must be FILETYPE_PEM, FILETYPE_ASN1, or FILETYPE_TEXT' ) _openssl_assert ( ( result_code != 0 ) ) return _bio_to_string ( bio )
dump a certificate request to a buffer .