From: John Kohl Date: Fri, 14 Dec 1990 18:26:22 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: krb5-1.0-alpha3~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e1772c824f6bd353311dab839c7f985a86004cb4;p=krb5.git *** empty log message *** git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1553 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/krb5/safepriv.h b/src/include/krb5/safepriv.h new file mode 100644 index 000000000..a9898ca61 --- /dev/null +++ b/src/include/krb5/safepriv.h @@ -0,0 +1,25 @@ +/* + * $Source$ + * $Author$ + * $Id$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * #defines for SAFE and PRIV message options. + */ + +#include + +#ifndef KRB5_SAFE_PRIV__ +#define KRB5_SAFE_PRIV__ + +#define KRB5_SAFE_NOTIME 0x1 +#define KRB5_SAFE_DOSEQUENCE 0x2 + +#define KRB5_PRIV_NOTIME 0x1 +#define KRB5_PRIV_DOSEQUENCE 0x2 + +#endif /* KRB5_SAFE_PRIV__ */ diff --git a/src/lib/krb5/asn.1/ktran2tran.c b/src/lib/krb5/asn.1/ktran2tran.c new file mode 100644 index 000000000..5b038c09b --- /dev/null +++ b/src/lib/krb5/asn.1/ktran2tran.c @@ -0,0 +1,52 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1989,1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * Glue between Kerberos version and ISODE 6.0 version of structures. + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_ktran2tran_c[] = +"$Id$"; +#endif /* lint || saber */ + +#include +#include + +/*#include */ +#include +#include +#include "asn1glue.h" + +#include + +/* ISODE defines max(a,b) */ + +struct type_KRB5_TransitedEncoding * +krb5_transited2KRB5_TransitedEncoding(val, error) +const register krb5_transited *val; +register int *error; +{ + register struct type_KRB5_TransitedEncoding *retval; + + retval = (struct type_KRB5_TransitedEncoding *)xmalloc(sizeof(*retval)); + if (!retval) { + *error = ENOMEM; + return(0); + } + xbzero(retval, sizeof(*retval)); + + retval->tr__type = val->tr_type; + retval->contents = krb5_data2qbuf(&val->tr_contents); + if (!retval->contents) { + *error = ENOMEM; + free_KRB5_TransitedEncoding(retval); + return(0); + } + return(retval); +} diff --git a/src/lib/krb5/asn.1/tran2ktran.c b/src/lib/krb5/asn.1/tran2ktran.c new file mode 100644 index 000000000..bba95123b --- /dev/null +++ b/src/lib/krb5/asn.1/tran2ktran.c @@ -0,0 +1,55 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1989,1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * Glue between Kerberos version and ISODE 6.0 version of structures. + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_tran2ktran_c[] = +"$Id$"; +#endif /* lint || saber */ + +#include +#include + +/*#include */ +#include +#include +#include "asn1glue.h" + +#include + +/* ISODE defines max(a,b) */ + +krb5_transited * +KRB5_TransitedEncoding2krb5_transited(val, error) +const register struct type_KRB5_TransitedEncoding *val; +register int *error; +{ + register krb5_transited *retval; + krb5_data *temp; + + retval = (krb5_transited *)xmalloc(sizeof(*retval)); + if (!retval) { + *error = ENOMEM; + return(0); + } + xbzero(retval, sizeof(*retval)); + + retval->tr_type = val->tr__type; + temp = qbuf2krb5_data(val->contents, error); + if (temp) { + retval->tr_contents = *temp; + xfree(temp); + } else { + xfree(retval); + return(0); + } + return(retval); +} diff --git a/src/lib/krb5/free/f_arep_enc.c b/src/lib/krb5/free/f_arep_enc.c new file mode 100644 index 000000000..be70cb1ee --- /dev/null +++ b/src/lib/krb5/free/f_arep_enc.c @@ -0,0 +1,30 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_ap_rep_enc_part() + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_f_arep_enc_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include +#include + +void +krb5_free_ap_rep_enc_part(val) +krb5_ap_rep_enc_part *val; +{ + if (val->subkey) + krb5_free_keyblock(val->subkey); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_padata.c b/src/lib/krb5/free/f_padata.c new file mode 100644 index 000000000..346fd722a --- /dev/null +++ b/src/lib/krb5/free/f_padata.c @@ -0,0 +1,35 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_padata() + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_f_padata_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include +#include + +void +krb5_free_pa_data(val) +krb5_pa_data **val; +{ + register krb5_pa_data **temp; + + for (temp = val; *temp; temp++) { + if ((*temp)->contents) + xfree((*temp)->contents); + xfree(*temp); + } + xfree(val); + return; +} diff --git a/src/lib/krb5/krb/pr_to_salt.c b/src/lib/krb5/krb/pr_to_salt.c new file mode 100644 index 000000000..40602026b --- /dev/null +++ b/src/lib/krb5/krb/pr_to_salt.c @@ -0,0 +1,54 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_principal2salt() + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_pr_to_salt_c[] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include + +#include +#include + +/* + * Convert a krb5_principal into the default salt for that principal. + */ + +krb5_error_code +krb5_principal2salt(pr, ret) +krb5_const_principal pr; +krb5_data *ret; +{ + int size, offset; + krb5_data **prp; + + + if (pr == 0) { + ret->length = 0; + ret->data = 0; + } else { + for (size = 0, prp = pr; *prp; prp++) + size += (*prp)->length; + + ret->length = size; + if (!(ret->data = malloc (size+1))) + return ENOMEM; + + for (offset=0, prp=pr; *prp; prp++) + { + memcpy(&ret->data[offset],(*prp)->data, (*prp)->length); + offset += (*prp)->length; + } + } + return 0; +}