libosmogsm: Add OSMO_ASSERT() to ensure correct algorithm

Let's make sure that nobody ever ends up calling the algo_impl
call-backs with data of a non-matching algorithm.  This should
never happen at all, as all normal users should go through
the auth_core.c:osmo_auth_gen_vec* API, which dispatches based
on algorithm.

Change-Id: I22b504b6cffb4999b2f14772fffcb2f6f02c198c
diff --git a/src/gsm/auth_comp128v1.c b/src/gsm/auth_comp128v1.c
index a314dc2..ded3f8a 100644
--- a/src/gsm/auth_comp128v1.c
+++ b/src/gsm/auth_comp128v1.c
@@ -30,6 +30,7 @@
 			  struct osmo_sub_auth_data2 *aud,
 			  const uint8_t *_rand)
 {
+	OSMO_ASSERT(aud->algo == OSMO_AUTH_ALG_COMP128v1);
 	comp128v1(aud->u.gsm.ki, _rand, vec->sres, vec->kc);
 	vec->auth_types = OSMO_AUTH_TYPE_GSM;