diff options
author | Chris Provenzano <proven@mit.edu> | 1995-01-13 21:21:42 +0000 |
---|---|---|
committer | Chris Provenzano <proven@mit.edu> | 1995-01-13 21:21:42 +0000 |
commit | 5b169bc85d0ddcf7055e694d07cbb704021e6c3c (patch) | |
tree | 6c53ff012a508b74c7decb1dffd72bbe7b2bf022 /src/lib/krb5/krb/gen_subkey.c | |
parent | f33e326f8f7ea7dde5026482f38083275ab8679c (diff) | |
download | krb5-5b169bc85d0ddcf7055e694d07cbb704021e6c3c.tar.gz krb5-5b169bc85d0ddcf7055e694d07cbb704021e6c3c.tar.xz krb5-5b169bc85d0ddcf7055e694d07cbb704021e6c3c.zip |
Removed all references to DECLARG and OLDDECLARG.
Added krb5_context to all krb5_routines.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4810 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/gen_subkey.c')
-rw-r--r-- | src/lib/krb5/krb/gen_subkey.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/krb5/krb/gen_subkey.c b/src/lib/krb5/krb/gen_subkey.c index e1178abca..68425b2c9 100644 --- a/src/lib/krb5/krb/gen_subkey.c +++ b/src/lib/krb5/krb/gen_subkey.c @@ -29,9 +29,10 @@ #include <krb5/ext-proto.h> krb5_error_code -krb5_generate_subkey(key, subkey) -const krb5_keyblock *key; -krb5_keyblock **subkey; +krb5_generate_subkey(context, key, subkey) + krb5_context context; + const krb5_keyblock *key; + krb5_keyblock **subkey; { krb5_pointer random_state; krb5_encrypt_block eblock; @@ -40,23 +41,23 @@ krb5_keyblock **subkey; if (!valid_keytype(key->keytype)) return KRB5_PROG_KEYTYPE_NOSUPP; - krb5_use_keytype(&eblock, key->keytype); + krb5_use_keytype(context, &eblock, key->keytype); - if (retval = krb5_init_random_key(&eblock, key, &random_state)) + if (retval = krb5_init_random_key(context, &eblock, key, &random_state)) return(retval); *subkey = (krb5_keyblock *)malloc(sizeof(**subkey)); if (!*subkey) { - (void) krb5_finish_random_key(&eblock, &random_state); + (void) krb5_finish_random_key(context, &eblock, &random_state); return ENOMEM; } - if (retval = krb5_random_key(&eblock, random_state, subkey)) { - (void) krb5_finish_random_key(&eblock, &random_state); + if (retval = krb5_random_key(context, &eblock, random_state, subkey)) { + (void) krb5_finish_random_key(context, &eblock, &random_state); krb5_xfree(*subkey); return retval; } /* ignore the error if any, since we've already gotten the key out */ - (void) krb5_finish_random_key(&eblock, &random_state); + (void) krb5_finish_random_key(context, &eblock, &random_state); return 0; } |