diff options
author | Mark Eichin <eichin@mit.edu> | 1994-06-10 19:02:23 +0000 |
---|---|---|
committer | Mark Eichin <eichin@mit.edu> | 1994-06-10 19:02:23 +0000 |
commit | 1df855ceda7a579c822e281f27723ebe55a42654 (patch) | |
tree | df9c81196e0a1c782b9fa394ef422bb68077cdd4 /src/lib/gssapi/generic/util_token.c | |
parent | 25e80c6ba616d95b811f490a2938b8eaafba0874 (diff) | |
download | krb5-1df855ceda7a579c822e281f27723ebe55a42654.tar.gz krb5-1df855ceda7a579c822e281f27723ebe55a42654.tar.xz krb5-1df855ceda7a579c822e281f27723ebe55a42654.zip |
"downgrade" to classic C, tweak headers a bit
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3715 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi/generic/util_token.c')
-rw-r--r-- | src/lib/gssapi/generic/util_token.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/lib/gssapi/generic/util_token.c b/src/lib/gssapi/generic/util_token.c index 3fad4b9e51..c25b9413d0 100644 --- a/src/lib/gssapi/generic/util_token.c +++ b/src/lib/gssapi/generic/util_token.c @@ -51,7 +51,8 @@ first two inner bytes, which indicate the token type. The token */ -static int der_length_size(int length) +static int der_length_size(length) + int length; { if (length < (1<<7)) return(1); @@ -65,7 +66,9 @@ static int der_length_size(int length) return(5); } -static void der_write_length(unsigned char **buf, int length) +static void der_write_length(buf, length) + unsigned char **buf; + int length; { if (length < (1<<7)) { *(*buf)++ = (unsigned char) length; @@ -84,7 +87,9 @@ static void der_write_length(unsigned char **buf, int length) /* returns decoded length, or < 0 on failure. Advances buf and decrements bufsize */ -static int der_read_length(unsigned char **buf, int *bufsize) +static int der_read_length(buf, bufsize) + unsigned char **buf; + int *bufsize; { unsigned char sf; int ret; @@ -110,7 +115,9 @@ static int der_read_length(unsigned char **buf, int *bufsize) /* returns the length of a token, given the mech oid and the body size */ -int g_token_size(const_gss_OID mech, unsigned int body_size) +int g_token_size(mech, body_size) + const_gss_OID mech; + unsigned int body_size; { /* set body_size to sequence contents size */ body_size += 4 + mech->length; @@ -120,8 +127,11 @@ int g_token_size(const_gss_OID mech, unsigned int body_size) /* fills in a buffer with the token header. The buffer is assumed to be the right size. buf is advanced past the token header */ -void g_make_token_header(const_gss_OID mech, int body_size, - unsigned char **buf, int tok_type) +void g_make_token_header(mech, body_size, buf, tok_type) + const_gss_OID mech; + int body_size; + unsigned char **buf; + int tok_type; { *(*buf)++ = 0x60; der_write_length(buf, 4 + mech->length + body_size); @@ -136,8 +146,12 @@ void g_make_token_header(const_gss_OID mech, int body_size, leaving buf advanced past the token header, and setting body_size to the number of remaining bytes */ -int g_verify_token_header(const_gss_OID mech, int *body_size, - unsigned char **buf, int tok_type, int toksize) +int g_verify_token_header(mech, body_size, buf, tok_type, toksize) + const_gss_OID mech; + int *body_size; + unsigned char **buf; + int tok_type; + int toksize; { int seqsize; gss_OID_desc toid; |