Commit Graph

96 Commits

Author SHA1 Message Date
Stig Bjørlykke a7c5d642d5 Regenerate ASN.1 dissectors to update the #line directive.
svn path=/trunk/; revision=37118
2011-05-13 08:12:27 +00:00
Jakub Zawadzki ed59c450f4 Cleanup: replace se_alloc+memcpy combo with single se_memdup().
svn path=/trunk/; revision=36996
2011-05-05 06:55:12 +00:00
Jakub Zawadzki d621e6acbe Cleanup: g_malloc can't return NULL, remove checks for them.
XXX, should this code use g_try_malloc instead?

svn path=/trunk/; revision=36988
2011-05-04 21:19:04 +00:00
Gerald Combs a5b20fbdf6 Add a relative path to the "#line" directives we produce. Regenerate the
SNMP and SPNEGO dissectors to see if it helps Coverity locate the
original source files.

svn path=/trunk/; revision=36522
2011-04-08 19:51:39 +00:00
Stig Bjørlykke 632dcd0d77 Add changes in r35384 to template file.
svn path=/trunk/; revision=36009
2011-02-20 15:03:09 +00:00
Jeff Morriss 11fc9bbe33 Use some tvb_ accessor functions instead of a standard function plus tvb_get_ptr().
svn path=/trunk/; revision=35384
2011-01-05 18:59:47 +00:00
Gerald Combs 622f07b95e Initialize MechType_oid in the right place.
svn path=/trunk/; revision=33396
2010-07-01 00:44:21 +00:00
Gerald Combs 6aaa5874c6 Initialize more variables.
svn path=/trunk/; revision=33392
2010-07-01 00:11:14 +00:00
Jeff Morriss 81da8e0b6b Use find_or_create_conversation() in some ASN.1 dissectors
svn path=/trunk/; revision=32791
2010-05-13 18:55:31 +00:00
Jeff Morriss a0c858efcd Add a little more code to avoid not-very-useful blurbs:
- Change spaces in the name to underscores before comparing it to the blurb.
  - Check if the type simply as T_ prepended to the name.
  - Don't put in a blurb of "NULL".

and regenerate the dissectors.

svn path=/trunk/; revision=32748
2010-05-11 03:53:31 +00:00
Jeff Morriss 08026e8bcc Regenerate a few more of the ASN.1 dissectors
svn path=/trunk/; revision=32746
2010-05-11 02:51:39 +00:00
Jeff Morriss ed75cdd99c Make a variable a guint8* instead of a char* since it a) holds TVB data and b) matches what tvb_new_child_real_data() wants for its 2nd argument. This cleans up a warning from the Sun compiler.
svn path=/trunk/; revision=32599
2010-04-29 15:23:10 +00:00
Bill Meier f8b92f8d0b #include <stdio.h> not needed.
svn path=/trunk/; revision=32405
2010-04-06 17:01:14 +00:00
Ronnie Sahlberg ad66a89c3a From: Stefan Metzmacher <metze@samba.org>
Date: Thu, 27 Aug 2009 10:51:34 +0200
Subject: [PATCH 3/7] packet-spnego: fix decryption of DCERPC packets in 
decrypt_gssapi_krb_cfx_wrap()

There the checksum and the encrypted data are no 2 different buffers
and we need to combine them before we try to rotate and decrypt them.

metze


svn path=/trunk/; revision=31794
2010-02-04 23:16:08 +00:00
Bill Meier b3b101e606 Fix gcc -Wshadow warning.
svn path=/trunk/; revision=31715
2010-01-28 15:03:47 +00:00
Stig Bjørlykke c4441c8b43 Use proto_spnego for protocol tree item.
svn path=/trunk/; revision=31418
2010-01-03 14:50:36 +00:00
Stig Bjørlykke 5c0369ba97 Apply r30376 to asn1 template files.
svn path=/trunk/; revision=30767
2009-10-30 10:21:35 +00:00
Anders Broman 88bb44a51e From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=30691
2009-10-25 11:43:30 +00:00
Stig Bjørlykke b7d8cd1c6a Switch to using tvb_new_subset_remaining() in .cnf files.
svn path=/trunk/; revision=30386
2009-10-07 07:59:11 +00:00
Anders Broman bc9a809b65 From Didier Gautheron:
ep memory can't be used for tvbs defined as data_source.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4054

svn path=/trunk/; revision=30376
2009-10-06 19:15:58 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Bill Meier cb7dac7100 Initialize several ett_... variables to -1
svn path=/trunk/; revision=29295
2009-08-04 18:52:01 +00:00
Ronnie Sahlberg f8cf2d2c83 When we passed the crytobuffer to krb5_c_decrypt() we never actually
verified that we did have enough data in the buffer/tvb, which could 
lead to a SEGV.
(for example if we enable KRB5 decryption but we do NOT use TCP 
reassembly, and the encrypted data goes beyong the end of the current 
segment)


Change the signature to decrypt_krb5_data() to take a TVB instead of a 
buffer+length.
Actually check that we do have the entire encrypted PDU before calling 
out to the kerberos libraries.



