#pragma ident	"@(#)ChangeLog	1.1	99/07/18 SMI"
Wed Nov  8 20:00:13 1995  Theodore Y. Ts'o  <tytso@dcl>

	* asn1_k_decode.c (asn1_decode_etype_info_entry): If the optional
		salt element is not present, set etype.length to -1.

	* asn1_k_encode.c (asn1_encode_etype_info_entry): When encoding
		the etype_info_entry structure, use length == -1 to mean
		that the optional salt structure should not be sent.  (It
		used to be if length == -1.)

Tue Oct 31 20:06:49 1995  Theodore Y. Ts'o  <tytso@dcl>

	* krb5_decode.c (decode_krb5_pa_enc_ts, decode_krb5_enc_data):
	        Added new functions.

	* krb5_encode.c (encode_krb5_pa_enc_ts, encode_krb5_enc_data):
	        Added new functions.

	* KRB5-asn.py (PA-ENC-TS-ENC): Added new definition for the
		krb5_pa_enc_ts structure.

Fri Oct  6 22:03:01 1995  Theodore Y. Ts'o  <tytso@dcl>

	* Makefile.in: Remove ##DOS!include of config/windows.in.
		config/windows.in is now included by wconfig.

Thu Sep 28 23:35:06 1995  Mark W. Eichin  <eichin@cygnus.com>

	* krb5_encode.c (krb5_cleanup): If asn1buf_destroy fails, don't
	call it again. (Not that it can ever fail anyhow.)

Tue Sep 26 19:59:56 1995    <tytso@rsts-11.mit.edu>

	* krb5_decode.c: Systematic rework of all the cleanup code to make
		the generated object file subtatially (40% on the i386
		platform) smaller.  The cleanup is now handled with a
		"goto error_out" statement, which prevents the cleanup
		statements from being replicated many, many, many times
		throughout the entire file.

Mon Sep 25 16:56:13 1995  Theodore Y. Ts'o  <tytso@dcl>

	* Makefile.in: Removed "foo:: foo-$(WHAT)" lines from the
		Makefile. 

Fri Sep 22 22:27:33 1995  Theodore Y. Ts'o  <tytso@dcl>

	* asn1_k_decode.c (asn1_decode_etype_info_entry): 
	* krb5_decode.c (decode_krb5_alt_method): Remove the (int) cast,
		since you can't take address of a value which has been
		casted.  Instead we change the underlying type in the
		structure to be an int.

Wed Sep 13 10:51:31 1995 Keith Vetter (keithv@fusion.com)

        * asn1_k_decode.c, asn1_k_encode.c, krb5_dec.c, krb5_enc.c: 32
		bit word being passed as an int.

Wed Sep 20 11:50:35 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>

	* krb5_decode.c (setup_buf_only): Declare cleanup routine as
		void and propogate through file.

Mon Sep 18 14:17:15 1995  Theodore Y. Ts'o  <tytso@dcl>

	* asn1_encode.c (asn1_encode_generaltime): Don't modify a const
		input variable val; copy it to a scratch variable and
		modify that.

