gss: harmonize SPNEGO with [MS-SPNG]
In [MS-SPNG], the Microsoft extension is defined as NegTokenInit2 rather than NegTokenInitWin. Harmonize with the specification.
This commit is contained in:
@@ -270,10 +270,10 @@ spnego_files = \
|
||||
asn1_MechType.x \
|
||||
asn1_MechTypeList.x \
|
||||
asn1_NegotiationToken.x \
|
||||
asn1_NegotiationTokenWin.x \
|
||||
asn1_NegotiationToken2.x \
|
||||
asn1_NegHints.x \
|
||||
asn1_NegTokenInit.x \
|
||||
asn1_NegTokenInitWin.x \
|
||||
asn1_NegTokenInit2.x \
|
||||
asn1_NegTokenResp.x \
|
||||
asn1_NegResultEnum.x
|
||||
|
||||
|
@@ -120,14 +120,14 @@ send_supported_mechs (OM_uint32 *minor_status,
|
||||
gss_const_cred_id_t acceptor_cred,
|
||||
gss_buffer_t output_token)
|
||||
{
|
||||
NegotiationTokenWin nt;
|
||||
NegotiationToken2 nt;
|
||||
size_t buf_len = 0;
|
||||
gss_buffer_desc data;
|
||||
OM_uint32 ret;
|
||||
|
||||
memset(&nt, 0, sizeof(nt));
|
||||
|
||||
nt.element = choice_NegotiationTokenWin_negTokenInit;
|
||||
nt.element = choice_NegotiationToken2_negTokenInit;
|
||||
nt.u.negTokenInit.reqFlags = NULL;
|
||||
nt.u.negTokenInit.mechToken = NULL;
|
||||
nt.u.negTokenInit.negHints = NULL;
|
||||
@@ -142,23 +142,23 @@ send_supported_mechs (OM_uint32 *minor_status,
|
||||
ALLOC(nt.u.negTokenInit.negHints, 1);
|
||||
if (nt.u.negTokenInit.negHints == NULL) {
|
||||
*minor_status = ENOMEM;
|
||||
free_NegotiationTokenWin(&nt);
|
||||
free_NegotiationToken2(&nt);
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
ALLOC(nt.u.negTokenInit.negHints->hintName, 1);
|
||||
if (nt.u.negTokenInit.negHints->hintName == NULL) {
|
||||
*minor_status = ENOMEM;
|
||||
free_NegotiationTokenWin(&nt);
|
||||
free_NegotiationToken2(&nt);
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
*nt.u.negTokenInit.negHints->hintName = strdup("not_defined_in_RFC4178@please_ignore");
|
||||
nt.u.negTokenInit.negHints->hintAddress = NULL;
|
||||
|
||||
ASN1_MALLOC_ENCODE(NegotiationTokenWin,
|
||||
ASN1_MALLOC_ENCODE(NegotiationToken2,
|
||||
data.value, data.length, &nt, &buf_len, ret);
|
||||
free_NegotiationTokenWin(&nt);
|
||||
free_NegotiationToken2(&nt);
|
||||
if (ret) {
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
|
@@ -22,7 +22,7 @@ NegHints ::= SEQUENCE {
|
||||
hintAddress [1] OCTET STRING OPTIONAL
|
||||
}
|
||||
|
||||
NegTokenInitWin ::= SEQUENCE {
|
||||
NegTokenInit2 ::= SEQUENCE {
|
||||
mechTypes [0] MechTypeList,
|
||||
reqFlags [1] ContextFlags OPTIONAL,
|
||||
mechToken [2] OCTET STRING OPTIONAL,
|
||||
@@ -59,8 +59,8 @@ NegotiationToken ::= CHOICE {
|
||||
negTokenResp[1] NegTokenResp
|
||||
}
|
||||
|
||||
NegotiationTokenWin ::= CHOICE {
|
||||
negTokenInit[0] NegTokenInitWin
|
||||
NegotiationToken2 ::= CHOICE {
|
||||
negTokenInit[0] NegTokenInit2
|
||||
}
|
||||
|
||||
END
|
||||
|
Reference in New Issue
Block a user