svn path=/trunk/; revision=29213
2009-07-28 13:01:41 +00:00
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Stig Bjørlykke 9733aadcfe Re-generate asn1 dissectors after hf_register_info cleanup.
svn path=/trunk/; revision=28848
2009-06-26 03:59:01 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Stig Bjørlykke c47e788c94 Regenerate all asn2wrs generated dissectors.
svn path=/trunk/; revision=28379
2009-05-16 22:07:03 +00:00
Anders Broman 17e10d08fb Use tvb_new_child_real_data().
svn path=/trunk/; revision=28357
2009-05-14 05:36:48 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Bill Meier 09e139a234 asn2wrs generated files changed as a result of recent asn1 template changes
svn path=/trunk/; revision=26698
2008-11-04 22:28:52 +00:00
Anders Broman e375c3990a Regenerate all asn2wrs generated dissectors
svn path=/trunk/; revision=26670
2008-11-01 22:30:14 +00:00
Ronnie Sahlberg 2b739fc611 use g_malloc/g_free instead of malloc/free
svn path=/trunk/; revision=26353
2008-10-05 08:41:44 +00:00
Ronnie Sahlberg 54716f411b change u_char to unsigned char to make the osx compiler happy
svn path=/trunk/; revision=26351
2008-10-05 00:51:28 +00:00
Ronnie Sahlberg d83b8b0336 kerberos/gss enhancements
add a parameter *datalen to decrypt_krb5_data() so that we can pass back 
the length of the decrypted blob back to the caller.
This is useful for when there are "junk" at the end of the blob and thus 
the decrypted data is not the same size as the encrypted blob.
GSS CFX is one such example.
(we should have done this earlier since it might have made some other 
stuff easier to imlement...)


make the preference setting krb_decrypt a globally visible variable so 
we can see its value and act on it from callers of krb decryption from 
outside of packet-kerberos.c    i.e.   from GSS CFX


Make keytype == -1  a wildcard that when passed to decrypt_krb5_data() 
will try any/all encryption keys.
This since GSS CFX does not provide the enctype in the GSS layer.
(The GSS CFX enctype is only negotiated during the AP-REQ/REP  so we 
should later pick this value up and store it in a CFX session variable.
That is for a later enhancement.
)


Enhance the GSS decryption (that for hitorical reasons are implemented 
in packet-spnego.c  and not packet-gssapi.c :-)  )
to also handle decryption of GSS CFX

This should make wireshark able to decrypt any/all GSSAPI  RFC4121 
packets, if the keytab file is provided.


I have successfully decrypted LDAP using GSS CFX with AES encryption 
with this.




svn path=/trunk/; revision=26350
2008-10-05 00:28:36 +00:00
Gerald Combs d2821ce8c0 We always use start_offset, so don't wrap it in "#ifdef HAVE_KERBEROS".
svn path=/trunk/; revision=26301
2008-09-30 02:55:42 +00:00
Ronnie Sahlberg 687b0422d3 from Metze
add dissection of RFC4121 krb5 blobs



svn path=/trunk/; revision=26294
2008-09-29 18:44:10 +00:00
Anders Broman de16039c51 Get rid of dissect_ber_boolean_value() and change the signature of
dissect_ber_boolean() to return a value and update asn2wrs to generate the new signature.
Regenerate all BER dissectors.

svn path=/trunk/; revision=24015
2008-01-04 16:21:07 +00:00
Anders Broman f6ba48b9fc Update do use the -X and -T asn2wrs flags.
svn path=/trunk/; revision=23364
2007-11-04 22:16:28 +00:00
Luis Ontanon 00c5e48a17 get users of oid_resolv to use the new oids, rollout packet-snmp.c
svn path=/trunk/; revision=22651
2007-08-25 01:14:24 +00:00
Tomas Kukosa eb782d0cea - CLASS definitions support including exports through the *-exp.cnf file
- support of extension in middle of SEQUENCE root elements
- new option EMBEDDED_PDV_CB to set default callback
- ChoiceValue support at syntax level
- ValueSet support at syntax level
- exception identifier support
- ValueFromObject support at syntax level
- next minor changes (to compile X.880 and INAP)

- dissectors using classes regenerated

svn path=/trunk/; revision=22036
2007-06-04 14:41:38 +00:00
Guy Harris 1e7c1bc036 Add a cast to squelch an MSVC warning.
svn path=/trunk/; revision=21944
2007-05-25 21:50:12 +00:00
Guy Harris 88f69b80c0 Make SND_SEQ an array of 2 guint32's, rather than an array of 8
guint8's, to squelch some compiler warnings (and clean up some
comparisons).

svn path=/trunk/; revision=21941
2007-05-25 19:39:35 +00:00
Anders Broman dca634c4de Prepare for the use of the new -X parameter for BER encoded protocols.
svn path=/trunk/; revision=21889
2007-05-22 16:17:54 +00:00
Anders Broman f08cd1e5e3 actx in the rest of dissect_ber..()l
svn path=/trunk/; revision=21773
2007-05-15 05:49:43 +00:00
Anders Broman c01f382974 Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
2007-05-13 20:58:29 +00:00
Anders Broman 4c692a62b6 Start introducing actx to ber functions.
svn path=/trunk/; revision=21705
2007-05-06 22:34:05 +00:00
Tomas Kukosa a70a1b3eb6 EXTERNAL type is handled in asn2wrs now
private implementations were renamed EXTERNAL -> EXTERNALt

svn path=/trunk/; revision=21662
2007-05-03 11:37:47 +00:00
Ronnie Sahlberg 8920a7e7f2 change the signature that asn2wrs generates for functions to marm all parameters as _U_
to reduce the number of compiler warnings.

update some template and cnf files to use _U_ as well 


svn path=/trunk/; revision=21088
2007-03-21 10:22:22 +00:00
Jeff Morriss 43e550c754 Fix bug 1380:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1380

by registering the spnego dissector by name (e.g., call 'register_dissector()').


svn path=/trunk/; revision=20837
2007-02-18 10:18:53 +00:00
Graeme Lunt 1864da87a8 This patch looks for a confounder in GSSWrap for DES_MAC_MD5 algorithm.
This is purely empirical as I can find no standard that says it should be there.
However successful LDAP/SASL/GSSAPI between AD and Java client shows it seems to be present.
If the confounder is not dissected, the LDAPMessage to fail to be decoded.


svn path=/trunk/; revision=20833
2007-02-17 11:16:52 +00:00