+Tue Feb 21 17:31:06 1995 Keith Vetter (keithv@fusion.com)
+
+ * config.h: added HAVE_ERRNO for the windows section
+ changed windows manifest constant from __windows__
+ to _MSDOS so that DOS test programs will compile.
+
+Tue Feb 21 12:00:32 1995 Keith Vetter (keithv@fusion.com)
+
+ * asn1.h: added windows INTERFACE keyword to all functions.
+
Tue Feb 21 17:49:41 1995 Mark Eichin (eichin@cygnus.com)
* config.h: get krb5/autoconf.h.
* Makefile.in (KRB5_HEADERS): add config.h, remove rsa-md4.h and
crc-32.h which aren't here anymore.
-=======
Tue Feb 21 0:0:32 1995 Keith Vetter (keithv@fusion.com)
* func-proto.h: added windows INTERFACE keyword to all functions.
Returns ENOMEM if memory runs out.
*/
-krb5_error_code encode_krb5_authenticator
+krb5_error_code INTERFACE encode_krb5_authenticator
PROTOTYPE((const krb5_authenticator *rep, krb5_data **code));
-krb5_error_code encode_krb5_ticket
+krb5_error_code INTERFACE encode_krb5_ticket
PROTOTYPE((const krb5_ticket *rep, krb5_data **code));
-krb5_error_code encode_krb5_encryption_key
+krb5_error_code INTERFACE encode_krb5_encryption_key
PROTOTYPE((const krb5_keyblock *rep, krb5_data **code));
-krb5_error_code encode_krb5_enc_tkt_part
+krb5_error_code INTERFACE encode_krb5_enc_tkt_part
PROTOTYPE((const krb5_enc_tkt_part *rep, krb5_data **code));
-krb5_error_code encode_krb5_enc_kdc_rep_part
+krb5_error_code INTERFACE encode_krb5_enc_kdc_rep_part
PROTOTYPE((const krb5_enc_kdc_rep_part *rep, krb5_data **code));
/* yes, the translation is identical to that used for KDC__REP */
-krb5_error_code encode_krb5_as_rep
+krb5_error_code INTERFACE encode_krb5_as_rep
PROTOTYPE((const krb5_kdc_rep *rep, krb5_data **code));
/* yes, the translation is identical to that used for KDC__REP */
-krb5_error_code encode_krb5_tgs_rep
+krb5_error_code INTERFACE encode_krb5_tgs_rep
PROTOTYPE((const krb5_kdc_rep *rep, krb5_data **code));
-krb5_error_code encode_krb5_ap_req
+krb5_error_code INTERFACE encode_krb5_ap_req
PROTOTYPE((const krb5_ap_req *rep, krb5_data **code));
-krb5_error_code encode_krb5_ap_rep
+krb5_error_code INTERFACE encode_krb5_ap_rep
PROTOTYPE((const krb5_ap_rep *rep, krb5_data **code));
-krb5_error_code encode_krb5_ap_rep_enc_part
+krb5_error_code INTERFACE encode_krb5_ap_rep_enc_part
PROTOTYPE((const krb5_ap_rep_enc_part *rep, krb5_data **code));
-krb5_error_code encode_krb5_as_req
+krb5_error_code INTERFACE encode_krb5_as_req
PROTOTYPE((const krb5_kdc_req *rep, krb5_data **code));
-krb5_error_code encode_krb5_tgs_req
+krb5_error_code INTERFACE encode_krb5_tgs_req
PROTOTYPE((const krb5_kdc_req *rep, krb5_data **code));
-krb5_error_code encode_krb5_kdc_req_body
+krb5_error_code INTERFACE encode_krb5_kdc_req_body
PROTOTYPE((const krb5_kdc_req *rep, krb5_data **code));
-krb5_error_code encode_krb5_safe
+krb5_error_code INTERFACE encode_krb5_safe
PROTOTYPE((const krb5_safe *rep, krb5_data **code));
-krb5_error_code encode_krb5_priv
+krb5_error_code INTERFACE encode_krb5_priv
PROTOTYPE((const krb5_priv *rep, krb5_data **code));
-krb5_error_code encode_krb5_enc_priv_part
+krb5_error_code INTERFACE encode_krb5_enc_priv_part
PROTOTYPE((const krb5_priv_enc_part *rep, krb5_data **code));
-krb5_error_code encode_krb5_cred
+krb5_error_code INTERFACE encode_krb5_cred
PROTOTYPE((const krb5_cred *rep, krb5_data **code));
-krb5_error_code encode_krb5_enc_cred_part
+krb5_error_code INTERFACE encode_krb5_enc_cred_part
PROTOTYPE((const krb5_cred_enc_part *rep, krb5_data **code));
-krb5_error_code encode_krb5_error
+krb5_error_code INTERFACE encode_krb5_error
PROTOTYPE((const krb5_error *rep, krb5_data **code));
-krb5_error_code encode_krb5_authdata
+krb5_error_code INTERFACE encode_krb5_authdata
PROTOTYPE((const krb5_authdata **rep, krb5_data **code));
-krb5_error_code encode_krb5_pwd_sequence
+krb5_error_code INTERFACE encode_krb5_pwd_sequence
PROTOTYPE((const passwd_phrase_element *rep, krb5_data **code));
-krb5_error_code encode_krb5_pwd_data
+krb5_error_code INTERFACE encode_krb5_pwd_data
PROTOTYPE((const krb5_pwd_data *rep, krb5_data **code));
/*************************************************************************
Returns asn1 and krb5 errors.
*/
-krb5_error_code decode_krb5_authenticator
+krb5_error_code INTERFACE decode_krb5_authenticator
PROTOTYPE((const krb5_data *code, krb5_authenticator **rep));
-krb5_error_code decode_krb5_ticket
+krb5_error_code INTERFACE decode_krb5_ticket
PROTOTYPE((const krb5_data *code, krb5_ticket **rep));
-krb5_error_code decode_krb5_encryption_key
+krb5_error_code INTERFACE decode_krb5_encryption_key
PROTOTYPE((const krb5_data *output, krb5_keyblock **rep));
-krb5_error_code decode_krb5_enc_tkt_part
+krb5_error_code INTERFACE decode_krb5_enc_tkt_part
PROTOTYPE((const krb5_data *output, krb5_enc_tkt_part **rep));
-krb5_error_code decode_krb5_enc_kdc_rep_part
+krb5_error_code INTERFACE decode_krb5_enc_kdc_rep_part
PROTOTYPE((const krb5_data *output, krb5_enc_kdc_rep_part **rep));
-krb5_error_code decode_krb5_as_rep
+krb5_error_code INTERFACE decode_krb5_as_rep
PROTOTYPE((const krb5_data *output, krb5_kdc_rep **rep));
-krb5_error_code decode_krb5_tgs_rep
+krb5_error_code INTERFACE decode_krb5_tgs_rep
PROTOTYPE((const krb5_data *output, krb5_kdc_rep **rep));
-krb5_error_code decode_krb5_ap_req
+krb5_error_code INTERFACE decode_krb5_ap_req
PROTOTYPE((const krb5_data *output, krb5_ap_req **rep));
-krb5_error_code decode_krb5_ap_rep
+krb5_error_code INTERFACE decode_krb5_ap_rep
PROTOTYPE((const krb5_data *output, krb5_ap_rep **rep));
-krb5_error_code decode_krb5_ap_rep_enc_part
+krb5_error_code INTERFACE decode_krb5_ap_rep_enc_part
PROTOTYPE((const krb5_data *output, krb5_ap_rep_enc_part **rep));
-krb5_error_code decode_krb5_as_req
+krb5_error_code INTERFACE decode_krb5_as_req
PROTOTYPE((const krb5_data *output, krb5_kdc_req **rep));
-krb5_error_code decode_krb5_tgs_req
+krb5_error_code INTERFACE decode_krb5_tgs_req
PROTOTYPE((const krb5_data *output, krb5_kdc_req **rep));
-krb5_error_code decode_krb5_kdc_req_body
+krb5_error_code INTERFACE decode_krb5_kdc_req_body
PROTOTYPE((const krb5_data *output, krb5_kdc_req **rep));
-krb5_error_code decode_krb5_safe
+krb5_error_code INTERFACE decode_krb5_safe
PROTOTYPE((const krb5_data *output, krb5_safe **rep));
-krb5_error_code decode_krb5_priv
+krb5_error_code INTERFACE decode_krb5_priv
PROTOTYPE((const krb5_data *output, krb5_priv **rep));
-krb5_error_code decode_krb5_enc_priv_part
+krb5_error_code INTERFACE decode_krb5_enc_priv_part
PROTOTYPE((const krb5_data *output, krb5_priv_enc_part **rep));
-krb5_error_code decode_krb5_cred
+krb5_error_code INTERFACE decode_krb5_cred
PROTOTYPE((const krb5_data *output, krb5_cred **rep));
-krb5_error_code decode_krb5_enc_cred_part
+krb5_error_code INTERFACE decode_krb5_enc_cred_part
PROTOTYPE((const krb5_data *output, krb5_cred_enc_part **rep));
-krb5_error_code decode_krb5_error
+krb5_error_code INTERFACE decode_krb5_error
PROTOTYPE((const krb5_data *output, krb5_error **rep));
-krb5_error_code decode_krb5_authdata
+krb5_error_code INTERFACE decode_krb5_authdata
PROTOTYPE((const krb5_data *output, krb5_authdata ***rep));
-krb5_error_code decode_krb5_pwd_sequence
+krb5_error_code INTERFACE decode_krb5_pwd_sequence
PROTOTYPE((const krb5_data *output, passwd_phrase_element **rep));
-krb5_error_code decode_krb5_pwd_data
+krb5_error_code INTERFACE decode_krb5_pwd_data
PROTOTYPE((const krb5_data *output, krb5_pwd_data **rep));
/*************************************************************************
#ifndef KRB5_CONFIG__
#define KRB5_CONFIG__
-#ifdef __windows__
+#ifdef _MSDOS
/*
* Machine-type definitions: PC Clone 386 running Microloss Windows
*/
#define USE_STRING_H
#define HAVE_SRAND
+#define HAVE_ERRNO
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
+Tue Feb 21 17:42:44 1995 Keith Vetter (keithv@fusion.com)
+
+ * Makefile.in: made to work on the PC
+ * *.c, des.h: added windows INTERFACE keyword
+ * read_passwd.c: renamed a static variable to avoid compiler error
+ * quad_cksum.c: errno extern declaration removed on the PC
+
Fri Feb 3 17:23:45 1995 Theodore Y. Ts'o (tytso@dcl)
* pcbc_encrypt.c: Add SIZEOF_FOO checks to properly define
CFLAGS = $(CCOPTS) $(DEFS) -I$(srcdir)/../crypto/des
LDFLAGS = -g
-all:: $(OBJS)
+##DOSBUILDTOP = ..\..
+##DOSLIBNAME=libdes425.lib
+##DOS!include $(BUILDTOP)\config\windows.in
-OBJS= cksum.o \
- des.o \
- enc_dec.o \
- key_parity.o \
- key_sched.o \
- new_rnd_key.o \
- pcbc_encrypt.o \
- quad_cksum.o \
- random_key.o \
- read_passwd.o \
- str_to_key.o \
- weak_key.o
+OBJS= cksum.$(OBJEXT) \
+ des.$(OBJEXT) \
+ enc_dec.$(OBJEXT) \
+ key_parity.$(OBJEXT) \
+ key_sched.$(OBJEXT) \
+ new_rnd_key.$(OBJEXT) \
+ pcbc_encrypt.$(OBJEXT) \
+ quad_cksum.$(OBJEXT) \
+ random_key.$(OBJEXT) \
+ read_passwd.$(OBJEXT) \
+ str_to_key.$(OBJEXT) \
+ weak_key.$(OBJEXT)
SRCS= $(srcdir)/cksum.c \
$(srcdir)/des.c \
EXT_LIB= libdes425.a $(TOPLIBD)/libcrypto.a
DEPKLIB= $(TOPLIBD)/libcrypto.a
+all:: $(OBJS)
+
verify: verify.o libdes425.a $(DEPKLIB)
$(CC) -o $@ verify.o $(LDFLAGS) $(EXT_LIB)
-check:: verify
+check:: check-$(WHAT)
+
+check-unix:: verify
./verify -z
./verify -m
./verify
+check-windows::
+
clean::
- $(RM) verify
+ $(RM) verify$(EXEEXT)
libdes425.a: $(OBJS)
$(RM) $@
$(RANLIB) $(DESTDIR)$(KRB5_LIBDIR)/libdes425.a
clean::
- $(RM) libdes425.a
+ $(RM) libdes425.$(LIBEXT) libdes425.bak
* multiple of eight bytes.
*/
-void
+void INTERFACE
des_cbc_cksum(in,out,length,key,iv)
krb5_octet *in; /* >= length bytes of inputtext */
krb5_octet *out; /* >= length bytes of outputtext */
#include "des.h"
#include <krb5/ext-proto.h>
-int
+int INTERFACE
des_ecb_encrypt(clear, cipher, schedule, encrypt)
unsigned long *clear;
unsigned long *cipher;
#define des_cblock_print(x) des_cblock_print_file(x, stdout)
+/*
+ * Windows needs everything prototyped because we're exporting all the fuctions.
+ */
+void INTERFACE des_cbc_cksum();
+int INTERFACE des_ecb_encrypt();
+int INTERFACE des_cbc_encrypt();
+void INTERFACE des_fixup_key_parity();
+int INTERFACE des_check_key_parity();
+int INTERFACE des_key_sched();
+int INTERFACE des_new_random_key();
+void INTERFACE des_init_random_number_generator();
+void INTERFACE des_set_random_generator_seed();
+void INTERFACE des_set_sequence_number();
+void INTERFACE des_generate_random_block();
+int INTERFACE des_pcbc_encrypt();
+unsigned long INTERFACE des_quad_cksum();
+int INTERFACE des_random_key();
+int INTERFACE des_read_password();
+int INTERFACE des_string_to_key();
+int INTERFACE des_is_weak_key();
+
#endif /* DES_DEFS */
* cleartext.
*/
-int
+int INTERFACE
des_cbc_encrypt(in,out,length,key,iv,encrypt)
krb5_octet *in; /* >= length bytes of input text */
krb5_octet *out; /* >= length bytes of output text */
* 8,16,...64 in des order, implies 0, 8, 16, ...
* vax order.
*/
-void
+void INTERFACE
des_fixup_key_parity(key)
register mit_des_cblock key;
{
* See des_fix_key_parity for the definition of
* correct des parity.
*/
-int
+int INTERFACE
des_check_key_parity(key)
register mit_des_cblock key;
{
/* the following are really void but cc86 doesnt allow it */
static void make_key_sched PROTOTYPE((key, mit_des_key_schedule));
-int
+int INTERFACE
des_key_sched(k,schedule)
register mit_des_cblock k; /* r11 */
mit_des_key_schedule schedule;
#include "des.h"
-extern void mit_des_fixup_key_parity();
-extern int mit_des_is_weak_key();
-extern int mit_des_init_random_number_generator();
-extern void mit_des_set_random_generator_seed();
-extern void mit_des_set_sequence_number();
-extern void mit_des_generate_random_block();
-extern int mit_des_new_random_key();
-extern void mit_des_generate_random_block();
+extern int INTERFACE mit_des_init_random_number_generator();
+extern void INTERFACE mit_des_set_random_generator_seed();
+extern void INTERFACE mit_des_set_sequence_number();
+extern void INTERFACE mit_des_generate_random_block();
+extern int INTERFACE mit_des_new_random_key();
-void des_set_random_generator_seed(), des_set_sequence_number();
-void des_generate_random_block();
+void INTERFACE des_set_random_generator_seed();
+void INTERFACE des_set_sequence_number();
+void INTERFACE des_generate_random_block();
/*
* The secret des key schedule and sequence number for the current
* to be a weak des key. Des_generate_random_block is used to
* provide the random bits.
*/
-int
+int INTERFACE
des_new_random_key(key)
mit_des_cblock key;
{
*
* Note: this routine calls des_set_random_generator_seed.
*/
-void des_init_random_number_generator(key)
+void INTERFACE
+des_init_random_number_generator(key)
mit_des_cblock key;
{
mit_des_init_random_number_generator(key, &random_sequence_state);
* Requires: key is a valid des key. I.e., has correct parity and is not a
* weak des key.
*/
-void
+void INTERFACE
des_set_random_generator_seed(key)
mit_des_cblock key;
{
*
* Note that des_set_random_generator_seed resets the sequence number to 0.
*/
-void
+void INTERFACE
des_set_sequence_number(new_sequence_number)
mit_des_cblock new_sequence_number;
{
* Requires: des_set_random_generator_seed must have been called at least once
* before this routine is called.
*/
-void des_generate_random_block(block)
+void INTERFACE
+des_generate_random_block(block)
mit_des_cblock block;
{
mit_des_generate_random_block(block, &random_sequence_state);
/*
* copy of include/des.h to avoid collision with local one
*/
-#include <kerberosIV/mit-copyright.h>
+#include <krb5/copyright.h>
+#include <krb5/config.h>
#include <krb5/osconf.h>
#ifndef KRB_INT32
/*
* des_pcbc_encrypt - {en,de}crypt a stream in PCBC mode
*/
-int
+int INTERFACE
des_pcbc_encrypt(in, out, length, schedule, ivec, encrypt)
des_cblock *in;
des_cblock *out;
/* Externals */
extern char *errmsg();
+#ifndef HAVE_ERRNO
extern int errno;
+#endif
extern int des_debug;
/*** Routines ***************************************************** */
-unsigned long
+unsigned long INTERFACE
des_quad_cksum(in,out,length,out_count,c_seed)
mit_des_cblock *c_seed; /* secret seed, 8 bytes */
unsigned char *in; /* input block */
#include "des.h"
/* random_key */
-int
+int INTERFACE
des_random_key(key)
mit_des_cblock *key;
{
#include "des.h"
-static krb5_context global_context = 0;
+static krb5_context krb4_global_context = 0;
/*** Routines ****************************************************** */
-int
+int INTERFACE
des_read_password/*_v4_compat_crock*/(k,prompt,verify)
mit_des_cblock *k;
char *prompt;
char prompt2[BUFSIZ];
int string_size = sizeof(key_string);
- if (!global_context) {
- retval = krb5_init_context(&global_context);
+ if (!krb4_global_context) {
+ retval = krb5_init_context(&krb4_global_context);
if (retval)
return retval;
}
strcpy(prompt2, "Verifying, please re-enter ");
strncat(prompt2, prompt, sizeof(prompt2)-(strlen(prompt2)+1));
}
- ok = krb5_read_password(global_context, prompt, verify ? prompt2 : 0,
+ ok = krb5_read_password(krb4_global_context, prompt, verify ? prompt2 : 0,
key_string, &string_size);
if (ok == 0)
/* #include "des_internal.h" */
extern int mit_des_debug;
-extern int mit_des_debug_print();
-extern void mit_des_fixup_key_parity();
/*
* convert an arbitrary length string to a DES key
*/
-int
+int INTERFACE
des_string_to_key(str,key)
char *str;
register mit_des_cblock *key;
register char *p_char;
static char k_char[64];
static mit_des_key_schedule key_sked;
- extern unsigned long des_cbc_cksum();
+ extern void INTERFACE des_cbc_cksum();
in_str = str;
forward = 1;
*
* Requires: key has correct odd parity.
*/
-int
+int INTERFACE
des_is_weak_key(key)
mit_des_cblock key;
{
+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):
RM = rm -f
CP = cp
+##DOSBUILDTOP = ..\..\..
+##DOSLIBNAME=..\libkrb5.lib
+##DOS!include $(BUILDTOP)\config\windows.in
PEPSY = @PEPSY@
PSYFLAGS = @PSYFLAGS@
KRB5_INCDIR = $(KRB5ROOT)/include
-all:: $(OBJS)
-
SRCTOP=$(srcdir)/$(BUILDTOP)
EHDRDIR=$(BUILDTOP)/include/krb5/asn.1
$(srcdir)asn1_misc.c
OBJS= \
- asn1_decode.o\
- asn1_k_decode.o\
- asn1_encode.o\
- asn1_get.o\
- asn1_make.o\
- asn1buf.o\
- krb5_decode.o\
- krb5_encode.o\
- asn1_k_encode.o\
- asn1_misc.o
-
-clean::
+ asn1_decode.$(OBJEXT)\
+ asn1_k_decode.$(OBJEXT)\
+ asn1_encode.$(OBJEXT)\
+ asn1_get.$(OBJEXT)\
+ asn1_make.$(OBJEXT)\
+ asn1buf.$(OBJEXT)\
+ krb5_decode.$(OBJEXT)\
+ krb5_encode.$(OBJEXT)\
+ asn1_k_encode.$(OBJEXT)\
+ asn1_misc.$(OBJEXT)
+
+all:: $(OBJS)
+
+clean:: clean-$(WHAT)
+
+clean-unix::
$(RM) $(OBJS)
+clean-windows::
+ $(RM) *.obj
#define cleanup()\
return 0
-asn1_error_code asn1_decode_integer(buf, val)
+asn1_error_code INTERFACE asn1_decode_integer(buf, val)
asn1buf * buf;
long * val;
{
cleanup();
}
-asn1_error_code asn1_decode_unsigned_integer(buf, val)
+asn1_error_code INTERFACE asn1_decode_unsigned_integer(buf, val)
asn1buf * buf;
unsigned long * val;
{
cleanup();
}
-asn1_error_code asn1_decode_octetstring(buf, retlen, val)
+asn1_error_code INTERFACE asn1_decode_octetstring(buf, retlen, val)
asn1buf * buf;
int * retlen;
asn1_octet ** val;
cleanup();
}
-asn1_error_code asn1_decode_charstring(buf, retlen, val)
+asn1_error_code INTERFACE asn1_decode_charstring(buf, retlen, val)
asn1buf * buf;
int * retlen;
char ** val;
}
-asn1_error_code asn1_decode_generalstring(buf, retlen, val)
+asn1_error_code INTERFACE asn1_decode_generalstring(buf, retlen, val)
asn1buf * buf;
int * retlen;
char ** val;
}
-asn1_error_code asn1_decode_null(buf)
+asn1_error_code INTERFACE asn1_decode_null(buf)
asn1buf * buf;
{
setup();
cleanup();
}
-asn1_error_code asn1_decode_printablestring(buf, retlen, val)
+asn1_error_code INTERFACE asn1_decode_printablestring(buf, retlen, val)
asn1buf * buf;
int * retlen;
char ** val;
cleanup();
}
-asn1_error_code asn1_decode_ia5string(buf, retlen, val)
+asn1_error_code INTERFACE asn1_decode_ia5string(buf, retlen, val)
asn1buf * buf;
int * retlen;
char ** val;
cleanup();
}
-asn1_error_code asn1_decode_generaltime(buf, val)
+asn1_error_code INTERFACE asn1_decode_generaltime(buf, val)
asn1buf * buf;
time_t * val;
{
Returns ENOMEM if memory is exhausted.
Returns asn1 errors. */
-asn1_error_code asn1_decode_integer
+asn1_error_code INTERFACE asn1_decode_integer
PROTOTYPE((asn1buf *buf, long *val));
-asn1_error_code asn1_decode_unsigned_integer
+asn1_error_code INTERFACE asn1_decode_unsigned_integer
PROTOTYPE((asn1buf *buf, unsigned long *val));
-asn1_error_code asn1_decode_null
+asn1_error_code INTERFACE asn1_decode_null
PROTOTYPE((asn1buf *buf));
-asn1_error_code asn1_decode_octetstring
+asn1_error_code INTERFACE asn1_decode_octetstring
PROTOTYPE((asn1buf *buf, int *retlen, asn1_octet **val));
-asn1_error_code asn1_decode_generalstring
+asn1_error_code INTERFACE asn1_decode_generalstring
PROTOTYPE((asn1buf *buf, int *retlen, char **val));
-asn1_error_code asn1_decode_charstring
+asn1_error_code INTERFACE asn1_decode_charstring
PROTOTYPE((asn1buf *buf, int *retlen, char **val));
/* Note: A charstring is a special hack to account for the fact that
krb5 structures store some OCTET STRING values in krb5_octet
PROTOTYPE((which use char arrays).
From the ASN.1 point of view, the two string types are the same,
only the receptacles differ. */
-asn1_error_code asn1_decode_printablestring
+asn1_error_code INTERFACE asn1_decode_printablestring
PROTOTYPE((asn1buf *buf, int *retlen, char **val));
-asn1_error_code asn1_decode_ia5string
+asn1_error_code INTERFACE asn1_decode_ia5string
PROTOTYPE((asn1buf *buf, int *retlen, char **val));
-asn1_error_code asn1_decode_generaltime
+asn1_error_code INTERFACE asn1_decode_generaltime
PROTOTYPE((asn1buf *buf, time_t *val));
#endif
#include "asn1_encode.h"
#include "asn1_make.h"
-asn1_error_code asn1_encode_integer(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_integer(buf, val, retlen)
asn1buf * buf;
const long val;
int * retlen;
valcopy = val;
do {
digit = valcopy&0xFF;
- retval = asn1buf_insert_octet(buf,digit);
+ retval = asn1buf_insert_octet(buf,(asn1_octet) digit);
if(retval) return retval;
length++;
valcopy = valcopy >> 8;
return 0;
}
-asn1_error_code asn1_encode_unsigned_integer(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_unsigned_integer(buf, val, retlen)
asn1buf * buf;
const unsigned long val;
int * retlen;
valcopy = val;
do {
digit = valcopy&0xFF;
- retval = asn1buf_insert_octet(buf,digit);
+ retval = asn1buf_insert_octet(buf,(asn1_octet) digit);
if(retval) return retval;
length++;
valcopy = valcopy >> 8;
return 0;
}
-asn1_error_code asn1_encode_octetstring(buf, len, val, retlen)
+asn1_error_code INTERFACE asn1_encode_octetstring(buf, len, val, retlen)
asn1buf * buf;
const int len;
const asn1_octet * val;
return 0;
}
-asn1_error_code asn1_encode_charstring(buf, len, val, retlen)
+asn1_error_code INTERFACE asn1_encode_charstring(buf, len, val, retlen)
asn1buf * buf;
const int len;
const char * val;
return 0;
}
-asn1_encode_null(buf, retlen)
+asn1_error_code INTERFACE asn1_encode_null(buf, retlen)
asn1buf * buf;
int * retlen;
{
return 0;
}
-asn1_error_code asn1_encode_printablestring(buf, len, val, retlen)
+asn1_error_code INTERFACE asn1_encode_printablestring(buf, len, val, retlen)
asn1buf * buf;
const int len;
const char * val;
return 0;
}
-asn1_error_code asn1_encode_ia5string(buf, len, val, retlen)
+asn1_error_code INTERFACE asn1_encode_ia5string(buf, len, val, retlen)
asn1buf * buf;
const int len;
const char * val;
return 0;
}
-asn1_error_code asn1_encode_generaltime(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_generaltime(buf, val, retlen)
asn1buf * buf;
const time_t val;
int * retlen;
return 0;
}
-asn1_error_code asn1_encode_generalstring(buf, len, val, retlen)
+asn1_error_code INTERFACE asn1_encode_generalstring(buf, len, val, retlen)
asn1buf * buf;
const int len;
const char * val;
asn1_encode_generalstring
*/
-asn1_error_code asn1_encode_integer
+asn1_error_code INTERFACE asn1_encode_integer
PROTOTYPE((asn1buf *buf, const long val, int *retlen));
/* requires *buf is allocated
modifies *buf, *retlen
Returns ENOMEM to signal an unsuccesful attempt
to expand the buffer. */
-asn1_error_code asn1_encode_unsigned_integer
+asn1_error_code INTERFACE asn1_encode_unsigned_integer
PROTOTYPE((asn1buf *buf, const unsigned long val, int *retlen));
/* requires *buf is allocated
modifies *buf, *retlen
Returns ENOMEM to signal an unsuccesful attempt
to expand the buffer. */
-asn1_error_code asn1_encode_octetstring
+asn1_error_code INTERFACE asn1_encode_octetstring
PROTOTYPE((asn1buf *buf,
const int len, const asn1_octet *val,
int *retlen));
Returns ENOMEM to signal an unsuccesful attempt
to expand the buffer. */
-asn1_error_code asn1_encode_charstring
+asn1_error_code INTERFACE asn1_encode_charstring
PROTOTYPE((asn1buf *buf,
const int len, const char *val,
int *retlen));
Returns ENOMEM to signal an unsuccesful attempt
to expand the buffer. */
-asn1_error_code asn1_encode_null
+asn1_error_code INTERFACE asn1_encode_null
PROTOTYPE((asn1buf *buf, int *retlen));
/* requires *buf is allocated
modifies *buf, *retlen
Returns ENOMEM to signal an unsuccesful attempt
to expand the buffer. */
-asn1_error_code asn1_encode_printablestring
+asn1_error_code INTERFACE asn1_encode_printablestring
PROTOTYPE((asn1buf *buf,
const int len, const char *val,
int *retlen));
Returns ENOMEM to signal an unsuccesful attempt
to expand the buffer. */
-asn1_error_code asn1_encode_ia5string
+asn1_error_code INTERFACE asn1_encode_ia5string
PROTOTYPE((asn1buf *buf,
const int len, const char *val,
int *retlen));
Returns ENOMEM to signal an unsuccesful attempt
to expand the buffer. */
-asn1_error_code asn1_encode_generaltime
+asn1_error_code INTERFACE asn1_encode_generaltime
PROTOTYPE((asn1buf *buf, const time_t val, int *retlen));
/* requires *buf is allocated
modifies *buf, *retlen
to expand the buffer.
Note: The encoding of GeneralizedTime is YYYYMMDDhhmmZ */
-asn1_error_code asn1_encode_generalstring
+asn1_error_code INTERFACE asn1_encode_generalstring
PROTOTYPE((asn1buf *buf,
const int len, const char *val,
int *retlen));
#include "asn1_get.h"
-asn1_error_code asn1_get_tag(buf, class, construction, tagnum, retlen)
+asn1_error_code INTERFACE asn1_get_tag(buf, class, construction, tagnum, retlen)
asn1buf * buf;
asn1_class * class;
asn1_construction * construction;
return 0;
}
-asn1_error_code asn1_get_sequence(buf, retlen)
+asn1_error_code INTERFACE asn1_get_sequence(buf, retlen)
asn1buf * buf;
int * retlen;
{
/****************************************************************/
/* Private Procedures */
-asn1_error_code asn1_get_id(buf, class, construction, tagnum)
+asn1_error_code INTERFACE asn1_get_id(buf, class, construction, tagnum)
asn1buf * buf;
asn1_class * class;
asn1_construction * construction;
return 0;
}
-asn1_error_code asn1_get_length(buf, retlen)
+asn1_error_code INTERFACE asn1_get_length(buf, retlen)
asn1buf * buf;
int * retlen;
{
#include "krbasn1.h"
#include "asn1buf.h"
-asn1_error_code asn1_get_tag
+asn1_error_code INTERFACE asn1_get_tag
PROTOTYPE((asn1buf *buf,
asn1_class *class,
asn1_construction *construction,
*tagnum is set to ASN1_TAGNUM_CEILING.
Returns ASN1_OVERRUN if *buf is exhausted during the parse. */
-asn1_error_code asn1_get_sequence
+asn1_error_code INTERFACE asn1_get_sequence
PROTOTYPE((asn1buf *buf, int *retlen));
/* requires *buf is allocated
effects Decodes a tag from *buf and returns ASN1_BAD_ID if it
/****************************************************************/
/* Private Procedures */
-asn1_error_code asn1_get_id
+asn1_error_code INTERFACE asn1_get_id
PROTOTYPE((asn1buf *buf,
asn1_class *class,
asn1_construction *construction,
are returned in *construction and *tagnum, respectively.
Returns ASN1_OVERRUN if *buf is exhausted. */
-asn1_error_code asn1_get_length
+asn1_error_code INTERFACE asn1_get_length
PROTOTYPE((asn1buf *buf, int *retlen));
/* requires *buf is allocated
effects Decodes the group of length octets at *buf's
/* scalars */
-asn1_error_code asn1_decode_kerberos_time(buf, val)
+asn1_error_code INTERFACE asn1_decode_kerberos_time(buf, val)
asn1buf * buf;
krb5_timestamp * val;
{
}
#define integer_convert(fname,ktype)\
-asn1_error_code fname(buf, val)\
+asn1_error_code INTERFACE fname(buf, val)\
asn1buf * buf;\
ktype * val;\
{\
return 0;\
}
#define unsigned_integer_convert(fname,ktype)\
-asn1_error_code fname(buf, val)\
+asn1_error_code INTERFACE fname(buf, val)\
asn1buf * buf;\
ktype * val;\
{\
unsigned_integer_convert(asn1_decode_ui_2,krb5_ui_2)
unsigned_integer_convert(asn1_decode_ui_4,krb5_ui_4)
-asn1_error_code asn1_decode_msgtype(buf, val)
+asn1_error_code INTERFACE asn1_decode_msgtype(buf, val)
asn1buf * buf;
krb5_msgtype * val;
{
/* structures */
-asn1_error_code asn1_decode_realm(buf, val)
+asn1_error_code INTERFACE asn1_decode_realm(buf, val)
asn1buf * buf;
krb5_principal * val;
{
&((*val)->realm.data));
}
-asn1_error_code asn1_decode_principal_name(buf, val)
+asn1_error_code INTERFACE asn1_decode_principal_name(buf, val)
asn1buf * buf;
krb5_principal * val;
{
cleanup();
}
-asn1_error_code asn1_decode_checksum(buf, val)
+asn1_error_code INTERFACE asn1_decode_checksum(buf, val)
asn1buf * buf;
krb5_checksum * val;
{
cleanup();
}
-asn1_error_code asn1_decode_encryption_key(buf, val)
+asn1_error_code INTERFACE asn1_decode_encryption_key(buf, val)
asn1buf * buf;
krb5_keyblock * val;
{
cleanup();
}
-asn1_error_code asn1_decode_encrypted_data(buf, val)
+asn1_error_code INTERFACE asn1_decode_encrypted_data(buf, val)
asn1buf * buf;
krb5_enc_data * val;
{
cleanup();
}
-asn1_error_code asn1_decode_krb5_flags(buf, val)
+asn1_error_code INTERFACE asn1_decode_krb5_flags(buf, val)
asn1buf * buf;
krb5_flags * val;
{
return 0;
}
-asn1_error_code asn1_decode_ticket_flags(buf, val)
+asn1_error_code INTERFACE asn1_decode_ticket_flags(buf, val)
asn1buf * buf;
krb5_flags * val;
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_ap_options(buf, val)
+asn1_error_code INTERFACE asn1_decode_ap_options(buf, val)
asn1buf * buf;
krb5_flags * val;
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_kdc_options(buf, val)
+asn1_error_code INTERFACE asn1_decode_kdc_options(buf, val)
asn1buf * buf;
krb5_flags * val;
{ return asn1_decode_krb5_flags(buf,val); }
-asn1_error_code asn1_decode_transited_encoding(buf, val)
+asn1_error_code INTERFACE asn1_decode_transited_encoding(buf, val)
asn1buf * buf;
krb5_transited * val;
{
cleanup();
}
-asn1_error_code asn1_decode_enc_kdc_rep_part(buf, val)
+asn1_error_code INTERFACE asn1_decode_enc_kdc_rep_part(buf, val)
asn1buf * buf;
krb5_enc_kdc_rep_part * val;
{
cleanup();
}
-asn1_error_code asn1_decode_ticket(buf, val)
+asn1_error_code INTERFACE asn1_decode_ticket(buf, val)
asn1buf * buf;
krb5_ticket * val;
{
cleanup();
}
-asn1_error_code asn1_decode_kdc_req(buf, val)
+asn1_error_code INTERFACE asn1_decode_kdc_req(buf, val)
asn1buf * buf;
krb5_kdc_req * val;
{
cleanup();
}
-asn1_error_code asn1_decode_kdc_req_body(buf, val)
+asn1_error_code INTERFACE asn1_decode_kdc_req_body(buf, val)
asn1buf * buf;
krb5_kdc_req * val;
{
cleanup();
}
-asn1_error_code asn1_decode_krb_safe_body(buf, val)
+asn1_error_code INTERFACE asn1_decode_krb_safe_body(buf, val)
asn1buf * buf;
krb5_safe * val;
{
cleanup();
}
-asn1_error_code asn1_decode_host_address(buf, val)
+asn1_error_code INTERFACE asn1_decode_host_address(buf, val)
asn1buf * buf;
krb5_address * val;
{
cleanup();
}
-asn1_error_code asn1_decode_kdc_rep(buf, val)
+asn1_error_code INTERFACE asn1_decode_kdc_rep(buf, val)
asn1buf * buf;
krb5_kdc_rep * val;
{
cleanup()
-asn1_error_code asn1_decode_authorization_data(buf, val)
+asn1_error_code INTERFACE asn1_decode_authorization_data(buf, val)
asn1buf * buf;
krb5_authdata *** val;
{
decode_array_body(krb5_authdata,asn1_decode_authdata_elt);
}
-asn1_error_code asn1_decode_authdata_elt(buf, val)
+asn1_error_code INTERFACE asn1_decode_authdata_elt(buf, val)
asn1buf * buf;
krb5_authdata * val;
{
cleanup();
}
-asn1_error_code asn1_decode_host_addresses(buf, val)
+asn1_error_code INTERFACE asn1_decode_host_addresses(buf, val)
asn1buf * buf;
krb5_address *** val;
{
decode_array_body(krb5_address,asn1_decode_host_address);
}
-asn1_error_code asn1_decode_sequence_of_ticket(buf, val)
+asn1_error_code INTERFACE asn1_decode_sequence_of_ticket(buf, val)
asn1buf * buf;
krb5_ticket *** val;
{
decode_array_body(krb5_ticket,asn1_decode_ticket);
}
-asn1_error_code asn1_decode_sequence_of_krb_cred_info(buf, val)
+asn1_error_code INTERFACE asn1_decode_sequence_of_krb_cred_info(buf, val)
asn1buf * buf;
krb5_cred_info *** val;
{
decode_array_body(krb5_cred_info,asn1_decode_krb_cred_info);
}
-asn1_error_code asn1_decode_krb_cred_info(buf, val)
+asn1_error_code INTERFACE asn1_decode_krb_cred_info(buf, val)
asn1buf * buf;
krb5_cred_info * val;
{
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_pa_data(buf, val)
+asn1_error_code INTERFACE asn1_decode_sequence_of_pa_data(buf, val)
asn1buf * buf;
krb5_pa_data *** val;
{
decode_array_body(krb5_pa_data,asn1_decode_pa_data);
}
-asn1_error_code asn1_decode_pa_data(buf, val)
+asn1_error_code INTERFACE asn1_decode_pa_data(buf, val)
asn1buf * buf;
krb5_pa_data * val;
{
cleanup();
}
-asn1_error_code asn1_decode_last_req(buf, val)
+asn1_error_code INTERFACE asn1_decode_last_req(buf, val)
asn1buf * buf;
krb5_last_req_entry *** val;
{
decode_array_body(krb5_last_req_entry,asn1_decode_last_req_entry);
}
-asn1_error_code asn1_decode_last_req_entry(buf, val)
+asn1_error_code INTERFACE asn1_decode_last_req_entry(buf, val)
asn1buf * buf;
krb5_last_req_entry * val;
{
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_enctype(buf, num, val)
+asn1_error_code INTERFACE asn1_decode_sequence_of_enctype(buf, num, val)
asn1buf * buf;
int * num;
krb5_enctype ** val;
cleanup();
}
-asn1_error_code asn1_decode_passwdsequence(buf, val)
+asn1_error_code INTERFACE asn1_decode_passwdsequence(buf, val)
asn1buf * buf;
passwd_phrase_element * val;
{
cleanup();
}
-asn1_error_code asn1_decode_sequence_of_passwdsequence(buf, val)
+asn1_error_code INTERFACE asn1_decode_sequence_of_passwdsequence(buf, val)
asn1buf * buf;
passwd_phrase_element *** val;
{
the bounds of *buf */
/* scalars */
-asn1_error_code asn1_decode_int
+asn1_error_code INTERFACE asn1_decode_int
PROTOTYPE((asn1buf *buf, int *val));
-asn1_error_code asn1_decode_int32
+asn1_error_code INTERFACE asn1_decode_int32
PROTOTYPE((asn1buf *buf, krb5_int32 *val));
-asn1_error_code asn1_decode_kvno
+asn1_error_code INTERFACE asn1_decode_kvno
PROTOTYPE((asn1buf *buf, krb5_kvno *val));
-asn1_error_code asn1_decode_keytype
+asn1_error_code INTERFACE asn1_decode_keytype
PROTOTYPE((asn1buf *buf, krb5_keytype *val));
-asn1_error_code asn1_decode_msgtype
+asn1_error_code INTERFACE asn1_decode_msgtype
PROTOTYPE((asn1buf *buf, krb5_msgtype *val));
-asn1_error_code asn1_decode_cksumtype
+asn1_error_code INTERFACE asn1_decode_cksumtype
PROTOTYPE((asn1buf *buf, krb5_cksumtype *val));
-asn1_error_code asn1_decode_enctype
+asn1_error_code INTERFACE asn1_decode_enctype
PROTOTYPE((asn1buf *buf, krb5_enctype *val));
-asn1_error_code asn1_decode_octet
+asn1_error_code INTERFACE asn1_decode_octet
PROTOTYPE((asn1buf *buf, krb5_octet *val));
-asn1_error_code asn1_decode_addrtype
+asn1_error_code INTERFACE asn1_decode_addrtype
PROTOTYPE((asn1buf *buf, krb5_addrtype *val));
-asn1_error_code asn1_decode_authdatatype
+asn1_error_code INTERFACE asn1_decode_authdatatype
PROTOTYPE((asn1buf *buf, krb5_authdatatype *val));
-asn1_error_code asn1_decode_ui_2
+asn1_error_code INTERFACE asn1_decode_ui_2
PROTOTYPE((asn1buf *buf, krb5_ui_2 *val));
-asn1_error_code asn1_decode_ui_4
+asn1_error_code INTERFACE asn1_decode_ui_4
PROTOTYPE((asn1buf *buf, krb5_ui_4 *val));
-asn1_error_code asn1_decode_kerberos_time
+asn1_error_code INTERFACE asn1_decode_kerberos_time
PROTOTYPE((asn1buf *buf, krb5_timestamp *val));
/* structures */
-asn1_error_code asn1_decode_realm
+asn1_error_code INTERFACE asn1_decode_realm
PROTOTYPE((asn1buf *buf, krb5_principal *val));
-asn1_error_code asn1_decode_principal_name
+asn1_error_code INTERFACE asn1_decode_principal_name
PROTOTYPE((asn1buf *buf, krb5_principal *val));
-asn1_error_code asn1_decode_checksum
+asn1_error_code INTERFACE asn1_decode_checksum
PROTOTYPE((asn1buf *buf, krb5_checksum *val));
-asn1_error_code asn1_decode_encryption_key
+asn1_error_code INTERFACE asn1_decode_encryption_key
PROTOTYPE((asn1buf *buf, krb5_keyblock *val));
-asn1_error_code asn1_decode_encrypted_data
+asn1_error_code INTERFACE asn1_decode_encrypted_data
PROTOTYPE((asn1buf *buf, krb5_enc_data *val));
-asn1_error_code asn1_decode_ticket_flags
+asn1_error_code INTERFACE asn1_decode_ticket_flags
PROTOTYPE((asn1buf *buf, krb5_flags *val));
-asn1_error_code asn1_decode_transited_encoding
+asn1_error_code INTERFACE asn1_decode_transited_encoding
PROTOTYPE((asn1buf *buf, krb5_transited *val));
-asn1_error_code asn1_decode_enc_kdc_rep_part
+asn1_error_code INTERFACE asn1_decode_enc_kdc_rep_part
PROTOTYPE((asn1buf *buf, krb5_enc_kdc_rep_part *val));
-asn1_error_code asn1_decode_krb5_flags
+asn1_error_code INTERFACE asn1_decode_krb5_flags
PROTOTYPE((asn1buf *buf, krb5_flags *val));
-asn1_error_code asn1_decode_ap_options
+asn1_error_code INTERFACE asn1_decode_ap_options
PROTOTYPE((asn1buf *buf, krb5_flags *val));
-asn1_error_code asn1_decode_kdc_options
+asn1_error_code INTERFACE asn1_decode_kdc_options
PROTOTYPE((asn1buf *buf, krb5_flags *val));
-asn1_error_code asn1_decode_ticket
+asn1_error_code INTERFACE asn1_decode_ticket
PROTOTYPE((asn1buf *buf, krb5_ticket *val));
-asn1_error_code asn1_decode_kdc_req
+asn1_error_code INTERFACE asn1_decode_kdc_req
PROTOTYPE((asn1buf *buf, krb5_kdc_req *val));
-asn1_error_code asn1_decode_kdc_req_body
+asn1_error_code INTERFACE asn1_decode_kdc_req_body
PROTOTYPE((asn1buf *buf, krb5_kdc_req *val));
-asn1_error_code asn1_decode_krb_safe_body
+asn1_error_code INTERFACE asn1_decode_krb_safe_body
PROTOTYPE((asn1buf *buf, krb5_safe *val));
-asn1_error_code asn1_decode_host_address
+asn1_error_code INTERFACE asn1_decode_host_address
PROTOTYPE((asn1buf *buf, krb5_address *val));
-asn1_error_code asn1_decode_kdc_rep
+asn1_error_code INTERFACE asn1_decode_kdc_rep
PROTOTYPE((asn1buf *buf, krb5_kdc_rep *val));
-asn1_error_code asn1_decode_last_req_entry
+asn1_error_code INTERFACE asn1_decode_last_req_entry
PROTOTYPE((asn1buf *buf, krb5_last_req_entry *val));
-asn1_error_code asn1_decode_authdata_elt
+asn1_error_code INTERFACE asn1_decode_authdata_elt
PROTOTYPE((asn1buf *buf, krb5_authdata *val));
-asn1_error_code asn1_decode_krb_cred_info
+asn1_error_code INTERFACE asn1_decode_krb_cred_info
PROTOTYPE((asn1buf *buf, krb5_cred_info *val));
-asn1_error_code asn1_decode_pa_data
+asn1_error_code INTERFACE asn1_decode_pa_data
PROTOTYPE((asn1buf *buf, krb5_pa_data *val));
-asn1_error_code asn1_decode_passwdsequence
+asn1_error_code INTERFACE asn1_decode_passwdsequence
PROTOTYPE((asn1buf *buf, passwd_phrase_element *val));
/* arrays */
-asn1_error_code asn1_decode_authorization_data
+asn1_error_code INTERFACE asn1_decode_authorization_data
PROTOTYPE((asn1buf *buf, krb5_authdata ***val));
-asn1_error_code asn1_decode_host_addresses
+asn1_error_code INTERFACE asn1_decode_host_addresses
PROTOTYPE((asn1buf *buf, krb5_address ***val));
-asn1_error_code asn1_decode_sequence_of_ticket
+asn1_error_code INTERFACE asn1_decode_sequence_of_ticket
PROTOTYPE((asn1buf *buf, krb5_ticket ***val));
-asn1_error_code asn1_decode_sequence_of_krb_cred_info
+asn1_error_code INTERFACE asn1_decode_sequence_of_krb_cred_info
PROTOTYPE((asn1buf *buf, krb5_cred_info ***val));
-asn1_error_code asn1_decode_sequence_of_pa_data
+asn1_error_code INTERFACE asn1_decode_sequence_of_pa_data
PROTOTYPE((asn1buf *buf, krb5_pa_data ***val));
-asn1_error_code asn1_decode_last_req
+asn1_error_code INTERFACE asn1_decode_last_req
PROTOTYPE((asn1buf *buf, krb5_last_req_entry ***val));
-asn1_error_code asn1_decode_sequence_of_enctype
+asn1_error_code INTERFACE asn1_decode_sequence_of_enctype
PROTOTYPE((asn1buf *buf, int *num, krb5_enctype **val));
-asn1_error_code asn1_decode_sequence_of_passwdsequence
+asn1_error_code INTERFACE asn1_decode_sequence_of_passwdsequence
PROTOTYPE((asn1buf *buf, passwd_phrase_element ***val));
*retlen = sum;\
return 0
-asn1_error_code asn1_encode_ui_4(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_ui_4(buf, val, retlen)
asn1buf * buf;
- const /*krb5_ui_4*/int val;
+ const krb5_ui_4 val;
int *retlen;
{
return asn1_encode_unsigned_integer(buf,val,retlen);
}
-asn1_error_code asn1_encode_realm(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_realm(buf, val, retlen)
asn1buf * buf;
const krb5_principal val;
int * retlen;
retlen);
}
-asn1_error_code asn1_encode_principal_name(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_principal_name(buf, val, retlen)
asn1buf * buf;
const krb5_principal val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kerberos_time(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_kerberos_time(buf, val, retlen)
asn1buf * buf;
const krb5_timestamp val;
int * retlen;
return asn1_encode_generaltime(buf,val,retlen);
}
-asn1_error_code asn1_encode_host_address(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_host_address(buf, val, retlen)
asn1buf * buf;
const krb5_address * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_host_addresses(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_host_addresses(buf, val, retlen)
asn1buf * buf;
const krb5_address ** val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_encrypted_data(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_encrypted_data(buf, val, retlen)
asn1buf * buf;
const krb5_enc_data * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb5_flags(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_krb5_flags(buf, val, retlen)
asn1buf * buf;
const krb5_flags val;
int * retlen;
int i;
for(i=0; i<4; i++){
- retval = asn1buf_insert_octet(buf,valcopy&0xFF);
+ retval = asn1buf_insert_octet(buf,(asn1_octet) (valcopy&0xFF));
if(retval) return retval;
valcopy >>= 8;
}
return 0;
}
-asn1_error_code asn1_encode_ap_options(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_ap_options(buf, val, retlen)
asn1buf * buf;
const krb5_flags val;
int * retlen;
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_ticket_flags(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_ticket_flags(buf, val, retlen)
asn1buf * buf;
const krb5_flags val;
int * retlen;
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_kdc_options(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_kdc_options(buf, val, retlen)
asn1buf * buf;
const krb5_flags val;
int * retlen;
return asn1_encode_krb5_flags(buf,val,retlen);
}
-asn1_error_code asn1_encode_authorization_data(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_authorization_data(buf, val, retlen)
asn1buf * buf;
const krb5_authdata ** val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb5_authdata_elt(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_krb5_authdata_elt(buf, val, retlen)
asn1buf * buf;
const krb5_authdata * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_rep(msg_type, buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_kdc_rep(msg_type, buf, val, retlen)
int msg_type;
asn1buf * buf;
const krb5_kdc_rep * val;
asn1_cleanup();
}
-asn1_error_code asn1_encode_enc_kdc_rep_part(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_enc_kdc_rep_part(buf, val, retlen)
asn1buf * buf;
const krb5_enc_kdc_rep_part * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_req_body(buf, rep, retlen)
+asn1_error_code INTERFACE asn1_encode_kdc_req_body(buf, rep, retlen)
asn1buf * buf;
const krb5_kdc_req * rep;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_encryption_key(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_encryption_key(buf, val, retlen)
asn1buf * buf;
const krb5_keyblock * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_checksum(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_checksum(buf, val, retlen)
asn1buf * buf;
const krb5_checksum * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_transited_encoding(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_transited_encoding(buf, val, retlen)
asn1buf * buf;
const krb5_transited * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_last_req(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_last_req(buf, val, retlen)
asn1buf * buf;
const krb5_last_req_entry ** val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_last_req_entry(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_last_req_entry(buf, val, retlen)
asn1buf * buf;
const krb5_last_req_entry * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_pa_data(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_sequence_of_pa_data(buf, val, retlen)
asn1buf * buf;
const krb5_pa_data ** val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_pa_data(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_pa_data(buf, val, retlen)
asn1buf * buf;
const krb5_pa_data * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_ticket(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_sequence_of_ticket(buf, val, retlen)
asn1buf * buf;
const krb5_ticket ** val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_ticket(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_ticket(buf, val, retlen)
asn1buf * buf;
const krb5_ticket * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_enctype(buf, len, val, retlen)
+asn1_error_code INTERFACE asn1_encode_sequence_of_enctype(buf, len, val, retlen)
asn1buf * buf;
const int len;
const krb5_enctype * val;
asn1_cleanup();
}
-asn1_error_code asn1_encode_kdc_req(msg_type, buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_kdc_req(msg_type, buf, val, retlen)
int msg_type;
asn1buf * buf;
const krb5_kdc_req * val;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb_safe_body(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_krb_safe_body(buf, val, retlen)
asn1buf * buf;
const krb5_safe * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_krb_cred_info(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_sequence_of_krb_cred_info(buf, val, retlen)
asn1buf * buf;
const krb5_cred_info ** val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_krb_cred_info(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_krb_cred_info(buf, val, retlen)
asn1buf * buf;
const krb5_cred_info * val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_sequence_of_passwdsequence(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_sequence_of_passwdsequence(buf, val, retlen)
asn1buf * buf;
const passwd_phrase_element ** val;
int * retlen;
asn1_cleanup();
}
-asn1_error_code asn1_encode_passwdsequence(buf, val, retlen)
+asn1_error_code INTERFACE asn1_encode_passwdsequence(buf, val, retlen)
asn1buf * buf;
const passwd_phrase_element * val;
int * retlen;
Returns ENOMEM if memory runs out.
*/
-asn1_error_code asn1_encode_ui_4 PROTOTYPE((asn1buf *buf,
- const /*krb5_ui_4*/int val,
+asn1_error_code INTERFACE asn1_encode_ui_4 PROTOTYPE((asn1buf *buf,
+ const krb5_ui_4 val,
int *retlen));
-asn1_error_code asn1_encode_msgtype PROTOTYPE((asn1buf *buf,
+asn1_error_code INTERFACE asn1_encode_msgtype PROTOTYPE((asn1buf *buf,
const /*krb5_msgtype*/int val,
int *retlen));
-asn1_error_code asn1_encode_realm
+asn1_error_code INTERFACE asn1_encode_realm
PROTOTYPE((asn1buf *buf, const krb5_principal val, int *retlen));
-asn1_error_code asn1_encode_principal_name
+asn1_error_code INTERFACE asn1_encode_principal_name
PROTOTYPE((asn1buf *buf, const krb5_principal val, int *retlen));
-asn1_error_code asn1_encode_encrypted_data
+asn1_error_code INTERFACE asn1_encode_encrypted_data
PROTOTYPE((asn1buf *buf, const krb5_enc_data *val, int *retlen));
-asn1_error_code asn1_encode_krb5_flags
+asn1_error_code INTERFACE asn1_encode_krb5_flags
PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen));
-asn1_error_code asn1_encode_ap_options
+asn1_error_code INTERFACE asn1_encode_ap_options
PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen));
-asn1_error_code asn1_encode_ticket_flags
+asn1_error_code INTERFACE asn1_encode_ticket_flags
PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen));
-asn1_error_code asn1_encode_kdc_options
+asn1_error_code INTERFACE asn1_encode_kdc_options
PROTOTYPE((asn1buf *buf, const krb5_flags val, int *retlen));
-asn1_error_code asn1_encode_authorization_data
+asn1_error_code INTERFACE asn1_encode_authorization_data
PROTOTYPE((asn1buf *buf, const krb5_authdata **val, int *retlen));
-asn1_error_code asn1_encode_krb5_authdata_elt
+asn1_error_code INTERFACE asn1_encode_krb5_authdata_elt
PROTOTYPE((asn1buf *buf, const krb5_authdata *val, int *retlen));
-asn1_error_code asn1_encode_kdc_rep
+asn1_error_code INTERFACE asn1_encode_kdc_rep
PROTOTYPE((int msg_type, asn1buf *buf, const krb5_kdc_rep *val,
int *retlen));
-asn1_error_code asn1_encode_enc_kdc_rep_part
+asn1_error_code INTERFACE asn1_encode_enc_kdc_rep_part
PROTOTYPE((asn1buf *buf, const krb5_enc_kdc_rep_part *val,
int *retlen));
-asn1_error_code asn1_encode_ticket
+asn1_error_code INTERFACE asn1_encode_ticket
PROTOTYPE((asn1buf *buf, const krb5_ticket *val, int *retlen));
-asn1_error_code asn1_encode_encryption_key
+asn1_error_code INTERFACE asn1_encode_encryption_key
PROTOTYPE((asn1buf *buf, const krb5_keyblock *val, int *retlen));
-asn1_error_code asn1_encode_kerberos_time
+asn1_error_code INTERFACE asn1_encode_kerberos_time
PROTOTYPE((asn1buf *buf, const krb5_timestamp val, int *retlen));
-asn1_error_code asn1_encode_checksum
+asn1_error_code INTERFACE asn1_encode_checksum
PROTOTYPE((asn1buf *buf, const krb5_checksum *val, int *retlen));
-asn1_error_code asn1_encode_host_address
+asn1_error_code INTERFACE asn1_encode_host_address
PROTOTYPE((asn1buf *buf, const krb5_address *val, int *retlen));
-asn1_error_code asn1_encode_host_addresses
+asn1_error_code INTERFACE asn1_encode_host_addresses
PROTOTYPE((asn1buf *buf, const krb5_address **val, int *retlen));
-asn1_error_code asn1_encode_transited_encoding
+asn1_error_code INTERFACE asn1_encode_transited_encoding
PROTOTYPE((asn1buf *buf, const krb5_transited *val, int *retlen));
-asn1_error_code asn1_encode_last_req
+asn1_error_code INTERFACE asn1_encode_last_req
PROTOTYPE((asn1buf *buf, const krb5_last_req_entry **val,
int *retlen));
asn1_error_code asn1_encode_sequence_of_pa_data
PROTOTYPE((asn1buf *buf, const krb5_pa_data **val, int *retlen));
-asn1_error_code asn1_encode_sequence_of_ticket
+asn1_error_code INTERFACE asn1_encode_sequence_of_ticket
PROTOTYPE((asn1buf *buf, const krb5_ticket **val, int *retlen));
-asn1_error_code asn1_encode_sequence_of_enctype
+asn1_error_code INTERFACE asn1_encode_sequence_of_enctype
PROTOTYPE((asn1buf *buf,
const int len, const krb5_enctype *val,
int *retlen));
-asn1_error_code asn1_encode_kdc_req
+asn1_error_code INTERFACE asn1_encode_kdc_req
PROTOTYPE((int msg_type,
asn1buf *buf,
const krb5_kdc_req *val,
int *retlen));
-asn1_error_code asn1_encode_kdc_req_body
+asn1_error_code INTERFACE asn1_encode_kdc_req_body
PROTOTYPE((asn1buf *buf, const krb5_kdc_req *val, int *retlen));
-asn1_error_code asn1_encode_krb_safe_body
+asn1_error_code INTERFACE asn1_encode_krb_safe_body
PROTOTYPE((asn1buf *buf, const krb5_safe *val, int *retlen));
-asn1_error_code asn1_encode_sequence_of_krb_cred_info
+asn1_error_code INTERFACE asn1_encode_sequence_of_krb_cred_info
PROTOTYPE((asn1buf *buf, const krb5_cred_info **val, int *retlen));
-asn1_error_code asn1_encode_krb_cred_info
+asn1_error_code INTERFACE asn1_encode_krb_cred_info
PROTOTYPE((asn1buf *buf, const krb5_cred_info *val, int *retlen));
-asn1_error_code asn1_encode_last_req_entry
+asn1_error_code INTERFACE asn1_encode_last_req_entry
PROTOTYPE((asn1buf *buf, const krb5_last_req_entry *val,
int *retlen));
-asn1_error_code asn1_encode_pa_data
+asn1_error_code INTERFACE asn1_encode_pa_data
PROTOTYPE((asn1buf *buf, const krb5_pa_data *val, int *retlen));
-asn1_error_code asn1_encode_passwdsequence
+asn1_error_code INTERFACE asn1_encode_passwdsequence
PROTOTYPE((asn1buf *buf, const passwd_phrase_element *val, int *retlen));
-asn1_error_code asn1_encode_sequence_of_passwdsequence
+asn1_error_code INTERFACE asn1_encode_sequence_of_passwdsequence
PROTOTYPE((asn1buf *buf, const passwd_phrase_element **val, int *retlen));
#endif
#include "asn1_make.h"
-asn1_error_code asn1_make_etag(buf, class, tagnum, in_len, retlen)
+asn1_error_code INTERFACE asn1_make_etag(buf, class, tagnum, in_len, retlen)
asn1buf * buf;
const asn1_class class;
const asn1_tagnum tagnum;
return asn1_make_tag(buf,class,CONSTRUCTED,tagnum,in_len,retlen);
}
-asn1_error_code asn1_make_tag(buf, class, construction, tagnum, in_len, retlen)
+asn1_error_code INTERFACE asn1_make_tag(buf, class, construction, tagnum, in_len, retlen)
asn1buf * buf;
const asn1_class class;
const asn1_construction construction;
return 0;
}
-asn1_error_code asn1_make_length(buf, in_len, retlen)
+asn1_error_code INTERFACE asn1_make_length(buf, in_len, retlen)
asn1buf * buf;
const int in_len;
int * retlen;
in_copy = in_copy >> 8;
length++;
}
- retval = asn1buf_insert_octet(buf, 0x80 | (asn1_octet)(length&0x7F));
+ retval = asn1buf_insert_octet(buf, (asn1_octet) (0x80 | (asn1_octet)(length&0x7F)));
if(retval) return retval;
length++;
*retlen = length;
return 0;
}
-asn1_error_code asn1_make_id(buf, class, construction, tagnum, retlen)
+asn1_error_code INTERFACE asn1_make_id(buf, class, construction, tagnum, retlen)
asn1buf * buf;
const asn1_class class;
const asn1_construction construction;
asn1_error_code retval;
if(tagnum < 31) {
- retval = asn1buf_insert_octet(buf, class | construction |
- (asn1_octet)tagnum);
+ retval = asn1buf_insert_octet(buf, (asn1_octet) (class | construction |
+ (asn1_octet)tagnum));
if(retval) return retval;
*retlen = 1;
}else{
length++;
for(; tagcopy != 0; tagcopy >>= 7){
- retval = asn1buf_insert_octet(buf, 0x80 | (asn1_octet)(tagcopy&0x7F));
+ retval = asn1buf_insert_octet(buf, (asn1_octet) (0x80 | (asn1_octet)(tagcopy&0x7F)));
if(retval) return retval;
length++;
}
- retval = asn1buf_insert_octet(buf, class | construction | 0x1F);
+ retval = asn1buf_insert_octet(buf, (asn1_octet) (class | construction | 0x1F));
if(retval) return retval;
length++;
*retlen = length;
return 0;
}
-asn1_error_code asn1_make_sequence(buf, seq_len, retlen)
+asn1_error_code INTERFACE asn1_make_sequence(buf, seq_len, retlen)
asn1buf * buf;
const int seq_len;
int * retlen;
return 0;
}
-asn1_error_code asn1_make_set(buf, set_len, retlen)
+asn1_error_code INTERFACE asn1_make_set(buf, set_len, retlen)
asn1buf * buf;
const int set_len;
int * retlen;
return 0;
}
-asn1_error_code asn1_make_string(buf, length, string, retlen)
+asn1_error_code INTERFACE asn1_make_string(buf, length, string, retlen)
asn1buf * buf;
const int length;
const char * string;
asn1_make_string
*/
-asn1_error_code asn1_make_etag
+asn1_error_code INTERFACE asn1_make_etag
PROTOTYPE((asn1buf *buf,
const asn1_class class,
const asn1_tagnum tagnum,
Returns the length of this encoding in *retlen.
Returns ENOMEM if memory runs out. */
-asn1_error_code asn1_make_tag
+asn1_error_code INTERFACE asn1_make_tag
PROTOTYPE((asn1buf *buf, const asn1_class class,
const asn1_construction construction,
const asn1_tagnum tagnum,
Returns ASN1_OVERFLOW if tagnum exceeds the limits of
the implementation. */
-asn1_error_code asn1_make_sequence
+asn1_error_code INTERFACE asn1_make_sequence
PROTOTYPE((asn1buf *buf, const int seq_len, int *len));
/* requires *buf is allocated, seq_len is the length of a series of
sequence components which have just been inserted in *buf
in *buf. Returns the length of this encoding in *retlen.
Returns ENOMEM if memory runs out. */
-asn1_error_code asn1_make_set
+asn1_error_code INTERFACE asn1_make_set
PROTOTYPE((asn1buf *buf, const int set_len, int *retlen));
/* requires *buf is allocated, seq_len is the length of a series of
sequence components which have just been inserted in *buf
Returns the length of this encoding in *retlen.
Returns ENOMEM if memory runs out. */
-asn1_error_code asn1_make_string
+asn1_error_code INTERFACE asn1_make_string
PROTOTYPE((asn1buf *buf,
const int len, const char *string,
int *retlen));
/* Private procedures */
/* "helper" procedure for asn1_make_tag */
-asn1_error_code asn1_make_length
+asn1_error_code INTERFACE asn1_make_length
PROTOTYPE((asn1buf *buf, const int in_len, int *retlen));
/* requires *buf is allocated, in_len is the length of an ASN.1 encoding
which has just been inserted in *buf
PROTOTYPE((s) for in_len into *buf */
/* "helper" procedure for asn1_make_tag */
-asn1_error_code asn1_make_id
+asn1_error_code INTERFACE asn1_make_id
PROTOTYPE((asn1buf *buf,
const asn1_class class,
const asn1_construction construction,
#include "asn1_misc.h"
-asn1_error_code asn1_krb5_realm_copy(target, source)
+asn1_error_code INTERFACE asn1_krb5_realm_copy(target, source)
krb5_principal target;
krb5_principal source;
{
#include <krb5/krb5.h>
#include "krbasn1.h"
-asn1_error_code asn1_krb5_realm_copy
+asn1_error_code INTERFACE asn1_krb5_realm_copy
PROTOTYPE((krb5_principal target, krb5_principal source));
/* requires target, source, and source->realm are allocated
effects Copies source->realm into target->realm.
#include "asn1buf.h"
#include <stdio.h>
-asn1_error_code asn1buf_create(buf)
+asn1_error_code INTERFACE asn1buf_create(buf)
asn1buf ** buf;
{
*buf = (asn1buf*)calloc(1,sizeof(asn1buf));
return 0;
}
-asn1_error_code asn1buf_wrap_data(buf, code)
+asn1_error_code INTERFACE asn1buf_wrap_data(buf, code)
asn1buf * buf;
const krb5_data * code;
{
return 0;
}
-asn1_error_code asn1buf_imbed(subbuf, buf, length)
+asn1_error_code INTERFACE asn1buf_imbed(subbuf, buf, length)
asn1buf * subbuf;
const asn1buf * buf;
const int length;
return 0;
}
-void asn1buf_sync(buf, subbuf)
+void INTERFACE asn1buf_sync(buf, subbuf)
asn1buf * buf;
asn1buf * subbuf;
{
buf->next = subbuf->next;
}
-asn1_error_code asn1buf_destroy(buf)
+asn1_error_code INTERFACE asn1buf_destroy(buf)
asn1buf ** buf;
{
if (*buf != NULL) {
return 0;
}
-asn1_error_code asn1buf_insert_octet(buf, o)
+asn1_error_code INTERFACE asn1buf_insert_octet(buf, o)
asn1buf * buf;
const asn1_octet o;
{
return 0;
}
-asn1_error_code asn1buf_insert_octetstring(buf, len, s)
+asn1_error_code INTERFACE asn1buf_insert_octetstring(buf, len, s)
asn1buf * buf;
const int len;
const krb5_octet * s;
return 0;
}
-asn1_error_code asn1buf_insert_charstring(buf, len, s)
+asn1_error_code INTERFACE asn1buf_insert_charstring(buf, len, s)
asn1buf * buf;
const int len;
const char * s;
return 0;
}
-asn1_error_code asn1buf_remove_octet(buf, o)
+asn1_error_code INTERFACE asn1buf_remove_octet(buf, o)
asn1buf * buf;
asn1_octet * o;
{
return 0;
}
-asn1_error_code asn1buf_remove_octetstring(buf, len, s)
+asn1_error_code INTERFACE asn1buf_remove_octetstring(buf, len, s)
asn1buf * buf;
const int len;
asn1_octet ** s;
return 0;
}
-asn1_error_code asn1buf_remove_charstring(buf, len, s)
+asn1_error_code INTERFACE asn1buf_remove_charstring(buf, len, s)
asn1buf * buf;
const int len;
char ** s;
return 0;
}
-int asn1buf_remains(buf)
+int INTERFACE asn1buf_remains(buf)
const asn1buf * buf;
{
if(buf == NULL || buf->base == NULL) return 0;
else return buf->bound - buf->next + 1;
}
-asn1_error_code asn12krb5_buf(buf, code)
+asn1_error_code INTERFACE asn12krb5_buf(buf, code)
const asn1buf * buf;
krb5_data ** code;
{
/* These parse and unparse procedures should be moved out. They're
useful only for debugging and superfluous in the production version. */
-asn1_error_code asn1buf_unparse(buf, s)
+asn1_error_code INTERFACE asn1buf_unparse(buf, s)
const asn1buf * buf;
char ** s;
{
return 0;
}
-asn1_error_code asn1buf_hex_unparse(buf, s)
+asn1_error_code INTERFACE asn1buf_hex_unparse(buf, s)
const asn1buf * buf;
char ** s;
{
/****************************************************************/
/* Private Procedures */
-int asn1buf_size(buf)
+int INTERFACE asn1buf_size(buf)
const asn1buf * buf;
{
if(buf == NULL || buf->base == NULL) return 0;
return buf->bound - buf->base + 1;
}
-int asn1buf_free(buf)
+int INTERFACE asn1buf_free(buf)
const asn1buf * buf;
{
if(buf == NULL || buf->base == NULL) return 0;
else return buf->bound - buf->next + 1;
}
-asn1_error_code asn1buf_ensure_space(buf, amount)
+asn1_error_code INTERFACE asn1buf_ensure_space(buf, amount)
asn1buf * buf;
const int amount;
{
return 0;
}
-asn1_error_code asn1buf_expand(buf, inc)
+asn1_error_code INTERFACE asn1buf_expand(buf, inc)
asn1buf * buf;
const int inc;
{
return 0;
}
-int asn1buf_len(buf)
+int INTERFACE asn1buf_len(buf)
const asn1buf * buf;
{
return buf->next - buf->base;
(asn1buf_len)
*/
-asn1_error_code asn1buf_create
+asn1_error_code INTERFACE asn1buf_create
PROTOTYPE((asn1buf **buf));
/* effects Creates a new encoding buffer pointed to by *buf.
Returns ENOMEM if the buffer can't be created. */
-asn1_error_code asn1buf_wrap_data
+asn1_error_code INTERFACE asn1buf_wrap_data
PROTOTYPE((asn1buf *buf, const krb5_data *code));
/* requires *buf has already been allocated
effects Turns *buf into a "wrapper" for *code. i.e. *buf is set up
is the top of *code.
Returns ASN1_MISSING_FIELD if code is empty. */
-asn1_error_code asn1buf_imbed
+asn1_error_code INTERFACE asn1buf_imbed
PROTOTYPE((asn1buf *subbuf, const asn1buf *buf, const int length));
/* requires *subbuf and *buf are allocated
effects *subbuf becomes a sub-buffer of *buf. *subbuf begins
that case, ASN1_OVERRUN is returned) *subbuf's current
position starts at the beginning of *subbuf. */
-void asn1buf_sync
+void INTERFACE asn1buf_sync
PROTOTYPE((asn1buf *buf, asn1buf *subbuf));
/* requires *subbuf is a sub-buffer of *buf, as created by asn1buf_imbed.
effects Synchronizes *buf's current position to match that of *subbuf. */
-asn1_error_code asn1buf_destroy
+asn1_error_code INTERFACE asn1buf_destroy
PROTOTYPE((asn1buf **buf));
/* effects Deallocates **buf, sets *buf to NULL. */
-asn1_error_code asn1buf_insert_octet
- PROTOTYPE((asn1buf *buf, const /*asn1_octet*/int o));
+asn1_error_code INTERFACE asn1buf_insert_octet
+ PROTOTYPE((asn1buf *buf, const asn1_octet o));
/* requires *buf is allocated
effects Inserts o into the buffer *buf, expanding the buffer if
necessary. Returns ENOMEM memory is exhausted. */
-asn1_error_code asn1buf_insert_octetstring
+asn1_error_code INTERFACE asn1buf_insert_octetstring
PROTOTYPE((asn1buf *buf, const int len, const asn1_octet *s));
/* requires *buf is allocated
modifies *buf
into the buffer *buf, expanding the buffer if necessary.
Returns ENOMEM if memory is exhausted. */
-asn1_error_code asn1buf_insert_charstring
+asn1_error_code INTERFACE asn1buf_insert_charstring
PROTOTYPE((asn1buf *buf, const int len, const char *s));
/* requires *buf is allocated
modifies *buf
into the buffer *buf, expanding the buffer if necessary.
Returns ENOMEM if memory is exhuasted. */
-asn1_error_code asn1buf_remove_octet
+asn1_error_code INTERFACE asn1buf_remove_octet
PROTOTYPE((asn1buf *buf, asn1_octet *o));
/* requires *buf is allocated
effects Returns *buf's current octet in *o and advances to
the next octet.
Returns ASN1_OVERRUN if *buf has already been exhuasted. */
-asn1_error_code asn1buf_remove_octetstring
+asn1_error_code INTERFACE asn1buf_remove_octetstring
PROTOTYPE((asn1buf *buf, const int len, asn1_octet **s));
/* requires *buf is allocated
effects Removes the next len octets of *buf and returns them in **s.
left in *buf.
Returns ENOMEM if *s could not be allocated. */
-asn1_error_code asn1buf_remove_charstring
+asn1_error_code INTERFACE asn1buf_remove_charstring
PROTOTYPE((asn1buf *buf, const int len,
char **s));
/* requires *buf is allocated
left in *buf.
Returns ENOMEM if *s could not be allocated. */
-asn1_error_code asn1buf_unparse
+asn1_error_code INTERFACE asn1buf_unparse
PROTOTYPE((const asn1buf *buf, char **s));
/* modifies *s
effects Returns a human-readable representation of *buf in *s,
where each octet in *buf is represented by a character in *s. */
-asn1_error_code asn1buf_hex_unparse
+asn1_error_code INTERFACE asn1buf_hex_unparse
PROTOTYPE((const asn1buf *buf, char **s));
/* modifies *s
effects Returns a human-readable representation of *buf in *s,
where each octet in *buf is represented by a 2-digit
hexadecimal number in *s. */
-asn1_error_code asn12krb5_buf
+asn1_error_code INTERFACE asn12krb5_buf
PROTOTYPE((const asn1buf *buf, krb5_data **code));
/* modifies *code
effects Instantiates **code with the krb5_data representation of **buf. */
-int asn1buf_remains
+int INTERFACE asn1buf_remains
PROTOTYPE((const asn1buf *buf));
/* effects Returns the number of unprocessed octets remaining in *buf. */
/**************** Private Procedures ****************/
-int asn1buf_size
+int INTERFACE asn1buf_size
PROTOTYPE((const asn1buf *buf));
/* requires *buf has been created and not destroyed
effects Returns the total size
PROTOTYPE((in octets) of buf's octet buffer. */
-int asn1buf_free
+int INTERFACE asn1buf_free
PROTOTYPE((const asn1buf *buf));
/* requires *buf is allocated
effects Returns the number of unused, allocated octets in *buf. */
-asn1_error_code asn1buf_ensure_space
+asn1_error_code INTERFACE asn1buf_ensure_space
PROTOTYPE((asn1buf *buf, const int amount));
/* requires *buf is allocated
modifies *buf
expanded to have at least amount octets of free space.
Returns ENOMEM memory is exhausted. */
-asn1_error_code asn1buf_expand
+asn1_error_code INTERFACE asn1buf_expand
PROTOTYPE((asn1buf *buf, const int inc));
/* requires *buf is allocated
modifies *buf
effects Expands *buf by allocating space for inc more octets.
Returns ENOMEM if memory is exhausted. */
-int asn1buf_len
+int INTERFACE asn1buf_len
PROTOTYPE((const asn1buf *buf));
/* requires *buf is allocated
effects Returns the length of the encoding in *buf. */
#define cleanup()\
return 0
-krb5_error_code decode_krb5_authenticator(code, rep)
+krb5_error_code INTERFACE decode_krb5_authenticator(code, rep)
const krb5_data * code;
krb5_authenticator ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_ticket(code, rep)
+krb5_error_code INTERFACE decode_krb5_ticket(code, rep)
const krb5_data * code;
krb5_ticket ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_encryption_key(code, rep)
+krb5_error_code INTERFACE decode_krb5_encryption_key(code, rep)
const krb5_data * code;
krb5_keyblock ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_enc_tkt_part(code, rep)
+krb5_error_code INTERFACE decode_krb5_enc_tkt_part(code, rep)
const krb5_data * code;
krb5_enc_tkt_part ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_enc_kdc_rep_part(code, rep)
+krb5_error_code INTERFACE decode_krb5_enc_kdc_rep_part(code, rep)
const krb5_data * code;
krb5_enc_kdc_rep_part ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_as_rep(code, rep)
+krb5_error_code INTERFACE decode_krb5_as_rep(code, rep)
const krb5_data * code;
krb5_kdc_rep ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_tgs_rep(code, rep)
+krb5_error_code INTERFACE decode_krb5_tgs_rep(code, rep)
const krb5_data * code;
krb5_kdc_rep ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_ap_req(code, rep)
+krb5_error_code INTERFACE decode_krb5_ap_req(code, rep)
const krb5_data * code;
krb5_ap_req ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_ap_rep(code, rep)
+krb5_error_code INTERFACE decode_krb5_ap_rep(code, rep)
const krb5_data * code;
krb5_ap_rep ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_ap_rep_enc_part(code, rep)
+krb5_error_code INTERFACE decode_krb5_ap_rep_enc_part(code, rep)
const krb5_data * code;
krb5_ap_rep_enc_part ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_as_req(code, rep)
+krb5_error_code INTERFACE decode_krb5_as_req(code, rep)
const krb5_data * code;
krb5_kdc_req ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_tgs_req(code, rep)
+krb5_error_code INTERFACE decode_krb5_tgs_req(code, rep)
const krb5_data * code;
krb5_kdc_req ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_kdc_req_body(code, rep)
+krb5_error_code INTERFACE decode_krb5_kdc_req_body(code, rep)
const krb5_data * code;
krb5_kdc_req ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_safe(code, rep)
+krb5_error_code INTERFACE decode_krb5_safe(code, rep)
const krb5_data * code;
krb5_safe ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_priv(code, rep)
+krb5_error_code INTERFACE decode_krb5_priv(code, rep)
const krb5_data * code;
krb5_priv ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_enc_priv_part(code, rep)
+krb5_error_code INTERFACE decode_krb5_enc_priv_part(code, rep)
const krb5_data * code;
krb5_priv_enc_part ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_cred(code, rep)
+krb5_error_code INTERFACE decode_krb5_cred(code, rep)
const krb5_data * code;
krb5_cred ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_enc_cred_part(code, rep)
+krb5_error_code INTERFACE decode_krb5_enc_cred_part(code, rep)
const krb5_data * code;
krb5_cred_enc_part ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_error(code, rep)
+krb5_error_code INTERFACE decode_krb5_error(code, rep)
const krb5_data * code;
krb5_error ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_authdata(code, rep)
+krb5_error_code INTERFACE decode_krb5_authdata(code, rep)
const krb5_data * code;
krb5_authdata *** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_pwd_sequence(code, rep)
+krb5_error_code INTERFACE decode_krb5_pwd_sequence(code, rep)
const krb5_data * code;
passwd_phrase_element ** rep;
{
cleanup();
}
-krb5_error_code decode_krb5_pwd_data(code, rep)
+krb5_error_code INTERFACE decode_krb5_pwd_data(code, rep)
const krb5_data * code;
krb5_pwd_data ** rep;
{
\
return 0
-krb5_error_code encode_krb5_authenticator(rep, code)
+krb5_error_code INTERFACE encode_krb5_authenticator(rep, code)
const krb5_authenticator * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_ticket(rep, code)
+krb5_error_code INTERFACE encode_krb5_ticket(rep, code)
const krb5_ticket * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_encryption_key(rep, code)
+krb5_error_code INTERFACE encode_krb5_encryption_key(rep, code)
const krb5_keyblock * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_tkt_part(rep, code)
+krb5_error_code INTERFACE encode_krb5_enc_tkt_part(rep, code)
const krb5_enc_tkt_part * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_kdc_rep_part(rep, code)
+krb5_error_code INTERFACE encode_krb5_enc_kdc_rep_part(rep, code)
const krb5_enc_kdc_rep_part * rep;
krb5_data ** code;
{
}
/* yes, the translation is identical to that used for KDC__REP */
-krb5_error_code encode_krb5_as_rep(rep, code)
+krb5_error_code INTERFACE encode_krb5_as_rep(rep, code)
const krb5_kdc_rep * rep;
krb5_data ** code;
{
}
/* yes, the translation is identical to that used for KDC__REP */
-krb5_error_code encode_krb5_tgs_rep( rep, code)
+krb5_error_code INTERFACE encode_krb5_tgs_rep( rep, code)
const krb5_kdc_rep * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_ap_req(rep, code)
+krb5_error_code INTERFACE encode_krb5_ap_req(rep, code)
const krb5_ap_req * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_ap_rep(rep, code)
+krb5_error_code INTERFACE encode_krb5_ap_rep(rep, code)
const krb5_ap_rep * rep;
krb5_data ** code;
{
}
-krb5_error_code encode_krb5_ap_rep_enc_part(rep, code)
+krb5_error_code INTERFACE encode_krb5_ap_rep_enc_part(rep, code)
const krb5_ap_rep_enc_part * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_as_req(rep, code)
+krb5_error_code INTERFACE encode_krb5_as_req(rep, code)
const krb5_kdc_req * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_tgs_req(rep, code)
+krb5_error_code INTERFACE encode_krb5_tgs_req(rep, code)
const krb5_kdc_req * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_kdc_req_body(rep, code)
+krb5_error_code INTERFACE encode_krb5_kdc_req_body(rep, code)
const krb5_kdc_req * rep;
krb5_data ** code;
{
}
-krb5_error_code encode_krb5_safe(rep, code)
+krb5_error_code INTERFACE encode_krb5_safe(rep, code)
const krb5_safe * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_priv(rep, code)
+krb5_error_code INTERFACE encode_krb5_priv(rep, code)
const krb5_priv * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_priv_part(rep, code)
+krb5_error_code INTERFACE encode_krb5_enc_priv_part(rep, code)
const krb5_priv_enc_part * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_cred(rep, code)
+krb5_error_code INTERFACE encode_krb5_cred(rep, code)
const krb5_cred * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_enc_cred_part(rep, code)
+krb5_error_code INTERFACE encode_krb5_enc_cred_part(rep, code)
const krb5_cred_enc_part * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_error(rep, code)
+krb5_error_code INTERFACE encode_krb5_error(rep, code)
const krb5_error * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_authdata(rep, code)
+krb5_error_code INTERFACE encode_krb5_authdata(rep, code)
const krb5_authdata ** rep;
krb5_data ** code;
{
}
/* Sandia Additions */
-krb5_error_code encode_krb5_pwd_sequence( rep, code)
+krb5_error_code INTERFACE encode_krb5_pwd_sequence( rep, code)
const passwd_phrase_element * rep;
krb5_data ** code;
{
krb5_cleanup();
}
-krb5_error_code encode_krb5_pwd_data(rep, code)
+krb5_error_code INTERFACE encode_krb5_pwd_data(rep, code)
const krb5_pwd_data * rep;
krb5_data ** code;
{