Commit graph

355 commits

Author SHA1 Message Date
Jakub Zawadzki
8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jeff Morriss
5adc2792e4 Fix CID 620: since we're checking if the given hf index is positive (since
r15662), move the proto_tree_add_boolean() call (which uses the hf index)
inside the check.

svn path=/trunk/; revision=41910
2012-04-03 17:37:27 +00:00
Anders Broman
cd6d0b075f Use hfi->abbrev insted.
svn path=/trunk/; revision=40376
2012-01-04 19:06:34 +00:00
Anders Broman
906d2aecbb Enhance error information.
svn path=/trunk/; revision=40361
2012-01-03 22:06:42 +00:00
Anders Broman
4a00a8ac58 Squelsh warnings.
svn path=/trunk/; revision=40025
2011-11-28 16:42:43 +00:00
Jaap Keuter
f14c2c772b Move some comments around to make it more boilerplate like.
svn path=/trunk/; revision=39992
2011-11-22 21:51:24 +00:00
Anders Broman
b431591727 Get rod of " warning: identifier ‘class’ conflicts with C++ keyword"
svn path=/trunk/; revision=39945
2011-11-19 09:08:50 +00:00
Stig Bjørlykke
89880b5b59 Increase the size of a unknown INTEGER to FT_INT64 to be able to show
negative integers and integers up to MAXINT64.  We still don't support
integers between MAXINT64 and MAXUINT64, which would be 9 bytes long.

svn path=/trunk/; revision=39673
2011-10-30 15:55:18 +00:00
Bill Meier
293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +00:00
Anders Broman
4b952c1324 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39146
2011-09-26 08:25:18 +00:00
Stig Bjørlykke
7f4e941ab6 Add an expert info warning for integers encoded with too many octets.
svn path=/trunk/; revision=38771
2011-08-29 10:01:36 +00:00
Graeme Lunt
a8d3a3ea8c Allow the dissection of BER/DER carried over a TCP transport using
"Decode As..."


svn path=/trunk/; revision=38560
2011-08-16 12:28:17 +00:00
Bill Meier
a2b58f051d Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
(In many cases I previously incorrectly removed the #include <stdlib.h>).

svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Anders Broman
f62ac53352 From Yaniv Kaul:
Fix 'set but not used' errors that GCC 4.6 emits.

svn path=/trunk/; revision=36892
2011-04-27 05:24:31 +00:00
Stig Bjørlykke
1fd17eb0d9 Fixed blurb for BER Error.
svn path=/trunk/; revision=36495
2011-04-06 09:59:21 +00:00
Stig Bjørlykke
3a1673c04c Made "BER Error" filterable.
svn path=/trunk/; revision=36494
2011-04-06 08:52:42 +00:00
Ronnie Sahlberg
13f6b77d92 remove two pointless const in casts
coverity 580 and 581

svn path=/trunk/; revision=36407
2011-03-30 04:36:09 +00:00
Tomas Kukosa
0b9c645150 Fix warning
svn path=/trunk/; revision=36139
2011-03-04 14:36:27 +00:00
Tomas Kukosa
3f8b9e87a9 Check only first 14 digits of GeneralizedTime which are fixed, next parts are optional
svn path=/trunk/; revision=36138
2011-03-04 14:01:57 +00:00
Gerald Combs
dae5200002 Fix some Visual C++ analysis warnings.
svn path=/trunk/; revision=35988
2011-02-17 23:00:34 +00:00
Stig Bjørlykke
0ac8e7cc8d Put error messages and expert info for illegal UTCTime elements as a
subtree on the UTCTime element.

svn path=/trunk/; revision=35945
2011-02-14 10:18:03 +00:00
Stig Bjørlykke
84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Jeff Morriss
e80012653f Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5537 :
Don't go modifying the bitstring if its length is 0 (meaning that there is only
the NULL terminator).

svn path=/trunk/; revision=35342
2011-01-03 17:37:41 +00:00
Guy Harris
d049046268 Note that this is ultimately not necessarily the right fix.
svn path=/trunk/; revision=35331
2011-01-02 21:49:00 +00:00
Guy Harris
8d7d050e9e For those cases where we interpret the contents of an OCTET STRING,
which could be of arbitrary length - even if it's not supposed to be! -
as a value of some other type, by adding them as a registered field,
first check to make sure the length of the field is appropriate for the
type and, if not, show a dissection error, rather than showing a
dissector-bug assertion when we call proto_tree_add_item().

