From: Theodore Tso Date: Wed, 19 Oct 1994 22:55:34 +0000 (+0000) Subject: Select the cryptosystem to be used using krb5_use_cstype() instead of X-Git-Tag: krb5-1.0-beta5~1090 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5c57295f5d3628a98d9d0eef7da6eaef41c6cf14;p=krb5.git 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4546 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/server/ChangeLog b/src/kadmin/server/ChangeLog index 95bfa930d..7ca21a302 100644 --- a/src/kadmin/server/ChangeLog +++ b/src/kadmin/server/ChangeLog @@ -1,3 +1,10 @@ +Wed Oct 19 17:40:22 1994 Theodore Y. Ts'o (tytso@dcl) + + * adm_server.c (main): 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 4 17:08:25 1994 Theodore Y. Ts'o (tytso@dcl) * adm_process.c (cpw_keyproc): Add widen.h and narrow.h around diff --git a/src/kadmin/server/adm_server.c b/src/kadmin/server/adm_server.c index a408331ff..a5a140f64 100644 --- a/src/kadmin/server/adm_server.c +++ b/src/kadmin/server/adm_server.c @@ -126,6 +126,7 @@ char **argv; char *mkey_name = 0; char *local_realm; krb5_enctype etype; + krb5_enctype kdc_etype = DEFAULT_KDC_ETYPE; #ifdef SANDIA char input_string[80]; @@ -152,7 +153,7 @@ char **argv; fclose(startup_file); } #endif - while ((c = getopt(argc, argv, "hmMa:d:k:r:D")) != EOF) { + while ((c = getopt(argc, argv, "hmMa:d:k:r:De:")) != EOF) { switch(c) { case 'a': /* new acl directory */ acl_file_name = optarg; @@ -168,6 +169,10 @@ char **argv; } break; + case 'e': + kdc_etype = atoi(optarg); + break; + case 'k': /* keytype for master key */ master_keyblock.keytype = atoi(optarg); keytypedone++; @@ -224,7 +229,12 @@ char **argv; exit(1); } - master_encblock.crypto_entry = krb5_des_cst_entry.system; + 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,