* admin_server.c, kadm_funcs.c, kadm_ser_wrap.c : Remove krb5_enctype
authorChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:26:42 +0000 (03:26 +0000)
committerChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:26:42 +0000 (03:26 +0000)
references, and replace with krb5_keytype where appropriate.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6672 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin.v4/server/ChangeLog
src/kadmin.v4/server/admin_server.c
src/kadmin.v4/server/kadm_funcs.c
src/kadmin.v4/server/kadm_ser_wrap.c

index fd1eec3ebd1cd99c67a401c79e734f411a232ed2..f18bd607740fcb033723cb06cb8053b3ce59e343 100644 (file)
@@ -1,4 +1,9 @@
 
+Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)
+
+        * admin_server.c, kadm_funcs.c, kadm_ser_wrap.c : Remove krb5_enctype 
+               references, and replace with krb5_keytype where appropriate.
+
 Tue Aug 15 14:31:37 EDT 1995   Paul Park       (pjpark@mit.edu)
        * admin_server,kadm_funcs,kadm_ser_wrap.c - Replace kadm_find_keytype()
                with krb5_dbe_find_keytype().
index bc5554b4e74842a46afa6e7b72ab8740ed6ddaf1..b745fee185d5828bcf274237d5ea266fdb98db4c 100644 (file)
@@ -382,7 +382,7 @@ struct sockaddr_in *who;
 
     status = krb5_dbe_find_keytype(kadm_context,
                                   &sprinc_entries,
-                                  KEYTYPE_DES,
+                                  KEYTYPE_DES_CBC_MD5,
                                   -1,
                                   -1,
                                   &kdatap);
index 01cb55b135070b492ebec79333e25c819432826d..bdeccf988fc873a26b564d58a09fa57b127e68a5 100644 (file)
@@ -80,7 +80,7 @@ kadm_entry2princ(entry, princ)
   /* Find the V4 key */
   retval = krb5_dbe_find_keytype(kadm_context,
                                 &entry,
-                                KEYTYPE_DES,
+                                KEYTYPE_DES_CBC_MD5,
                                 KRB5_KDB_SALTTYPE_V4,
                                 -1,
                                 &pkey);
@@ -129,7 +129,7 @@ kadm_princ2entry(princ, entry)
 
   if (retval = krb5_dbe_find_keytype(kadm_context,
                                     entry,
-                                    KEYTYPE_DES,
+                                    KEYTYPE_DES_CBC_MD5,
                                     KRB5_KDB_SALTTYPE_V4,
                                     -1,
                                     &kdatap)) {
@@ -137,7 +137,7 @@ kadm_princ2entry(princ, entry)
       kdatap = &entry->key_data[entry->n_key_data-1];
   }
   if (kdatap) {
-    kdatap->key_data_type[0] = (krb5_int16) KEYTYPE_DES;
+    kdatap->key_data_type[0] = (krb5_int16) KEYTYPE_DES_CBC_MD5;
     kdatap->key_data_type[1] = (krb5_int16) KRB5_KDB_SALTTYPE_V4; 
     kdatap->key_data_kvno = (krb5_int16) princ.key_version;
   }
@@ -239,13 +239,12 @@ Kadm_vals *valsout;
   }
 
   newpw.magic = KV5M_KEYBLOCK;
-  newpw.etype = ETYPE_UNKNOWN;
   if ((newpw.contents = (krb5_octet *)malloc(8)) == NULL)
     failadd(KADM_NOMEM);
 
   if (retval = krb5_dbe_find_keytype(kadm_context,
                                     &newentry,
-                                    KEYTYPE_DES,
+                                    KEYTYPE_DES_CBC_MD5,
                                     KRB5_KDB_SALTTYPE_V4,
                                     -1,
                                     &pkey)) {
@@ -260,7 +259,7 @@ Kadm_vals *valsout;
   memcpy(newpw.contents, &data_i.key_low, 4);
   memcpy((char *)(((krb5_int32 *) newpw.contents) + 1), &data_i.key_high, 4);
   newpw.length = 8;
-  newpw.keytype = KEYTYPE_DES;
+  newpw.keytype = KEYTYPE_DES_CBC_MD5;
   sblock.type = KRB5_KDB_SALTTYPE_V4;
   sblock.data.length = 0;
   sblock.data.data = (char *) NULL;
@@ -545,16 +544,15 @@ Kadm_vals *valsout;               /* the actual record which is returned */
        failmod(KADM_NOMEM);
       }
       newpw.magic = KV5M_KEYBLOCK;
-      newpw.etype = ETYPE_UNKNOWN;
       newpw.length = 8;