This fixes a bunch of dissector-bug assertions that show up with
malformed BER-encoded packets.

Also, fix a typo, and expand a comment.

svn path=/trunk/; revision=35330
2011-01-02 21:27:57 +00:00
Guy Harris
a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Anders Broman
bb0eefd834 Fix a cut-n-paste error.
svn path=/trunk/; revision=34866
2010-11-14 14:13:52 +00:00
Anders Broman
2c042dcd15 Use value_string_ext.
svn path=/trunk/; revision=34845
2010-11-11 21:18:15 +00:00
Stig Bjørlykke
34d9ef736b Added an expert info for illegal integer length.
svn path=/trunk/; revision=34820
2010-11-09 12:17:11 +00:00
Stig Bjørlykke
c56ac0d6db Removed calls to proto_item_set_expert_flags(), as this will be called
in expert_add_info_format().

svn path=/trunk/; revision=34819
2010-11-09 12:15:55 +00:00
Jeff Morriss
e17b9ccec1 Rev 29427 added packet_add_new_data_source() with a comment indicating that
the data source does not need to be allocated if (!tree).

Rev 30158 took the if (!tree) check out indicating that the check was invalid.

So: (since packet_add_new_data_source() now only calls add_new_data_source()),
remove packet_add_new_data_source().

svn path=/trunk/; revision=34717
2010-10-30 16:00:30 +00:00
Guy Harris
17d4d51b7d Make the third argument to a UAT copy callback a size_t (not that any of
the callbacks we have use that argument - is it really needed?).

svn path=/trunk/; revision=34694
2010-10-29 21:11:33 +00:00
Martin Mathieson
9d87437659 Add volatile in several places to gcc warnings.
svn path=/trunk/; revision=34526
2010-10-15 18:41:12 +00:00
Stig Bjørlykke
2b34ed288b Avoid getting BoundsError when trying to decode OCTET STRING or
unknown primitive as constructed ASN.1 BER encoded data.

svn path=/trunk/; revision=34520
2010-10-15 11:10:20 +00:00
Stig Bjørlykke
7c3f2513ee Remove unneeded includes.
svn path=/trunk/; revision=34289
2010-09-30 19:20:59 +00:00
Stig Bjørlykke
65e0721f71 Constructed octet strings may contain zero encodings.
(X.690 chapter 8.7.3)

svn path=/trunk/; revision=34284
2010-09-30 06:19:32 +00:00
Gerald Combs
4c74418400 Attempt to fix the stack overflow reported at
http://seclists.org/bugtraq/2010/Sep/87 .

Unfortunately no one from the NCNIPC pen test team has contacted us or
provided a sample capture so the fix hasn't been verified.

svn path=/trunk/; revision=34111
2010-09-13 18:49:55 +00:00
Stig Bjørlykke
16db2dd4f5 Check if using tree before adding the octet string.
svn path=/trunk/; revision=34055
2010-09-03 08:44:00 +00:00
Stig Bjørlykke
598b89ab7f Added a check for constructed octet string to avoid a loop.
This fixes bug 5154.

svn path=/trunk/; revision=33949
2010-08-27 11:55:14 +00:00
Stig Bjørlykke
8b6c6a3dbf Display constructed octet strings with correct hf_id.
Show octet string fragments as for reassembly.

svn path=/trunk/; revision=33910
2010-08-24 15:08:07 +00:00
Gerald Combs
3a5ba15b4d Rename a variable. "tmp_len" was too similar to "tmp_length".
svn path=/trunk/; revision=33506
2010-07-13 22:49:17 +00:00
Gerald Combs
041cd31c9e Revert get_ber_length() back to r32530, which removes all of the changes
back to and including my attempt to make it iterative. Move its guts
back into try_get_ber_length() and add a recursion level check.

This should fix CVE-2010-2284 and preserve existing behavior without
introducing any new regressions (such as bug 5000).

svn path=/trunk/; revision=33505
2010-07-13 22:41:34 +00:00
Gerald Combs
cfe9b05691 Add length checks.
svn path=/trunk/; revision=33488
2010-07-12 17:30:14 +00:00
Gerald Combs
edb7f000dc Assume that if we have more than 500 levels of nested indefinite lengths
we have a malformed packet.

