From becdb4458337a40bde7ba7a23525c341abca9f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 30 May 2007 13:58:46 +0000 Subject: [PATCH] more testing of lifetimes git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20694 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/test_kcred.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/gssapi/test_kcred.c b/lib/gssapi/test_kcred.c index be621b6f5..77bd04454 100644 --- a/lib/gssapi/test_kcred.c +++ b/lib/gssapi/test_kcred.c @@ -112,6 +112,24 @@ copy_import(void) errx(1, "usages disjoined"); } + gss_release_name(&min_stat, &name2); + gss_release_oid_set(&min_stat, &mechs2); + + maj_stat = gss_inquire_cred(&min_stat, cred2, &name2, &lifetime2, + &usage2, &mechs2); + if (maj_stat != GSS_S_COMPLETE) + errx(1, "gss_inquire_cred"); + + maj_stat = gss_compare_name(&min_stat, name1, name2, &equal); + if (maj_stat != GSS_S_COMPLETE) + errx(1, "gss_compare_name"); + if (!equal) + errx(1, "names not equal"); + + if (lifetime1 != lifetime2) + errx(1, "lifetime not equal %lu != %lu", + (unsigned long)lifetime1, (unsigned long)lifetime2); + gss_release_cred(&min_stat, &cred1); gss_release_cred(&min_stat, &cred2);