aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x509af.c
AgeCommit message (Collapse)AuthorFilesLines
2017-07-11[x509af] Make CertificateSerialNumber an unsigned integer to handle a 9AndersBroman1-3/+3
byte 64 bit BER encoded unsigned number. Change-Id: I43e4a7f3103fac458a528022e0fdf6f0947804dc Reviewed-on: https://code.wireshark.org/review/22585 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-13Move /asn1 to /epan/dissectorsJoão Valverde1-22/+22
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9 Reviewed-on: https://code.wireshark.org/review/14388 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-20X509AF: reset algorithm_id global variable when closing a filePascal Quantin1-3/+10
Change-Id: I59a6e5e482f4f11ab446e9839cc7a0c67742dab3 Reviewed-on: https://code.wireshark.org/review/13424 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-19X509AF: make a local copy of algorithm_id in file scope for later usePascal Quantin1-9/+15
Bug: 12002 Change-Id: Iff48863c1954f76d6fc34150d315d15295dc1f5c Reviewed-on: https://code.wireshark.org/review/13406 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-10Convert ASN.1 dissectors to remove "new" from "new-style" dissector function ↵Michael Mann1-33/+33
names that were generated from asn2wrs.py This includes: 1. new_create_dissector_handle -> create_dissector_handle 2. new_register_dissector -> register_dissector 3. new_register_ber_oid_dissector -> register_ber_oid_dissector 4. new_register_ber_syntax_dissector -> register_ber_syntax_dissector Also remove PDU_NEW, SYNTAX_NEW and REGISTER_NEW as there is no need for the distinction anymore. Change-Id: I82c7de7c8ffeeab3259d1b55bb4afc5f6a1e0329 Reviewed-on: https://code.wireshark.org/review/12491 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09"new" dissector API -> dissector API for ASN.1 dissectors.Michael Mann1-8/+8
Change-Id: I7b794cba2feda2cae40411e2b1cb9fb091d08220 Reviewed-on: https://code.wireshark.org/review/12480 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-25Require BER dissector (OID) registration to be "new style".Michael Mann1-21/+21
Both old and new style API existed, just remove the "old" one. Change-Id: If725e778a0ecad5a431d634ed5c4856b4a281013 Reviewed-on: https://code.wireshark.org/review/12107 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-24Remove the LDAP wrapping for registering dissectors and just use ↵Michael Mann1-7/+7
dissector_add_string directly. Change-Id: I307ee31562a5a84bc62691f367e3b8df3cb3f244 Reviewed-on: https://code.wireshark.org/review/12097 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-19X509AF: ensure that BER dissector successfully decoded a bit string before ↵Pascal Quantin1-2/+2
calling RSA Public Key dissection Bug: 11612 Change-Id: Ia1279b5991604631241398ab19f0652e36a2114e Reviewed-on: https://code.wireshark.org/review/11144 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-19X509AF: protect against a comparison with a NULL algorithm_id stringPascal Quantin1-1/+1
Bug: 11611 Change-Id: Ide8a26f74c99405b53acf394041ddf4a599da90a Reviewed-on: https://code.wireshark.org/review/11143 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-18x509af: dissect subjectPublicKey for RSAPeter Wu1-16/+42
The subjectPublicKey field of a Certificate (TBSCertificate) is defined as type BIT STRING. The actual contents depend on the Algorithm Identifier which is preceding the subjectPublicKey field. This patch adds support for dissection of the public key for RSA public keys which show up below the subjectPublicKey tree: subjectPublicKeyInfo algorithm (rsaEncryption) Algorithm Id: 1.2.840.113549.1.1.1 (rsaEncryption) subjectPublicKey: 3082010a0282010100b7c769e2d0eacaeb929fc08238a9ff... modulus : 0x00b7c769e2d0eacaeb929fc08238a9ffc59cab39c28a2e26... publicExponent: 65537 Change-Id: Ib92645433b0a0078a947ff0ac26c5e6a64877b93 Reviewed-on: https://code.wireshark.org/review/10967 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-07ssl-utils: load RSA keys based on their modulus+exponentPeter Wu1-9/+36
Load RSA private keys based on their public key instead of relying on the user to specify a valid address and port mapping. This is more reliable and prepares for simplification of the SSL Keys dialog. After this change, the "address" part of the UAT dialog will be ignored when loading the private key. The port+protocol mapping is still imported, but should probably be removed too. Change-Id: I4d7a2bfcf63d17e66e336ef770759f20510fc176 Reviewed-on: https://code.wireshark.org/review/10766 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-15x509,ber: fix header field of large integersPeter Wu1-3/+3
In the past large integers would be displayed as text, later on this was changed into a "proper" header field. In most cases you do not want to see "ber.64bit_uint_as_bytes" though, but the original field name. This patch allows fields that are marked as FT_BYTES to be displayed with their original header field details (name, description, etc.). Change-Id: I4ab1a4cce649a225c73298fbf4dcf1692c693a03 Reviewed-on: https://code.wireshark.org/review/10539 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-19Convert OID APIs to use wmem.Michael Mann1-2/+2
There are a few oid functions that are only called in oids_test.c. I'll presume the APIs are used in proprietary dissectors rather than just remove them. Change-Id: I4595e00f93bf9ab8cf2493fe0432b91960f55a3f Reviewed-on: https://code.wireshark.org/review/6592 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-17X509AF: dissect Certificate Serial Number as INT64 instead of INT32Pascal Quantin1-4/+4
Bug: 10862 Change-Id: Ie315298dd090b3b689f6a9bfff6f6f5bf7cc715a Reviewed-on: https://code.wireshark.org/review/6594 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-7/+6
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387 Reviewed-on: https://code.wireshark.org/review/6008 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-13ASN1: Register PDU-dissectors as NEWStig Bjørlykke1-29/+39
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64 Reviewed-on: https://code.wireshark.org/review/4494 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-2/+2
Change-Id: Ia6c3e7a25615bf8e052c3bacf096d76df775c9c2 Reviewed-on: https://code.wireshark.org/review/4126 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-22convert to proto_tree_add_subtree[_format] for ASN.1 dissectorsMichael Mann1-9/+5
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef Reviewed-on: https://code.wireshark.org/review/2509 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-02-26Remove trailing whitespace from asn1 .cnf & template.[hc] files. Regenerate ↵Bill Meier1-6/+6
dissectors. Change-Id: I0e779b2ac2f608356649c5bbfca438141070dea4 Reviewed-on: https://code.wireshark.org/review/412 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-18Remove $Id$ from the ASN.1 dissectors and regenerate them.Jeff Morriss1-13/+11
Change-Id: Ie476c6f82f318188b41ed922b92c6fec119ea954 Reviewed-on: https://code.wireshark.org/review/244 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-01-27Added back x509af_get_last_algorithm_id() removed in revision 54647 to Stig Bjørlykke1-8/+16
restore usage in cms and pkcs12. They never got a valid value in actx->external.direct_reference because they use another actx in this case. This will add back the global variable in x509af, but this is needed until we manage to pass the value in another way. See comments in bug 9573. svn path=/trunk/; revision=54975
2014-01-08Make global algorithm_id in x509af dissector a direct_reference instead. ↵Michael Mann1-15/+9
Bug 9573 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9573). Removes valgrind warnings as well as just being Good Code. svn path=/trunk/; revision=54647
2013-10-31Add a data parameter to call_ber_oid_callback to be able to pass data to ↵Michael Mann1-2/+2
subdissectors found with dissector_try_string_new. The intention is to aid in the removal of pinfo->private_data use as well as static global variables in a dissector. For now, all calls to call_ber_oid_callback have the data parameter set to NULL. svn path=/trunk/; revision=52994
2013-06-22More proper fix (per advice of bug 8515 ↵Michael Mann1-5/+5
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8515)) of global variables complained about in bug 7060 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7060). Not sure if algorithm_id of x509af dissector could also be a actx->external.direct_reference, so left it alone. svn path=/trunk/; revision=50113
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-27/+27
incompatible filters in ASN.1 dissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402 svn path=/trunk/; revision=49599
2013-05-01Fix warning.Guy Harris1-1/+1
svn path=/trunk/; revision=49118
2013-05-01Remove some global variables in favor of private_data member of asn1_ctx_t. ↵Michael Mann1-12/+9
Bug 7060 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7060). This should (mostly) passify the bug, but it appears like this could be done with a lot more ASN.1 dissectors. svn path=/trunk/; revision=49117
2013-04-11Update the ASN.1 based dissectors following the changes done in r48812Pascal Quantin1-2/+2
svn path=/trunk/; revision=48820
2013-03-28-Wmissing-prototypesAnders Broman1-6/+9
svn path=/trunk/; revision=48609
2013-03-02Use explicit casts.Anders Broman1-2/+2
svn path=/trunk/; revision=48008
2012-12-07Added deltaRevocationList.Stig Bjørlykke1-5/+6
svn path=/trunk/; revision=46438
2012-09-24Regenerate asn.1 dissectors.Jakub Zawadzki1-6/+6
svn path=/trunk/; revision=45110
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-10-15Update generated ASN1 *.[hc] files after recent work done by Jeff Morriss;Bill Meier1-1/+1
The only change in each file is in a comment showing the asn2wrs cmd used to build that file. svn path=/trunk/; revision=39427
2011-05-13Regenerate ASN.1 dissectors to update the #line directive.Stig Bjørlykke1-18/+18
svn path=/trunk/; revision=37118
2010-06-28Moved register_ber_syntax_dissector() and register_ber_oid_syntax() fromStig Bjørlykke1-9/+9
proto_reg_handoff_* to proto_register_*. svn path=/trunk/; revision=33345
2010-05-11Add a little more code to avoid not-very-useful blurbs:Jeff Morriss1-8/+8
- 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-11Regenerate a few more of the ASN.1 dissectorsJeff Morriss1-74/+74
svn path=/trunk/; revision=32747
2010-04-21Export Certificate PDU so this can be dissected from non-asn dissectors.Stig Bjørlykke1-14/+14
svn path=/trunk/; revision=32532
2010-04-07#include <string.h> and/or #include <stdio.h> not needed.Bill Meier1-8/+6
svn path=/trunk/; revision=32417
2010-04-06#include <stdio.h> not needed.Bill Meier1-7/+6
svn path=/trunk/; revision=32405
2009-10-09Regenerate asn1 dissectors (no change, only some line offset changes)Kovarththanan Rajaratnam1-3/+3
svn path=/trunk/; revision=30454
2009-09-24Remove check_col() guardKovarththanan Rajaratnam1-3/+1
svn path=/trunk/; revision=30124
2009-09-23Don't col_clear() followed by col_set_str(). A col_set_str() will clear ↵Kovarththanan Rajaratnam1-2/+0
(replace) any existing string (the fence still needs to be respected though) svn path=/trunk/; revision=30086
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-26Re-generate asn1 dissectors after hf_register_info cleanup.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=28848
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-10/+10
(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