/* * $Source$ * $Author$ * * Copyright 1989,1990 by the Massachusetts Institute of Technology. * All Rights Reserved. * * 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_kpriv2priv_c[] = "$Id$"; #endif /* lint || saber */ #include /*#include */ #include #include #include "asn1glue.h" #include /* ISODE defines max(a,b) */ struct type_KRB5_KRB__PRIV * krb5_priv2KRB5_KRB__PRIV(val, error) const register krb5_priv *val; register int *error; { register struct type_KRB5_KRB__PRIV *retval; retval = (struct type_KRB5_KRB__PRIV *)xmalloc(sizeof(*retval)); if (!retval) { *error = ENOMEM; return(0); } xbzero(retval, sizeof(*retval)); retval->pvno = KRB5_PVNO; retval->msg__type = KRB5_PRIV; retval->enc__part = krb5_enc_data2KRB5_EncryptedData(&(val->enc_part), error); if (!retval->enc__part) { xfree(retval); return(0); } return(retval); }