def _decode_subject(self, subject):
self.common_names = []<EOL>subject_name = []<EOL>for rdnss in subject:<EOL><INDENT>for rdns in rdnss:<EOL><INDENT>rdnss_list = []<EOL>for nameval in rdns:<EOL><INDENT>val_type = nameval.getComponentByName('<STR_LIT:type>')<EOL>value = nameval.getComponentByName('<STR_LIT:value>')<EOL>if val_type not in DN_OIDS:<EOL><INDENT>logger.debug("<STR_LIT>".format(val_type))<EOL>continue<EOL><DEDENT>val_type = DN_OIDS[val_type]<EOL>value = der_decoder.decode(value,<EOL>asn1Spec = DirectoryString())[<NUM_LIT:0>]<EOL>value = value.getComponent()<EOL>try:<EOL><INDENT>value = _decode_asn1_string(value)<EOL><DEDENT>except UnicodeError:<EOL><INDENT>logger.debug("<STR_LIT>".format(value))<EOL>continue<EOL><DEDENT>if val_type == "<STR_LIT>":<EOL><INDENT>self.common_names.append(value)<EOL><DEDENT>rdnss_list.append((val_type, value))<EOL><DEDENT>subject_name.append(tuple(rdnss_list))<EOL><DEDENT><DEDENT>self.subject_name = tuple(subject_name)<EOL>
Load data from a ASN.1 subject.