summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/gssapi/test_kcred.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/gssapi/test_kcred.c')
-rw-r--r--crypto/heimdal/lib/gssapi/test_kcred.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/crypto/heimdal/lib/gssapi/test_kcred.c b/crypto/heimdal/lib/gssapi/test_kcred.c
index b774b04..a22d4ec 100644
--- a/crypto/heimdal/lib/gssapi/test_kcred.c
+++ b/crypto/heimdal/lib/gssapi/test_kcred.c
@@ -1,18 +1,18 @@
/*
- * Copyright (c) 2003-2004 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
+ * Copyright (c) 2003-2004 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
*
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of KTH nor the names of its contributors may be
* used to endorse or promote products derived from this software without
@@ -35,18 +35,18 @@
#include <config.h>
#endif
+#include <roken.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <gssapi.h>
+#include <gssapi_krb5.h>
+#include <gssapi_spnego.h>
#include <krb5.h>
#include <err.h>
-#include <roken.h>
#include <getarg.h>
-RCSID("$Id: test_kcred.c 20694 2007-05-30 13:58:46Z lha $");
-
static int version_flag = 0;
static int help_flag = 0;
@@ -79,9 +79,9 @@ copy_import(void)
if (ret)
errx(1, "krb5_init_context");
- ret = krb5_cc_gen_new(context, &krb5_mcc_ops, &id);
+ ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, &id);
if (ret)
- krb5_err(context, 1, ret, "krb5_cc_gen_new");
+ krb5_err(context, 1, ret, "krb5_cc_new_unique");
maj_stat = gss_krb5_copy_ccache(&min_stat, cred1, id);
if (maj_stat != GSS_S_COMPLETE)
@@ -101,7 +101,7 @@ copy_import(void)
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);
@@ -125,7 +125,7 @@ copy_import(void)
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);
@@ -168,7 +168,7 @@ main(int argc, char **argv)
setprogname(argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))
usage(1);
-
+
if (help_flag)
usage (0);
OpenPOWER on IntegriCloud