From: Ken Raeburn Date: Thu, 8 Nov 1990 13:47:50 +0000 (+0000) Subject: Added routines to write authdata structures X-Git-Tag: krb5-1.0-alpha3~169 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9efe7f0abf07614cd89f58d07d94feac3efad520;p=krb5.git Added routines to write authdata structures git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1423 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/stdio/scc_write.c b/src/lib/krb5/ccache/stdio/scc_write.c index 901fec571..e180437cc 100644 --- a/src/lib/krb5/ccache/stdio/scc_write.c +++ b/src/lib/krb5/ccache/stdio/scc_write.c @@ -223,3 +223,39 @@ krb5_scc_store_flags(id, f) { return krb5_scc_write(id, (char *) f, sizeof(krb5_flags)); } + +krb5_error_code +krb5_scc_store_authdata(id, a) + krb5_ccache id; + krb5_authdata **a; +{ + krb5_error_code ret; + krb5_authdata **temp; + krb5_int32 i, length=0; + + if (a != NULL) { + for (temp=a; *temp; temp++) + length++; + } + + ret = krb5_scc_store_int32(id, &length); + CHECK(ret); + for (i=0; iad_type); + CHECK(ret); + ret = krb5_scc_store_int32(id, &a->length); + CHECK(ret); + return krb5_scc_write(id, a->contents, a->length); +}