'Returns:
All DNS altnames.'

@property
def altnames(self):

    altnames = []
    for i in range(self.x509.get_extension_count()):
        ext = self.x509.get_extension(i)
        if (ext.get_short_name() == 'subjectAltName'):
            try:
                dec = decode(ext.get_data(), asn1Spec=_GeneralNames())
            except PyAsn1Error:
                continue
            for i in dec[0]:
                if i[0].hasValue():
                    e = i[0].asOctets()
                    altnames.append(e)
    return altnames
