From 3cf6b97bbf037a42dbedb692d337e991bac5adf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 25 Sep 2006 22:33:39 +0000 Subject: [PATCH] Check that the pre-wrapped data is the same as afterward. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18174 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/gssmask/gssmaestro.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appl/gssmask/gssmaestro.c b/appl/gssmask/gssmaestro.c index 57f8941d6..81f2bf653 100644 --- a/appl/gssmask/gssmaestro.c +++ b/appl/gssmask/gssmaestro.c @@ -398,6 +398,12 @@ test_wrap(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2, if (val) errx(1, "unwrap_token failed to host: %s", c2->moniker); + if (msg.length != out.length) + errx(1, "unwrap'ed token have wrong length"); + + if (memcmp(msg.data, out.data, msg.length) != 0) + errx(1, "unwrap'ed token have wrong data"); + krb5_data_free(&wrapped); krb5_data_free(&out); }