-      newpw.keytype = KEYTYPE_DES;
+      newpw.keytype = KEYTYPE_DES_CBC_MD5;
       temp_key.key_low = ntohl(temp_key.key_low);
       temp_key.key_high = ntohl(temp_key.key_high);
       memcpy(newpw.contents, &temp_key.key_low, 4);
       memcpy(newpw.contents + 4, &temp_key.key_high, 4);
       if (retval = krb5_dbe_find_keytype(kadm_context,
                                         &newentry,
-                                        KEYTYPE_DES,
+                                        KEYTYPE_DES_CBC_MD5,
                                         KRB5_KDB_SALTTYPE_V4,
                                         -1,
                                         &pkey)) {
@@ -677,8 +675,7 @@ des_cblock newpw;
     failchange(KADM_NOMEM);
   memcpy(localpw.contents, newpw, 8);
   localpw.magic = KV5M_KEYBLOCK;
-  localpw.etype = ETYPE_UNKNOWN;
-  localpw.keytype = KEYTYPE_DES;
+  localpw.keytype = KEYTYPE_DES_CBC_MD5;
   localpw.length = 8;
   numfound = 1;
   retval = krb5_db_get_principal(kadm_context, rprinc, &odata,
@@ -691,7 +688,7 @@ des_cblock newpw;
   } else if (numfound == 1) {
     if (retval = krb5_dbe_find_keytype(kadm_context,
                                       &odata,
-                                      KEYTYPE_DES,
+                                      KEYTYPE_DES_CBC_MD5,
                                       KRB5_KDB_SALTTYPE_V4,
                                       -1,
                                       &pkey)) {
@@ -973,7 +970,7 @@ kadm_chg_srvtab(rname, rinstance, rrealm, values)
   } else if (numfound) {
     retval = krb5_dbe_find_keytype(kadm_context,
                                   &odata,
-                                  KEYTYPE_DES,
+                                  KEYTYPE_DES_CBC_MD5,
                                   KRB5_KDB_SALTTYPE_V4,
                                   -1,
                                   &pkey);
@@ -998,7 +995,7 @@ kadm_chg_srvtab(rname, rinstance, rrealm, values)
       pkey = &odata.key_data[0];
       memset(pkey, 0, sizeof(*pkey));
       pkey->key_data_ver = 2;
-      pkey->key_data_type[0] = KEYTYPE_DES;
+      pkey->key_data_type[0] = KEYTYPE_DES_CBC_MD5;
       pkey->key_data_type[1] = KRB5_KDB_SALTTYPE_V4;
     }
   }
@@ -1018,7 +1015,7 @@ kadm_chg_srvtab(rname, rinstance, rrealm, values)
     krb5_db_free_principal(kadm_context, &odata, 1);
     failsrvtab(KADM_NOMEM);
   }
-  newpw.keytype = KEYTYPE_DES;
+  newpw.keytype = KEYTYPE_DES_CBC_MD5;
   newpw.length = 8;
   memcpy((char *)newpw.contents, new_key, 8);
   memset((char *)new_key, 0, sizeof (new_key));
index 17d000ed046944d5175397895ed8dabd86e8e41f..abe4214d513939489155dad2a7dd3254622af610 100644 (file)
@@ -48,7 +48,6 @@ kadm_ser_init(inter, realm)
     int numfound = 1;
     krb5_boolean more;
     krb5_db_entry master_entry;
-    krb5_enctype kdc_etype = DEFAULT_KDC_ETYPE;
     krb5_key_data *kdatap;
     
     if (gethostname(hostname, sizeof(hostname)))
@@ -77,11 +76,10 @@ kadm_ser_init(inter, realm)
     server_parm.admin_addr.sin_port = sep->s_port;
     /* setting up the database */
     mkey_name = KRB5_KDB_M_NAME;
-    server_parm.master_keyblock.keytype = KEYTYPE_DES;
+    server_parm.master_keyblock.keytype = KEYTYPE_DES_CBC_MD5;
     
-    if (!valid_etype(kdc_etype))
-       return KRB5_PROG_ETYPE_NOSUPP;
-    krb5_use_cstype(kadm_context, &server_parm.master_encblock, kdc_etype);
+    krb5_use_keytype(kadm_context, &server_parm.master_encblock, 
+                   server_parm.master_keyblock.keytype);
     
     retval = krb5_db_setup_mkey_name(kadm_context, mkey_name, realm,
                                     (char **) 0,
@@ -110,7 +108,7 @@ kadm_ser_init(inter, realm)
 
     retval = krb5_dbe_find_keytype(kadm_context,
                                   &master_entry,
-                                  KEYTYPE_DES,
+                                  KEYTYPE_DES_CBC_MD5,
                                   -1,
                                   -1,
                                   &kdatap);