~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/lib/crypto/encrypt.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2009-05-07 16:16:34 UTC
  • mfrom: (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090507161634-xqyk0s9na0le4flj
Tags: 1.7dfsg~beta1-4
When  decrypting the TGS response fails with the subkey, try with the
session key to work around Heimdal bug, Closes: #527353 

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "k5-int.h"
28
28
#include "etypes.h"
 
29
#include "aead.h"
29
30
 
30
31
krb5_error_code KRB5_CALLCONV
31
32
krb5_c_encrypt(krb5_context context, const krb5_keyblock *key,
46
47
    output->kvno = 0;
47
48
    output->enctype = key->enctype;
48
49
 
 
50
    if (krb5_enctypes_list[i].encrypt == NULL) {
 
51
        assert(krb5_enctypes_list[i].aead != NULL);
 
52
 
 
53
        return krb5int_c_encrypt_aead_compat(krb5_enctypes_list[i].aead,
 
54
                                             krb5_enctypes_list[i].enc,
 
55
                                             krb5_enctypes_list[i].hash,
 
56
                                             key, usage, ivec,
 
57
                                             input, &output->ciphertext);
 
58
    }
 
59
 
49
60
    return((*(krb5_enctypes_list[i].encrypt))
50
61
           (krb5_enctypes_list[i].enc, krb5_enctypes_list[i].hash,
51
62
            key, usage, ivec, input, &output->ciphertext));