Fri Jan 26 00:06:50 1996 Sam Hartman <hartmans@tertius.mit.edu>
+ * ktutil.c (ktutil_list): Implement -e option to show enctypes.
+
* ktutil_funcs.c (ktutil_write_srvtab): Write v4 version
properly. Previous code was endien dependent.
/*
* kadmin/ktutil/ktutil.c
*
- * Copyright 1995 by the Massachusetts Institute of Technology.
+ * Copyright 1995, 1996 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
krb5_error_code retval;
krb5_kt_list lp;
struct tm *stime;
- int show_time = 0, show_keys = 0;
+ int show_time = 0, show_keys = 0, show_enctype = 0;
int i, j;
char *pname;
show_keys++;
continue;
}
+if ( (strlen(argv[i]) == 2)&&
+ (!strncmp(argv[i],"-e",2))) {
+ show_enctype = 1;
+ continue;
+}
+
fprintf(stderr, "%s: illegal arguments\n", argv[0]);
return;
}
printf(fmtbuf);
}
printf("%40s", pname);
+ if (show_enctype) {
+ static char buf[256];
+ if ((retval = krb5_enctype_to_string(
+ lp->entry->key.enctype, buf, 256))) {
+ com_err(argv[0], retval, "While converting enctype to string");
+ return;
+ }
+ printf(" (%s) ", buf);
+ }
+
if (show_keys) {
printf(" (0x");
for (j = 0; j < lp->entry->key.length; j++)