svn path=/trunk/; revision=33480
2010-07-09 17:07:34 +00:00
Jeff Morriss
4e76ef92cb For: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4984#c4 : In try_get_ber_length() don't let a negative length make us go backwards. This should eliminate a possible infinite loop and appears to /help/ limit the depth of recursion.
svn path=/trunk/; revision=33471
2010-07-07 22:00:44 +00:00
Jeff Morriss
c24f16ad44 Fix infinite recursion reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4984 : In try_get_ber_length() make sure we move forward before recursing.
svn path=/trunk/; revision=33464
2010-07-07 15:52:09 +00:00
Gerald Combs
a7df969fb1 Have get_ber_length() set the length to 0 by default. This restores behavior
that was lost recently.

svn path=/trunk/; revision=33402
2010-07-01 16:35:37 +00:00
Graeme Lunt
852d60ca7e When determining a BER length, make sure the BER identifier was marked as constructed if an indefinite length is encountered.
This helps prevent a stack overflow problem reported in Bug 4951.


svn path=/trunk/; revision=33383
2010-06-30 10:06:21 +00:00
Stig Bjørlykke
e777398d4f Added expert info for illegal bitstring padding and when bits are set
in the padded area.

svn path=/trunk/; revision=33382
2010-06-30 09:09:18 +00:00
Bill Meier
9427f9f2c3 Hack to prevent checkAPIs.pl from complaining about missing const in
'static value_string syntax_names[...]' 

svn path=/trunk/; revision=33365
2010-06-29 03:43:17 +00:00
Gerald Combs
a9650cd851 Don't try to use a NULL tvb in call_ber_oid_callback(). Fixes bug 4950.
svn path=/trunk/; revision=33363
2010-06-29 00:44:41 +00:00
Gerald Combs
a514fe61c3 tvb_get_ptr() may not return a valid string. Must I break out the
picture of the cow again?

svn path=/trunk/; revision=33361
2010-06-28 23:11:48 +00:00
Gerald Combs
dd4e194304 Make sure dissect_ber_integer() always sets a value.
svn path=/trunk/; revision=33358
2010-06-28 22:13:53 +00:00
Stig Bjørlykke
1c81c60477 Search in user defined oid syntax table before built-in oid table in
call_ber_oid_callback(), so the user can override the defaults in the
"OID Tables".

svn path=/trunk/; revision=33355
2010-06-28 19:06:16 +00:00
Gerald Combs
e2c79ddfd0 It looks like dissect_ber_octet_string() is called with the expectation
that out_tvb will always be set (the H.248 dissector does this, at
least). Make sure we do so. Do the same for
dissect_ber_constrained_octet_string().

svn path=/trunk/; revision=33354
2010-06-28 17:26:07 +00:00
Graeme Lunt
342fc4cfb4 After a nudge from Stig (thanks Stig), convert the OID configuration from
GKeyFile (which is not available on Sparc Solaris) to a User Accessible 
Table(UAT). 
This also allows the user to manage the configuration from the Wireshark GUI 
and select the associated syntax from a drop down list.


svn path=/trunk/; revision=33344
2010-06-28 09:33:04 +00:00
Graeme Lunt
14d5a86ee5 The version of glib on Solaris 10 (2.4?) does not support GKeyFile which was
introduced in 2.6. Disable oid table if GKeyFile is not available. 


svn path=/trunk/; revision=33303
2010-06-23 14:26:19 +00:00
Graeme Lunt
1fce0a0ac2 Configuration to allow the definition of an OID name and associated syntax.
It allows the user to:
* Add names and/or syntaxes for OIDs that Wireshark doesn't natively understand
* Override the built-in OID names (e.g. change 'id-at-organization' to 'o')
* Use a special syntax, "ASN.1", that allows a value associated with an OID 
  to be dissected as "unknown ber". (This is a effectively a selective 
  version of the "Decode unexpected tags as BER encoded data" BER option.)

The configuration file is a glib key-value file, with the dotted OID used as
the group, and two keys defined, "name" and "syntax".

A configuration option is added to the BER preferences page. A single 
configuration file may be specified, or a directory may be specified. If a 
directory is specified, then the files with a ".oid" extension will be loaded.

An example configuration file:

[2.5.21.5]
name=attributeTypes
syntax=ASN.1
[2.5.21.6]
name=objectClasses
[2.5.21.7]
name=nameForms
[1.2.840.10040.4.3]
name=id-dsa-with-sha1
[2.5.4.6]
name=c
[2.5.4.10]
name=o
[2.5.4.11]
name=ou
[2.5.4.3]
name=cn
[1.3.32.0.2.0.4.66]
name=Unknown OID
syntax=PrintableString
[0.9.2342.19200300.100.1.10]
name=unknown dn
syntax=DistinguishedName

