Commit Graph

29 Commits

Author SHA1 Message Date
Jörg Mayer 3e2633a0f4 char *drep -> guint8 *drep
svn path=/trunk/; revision=9735
2004-01-19 20:10:37 +00:00
Guy Harris 7bd2e232a9 Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.

Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).

Change some direct dissector calls to go through handles.

svn path=/trunk/; revision=8979
2003-11-16 23:17:27 +00:00
Tim Potter 8b89bd76ee Move all DCERPC authentication/encryption dissection code from packet-dcerpc.c
to the dissector that handles the particular authentication flavour.  This
gets rid of a couple of ugly switch statements and allows other authentication
modules to be written easily.

svn path=/trunk/; revision=8026
2003-07-16 04:20:33 +00:00
Guy Harris b74f119d9a Don't discard the constness of arguments to GHashTable functions.
svn path=/trunk/; revision=6719
2002-12-02 20:04:07 +00:00
Guy Harris 35eefef60a Handle GSS_Wrap header information as well as context-level tokens. A
call to "gssapi_init_oid()" supplies both dissectors for context-level
tokens and GSS_Wrap header information; the latter dissector should
return the number of bytes of header information, so that if the header
information and the message for the protocol that's using GSSAPI are
treated as a single blob of data (as is the case with LDAP, but not with
DCE RPC, for example), the dissector for the protocol using GSSAPI knows
where to start dissecting.

We associate a pointer to the entire data structure for the OID, not the
handle for context-level token dissector for the OID, with conversations
and frames.

Make the dissector for NTLMSSP verifiers be the handler for GSS_Wrap
stuff for NTLMSSP, and add support for GSS_Wrap stuff for Kerberos.

Support SASL GSS-SPNEGO wrapping of LDAP messages.  (XXX - this should
really check for GSS-SPNEGO.)

svn path=/trunk/; revision=6692
2002-11-28 06:48:42 +00:00
Guy Harris 86fab5b855 Note that the verifiers are GSS_Wrap tokens (apparently).
svn path=/trunk/; revision=6668
2002-11-23 06:02:42 +00:00
Guy Harris 412aaf59a5 Note that it's perfectly OK to store a dissector handle as per-frame or
per-conversation data.

svn path=/trunk/; revision=6570
2002-11-06 23:38:27 +00:00
Guy Harris 498d55ec8a There can be more than one GSS-API negotiation in a conversation, so the
handle to use to dissect GSS-API inner context tokens has to be stored
as per-frame data, not just as conversation data.

svn path=/trunk/; revision=6569
2002-11-06 23:36:25 +00:00
Guy Harris 3b71004a61 In connection-oriented DCE RPC, the authentication data are credentials
only in bind, bind_ack, alter_context, alter_context_response, and auth3
PDUs; they're a verifier of some sort in other PDUs.  The verifier
appears to start with an OID for the real authentication mechanism if
the authentication type is SPNEGO.

svn path=/trunk/; revision=6563
2002-11-05 21:41:27 +00:00
Gerald Combs 80f88eb15d Include <string.h>.
svn path=/trunk/; revision=6356
2002-09-29 18:58:56 +00:00
Guy Harris 849e1c6866 Add a "gssapi_lookup_oid()" that takes a binary OID (pointer and length)
as an argument, and looks up that OID in the GSSAPI OID hash table.

Always use that routine to look up OIDs, so that we never use the result
of "format_oid()" as the key (as that doesn't necessarily work).

Make "gssapi_oids" static, as one should only look up GSSAPI
authentication mechanism OIDs with "gssapi_lookup_oid()".

In the SPNEGO dissector, free up the OID strings when we're done with
them, and don't advance the offset past the OID until after we put the
OID into the protocol tree.

svn path=/trunk/; revision=6228
2002-09-08 01:43:44 +00:00
Richard Sharpe d3be9940c1 Add a copyright :-)
svn path=/trunk/; revision=6226
2002-09-08 01:07:40 +00:00
Guy Harris 24f888c088 Do *N*O*T* use the result of "format_oid()" as a key to look up a entry
in the gssapi_oids hash table; the keys are just text representations of
the numbers in the OID, but "format_oid()" can add a formatted
description of the OID to the end of the string it returns, which means
it won't match.

