Test if reference of keyinfo is valid