Wireshark-commits: [Wireshark-commits] master dbfb204: ber: display x509af.utcTime year in 4 digits
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 11 Jan 2020 18:36:43 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=dbfb204f487097032d83de318c26cacd185a9d4e
Submitter: "Pascal Quantin <pascal@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

dbfb204 by Andre Luyer (andre@xxxxxxxx):

    ber: display x509af.utcTime year in 4 digits
    
    Because:
    - the 2-digit year can only be in the range 1950..2049 according to
    https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1
    - to avoid confusion, interpreting the year/month/day in a different order may
    still represent a valid date.
    - now both utcTime and GeneralizedTime are displayed in exactly the same way.
    - some tools, like Perl, apply a different date range when converting 2-digit years.
    
    In packet-ber.c two parameters are added to the function dissect_ber_UTCTime:
    datestrptr: if not NULL return datetime string instead of adding to tree
    or NULL when packet is malformed
    tvblen: if not NULL return consumed packet bytes
    Also the memory allocation for outstr is now done using the recommended method
    as described in the README.developer document.
    
    The calling function in x509af/x509sat uses this to prepend the century.
    Added generated files.
    
    Change-Id: I714c2e8e7f899211caaa1f4136ca0d27cb1aba4a
    Reviewed-on: https://code.wireshark.org/review/35414
    Petri-Dish: Pascal Quantin <pascal@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Reviewed-by: Pascal Quantin <pascal@xxxxxxxxxxxxx>
    

Actions performed:

    from  3f17a89   Add Cisco Miscabling Protocol
     add  dbfb204   ber: display x509af.utcTime year in 4 digits


Summary of changes:
 epan/dissectors/asn1/x509af/x509af.cnf   | 11 +++++++++++
 epan/dissectors/asn1/x509sat/x509sat.cnf | 11 +++++++++++
 epan/dissectors/packet-HI2Operations.c   |  2 +-
 epan/dissectors/packet-acp133.c          |  2 +-
 epan/dissectors/packet-ber.c             | 26 +++++++++++++++++++-------
 epan/dissectors/packet-ber.h             |  3 +--
 epan/dissectors/packet-cms.c             |  2 +-
 epan/dissectors/packet-dap.c             |  2 +-
 epan/dissectors/packet-dop.c             |  2 +-
 epan/dissectors/packet-dsp.c             |  2 +-
 epan/dissectors/packet-p1.c              |  4 ++--
 epan/dissectors/packet-p22.c             |  2 +-
 epan/dissectors/packet-p7.c              |  8 ++++----
 epan/dissectors/packet-p772.c            |  2 +-
 epan/dissectors/packet-pkix1explicit.c   |  2 +-
 epan/dissectors/packet-rtse.c            |  2 +-
 epan/dissectors/packet-x509af.c          | 21 ++++++++++++++++-----
 epan/dissectors/packet-x509sat.c         | 15 +++++++++++++--
 tools/asn2wrs.py                         |  2 +-
 19 files changed, 88 insertions(+), 33 deletions(-)