def _get_basic_info(ca_name, cert, ca_dir=None):
 if (ca_dir is None):
  ca_dir = '{0}/{1}'.format(_cert_base_path(), ca_name)
 index_file = '{0}/index.txt'.format(ca_dir)
 expire_date = _four_digit_year_to_two_digit(datetime.strptime(cert.get_notAfter(), four_digit_year_fmt))
 serial_number = format(cert.get_serial_number(), 'X')
 subject = '/'
 subject += '/'.join(['{0}={1}'.format(x, y) for (x, y) in cert.get_subject().get_components()])
 subject += '\n'
 return (index_file, expire_date, serial_number, subject)

def _get_basic_info ( ca_name , cert , ca_dir = None ) : if ( ca_dir is None ) : ca_dir = '{0}/{1}' . format ( _cert_base_path ( ) , ca_name ) index_file = '{0}/index.txt' . format ( ca_dir ) expire_date = _four_digit_year_to_two_digit ( datetime . strptime ( cert . get_notAfter ( ) , four_digit_year_fmt ) ) serial_number = format ( cert . get_serial_number ( ) , 'X' ) subject = '/' subject += '/' . join ( [ '{0}={1}' . format ( x , y ) for ( x , y ) in cert . get_subject ( ) . get_components ( ) ] ) subject += '\n' return ( index_file , expire_date , serial_number , subject )
get basic info to write out to the index .