1*0a6a1f1dSLionel Sambuc /*	$NetBSD: codec.c,v 1.1.1.2 2014/04/24 12:45:49 pettai Exp $	*/
2ebfedea0SLionel Sambuc 
3ebfedea0SLionel Sambuc /*
4ebfedea0SLionel Sambuc  * Copyright (c) 1998 - 2001 Kungliga Tekniska Högskolan
5ebfedea0SLionel Sambuc  * (Royal Institute of Technology, Stockholm, Sweden).
6ebfedea0SLionel Sambuc  * All rights reserved.
7ebfedea0SLionel Sambuc  *
8ebfedea0SLionel Sambuc  * Redistribution and use in source and binary forms, with or without
9ebfedea0SLionel Sambuc  * modification, are permitted provided that the following conditions
10ebfedea0SLionel Sambuc  * are met:
11ebfedea0SLionel Sambuc  *
12ebfedea0SLionel Sambuc  * 1. Redistributions of source code must retain the above copyright
13ebfedea0SLionel Sambuc  *    notice, this list of conditions and the following disclaimer.
14ebfedea0SLionel Sambuc  *
15ebfedea0SLionel Sambuc  * 2. Redistributions in binary form must reproduce the above copyright
16ebfedea0SLionel Sambuc  *    notice, this list of conditions and the following disclaimer in the
17ebfedea0SLionel Sambuc  *    documentation and/or other materials provided with the distribution.
18ebfedea0SLionel Sambuc  *
19ebfedea0SLionel Sambuc  * 3. Neither the name of the Institute nor the names of its contributors
20ebfedea0SLionel Sambuc  *    may be used to endorse or promote products derived from this software
21ebfedea0SLionel Sambuc  *    without specific prior written permission.
22ebfedea0SLionel Sambuc  *
23ebfedea0SLionel Sambuc  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24ebfedea0SLionel Sambuc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25ebfedea0SLionel Sambuc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ebfedea0SLionel Sambuc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27ebfedea0SLionel Sambuc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28ebfedea0SLionel Sambuc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29ebfedea0SLionel Sambuc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30ebfedea0SLionel Sambuc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31ebfedea0SLionel Sambuc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32ebfedea0SLionel Sambuc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33ebfedea0SLionel Sambuc  * SUCH DAMAGE.
34ebfedea0SLionel Sambuc  */
35ebfedea0SLionel Sambuc 
36ebfedea0SLionel Sambuc #include "krb5_locl.h"
37ebfedea0SLionel Sambuc 
38ebfedea0SLionel Sambuc #ifndef HEIMDAL_SMALLER
39ebfedea0SLionel Sambuc 
40ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncTicketPart(krb5_context context,const void * data,size_t length,EncTicketPart * t,size_t * len)41ebfedea0SLionel Sambuc krb5_decode_EncTicketPart (krb5_context context,
42ebfedea0SLionel Sambuc 			   const void *data,
43ebfedea0SLionel Sambuc 			   size_t length,
44ebfedea0SLionel Sambuc 			   EncTicketPart *t,
45ebfedea0SLionel Sambuc 			   size_t *len)
46*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
47ebfedea0SLionel Sambuc {
48ebfedea0SLionel Sambuc     return decode_EncTicketPart(data, length, t, len);
49ebfedea0SLionel Sambuc }
50ebfedea0SLionel Sambuc 
51ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncTicketPart(krb5_context context,void * data,size_t length,EncTicketPart * t,size_t * len)52ebfedea0SLionel Sambuc krb5_encode_EncTicketPart (krb5_context context,
53ebfedea0SLionel Sambuc 			   void *data,
54ebfedea0SLionel Sambuc 			   size_t length,
55ebfedea0SLionel Sambuc 			   EncTicketPart *t,
56ebfedea0SLionel Sambuc 			   size_t *len)
57*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
58ebfedea0SLionel Sambuc {
59ebfedea0SLionel Sambuc     return encode_EncTicketPart(data, length, t, len);
60ebfedea0SLionel Sambuc }
61ebfedea0SLionel Sambuc 
62ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncASRepPart(krb5_context context,const void * data,size_t length,EncASRepPart * t,size_t * len)63ebfedea0SLionel Sambuc krb5_decode_EncASRepPart (krb5_context context,
64ebfedea0SLionel Sambuc 			  const void *data,
65ebfedea0SLionel Sambuc 			  size_t length,
66ebfedea0SLionel Sambuc 			  EncASRepPart *t,
67ebfedea0SLionel Sambuc 			  size_t *len)
68*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
69ebfedea0SLionel Sambuc {
70ebfedea0SLionel Sambuc     return decode_EncASRepPart(data, length, t, len);
71ebfedea0SLionel Sambuc }
72ebfedea0SLionel Sambuc 
73ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncASRepPart(krb5_context context,void * data,size_t length,EncASRepPart * t,size_t * len)74ebfedea0SLionel Sambuc krb5_encode_EncASRepPart (krb5_context context,
75ebfedea0SLionel Sambuc 			  void *data,
76ebfedea0SLionel Sambuc 			  size_t length,
77ebfedea0SLionel Sambuc 			  EncASRepPart *t,
78ebfedea0SLionel Sambuc 			  size_t *len)
79*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
80ebfedea0SLionel Sambuc {
81ebfedea0SLionel Sambuc     return encode_EncASRepPart(data, length, t, len);
82ebfedea0SLionel Sambuc }
83ebfedea0SLionel Sambuc 
84ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncTGSRepPart(krb5_context context,const void * data,size_t length,EncTGSRepPart * t,size_t * len)85ebfedea0SLionel Sambuc krb5_decode_EncTGSRepPart (krb5_context context,
86ebfedea0SLionel Sambuc 			   const void *data,
87ebfedea0SLionel Sambuc 			   size_t length,
88ebfedea0SLionel Sambuc 			   EncTGSRepPart *t,
89ebfedea0SLionel Sambuc 			   size_t *len)
90*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
91ebfedea0SLionel Sambuc {
92ebfedea0SLionel Sambuc     return decode_EncTGSRepPart(data, length, t, len);
93ebfedea0SLionel Sambuc }
94ebfedea0SLionel Sambuc 
95ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncTGSRepPart(krb5_context context,void * data,size_t length,EncTGSRepPart * t,size_t * len)96ebfedea0SLionel Sambuc krb5_encode_EncTGSRepPart (krb5_context context,
97ebfedea0SLionel Sambuc 			   void *data,
98ebfedea0SLionel Sambuc 			   size_t length,
99ebfedea0SLionel Sambuc 			   EncTGSRepPart *t,
100ebfedea0SLionel Sambuc 			   size_t *len)
101*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
102ebfedea0SLionel Sambuc {
103ebfedea0SLionel Sambuc     return encode_EncTGSRepPart(data, length, t, len);
104ebfedea0SLionel Sambuc }
105ebfedea0SLionel Sambuc 
106ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncAPRepPart(krb5_context context,const void * data,size_t length,EncAPRepPart * t,size_t * len)107ebfedea0SLionel Sambuc krb5_decode_EncAPRepPart (krb5_context context,
108ebfedea0SLionel Sambuc 			  const void *data,
109ebfedea0SLionel Sambuc 			  size_t length,
110ebfedea0SLionel Sambuc 			  EncAPRepPart *t,
111ebfedea0SLionel Sambuc 			  size_t *len)
112*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
113ebfedea0SLionel Sambuc {
114ebfedea0SLionel Sambuc     return decode_EncAPRepPart(data, length, t, len);
115ebfedea0SLionel Sambuc }
116ebfedea0SLionel Sambuc 
117ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncAPRepPart(krb5_context context,void * data,size_t length,EncAPRepPart * t,size_t * len)118ebfedea0SLionel Sambuc krb5_encode_EncAPRepPart (krb5_context context,
119ebfedea0SLionel Sambuc 			  void *data,
120ebfedea0SLionel Sambuc 			  size_t length,
121ebfedea0SLionel Sambuc 			  EncAPRepPart *t,
122ebfedea0SLionel Sambuc 			  size_t *len)
123*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
124ebfedea0SLionel Sambuc {
125ebfedea0SLionel Sambuc     return encode_EncAPRepPart(data, length, t, len);
126ebfedea0SLionel Sambuc }
127ebfedea0SLionel Sambuc 
128ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_Authenticator(krb5_context context,const void * data,size_t length,Authenticator * t,size_t * len)129ebfedea0SLionel Sambuc krb5_decode_Authenticator (krb5_context context,
130ebfedea0SLionel Sambuc 			   const void *data,
131ebfedea0SLionel Sambuc 			   size_t length,
132ebfedea0SLionel Sambuc 			   Authenticator *t,
133ebfedea0SLionel Sambuc 			   size_t *len)
134*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
135ebfedea0SLionel Sambuc {
136ebfedea0SLionel Sambuc     return decode_Authenticator(data, length, t, len);
137ebfedea0SLionel Sambuc }
138ebfedea0SLionel Sambuc 
139ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_Authenticator(krb5_context context,void * data,size_t length,Authenticator * t,size_t * len)140ebfedea0SLionel Sambuc krb5_encode_Authenticator (krb5_context context,
141ebfedea0SLionel Sambuc 			   void *data,
142ebfedea0SLionel Sambuc 			   size_t length,
143ebfedea0SLionel Sambuc 			   Authenticator *t,
144ebfedea0SLionel Sambuc 			   size_t *len)
145*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
146ebfedea0SLionel Sambuc {
147ebfedea0SLionel Sambuc     return encode_Authenticator(data, length, t, len);
148ebfedea0SLionel Sambuc }
149ebfedea0SLionel Sambuc 
150ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_EncKrbCredPart(krb5_context context,const void * data,size_t length,EncKrbCredPart * t,size_t * len)151ebfedea0SLionel Sambuc krb5_decode_EncKrbCredPart (krb5_context context,
152ebfedea0SLionel Sambuc 			    const void *data,
153ebfedea0SLionel Sambuc 			    size_t length,
154ebfedea0SLionel Sambuc 			    EncKrbCredPart *t,
155ebfedea0SLionel Sambuc 			    size_t *len)
156*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
157ebfedea0SLionel Sambuc {
158ebfedea0SLionel Sambuc     return decode_EncKrbCredPart(data, length, t, len);
159ebfedea0SLionel Sambuc }
160ebfedea0SLionel Sambuc 
161ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_EncKrbCredPart(krb5_context context,void * data,size_t length,EncKrbCredPart * t,size_t * len)162ebfedea0SLionel Sambuc krb5_encode_EncKrbCredPart (krb5_context context,
163ebfedea0SLionel Sambuc 			    void *data,
164ebfedea0SLionel Sambuc 			    size_t length,
165ebfedea0SLionel Sambuc 			    EncKrbCredPart *t,
166ebfedea0SLionel Sambuc 			    size_t *len)
167*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
168ebfedea0SLionel Sambuc {
169ebfedea0SLionel Sambuc     return encode_EncKrbCredPart (data, length, t, len);
170ebfedea0SLionel Sambuc }
171ebfedea0SLionel Sambuc 
172ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_ETYPE_INFO(krb5_context context,const void * data,size_t length,ETYPE_INFO * t,size_t * len)173ebfedea0SLionel Sambuc krb5_decode_ETYPE_INFO (krb5_context context,
174ebfedea0SLionel Sambuc 			const void *data,
175ebfedea0SLionel Sambuc 			size_t length,
176ebfedea0SLionel Sambuc 			ETYPE_INFO *t,
177ebfedea0SLionel Sambuc 			size_t *len)
178*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
179ebfedea0SLionel Sambuc {
180ebfedea0SLionel Sambuc     return decode_ETYPE_INFO(data, length, t, len);
181ebfedea0SLionel Sambuc }
182ebfedea0SLionel Sambuc 
183ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_ETYPE_INFO(krb5_context context,void * data,size_t length,ETYPE_INFO * t,size_t * len)184ebfedea0SLionel Sambuc krb5_encode_ETYPE_INFO (krb5_context context,
185ebfedea0SLionel Sambuc 			void *data,
186ebfedea0SLionel Sambuc 			size_t length,
187ebfedea0SLionel Sambuc 			ETYPE_INFO *t,
188ebfedea0SLionel Sambuc 			size_t *len)
189*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
190ebfedea0SLionel Sambuc {
191ebfedea0SLionel Sambuc     return encode_ETYPE_INFO (data, length, t, len);
192ebfedea0SLionel Sambuc }
193ebfedea0SLionel Sambuc 
194ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_decode_ETYPE_INFO2(krb5_context context,const void * data,size_t length,ETYPE_INFO2 * t,size_t * len)195ebfedea0SLionel Sambuc krb5_decode_ETYPE_INFO2 (krb5_context context,
196ebfedea0SLionel Sambuc 			const void *data,
197ebfedea0SLionel Sambuc 			size_t length,
198ebfedea0SLionel Sambuc 			ETYPE_INFO2 *t,
199ebfedea0SLionel Sambuc 			size_t *len)
200*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
201ebfedea0SLionel Sambuc {
202ebfedea0SLionel Sambuc     return decode_ETYPE_INFO2(data, length, t, len);
203ebfedea0SLionel Sambuc }
204ebfedea0SLionel Sambuc 
205ebfedea0SLionel Sambuc KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_encode_ETYPE_INFO2(krb5_context context,void * data,size_t length,ETYPE_INFO2 * t,size_t * len)206ebfedea0SLionel Sambuc krb5_encode_ETYPE_INFO2 (krb5_context context,
207ebfedea0SLionel Sambuc 			 void *data,
208ebfedea0SLionel Sambuc 			 size_t length,
209ebfedea0SLionel Sambuc 			 ETYPE_INFO2 *t,
210ebfedea0SLionel Sambuc 			 size_t *len)
211*0a6a1f1dSLionel Sambuc     KRB5_DEPRECATED_FUNCTION("Use X instead")
212ebfedea0SLionel Sambuc {
213ebfedea0SLionel Sambuc     return encode_ETYPE_INFO2 (data, length, t, len);
214ebfedea0SLionel Sambuc }
215ebfedea0SLionel Sambuc 
216ebfedea0SLionel Sambuc #endif /* HEIMDAL_SMALLER */
217