* admin.h: add prototype for kadm5_setkey_principal
authorBarry Jaspan <bjaspan@mit.edu>
Wed, 28 May 1997 17:35:05 +0000 (17:35 +0000)
committerBarry Jaspan <bjaspan@mit.edu>
Wed, 28 May 1997 17:35:05 +0000 (17:35 +0000)
* misc_free.c (kadm5_free_key_data): add kadm5_free_data

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

src/lib/kadm5/ChangeLog
src/lib/kadm5/admin.h
src/lib/kadm5/misc_free.c

index dc016db5746b0f1b8d766e4ae96f08df10ecd04a..45b403c739179588ad03391580bb8f17d0e30e9d 100644 (file)
@@ -1,3 +1,9 @@
+Wed May 28 13:34:17 1997  Barry Jaspan  <bjaspan@mit.edu>
+
+       * admin.h: add prototype for kadm5_setkey_principal
+
+       * misc_free.c (kadm5_free_key_data): add kadm5_free_data
+       
 Mon Mar 31 17:41:11 1997  Barry Jaspan  <bjaspan@mit.edu>
 
        * kadm_err.et, kadm_rpc.h, kadm_rpc_xdr.c: add support for
index d45e16e9cf375181640e8079a3fe8e7400b3a327..0c2501b3f6d42d3e465edc987cfaa424d1800168 100644 (file)
@@ -331,6 +331,11 @@ kadm5_ret_t    kadm5_randkey_principal(void *server_handle,
                                       krb5_keyblock **keyblocks,
                                       int *n_keys);
 #endif
+kadm5_ret_t    kadm5_setkey_principal(void *server_handle,
+                                     krb5_principal principal,
+                                     krb5_keyblock *keyblocks,
+                                     int n_keys);
+
 kadm5_ret_t    kadm5_create_policy(void *server_handle,
                                   kadm5_policy_ent_t ent,
                                   long mask);
index dbf91d3eeba549f4a518faacd81c612fbb2066f7..9dc91b53f763897291b8bbd3e14107e63834f47a 100644 (file)
@@ -38,7 +38,6 @@ kadm5_ret_t
     return KADM5_OK;
 }
 
-
 /* XXX this ought to be in libkrb5.a, but isn't */
 kadm5_ret_t krb5_free_key_data_contents(context, key)
    krb5_context context;
@@ -56,6 +55,24 @@ kadm5_ret_t krb5_free_key_data_contents(context, key)
      return KADM5_OK;
 }
 
+kadm5_ret_t kadm5_free_key_data(void *server_handle,
+                               krb5_int16 *n_key_data,
+                               krb5_key_data *key_data)
+{
+     kadm5_server_handle_t     handle = server_handle;
+     int i, nkeys = (int) *n_key_data;
+
+     _KADM5_CHECK_HANDLE(server_handle);
+
+     if (key_data == NULL)
+         return KADM5_OK;
+     
+     for (i = 0; i < nkeys; i++)
+         krb5_free_key_data_contents(handle->context, &key_data[i]);
+     free(key_data);
+     return KADM5_OK;
+}
+
 kadm5_ret_t
 kadm5_free_principal_ent(void *server_handle,
                              kadm5_principal_ent_t val)