def nessus_x509scan_loopy(var1, reporthost, x509_obs, var2):
    """ Specific Nessus loop to find all X.509 certificate issues """
    for reportitem in reporthost.findall('ReportItem'):
        if int(reportitem.get('pluginID')) in x509_obs.keys():
            if var1 == 'addr':
                var2.append(reporthost.get('name') + ':' + reportitem.get(
                    'port'))
            elif var1 == 'obs':
                var2.append(x509_obs.get(int(reportitem.get('pluginID'))))
