(krb5_get_forwarded_creds): figure out what etype to use from the
keytype. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3568 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -64,6 +64,17 @@ krb5_get_forwarded_creds (krb5_context context,
|
||||
krb5_data enc_data;
|
||||
int32_t sec, usec;
|
||||
krb5_kdc_flags kdc_flags;
|
||||
krb5_enctype enctype;
|
||||
|
||||
if (auth_context->enctype)
|
||||
enctype = auth_context->enctype;
|
||||
else {
|
||||
ret = krb5_keytype_to_etype (context,
|
||||
auth_context->local_subkey.keytype,
|
||||
&enctype);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
out_creds = calloc(1, sizeof(*out_creds));
|
||||
if (out_creds == NULL)
|
||||
@@ -177,7 +188,7 @@ krb5_get_forwarded_creds (krb5_context context,
|
||||
ret = krb5_encrypt_EncryptedData (context,
|
||||
buf + sizeof(buf) - len,
|
||||
len,
|
||||
auth_context->enctype,
|
||||
enctype,
|
||||
0,
|
||||
&auth_context->local_subkey,
|
||||
&cred.enc_part);
|
||||
|
Reference in New Issue
Block a user