+Fri Oct 14 00:31:14 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * main.c (process_args): Select the cryptosystem to be used using
+ krb5_use_cstype() instead of using a implementation
+ specific assignment. Also, allow the encryption type to
+ be specified using a command line option.
+
Tue Oct 11 22:11:09 1994 Theodore Y. Ts'o (tytso@dcl)
* do_as_req.c (process_as_req): Don't assume that the request
char *rcname = 0;
char *lrealm;
krb5_error_code retval, retval2;
+ krb5_enctype kdc_etype = DEFAULT_KDC_ETYPE;
krb5_enctype etype;
extern krb5_deltat krb5_clockskew;
extern char *optarg;
- while ((c = getopt(argc, argv, "r:d:mM:k:R:")) != EOF) {
+ while ((c = getopt(argc, argv, "r:d:mM:k:R:e:")) != EOF) {
switch(c) {
case 'r': /* realm name for db */
db_realm = optarg;
case 'R':
rcname = optarg;
break;
+ case 'e':
+ kdc_etype = atoi(optarg);
+ break;
case '?':
default:
usage(argv[0]);
exit(1);
}
-#ifdef PROVIDE_DES_CBC_CRC
- master_encblock.crypto_entry = krb5_des_cst_entry.system;
-#else
-error(You gotta figure out what cryptosystem to use in the KDC);
-#endif
+ if (!valid_etype(kdc_etype)) {
+ com_err(argv[0], KRB5_PROG_ETYPE_NOSUPP,
+ "while setting up etype %d", kdc_etype);
+ exit(1);
+ }
+ krb5_use_cstype(&master_encblock, kdc_etype);
if (retval = krb5_db_fetch_mkey(master_princ, &master_encblock, manual,
FALSE, /* only read it once, if at all */