def read_csr(csr):
 csr = _get_request_obj(csr)
 ret = {'Version': (csr.get_version() + 1), 'Subject': _parse_subject(csr.get_subject()), 'Subject Hash': _dec2hex(csr.get_subject().as_hash()), 'Public Key Hash': hashlib.sha1(csr.get_pubkey().get_modulus()).hexdigest()}
 ret['X509v3 Extensions'] = _get_csr_extensions(csr)
 return ret

def read_csr ( csr ) : csr = _get_request_obj ( csr ) ret = { 'Version' : ( csr . get_version ( ) + 1 ) , 'Subject' : _parse_subject ( csr . get_subject ( ) ) , 'Subject Hash' : _dec2hex ( csr . get_subject ( ) . as_hash ( ) ) , 'Public Key Hash' : hashlib . sha1 ( csr . get_pubkey ( ) . get_modulus ( ) ) . hexdigest ( ) } ret [ 'X509v3 Extensions' ] = _get_csr_extensions ( csr ) return ret
returns a dict containing details of a certificate request .