Wed Sep 13 19:53:30 1995  Mark Eichin  <eichin@cygnus.com>

	* krb5_decode.c (clean_krb5_authenticator, clean_krb5_ticket,
	clean_krb5_enc_tkt_part,clean_krb5_ap_req,
	clean_krb5_ap_rep_enc_part, clean_krb5_safe,
	clean_krb5_priv_enc_part, clean_krb5_cred_enc_part,
	clean_krb5_error): new static functions to free objects that may
	be partially constructed.
	(setup_buf_only, setup_no_tagnum, setup_no_length, setup): define
	in terms of each other to remove duplication, then add local
	variable error_cleanup to common declarations.
	(clean_return): new macro, uses error_cleanup on rep if possible
	and the allows the argument to be returned.
	(alloc_field, check_apptag, next_tag, begin_structure,
	get_field_body, get_field, get_lenfield_body, get_lenfield): use
	clean_return. 
	(free_field): new macro to simplify the writing of clean_*.
	(clear_field): macro to clean up preparation of fields for later
	use by clean_* functions.
	(decode_krb5_authenticator, decode_krb5_ticket,
	decode_krb5_encryption_key, decode_krb5_enc_tkt_part, 
	decode_krb5_enc_kdc_rep_part, decode_krb5_as_rep,
	decode_krb5_tgs_rep, decode_krb5_ap_req, decode_krb5_ap_rep,
	decode_krb5_ap_rep_enc_part, decode_krb5_as_req,
	decode_krb5_tgs_req, decode_krb5_kdc_req_body, decode_krb5_safe,
	decode_krb5_priv, decode_krb5_enc_priv_part, decode_krb5_cred,
	decode_krb5_enc_cred_part, decode_krb5_error,
	decode_krb5_authdata, decode_krb5_pwd_sequence,
	decode_krb5_pwd_data, decode_krb5_padata_sequence,
	decode_krb5_alt_method, decode_krb5_etype_info): change setup
	macro to pass a cleanup method (or just free if there were no
	partial allocations, or 0 for the two cases with no allocation at
	all.) Also explicitly zero pointer subfields, since calloc is not
	a safe way to assure that. Generally, provide for automatic
	deallocation of storage on error.
	
Sun Sep 10 12:00:00 1995    <mattly@fusion.com>

	* asn1_encode.c: Removed use of localtime for encoding of generaltime.

Wed Sep 06 14:20:57 1995   Chris Provenzano (proven@mit.edu)

        * asn1_k_decode.c, asn1_k_decode.h, asn1_k_encode.c, asn1_k_encode.h,
	* krb5_decode.c, krb5_encode.c: s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g

Wed Sept 6 12:00:00 1995    <mattly@fusion.com>

	* asn1_encode.c: added EPOCH to account for macintosh time keeping
		differences in asn1_encode_generaltime.

	* asn1buf.c: removed some debugging cruft.

Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)

        * asn1_k_decode.c, asn1_k_decode.h, asn1_k_encode.c, asn1_k_encode.h
	* krb5_decode.c : Remove krb5_enctype references, and replace with
                krb5_keytype where appropriate
  
Mon Aug 28 12:54:05 1995    <tytso@rsts-11.mit.edu>

	* krb5_decode.c (decode_krb5_alt_method,
		decode_krb5_etype_info): New functions for
		decoding some new data structures.

	* krb5_encode.c (encode_krb5_alt_method, encode_krb5_etype_info):
		New functions for encoding some new data structures.

	* asn1_k_decode.c (asn1_decode_etype_info_entry,
		asn1_decode_etype_info): Added new functions to decode 
		some new data structures.

	* asn1_k_encode.c (asn1_encode_etype_info_entry,
		asn1_encode_etype_info): Added new functions to encode
		some new data structures.

Fri Aug 25 21:43:42 1995  Theodore Y. Ts'o  <tytso@dcl>

	* krb5_encode.c (encode_krb5_padata_sequence): New function which
		encodes a sequence of pa_data elements

	* krb5_decode.c (decode_krb5_padata_sequence): New function which
		decodes a sequence of pa_data elements.

	* asn1_k_encode.c (asn1_encode_sequence_of_pa_data): Make it
		possible to encode sequence of zero pa_data elements.

	* asn1_k_decode.c (decode_array_body): Make it possible to decode
		SEQUENCE OF encodinges of zero items (which is legal
		according to ASN.1)

Sat Jun 17 00:00:33 1995  Theodore Y. Ts'o  (tytso@dcl)

	* asn1_get.c (asn1_get_tag): Added change to allow for 
		ASN.1 indefinite encoding; needed for DCE compatibility.

Fri Jun  9 19:34:05 1995    <tytso@rsx-11.mit.edu>

	* configure.in: Remove standardized set of autoconf macros, which
		are now handled by CONFIG_RULES.

Fri May 26 20:19:15 1995  Theodore Y. Ts'o  (tytso@dcl)

	* configure.in, Makefile.in: Add support for building shared libraries.

Tue May 23 16:22:57 1995  Theodore Y. Ts'o  (tytso@dcl)

	* asn1_decode.c: Rearrange #include files so that krb5.h gets
		included first, so that the debugging information can be
		more efficiently collapsed since the type numbers will be
		the same.

	* asn1_encode.h: Rearrange the #include files so that the type
		numbers are the same.

