Port to new libosmogsm 'struct osmo_sub_auth_data2'

libosmogsm has recently introdcued a 'struct osmo_sub_auth_data2' as
successor to 'struct osmo_sub_auth_data', together with updated
osmo_auth_gen_vec2/osmo_auth_gen_vec_auts2 API.

The rationale of this new API is to enable
* support for AKA algorithms which use K and/or OP[c] values of 256bit
  (instead of the classic 128bit)
* support for RES length sizes of 4 and 16 bytes (instead of the classic
  8 bytes)

This commit just jumps over to the new API without adding any related
functionality to osmo-hlr.  The latter is left for subsequent commits.

Change-Id: I3207c7bfb73e9ff5471e5c26b66639549e4d48a2
Depends: libosmocore.git Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
diff --git a/tests/auc/auc_test.c b/tests/auc/auc_test.c
index f39a5ad..5906720 100644
--- a/tests/auc/auc_test.c
+++ b/tests/auc/auc_test.c
@@ -116,14 +116,14 @@
 /* Subscriber with 2G-only (COMP128v1) authentication data */
 static void test_gen_vectors_2g_only(void)
 {
-	struct osmo_sub_auth_data aud2g;
-	struct osmo_sub_auth_data aud3g;
+	struct osmo_sub_auth_data2 aud2g;
+	struct osmo_sub_auth_data2 aud3g;
 	struct osmo_auth_vector vec;
 	int rc;
 
 	comment_start();
 
-	aud2g = (struct osmo_sub_auth_data){
+	aud2g = (struct osmo_sub_auth_data2){
 		.type = OSMO_AUTH_TYPE_GSM,
 		.algo = OSMO_AUTH_ALG_COMP128v1,
 	};
@@ -131,7 +131,7 @@
 	osmo_hexparse("EB215756028D60E3275E613320AEC880",
 		      aud2g.u.gsm.ki, sizeof(aud2g.u.gsm.ki));
 
-	aud3g = (struct osmo_sub_auth_data){ 0 };
+	aud3g = (struct osmo_sub_auth_data2){ 0 };
 
 	next_rand("39fa2f4e3d523d8619a73b4f65c3e14d", true);
 
@@ -179,14 +179,14 @@
  * reflects the default configuration of sysmoUSIM-SJS1 */
 static void test_gen_vectors_2g_plus_3g(void)
 {
-	struct osmo_sub_auth_data aud2g;
-	struct osmo_sub_auth_data aud3g;
+	struct osmo_sub_auth_data2 aud2g;
+	struct osmo_sub_auth_data2 aud3g;
 	struct osmo_auth_vector vec;
 	int rc;
 
 	comment_start();
 
-	aud2g = (struct osmo_sub_auth_data){
+	aud2g = (struct osmo_sub_auth_data2){
 		.type = OSMO_AUTH_TYPE_GSM,
 		.algo = OSMO_AUTH_ALG_COMP128v1,
 	};
@@ -194,9 +194,11 @@
 	osmo_hexparse("EB215756028D60E3275E613320AEC880",
 		      aud2g.u.gsm.ki, sizeof(aud2g.u.gsm.ki));
 
-	aud3g = (struct osmo_sub_auth_data){
+	aud3g = (struct osmo_sub_auth_data2){
 		.type = OSMO_AUTH_TYPE_UMTS,
 		.algo = OSMO_AUTH_ALG_MILENAGE,
+		.u.umts.k_len = 16,
+		.u.umts.opc_len = 16,
 		.u.umts.sqn = 31,
 	};
 
@@ -292,8 +294,8 @@
  * tuples are suitable for both 2G and 3G authentication */
 static void test_gen_vectors_3g_only(void)
 {
-	struct osmo_sub_auth_data aud2g;
-	struct osmo_sub_auth_data aud3g;
+	struct osmo_sub_auth_data2 aud2g;
+	struct osmo_sub_auth_data2 aud3g;
 	struct osmo_auth_vector vec;
 	struct osmo_auth_vector vecs[3];
 	uint8_t auts[14];
@@ -302,11 +304,13 @@
 
 	comment_start();
 
-	aud2g = (struct osmo_sub_auth_data){ 0 };
+	aud2g = (struct osmo_sub_auth_data2){ 0 };
 
-	aud3g = (struct osmo_sub_auth_data){
+	aud3g = (struct osmo_sub_auth_data2){
 		.type = OSMO_AUTH_TYPE_UMTS,
 		.algo = OSMO_AUTH_ALG_MILENAGE,
+		.u.umts.k_len = 16,
+		.u.umts.opc_len = 16,
 		.u.umts.sqn = 31,
 	};
 
@@ -466,18 +470,20 @@
  * 2G and 3G authentication */
 static void test_gen_vectors_3g_xor(void)
 {
-	struct osmo_sub_auth_data aud2g;
-	struct osmo_sub_auth_data aud3g;
+	struct osmo_sub_auth_data2 aud2g;
+	struct osmo_sub_auth_data2 aud3g;
 	struct osmo_auth_vector vec;
 	int rc;
 
 	comment_start();
 
-	aud2g = (struct osmo_sub_auth_data){ 0 };
+	aud2g = (struct osmo_sub_auth_data2){ 0 };
 
-	aud3g = (struct osmo_sub_auth_data){
+	aud3g = (struct osmo_sub_auth_data2){
 		.type = OSMO_AUTH_TYPE_UMTS,
 		.algo = OSMO_AUTH_ALG_XOR_3G,
+		.u.umts.k_len = 16,
+		.u.umts.opc_len = 16,
 		.u.umts.sqn = 0,
 	};
 
@@ -517,39 +523,43 @@
 	int rc;
 	int i;
 
-	struct osmo_sub_auth_data aud2g = {
+	struct osmo_sub_auth_data2 aud2g = {
 		.type = OSMO_AUTH_TYPE_GSM,
 		.algo = OSMO_AUTH_ALG_COMP128v1,
 	};
 
-	struct osmo_sub_auth_data aud3g = {
+	struct osmo_sub_auth_data2 aud3g = {
 		.type = OSMO_AUTH_TYPE_UMTS,
 		.algo = OSMO_AUTH_ALG_MILENAGE,
+		.u.umts.k_len = 16,
+		.u.umts.opc_len = 16,
 	};
 
-	struct osmo_sub_auth_data aud2g_noalg = {
+	struct osmo_sub_auth_data2 aud2g_noalg = {
 		.type = OSMO_AUTH_TYPE_GSM,
 		.algo = OSMO_AUTH_ALG_NONE,
 	};
 
-	struct osmo_sub_auth_data aud3g_noalg = {
+	struct osmo_sub_auth_data2 aud3g_noalg = {
 		.type = OSMO_AUTH_TYPE_UMTS,
 		.algo = OSMO_AUTH_ALG_NONE,
+		.u.umts.k_len = 16,
+		.u.umts.opc_len = 16,
 	};
 
-	struct osmo_sub_auth_data aud_notype = {
+	struct osmo_sub_auth_data2 aud_notype = {
 		.type = OSMO_AUTH_TYPE_NONE,
 		.algo = OSMO_AUTH_ALG_MILENAGE,
 	};
 
-	struct osmo_sub_auth_data no_aud = {
+	struct osmo_sub_auth_data2 no_aud = {
 		.type = OSMO_AUTH_TYPE_NONE,
 		.algo = OSMO_AUTH_ALG_NONE,
 	};
 
 	struct {
-		struct osmo_sub_auth_data *aud2g;
-		struct osmo_sub_auth_data *aud3g;
+		struct osmo_sub_auth_data2 *aud2g;
+		struct osmo_sub_auth_data2 *aud3g;
 		uint8_t *rand_auts;
 		uint8_t *auts;
 		const char *label;