aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-05-18 19:36:42 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-01 12:10:41 +0000
commit4f511b67fd83b5767071604920ebc3bac025b751 (patch)
treebef78c77800e4c157d1d54a5d0b0ff2d1f6abb8e
parentec8f192fec548dd87522946319d80e4f3bc4e35c (diff)
osmo-auc-gen: Print hex values without intermittent spaces
When generating some authentication vectors using the osmo-auc-gen utility, it used to print values like this: AUTN: f7 55 bc 47 de d0 00 00 f9 ed 4b 3f 6c 2a 97 6f which is quite difficult to copy+paste on the terminal. Now it generates the following format: Change-Id: I2805615e0c2087ca632e0658b37a9e06929620b6 AUTN: f755bc47ded00000f9ed4b3f6c2a976f Reviewed-on: https://gerrit.osmocom.org/164 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
-rw-r--r--utils/osmo-auc-gen.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c
index b026e28..3b3e557 100644
--- a/utils/osmo-auc-gen.c
+++ b/utils/osmo-auc-gen.c
@@ -48,18 +48,18 @@ static void dump_triplets_dat(struct osmo_auth_vector *vec)
static void dump_auth_vec(struct osmo_auth_vector *vec)
{
- printf("RAND:\t%s\n", osmo_hexdump(vec->rand, sizeof(vec->rand)));
+ printf("RAND:\t%s\n", osmo_hexdump_nospc(vec->rand, sizeof(vec->rand)));
if (vec->auth_types & OSMO_AUTH_TYPE_UMTS) {
- printf("AUTN:\t%s\n", osmo_hexdump(vec->autn, sizeof(vec->autn)));
- printf("IK:\t%s\n", osmo_hexdump(vec->ik, sizeof(vec->ik)));
- printf("CK:\t%s\n", osmo_hexdump(vec->ck, sizeof(vec->ck)));
- printf("RES:\t%s\n", osmo_hexdump(vec->res, vec->res_len));
+ printf("AUTN:\t%s\n", osmo_hexdump_nospc(vec->autn, sizeof(vec->autn)));
+ printf("IK:\t%s\n", osmo_hexdump_nospc(vec->ik, sizeof(vec->ik)));
+ printf("CK:\t%s\n", osmo_hexdump_nospc(vec->ck, sizeof(vec->ck)));
+ printf("RES:\t%s\n", osmo_hexdump_nospc(vec->res, vec->res_len));
}
if (vec->auth_types & OSMO_AUTH_TYPE_GSM) {
- printf("SRES:\t%s\n", osmo_hexdump(vec->sres, sizeof(vec->sres)));
- printf("Kc:\t%s\n", osmo_hexdump(vec->kc, sizeof(vec->kc)));
+ printf("SRES:\t%s\n", osmo_hexdump_nospc(vec->sres, sizeof(vec->sres)));
+ printf("Kc:\t%s\n", osmo_hexdump_nospc(vec->kc, sizeof(vec->kc)));
}
}