Thu Apr 13 20:13:38 1995 Keith Vetter (keithv@fusion.com)

	* asn1_k_decode.c: fixed up 'unreferenced local variable' problems.

Thu Apr 13 15:49:16 1995 Keith Vetter (keithv@fusion.com)

	* *.[ch]: removed unneeded INTERFACE from non-api functions.

Wed Mar 22 09:39:55 1995    <tytso@rsx-11.mit.edu>

	* asn1_k_decode.c (setup, next_tag, apptag, get_field_body,
		get_lenfield_body, asn1_decode_ticket): Use the
		taglength to determine whether or not the indefinite
		encoding was used, and if so skip over the termination
		flag bytes in the ASN.1 stream.

	* asn1buf.c (asn1buf_imbed, asn1buf_remains): Make changes to
		allow for indefinite encodings.  asn1buf_remains() is now
		only used for decoding structures and arrays (i.e., asn.1
		constructs which terminate indefinite encodings with two
		zero octets.

		[ Note these fixes to support indefinite encoding
		aren't terribly clean; some invalid encodings may
		be accepted when they should not be.  This should be
		looked at in more detail later.]

	* asn1_get.c (asn1_get_tag): Inline original asn1buf_remains()
		code, since asn1_get_tag doesn't use asn1buf_remains in
		the context of a structure or an array.

Sat Mar 25 14:12:31 1995  Tom Yu  (tlyu@dragons-lair)

	* asn1_decode.c: move declaration of gmt_mktime() outside of
	asn1_decode_generaltime() so that compilers like Ultrix cc that
	don't support prototypes within function bodies don't break

Fri Mar 17 19:05:22 1995  John Gilmore  (gnu at toad.com)

	* Makefile.in:  Remove redundant definitions from config/pre.in
	(clean-mac):  Add.
	* asn1_misc.c:  Avoid <malloc.h> and <memory.h> includes, for Mac.
	(asn1_krb5_realm_copy):  Use malloc, not calloc, since we're
	about to clobber the storage anyway.
	* configure.in (WITH_KRB5ROOT):  Remove, not needed.
	* krbasn1.h:  Document that <limits.h> is needed for INT_MAX.

Fri Mar 10 15:39:24 1995  Theodore Y. Ts'o  (tytso@kenmore)

	* asn1buf.c. asn1buf.h (asn1buf_insert_octet): Make the second
		argument of asn1buf_insert_octet be an int, instead of
		asn1_octet.  ANSI C narrow types screws us again....

Tue Mar 7 21:40:18 1995 Keith Vetter (keithv@fusion.com)

	* Makefile.in: changed library name for the PC.

Wed Mar 1 18:00:00 1995 Keith Vetter (keithv@fusion.com)

	* asn1_decode.c, asn1_encode.c, ans1_k_encode.c, asn1_misc.c: 16 vs 
	   32 bit casts.
	* asn1_k_encode.h: added missing INTERFACE to a prototype

Tue Feb 28 00:32:48 1995  John Gilmore  (gnu at toad.com)

	* asn1_decode.h, asn1_encode.h, asn1_get.h, asn1_k_decode.h,
	asn1_k_encode.h, asn1_make.h asn1_misc.h, asn1_buf.h, glue2.c,
	krb5_decode.c, krb5_encode.c, krbasn1.h:  Avoid <krb5/...> includes.

Tue Feb 21 12:00:00 1995  Keith Vetter (keithv@fusion.com)

	* Makefile.in: made to work for the PC
	* *.c, *.h: added windows INTERFACE keyword to all functions

Tue Feb 21 20:11:30 1995  Theodore Y. Ts'o  (tytso@dcl)

	* asn1_k_decode.h(asn1_decode_kvno, asn1_decode_krb_safe_body):
		Removed duplicate declarations.

	* asn1_k_decode.h(asn1_decode_passwdsequence, 
		asn1_decode_sequence_of_passwdsequence): Added missing
		declarations.

Thu Feb 16 19:29:59 1995  Theodore Y. Ts'o  (tytso@dcl)

	* asn1_k_encode.h(asn1_encode_enc_kdc_rep_part): Remove duplicate
		declaration of asn1_encode_enc_kdc_rep_part.

Fri Feb 10 15:30:45 1995  Theodore Y. Ts'o  <tytso@dcl>

	* asn1_k_encode.c: Remove #include of krb5_encode.h (it's not
	        needed).

	* krb5_encode.h:
	* krb5_decode.h: These files removed; their contents have been
		poured into include/krb5/asn1.h.

	* Makefile.isode.in: Removed.

	* process.perl: Removed (isode cruft).

	* Makefile.sane.in: Removed; contents moved to Makefile.in

	* configure.in: 
	* Makefile.in: Removed isode croft.  (Makefile.in was
		Makefile.sane.in) 

