From: Paul Park Date: Mon, 21 Aug 1995 21:12:06 +0000 (+0000) Subject: Use symbolic names for keytype and enctype X-Git-Tag: krb5-1.0-beta6~1285 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aae35789bfa57ef6cc8eda49b241a1daf72b9d6e;p=krb5.git Use symbolic names for keytype and enctype git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6555 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/admin/convert/ChangeLog b/src/admin/convert/ChangeLog index 29319bbe7..20d58958c 100644 --- a/src/admin/convert/ChangeLog +++ b/src/admin/convert/ChangeLog @@ -1,4 +1,10 @@ +Mon Aug 21 16:44:07 EDT 1995 Paul Park (pjpark@mit.edu) + * kdb5_convert.c - Interpret -k and -e arguments as strings instead of + string representations of integers (e.g. -e des-cbc-md5). + * kdb5_convert.M - Remove "ascii representation of a decimal number". + + Thu Jul 27 14:59:53 EDT 1995 Paul Park (pjpark@mit.edu) * configure.in - Add --with-dbm and check for already checking for dbm. diff --git a/src/admin/convert/kdb5_convert.M b/src/admin/convert/kdb5_convert.M index 22a32e473..522766a5f 100644 --- a/src/admin/convert/kdb5_convert.M +++ b/src/admin/convert/kdb5_convert.M @@ -115,8 +115,8 @@ dump file rather than from a principal database. The .B \-k .I keytype -option specifies the key type (as an ascii representation of a decimal -number) of the master key in the database; the default is KEYTYPE_DES. +option specifies the key type of the master key in the database; the default +is KEYTYPE_DES. .PP The .B \-M @@ -127,8 +127,7 @@ the default is KRB5_KDB_M_NAME (usually "K/M" in the local realm). The .B \-e .I enctype -option specifies the encryption type (as an ascii representation of a decimal -number) to be used when placing entries in +option specifies the encryption type to be used when placing entries in the database; the default is the default encryption type for the master keytype. .PP diff --git a/src/admin/convert/kdb5_convert.c b/src/admin/convert/kdb5_convert.c index b4c4b8e17..73e6f8a87 100644 --- a/src/admin/convert/kdb5_convert.c +++ b/src/admin/convert/kdb5_convert.c @@ -212,14 +212,18 @@ char *argv[]; verbose = 1; break; case 'k': - master_keyblock.keytype = atoi(optarg); - keytypedone++; + if (!krb5_string_to_keytype(optarg, &master_keyblock.keytype)) + keytypedone++; + else + com_err(argv[0], 0, "%s is an invalid keytype", optarg); break; case 'M': /* master key name in DB */ mkey_name = optarg; break; case 'e': - etype = atoi(optarg); + if (krb5_string_to_enctype(optarg, &etype)) + com_err(argv[0], 0, "%s is an invalid encryption type", + optarg); break; case 'n': v4manual++;