diff options
author | John Kohl <jtkohl@mit.edu> | 1990-08-28 10:23:28 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1990-08-28 10:23:28 +0000 |
commit | a736b998a595d633106e043af6c4a1afc016e8c1 (patch) | |
tree | e136a1f67627f7c79500afe7f2eae5a1d1115a45 /src/lib/krb5/asn.1/kck2ck.c | |
parent | 0c0d40eea310e5a63631ecdf5f616ec6baac21f9 (diff) | |
download | krb5-a736b998a595d633106e043af6c4a1afc016e8c1.tar.gz krb5-a736b998a595d633106e043af6c4a1afc016e8c1.tar.xz krb5-a736b998a595d633106e043af6c4a1afc016e8c1.zip |
*** empty log message ***
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1047 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1/kck2ck.c')
-rw-r--r-- | src/lib/krb5/asn.1/kck2ck.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/lib/krb5/asn.1/kck2ck.c b/src/lib/krb5/asn.1/kck2ck.c new file mode 100644 index 000000000..e7da9970f --- /dev/null +++ b/src/lib/krb5/asn.1/kck2ck.c @@ -0,0 +1,64 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1989,1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * <krb5/copyright.h>. + * + * Glue between Kerberos version and ISODE 6.0 version of structures. + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_kck2ck_c[] = +"$Id$"; +#endif /* lint || saber */ + +#include <krb5/copyright.h> +#include <krb5/krb5.h> + +/*#include <time.h> */ +#include <isode/psap.h> +#include "KRB5-types.h" +#include "asn1glue.h" +#include "asn1defs.h" + +#include <krb5/ext-proto.h> + +/* ISODE defines max(a,b) */ + +struct type_KRB5_Checksum * +krb5_checksum2KRB5_Checksum(val, error) +const krb5_checksum *val; +register int *error; +{ + PE pe; + register struct type_KRB5_Checksum *retval; + struct qbuf *temp; + + pe = gens2prim(val->contents, val->length); + if (!pe) { + nomem: + *error = ENOMEM; + return(0); + } else + *error = 0; + + temp = prim2qb(pe); + if (!temp) + *error = pe->pe_errno + ISODE_50_PE_ERR_NONE; + (void) pe_free(pe); + + if (!temp) + return(0); + + retval = (struct type_KRB5_Checksum *) xmalloc(sizeof(*retval)); + if (!retval) { + goto nomem; + } + retval->cksumtype = val->checksum_type; + retval->checksum = temp; + + return(retval); +} |