Fri Feb  3 01:02:43 1995  John Gilmore  <gnu@cygnus.com>

	* asn1_decode_k.c => asn1_k_decode.c
	* asn1_decode_k.h => asn1_k_decode.h
	* asn1_encode_k.c => asn1_k_encode.c
	* asn1_encode_k.h => asn1_k_encode.h
	* Makefile.sane.in, krb5_decode.c, krb5_encode.c,
	asn1_k_encode.c, asn1_k_decode.c:  updated to match.

Fri Nov 18 16:24:35 1994  Theodore Y. Ts'o  (tytso@dcl)

	* krb5_decode.c (decode_krb5_encryption_key): Add magic number to
		keyblock structure.

Thu Nov 10 21:51:55 1994  Theodore Y. Ts'o  (tytso@dcl)

	* asn1_decode_k.c (asn1_decode_principal_name,
		asn1_decode_checksum, asn1_decode_encrypted_data,
		asn1_decode_transited_encoding,
		asn1_decode_enc_kdc_rep_part, asn1_decode_ticket,
		asn1_decode_kdc_req, asn1_decode_kdc_req_body,
		asn1_decode_safe_body, asn1_decode_host_address,
		asn1_decode_kdc_rep, asn1_decode_authdata_elt,
		asn1_decode_krb_cred_info, asn1_decode_pa_data,
		asn1_decode_last_req_entry): Initialize magic number field
		in the relevant structures.

	* asn1_decode_k.c (asn1_decode_encryption_key): Add appropriate
		magic number and encryption type.

Wed Nov  2 23:10:36 1994  Theodore Y. Ts'o  (tytso@dcl)

	* configure.in: Add WITH_CPPOPTS since we're not using
		CONFIG_RULES (yet).

Thu Oct 27 22:32:13 1994  Theodore Y. Ts'o  (tytso@dcl)

	* Makefile.sane.in: Remove duplicate definitions for DEFS, CC,
		CCOPTS, and LIBS.  (now defined in config/pre.in).

Wed Oct 19 10:51:16 1994  Theodore Y. Ts'o  (tytso@maytag)

	* err2kerr.c (KRB5_KRB__ERROR2krb5_error): The e_data field
		wasn't being decoded when it should have been.

	* qbuf2data.c (qbuf2krb5_data): Set magic number field to zero.

	* asn1_decode_k.c (asn1_decode_kdc_req_body): If the authorization
		field is not present, fill in the authorization data
		fields with all zeros.  Don't set kvno (that's *key*
		version number, not *Kerberos* version number) to 5.

Tue Oct 18 23:07:20 1994  Theodore Y. Ts'o  (tytso@maytag)

	* tgrq2ktgrq.c (KRB5_KDC__REQ__BODY2krb5_kdc_req): Allow the
		service principal to be optional.

	* ktgrq2tgrq.c (krb5_kdc_req2KRB5_KDC__REQ__BODY): Allow the
		server principal to be optional.

Fri Oct  7 15:05:35 1994  Theodore Y. Ts'o  (tytso@dcl)

	* Makefile.isode.in: Add -DKRB5_USE_ISODE so that include files
		are right.

