'Ensure a keyid doesn\'t have a leading 0x, has leading or trailing whitespace, and make sure is lowercase'

def normalize_keyid(self, keyid):

    ret = keyid.strip().lower()
    if ret.startswith('0x'):
        return ret[2:]
    elif ret.startswith('0X'):
        return ret[2:]
    else:
        return ret
