#NEWLINE# def extract_from_system( ) : #NEWLINE# #INDENT# '\n    Extracts trusted CA certs from the system CA cert bundle\n\n    :return:\n        A list of byte strings - each a DER-encoded certificate\n    ' #NEWLINE# ca_path = system_path ( ) #NEWLINE# output = [ ] #NEWLINE# with open ( ca_path , 'rb' ) as f : #NEWLINE# #INDENT# for entry_info in unarmor ( f . read ( ) , multiple = True ) : #NEWLINE# #INDENT# if ( entry_info [ 0 ] == 'CERTIFICATE' ) : #NEWLINE# #INDENT# output . append ( entry_info [ 2 ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return output