Tue Oct  4 16:13:45 1994  Theodore Y. Ts'o  (tytso@dcl)

	* asn1_decode_k.c (asn1_decode_kerberos_time): Don't assume that
		  krb5_timestamp and time_t are the same.

Thu Sep 29 14:26:34 1994  Theodore Y. Ts'o  (tytso@dcl)

	* asn1buf.c (asn1buf_remove_octetstring, asn1buf_remove_charstring): 
		If the length is zero, don't call calloc(0,1); instead
		return a NULL pointer.  This way, we get consistent
		behavior even on systems where malloc(0) returns a
		non-null pointer.

Tue Sep 27 23:31:50 1994  Theodore Y. Ts'o  (tytso@dcl)

	* krb5_encode.c (encode_krb5_enc_kdc_rep_part): = should have been
	        == in commented-out code.  Get it right for the future...

Wed Sep 21 00:18:12 1994  Theodore Y. Ts'o  (tytso@dcl)

	* krb5_decode.c (decode_krb5_authdata): Initialize variable where
		the authdata is returned to NULL first.  (Caller shouldn't
		have to do this.)

	* asn1_decode.c (asn1_decode_generaltime): Plug memory leak caused
		by not freeing temporary string.

Wed Aug 17 16:07:06 1994  Theodore Y. Ts'o  (tytso at tsx-11)

	* krb5_encode.c (encode_krb5_enc_kdc_rep_part): Older versions of
	the Kerberos are always sending the enc_kdc_rep_part structure
	with an application tag of #26, instead of using the application
	tag of #25 (AS REP) or #26 (AS REP) as necessary.  Worse yet, they
	will only accept a tag of #26, so we need to follow this for
	backwards compatibility.  #defining KRB5_ENCKRB5KDCREPPART_COMPAT
	will preserve this wrong (but compatible) behavior.

	* krb5_decode.c (decode_krb5_enc_kdc_rep_part): Record the tag
	value of the ASN.1 sequence in the rkb5_enc_kdc_rep structure.
	Allow both tag #25 and #26 (although old software was always
	sending tag #26).

	* krb5_decode.c (decode_krb5_as_rep, decode_krb5_tgs_rep,
	decode_krb5_ap_req, decode_krb5_ap_rep, decode_krb5_as_req,
	decode_krb5_tgs_req, decode_krb5_safe, decode_krb5_priv,
	decode_krb5_cred, decode_krb5_error): Only check the ASN.1 message
	type if KRB5_MSGTYPE_STRICT is defined.  "Be strict in what you
	send out, liberal in what you receive..."

	* asn1_decode_k.c (asn1_decode_msgtype): Stop checking the
	validity of the message type here.  Each routine that calls
	asn1_decode_msgtype is checking the message type anyway, so it's
	just duplicated effort.

Sat Aug 13 03:40:16 1994  Mark Eichin  (eichin@perdiem)

	* krbasn1.h: include stdlib.h for calloc declaration (if we can)

Thu Aug 11 00:38:10 1994  Theodore Y. Ts'o  (tytso@dcl)

	* asn1_encode_k.c (asn1_encode_kdc_req): Add extra argument which
	specifies the msg_type of the encoding; don't use req->msg_type
	which is generally not set right.  (That output is only as a place
	to stash the msg_type from decode).  All callers updated.

	* asn1_encode_k.c (asn1_encode_kdc_rep): Add extra argument which
	specifies the msg_type of the encoding; don't use rep->msg_type
	which is generally not set right.  (That output is only as a place
	to stash the msg_type from decode).  All callers updated.

	* asn1_encode_k.c (asn1_encode_msgtype): Routine removed.  Not
	really necessary, since a msg_type is really just an integer.  


Thu Aug  4 13:19:14 1994  Tom Yu  (tlyu@dragons-lair)

	* asn1_decode_k.c (asn1_decode_sequence_of_enctype): fix typo

Tue Aug  2 07:22:57 1994  Tom Yu  (tlyu@dragons-lair)

	* asn1_decode_k.c (asn1_decode_sequence_of_enctype): more fixing
	of realloc(NULL) returning NULL

Sat Jul 23 08:48:18 1994  Tom Yu  (tlyu@dragons-lair)

	* asn1buf.h: include ext-proto.h now to avoid type warnings

