validate_key
if ((ret = validate_key(hdl, keyformat, buf, buflen)) != 0) {
if ((ret = validate_key(hdl, keyformat, (const char *)km, kmlen)) != 0)