Wireshark-commits: [Wireshark-commits] master c909900: ssl, dtls: use a single field to track Proto
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 16 Nov 2015 21:45:59 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c90990068ff2f442bdfb2475dc9dd3a55cdb2e46
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c909900 by Peter Wu (peter@xxxxxxxxxxxxx):

    ssl,dtls: use a single field to track ProtocolVersion
    
    The SslSession struct contains a "version" field for displaying
    purposes in the protocol column while the SslDecryptSession struct
    has a "version_netorder" field for use in TLS hash functions (for
    secrets calculations).
    
    As these are strongly associated with each other, remove the
    version_netorder field and its associated constants, let the SslSession
    version field store this value instead. All SSL_VER_* are renamed to
    appropriate *_VERSION macros (via search & replace), SSL_VER_UNKNOWN
    is kept though.
    
    The PCT and SSLv2 protocols had no wire value (*_VERSION), so
    SSL_VER_PCT and SSL_VER_SSLv2 are assigned with some arbitrary values.
    
    Warning: external plugins using the ssl_set_master_secret function
    must now pass the wire version (TLSV1_VERSION) instead of the (now
    removed) internal macros (SSL_VER_TLSv1).
    
    Change-Id: Icd8ef15adae9c62eb21eab1c3b812166e451936f
    Reviewed-on: https://code.wireshark.org/review/11820
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    Petri-Dish: Michael Mann <mmann78@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  9ec2cbb   Catch failure of _open_osfhandle().
    adds  c909900   ssl,dtls: use a single field to track ProtocolVersion


Summary of changes:
 epan/dissectors/packet-dtls.c      |   82 ++++----------------
 epan/dissectors/packet-ssl-utils.c |   76 ++++++++++---------
 epan/dissectors/packet-ssl-utils.h |   22 ++----
 epan/dissectors/packet-ssl.c       |  144 +++++++++---------------------------
 4 files changed, 96 insertions(+), 228 deletions(-)