Sat Jul 16 00:19:18 1994  Tom Yu  (tlyu at dragons-lair)

	* asn1_encode_k.c (asn1_encode_transited_encoding): whoops don't
	bomb if val->tr_contents.dlength == 0

	* asn1_decode_k.c (asn1_decode_encrypted_data): oops looks like
	Harry made a brain fart here.... default value for kvno was 5, not
	0.

Thu Jul 14 11:37:59 1994  Theodore Y. Ts'o  (tytso at tsx-11)

	* asn1_*.[ch]: 
	* krb5_*.[ch]: Add MIT Copyright notices.

Thu Jul 14 01:26:22 1994  Tom Yu  (tlyu at dragons-lair)

	* asn1_encode_k.c (asn1_encode_pa_data): oops still check NULL if
	length != 0

Sat Jul  9 00:26:48 1994  Tom Yu  (tlyu at dragons-lair)

	* asn1_encode_k.c (asn1_encode_pa_data): the contents field of a
	krb5_pa_data structure can be NULL (e.g.
	salt_type==KRB5_KDB_SALTTYPE_V4), and the encoder was treating
	this as a missing required field

Fri Jul  8 17:32:29 1994  Tom Yu  (tlyu at dragons-lair)

	* asn1_decode_k.c: yet another instance of the SunOS realloc bug

	* asn1buf.c: whee SunOS realloc of a NULL pointer returns NULL.
	sigh.

Wed Jul  6 13:21:35 1994  Mark Eichin  (eichin@cygnus.com)

	* an1buf.c: Harry saves vs. Unix again.  Making sure that anything
	that can call calloc with a zero argument won't return ENOMEM if
	calloc retuns NULL in this case.  This was prompted by breakage
	under linux.

	* asn1_encode.c (asn1_encode_generaltime): don't use strftime on
	the output of gmtime -- under Solaris, it mutates it! (seems to be
	doing a timezone offset.) Besides, sprintf is quite sufficient.
	Also rename local variable time to gtime to avoid name collision.
	(asn1_decode_generaltime): the fixed-point method below doesn't
	actually work because it doesn't handle the current timezone
	offset. Simpler, and more general -- always call gmt_mktime, which
	is now provided in lib/krb5/os/gmt_mktime.c.

Sun Jul  3 04:43:42 1994  Tom Yu  (tlyu at dragons-lair)

	* asn1_encode_k.h:
	* asn1buf.c:
	* krbasn1.h: punt stdlib.h in favor of stdio.h.  It looks like
	Harry was assuming that NULL gets defined in stdlib instead of
	stdio

Fri Jul  1 13:03:39 1994  Mark Eichin  (eichin@cygnus.com)

	* asn1_encode_k.c (asn1_encode_msgtype): comment out krb5_msgtype
	decl of val arg, use int (to match prototype in header.) Throw out
	OLDDECLARG, DECLARG, and use old-style definition to match style
	of the rest of the code.
	(asn1_encode_ui_4): comment out krb5_ui_4 decl of val arg, use int
	(to match prototype in header.) Also rewrote definition header.

	* asn1_decode.c (asn1_decode_generaltime): tm_gmtoff is *not* in
	System V either. The only portable way to find the delta is to
	subtract gmtime from localtime at a fixed point (epoch+24hours is
	an easy way to simplify the arithmetic.)
	HAVE_GMTOFF: might someday be defined, but for now merely labels
	what the code original did/was intended to do.

	* configure.in: redo "autoconf frobbage" since the old way didn't
	work with srcdir. Now, AC_OUTPUT generates all three Makefiles,
	and ISODEMAKEFILE is subst'ed in to be either Makefile.isode or
	Makefile.sane. EXTRA_RULES_IN is used to append the extra stuff to
	the end of the "real" one of the two.
	* configure.in: krb5_encode.h and krb5_encode.h are source, not
	generated, so use CopySrcHeader instead.


Tue Jun 28 19:57:28 1994  Tom Yu  (tlyu at dragons-lair)

	* configure.in:
	* Makefile.in: autoconf frobbage