Use -1 rather than "tvb_length_remaining(tvb, 0)" as the length to say
"this item goes to the end of the tvbuff.

svn path=/trunk/; revision=6225
2002-09-08 00:40:44 +00:00
Richard Sharpe 14c0a66cc8 Fix up compiler warning problems ...
svn path=/trunk/; revision=6188
2002-09-05 04:19:31 +00:00
Richard Sharpe 174fb49854 Add some level of OID naming etc ...
svn path=/trunk/; revision=6180
2002-09-04 21:34:38 +00:00
Guy Harris 4e4000a12d Make "gssapi_init_oid()" take a dissector handle rather than a
registered dissector name; that means you don't have to register a
dissector by name to associate it with a GSS-API security mechanism OID.

svn path=/trunk/; revision=6163
2002-08-31 22:22:29 +00:00
Richard Sharpe 9a34291606 Make sure we stop processing GSS-API tokens when we actually have finished
and not try to parse unrelated info in the TVB.

svn path=/trunk/; revision=6162
2002-08-31 20:50:08 +00:00
Guy Harris e9e4881caa Catch exceptions thrown while dissecting the GSS-API stuff, so that we
don't abort dissection of the entire packet if we get a
ReportedBoundsError while dissecting an authentication blob - the
authentication blob might be in the middle of a packet, and if it's too
short, that doesn't mean that the stuff *after* it shouldn't be
dissected.

svn path=/trunk/; revision=6160
2002-08-31 20:09:26 +00:00
Richard Sharpe ab3cf9bc61 OK, we now dissect the innerContextToken properly, and SPNEGO understands a
negTokenTarg, there is just more work to do on this.

svn path=/trunk/; revision=6127
2002-08-29 17:58:22 +00:00
Richard Sharpe 3098546c95 OK, add more conversation stuff for gssapi ... see iff it works now.
svn path=/trunk/; revision=6126
2002-08-29 17:20:31 +00:00
Richard Sharpe 7f0a872055 Start the code to keep state in GSSAPI.
Since we only need the dissector handle, I cheated :-)

This should not cause problems (famous last words)

svn path=/trunk/; revision=6125
2002-08-29 16:36:16 +00:00
Richard Sharpe 0934975cc1 Guided by Guy and an examination of RFC2078 and RFC2478, I have added some
comments about what we need to do to get SPNEGO properly implemented.

More work to do.

svn path=/trunk/; revision=6121
2002-08-29 05:26:45 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Richard Sharpe 5d6821ad02 Ohh, I feel so good. More of SPNEGO ...
Still more to come. SHould have the negTokenInit done soon, then onto the
negTokenTarg ...

svn path=/trunk/; revision=6109
2002-08-28 02:30:18 +00:00
Richard Sharpe 0401d17629 OK, fix up the problems of the previous commit ...
svn path=/trunk/; revision=6105
2002-08-27 23:30:34 +00:00
Guy Harris 06573c83ef Plug a memory leak, by freeing the OID string generated by
"format_oid()" after we're done with it.

"format_oid()" doesn't necessarily generate a string containing only the
numerical OID value, so we can't use that string to search for an OID in
the OID hash table.  Generate the string used in that lookup ourselves,
instead.

svn path=/trunk/; revision=6089
2002-08-26 18:52:50 +00:00
Richard Sharpe 3f96656bd4 Small fix to get the OIDs to display properly in GSSAPI.
Next to turn SPNEGO into SPNEGO and not SNEGO ... and display the contents
properly as NTLMSSP.

svn path=/trunk/; revision=6083
2002-08-25 19:22:20 +00:00
Guy Harris df35b83338 Make the filter name for GSS-API tokens "gss-api", not "GSS-API", to
1) match the protocol's filter name (which isn't used, as we
	   never put entries into the protocol tree for the protocol
	   itself)

and

	2) make it more obvious what you type.

(This matches what the NTLMSSP dissector does for its security blobs.)

svn path=/trunk/; revision=6076
2002-08-24 00:40:45 +00:00
Tim Potter ca5c15a56b A dissector for GSS-API (rfc2078). This is used by Windows 2000/XP when
the extended security bit is set.

svn path=/trunk/; revision=6047
2002-08-21 20:52:40 +00:00