----

The list of known syntaxes is shown in the "Decode As ..." dialog when 
examining a BER file.


svn path=/trunk/; revision=33300
2010-06-23 11:28:59 +00:00
Graeme Lunt
eef8c02bd7 Bug 3597 - implicit octet string that is constructed causes PRES/FTAM dissect failure
Introduced some state to remember last dissected Tag/Length so that they can be recalled if an IMPLICIT tag is encountered and stripped. This allows its to be determined if the value has a constructed value - and so can be reassembled.

In this case, it is a IMPLICIT constructed OCTET STRING at the presentation layer.

Many thanks to Fred Gruman for identifying - and apologies for the delay in commiting.


svn path=/trunk/; revision=33048
2010-06-02 14:42:57 +00:00
Graeme Lunt
3644d0faa7 Updated get_ber_length to handle multiple nested indefinite length encodings.
svn path=/trunk/; revision=33046
2010-06-02 13:33:37 +00:00
Gerald Combs
20914ee220 Make get_ber_length() iterative instead of recursive so we don't overrun the
stack. Discovered by J. Oquendo.

svn path=/trunk/; revision=32922
2010-05-23 23:42:58 +00:00
Stig Bjørlykke
dc4ecbf172 Do not give a warning for not implemented OID if value is a "NULL tag".
svn path=/trunk/; revision=32530
2010-04-21 10:05:19 +00:00
Stig Bjørlykke
8f5c4683ea Added an option to try decoding unknown primitives as BER encoded data.
svn path=/trunk/; revision=31740
2010-01-30 17:44:45 +00:00
Stig Bjørlykke
9b2f05da33 Don't try decode an empty octetstring as BER.
svn path=/trunk/; revision=31589
2010-01-20 12:47:26 +00:00
Stig Bjørlykke
174de72350 Moved expert info for bitstring size constraints below bit values.
Enabled bitstring minimum length size check.

svn path=/trunk/; revision=31564
2010-01-19 08:54:13 +00:00
Stig Bjørlykke
6ff81c8f6a Change group for "Unknown bit(s)" expert info to Undecoded.
svn path=/trunk/; revision=31563
2010-01-19 08:11:23 +00:00
Stig Bjørlykke
10466c4bbe Add expert info to unknown bitstring bits when having a named_bits table.
svn path=/trunk/; revision=31554
2010-01-18 20:08:56 +00:00
Anders Broman
c4dd31cd87 From Didier Gautheron:
col_clear.diff 
Remove calls to col_clear :
- called twice.
- before functions which also clear the column
- by replacing col_clear + col_append_xxx with col_add_xxx
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31517
2010-01-13 20:25:10 +00:00
Stig Bjørlykke
6a433058f9 Added check for SIZE constraints in bit-string.
svn path=/trunk/; revision=31447
2010-01-05 11:38:33 +00:00
Stig Bjørlykke
e73a89d91a Added option (-C) to check for SIZE constraints in octet-string, integer,
enumerated, sequence-of and set-of types.

Added BER functions to check for SIZE constraints and give expert info warnings.

svn path=/trunk/; revision=31309
2009-12-18 15:18:31 +00:00
Bill Meier
5d68a812ab Fix memory leak: re-init defragmentation tables each time a capture file is (re) opened.
svn path=/trunk/; revision=30589
2009-10-17 21:42:51 +00:00
Anders Broman
f0aaa035a4 From Gerasimos Dimitriadis:
TCAP problem with indefinite length 'components' SEQ OF.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4053

svn path=/trunk/; revision=30319
2009-10-04 19:25:46 +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
Kovarththanan Rajaratnam
5d5a5442d6 Don't guard col_set_str (COL_RES_DL_SRC/COL_RES_DL_DST) with col_check
svn path=/trunk/; revision=29343
2009-08-09 07:14:16 +00:00
Kovarththanan Rajaratnam
e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +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
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
Guy Harris
39630a763d Squelch a warning.
svn path=/trunk/; revision=27947
2009-04-03 17:06:20 +00:00
Guy Harris
cf308a6cc0 Don't reply on an argument of -1 as the last argument of tvb_memcpy()
meaning "to the end of the tvbuff"; we'd like to get rid of the "-1
means to the end of the tvbuff" convention, as in many cases the length
comes from a 32-bit length field in the packet, and we want 0xFFFFFFFF
to be treated, even on ILP32 platforms, as meaning "2^32-1 bytes",
probably giving an exception, rather than as "to the end of the packet".

