diff options
author | Paul Park <pjpark@mit.edu> | 1995-08-21 21:12:06 +0000 |
---|---|---|
committer | Paul Park <pjpark@mit.edu> | 1995-08-21 21:12:06 +0000 |
commit | aae35789bfa57ef6cc8eda49b241a1daf72b9d6e (patch) | |
tree | 1fc4b52ac9ceb8b5beb7f5520f240bf4f788102c /src | |
parent | dba45380c32e55ec0a4bc7d862ea036d455fdb3a (diff) | |
download | krb5-aae35789bfa57ef6cc8eda49b241a1daf72b9d6e.tar.gz krb5-aae35789bfa57ef6cc8eda49b241a1daf72b9d6e.tar.xz krb5-aae35789bfa57ef6cc8eda49b241a1daf72b9d6e.zip |
Use symbolic names for keytype and enctype
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6555 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/admin/convert/ChangeLog | 6 | ||||
-rw-r--r-- | src/admin/convert/kdb5_convert.M | 7 | ||||
-rw-r--r-- | src/admin/convert/kdb5_convert.c | 10 |
3 files changed, 16 insertions, 7 deletions
diff --git a/src/admin/convert/ChangeLog b/src/admin/convert/ChangeLog index 29319bbe71..20d58958c5 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 22a32e4734..522766a5f4 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 b4c4b8e178..73e6f8a878 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++; |