summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi/krb5/wrap_size_limit.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-10-19 20:04:21 +0000
committerGreg Hudson <ghudson@mit.edu>2009-10-19 20:04:21 +0000
commite6b93b7dd43bb765900b2db71641479b597844da (patch)
tree2b6da09e37da6ca699a8cb43c87e8a4218132254 /src/lib/gssapi/krb5/wrap_size_limit.c
parent04a5d19e61bedbb1da4db52334c00f7a54a9d5a8 (diff)
downloadkrb5-e6b93b7dd43bb765900b2db71641479b597844da.tar.gz
krb5-e6b93b7dd43bb765900b2db71641479b597844da.tar.xz
krb5-e6b93b7dd43bb765900b2db71641479b597844da.zip
Implement new APIs to allow improved crypto performance
Merge branches/enc-perf to trunk. Adds the krb5_key opaque type, the krb5_k_* APIs to use them, and caching of derived keys when krb5_k_* functions are used. Updates the krb5 auth context and GSS id-rec to use krb5_keys. ticket: 6576 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22944 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi/krb5/wrap_size_limit.c')
-rw-r--r--src/lib/gssapi/krb5/wrap_size_limit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/gssapi/krb5/wrap_size_limit.c b/src/lib/gssapi/krb5/wrap_size_limit.c
index 7fa9c44d66..0b90bba00b 100644
--- a/src/lib/gssapi/krb5/wrap_size_limit.c
+++ b/src/lib/gssapi/krb5/wrap_size_limit.c
@@ -114,10 +114,12 @@ krb5_gss_wrap_size_limit(minor_status, context_handle, conf_req_flag,
/* Token header: 16 octets. */
if (conf_req_flag) {
+ krb5_key key;
krb5_enctype enctype;
- enctype = ctx->have_acceptor_subkey ? ctx->acceptor_subkey->enctype
- : ctx->subkey->enctype;
+ key = ctx->have_acceptor_subkey ? ctx->acceptor_subkey
+ : ctx->subkey;
+ enctype = key->keyblock.enctype;
while (sz > 0 && krb5_encrypt_size(sz, enctype) + 16 > req_output_size)
sz--;