svn path=/trunk/; revision=27945
2009-04-03 16:53:40 +00:00
Tomas Kukosa
494942c9c0 Display information which OID is not implemented in expert info
svn path=/trunk/; revision=27384
2009-02-06 13:48:32 +00:00
Bill Meier
c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +00:00
Stig Bjørlykke
eb204d1ecf Added a filter entry when dissector for OID not implemented.
svn path=/trunk/; revision=26874
2008-11-29 11:17:34 +00:00
Stig Bjørlykke
4528043ab6 Fixed decoding of multiple sequences in a sequence of implict sequence.
Removed attempt to fix number of items in indef sequence-of and set-of.

svn path=/trunk/; revision=26476
2008-10-16 10:50:12 +00:00
Stig Bjørlykke
c2515c5abd Count correct number of items in indef sequence-of and set-of.
svn path=/trunk/; revision=26451
2008-10-14 16:28:54 +00:00
Bill Meier
b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Stig Bjørlykke
d255e44bfa From Martin Peylo (bug 2507):
The attached patch enables asn2wrs.py and packet-ber.c to decode UTCTime
according to the definitions in X.680.

svn path=/trunk/; revision=25897
2008-08-01 16:44:06 +00:00
Bill Meier
7aaadd9bec Fix some warnings reported by gcc -Wshadow ...
svn path=/trunk/; revision=25616
2008-06-27 04:52:56 +00:00
Stig Bjørlykke
28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Anders Broman
14756d9e5d Let epan/asn1.c handle real type.
svn path=/trunk/; revision=24129
2008-01-18 05:55:24 +00:00
Sake Blok
6ff98095fe From Martin Peylo (bug 2184), fix for:
The current dissection of GeneralizedTime in packet-ber does not consider all
the possibilities how this field can be constructed.

According to ITU-T X.680 this field can be encoded as
YYYYMMDDhhmmss([\.,]f{1,3})?(([+-]hhmm)|Z)?
This is a regex-like expression where each letter except the literal 'Z'
represents an ASCII encoded digit.

So far only the first 14 digits are dissected and the 15th character is put
into parentheses. This may not show all available information.



svn path=/trunk/; revision=24071
2008-01-12 12:06:56 +00:00
Jeff Morriss
db8bae4fb2 When searching for EOC (because we have an indefinite length) don't stop searching just because we ran out of TVB (thus assuming that the EOC is just beyond the end of the message). Instead, try to keep going which will throw an exception (ReportedBoundsError). I had a packet which was missing the EOC (probably programmer error) and Wirshark was reporting BoundsError (Packet size limited during capture) instead of ReportedBoundsError (Malformed Packet); this patch fixes that.
svn path=/trunk/; revision=24046
2008-01-09 17:06:25 +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
73fee653de Get rid of ber_last_created_item(). (Final?)
svn path=/trunk/; revision=24010
2008-01-04 13:39:24 +00:00
Anders Broman
6f5a53b789 Add more debug info.
svn path=/trunk/; revision=23977
2007-12-30 00:03:10 +00:00
Stig Bjørlykke
5e1ffde520 Moved check for empty choice to make it work correctly.
svn path=/trunk/; revision=23548
2007-11-23 12:22:22 +00:00
Stig Bjørlykke
92682d51de Added handling of octet-aligned data according to direct_reference.
Implemented handling of ber_callback for tagged type octet-aligned
and arbitrary.  Renamed some functions.

svn path=/trunk/; revision=23539
2007-11-21 23:33:13 +00:00
Stig Bjørlykke
8fc83d2cf3 Improved "BER Error" messages to be more uniform.
svn path=/trunk/; revision=23501
2007-11-19 20:23:49 +00:00
Stig Bjørlykke
9233fa7578 Second try to not stop processing if length==0 in choice.
svn path=/trunk/; revision=23497
2007-11-19 17:46:11 +00:00
Stig Bjørlykke
77e69e06e1 Reverted r23485 and r23486, this was not a correct fix.
svn path=/trunk/; revision=23489
2007-11-19 07:25:06 +00:00
Stig Bjørlykke
c3d985077e And dump internal ber fields for empty choice field.
svn path=/trunk/; revision=23486
2007-11-18 16:40:20 +00:00