(spnego_initial): add #if 0 out version of the CHOICE branch encoding,

also where here, free no longer used memory


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12818 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-09-10 20:49:11 +00:00
parent b291ac9e96
commit b1576251e1
2 changed files with 42 additions and 0 deletions

View File

@@ -872,6 +872,21 @@ spnego_initial
ni.mechListMIC = NULL;
#if 0
{
int ret;
NegotiationToken nt;
nt.element = choice_NegotiationToken_negTokenInit;
nt.u.negTokenInit = ni;
ASN1_MALLOC_ENCODE(NegotiationToken, buf, buf_size,
&nt, &buf_len, ret);
data.data = buf;
data.length = buf_len;
}
#else
buf_size = 1024;
buf = malloc(buf_size);
if (buf == NULL) {
@@ -921,6 +936,12 @@ spnego_initial
data.data = buf + buf_size - buf_len;
data.length = buf_len;
#endif
if (mech_token.length != 0)
gss_release_buffer(&minor, &mech_token);
free_NegTokenInit(&ni);
if (ret)
return ret;
sub = _gssapi_encapsulate(minor_status,
&data,