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

« back to all changes in this revision

Viewing changes to src/lib/krb4/pkt_cipher.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:
1
 
/*
2
 
 * pkt_cipher.c
3
 
 *
4
 
 * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
5
 
 * of Technology.
6
 
 *
7
 
 * For copying and distribution information, please see the file
8
 
 * <mit-copyright.h>.
9
 
 */
10
 
 
11
 
#include "mit-copyright.h"
12
 
#include <string.h>
13
 
#include "krb.h"
14
 
#include "prot.h"
15
 
 
16
 
 
17
 
/*
18
 
 * This routine takes a reply packet from the Kerberos ticket-granting
19
 
 * service and returns a pointer to the beginning of the ciphertext in it.
20
 
 *
21
 
 * See "prot.h" for packet format.
22
 
 */
23
 
 
24
 
KTEXT
25
 
pkt_cipher(packet)
26
 
    KTEXT packet;
27
 
{
28
 
    unsigned char *ptr = pkt_a_realm(packet) + 6
29
 
        + strlen((char *)pkt_a_realm(packet));
30
 
    /* Skip a few more fields */
31
 
    ptr += 3 + 4;               /* add 4 for exp_date */
32
 
 
33
 
    /* And return the pointer */
34
 
    return((KTEXT) ptr);
35
 
}