freebsd-dev/eBones/krb/pkt_cipher.c
Geoff Rehmet 60643d379b Initial import of eBones.
(Including all changes for FreeBSD - importing the original eBones distribution
would be too complex at this stage, since I don't have access to Piero's 
CVS.)
(If you want to include eBones in your system, don't forget to include
MAKE_EBONES in /etc/make.conf.)
(This stuff is now also suppable from braae.ru.ac.za.)

Bones originally from MIT SIPB.
Original port to FreeBSD 1.x  by Piero Serini.
Moved to FreeBSD 2.0 by Doug Rabson and Geoff Rehmet.
Nice bug fixes from Doug Rabson.
1994-09-30 14:50:09 +00:00

39 lines
919 B
C

/*
* Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
* of Technology.
* For copying and distribution information, please see the file
* <Copyright.MIT>.
*
* from: pkt_cipher.c,v 4.8 89/01/13 17:46:14 steiner Exp $
* $Id: pkt_cipher.c,v 1.2 1994/07/19 19:26:07 g89r4222 Exp $
*/
#ifndef lint
static char *rcsid =
"$Id: pkt_cipher.c,v 1.2 1994/07/19 19:26:07 g89r4222 Exp $";
#endif /* lint */
#include <krb.h>
#include <prot.h>
/*
* This routine takes a reply packet from the Kerberos ticket-granting
* service and returns a pointer to the beginning of the ciphertext in it.
*
* See "prot.h" for packet format.
*/
KTEXT
pkt_cipher(packet)
KTEXT packet;
{
unsigned char *ptr = pkt_a_realm(packet) + 6
+ strlen((char *)pkt_a_realm(packet));
/* Skip a few more fields */
ptr += 3 + 4; /* add 4 for exp_date */
/* And return the pointer */
return((KTEXT) ptr);
}