Fix bugs in 3GPP exception checking and improve diagnostics in crypt/cmp/cmp_vfy.c