Wireshark-commits: [Wireshark-commits] rev 54039: /trunk/epan/dissectors/ /trunk/epan/dissectors/:
Date: Fri, 13 Dec 2013 11:30:24 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=54039

User: alagoutte
Date: 2013/12/13 11:30 AM

Log:
 From Peter Wu
 
 ssl-utils: remove SIG, rename mode and formatting
 
 The changes seem huge, but actually involve a few structural changes
 that do not change functionality, but aim to make maintenance easier and
 lines shorter. The following changes were made:
 
  1. Remove the "sig" field and `SIG_*` constants as they are not used
     anywhere.
  2. Convert `SSL_CIPHER_MODE_*` macros to an enum, change the type in
     SslCipherSuite, change the field terminator in cipher_suites and
     drop the `SSL_CIPHER_` prefix to make it shorter.
  3. Add whitespace to align the cipher suites and convert the numbers to
     hex to match common usage (e.g. IANA docs). Done with the awk script
     below.
 
 AWK script that takes the lines with `,KEX_` and applies changes (3):
 
     #!/usr/bin/gawk -f
     BEGIN { FS="[, {]+" }
     {
         split($0, c, "}, *");
         comment="";if(c[2])comment="   "c[2];
         sub("}", "", $10); # comment }
         printf("    {0x%04X,%-12s%-16s%2d,%3d,%3d,%-11s %-22s},%s\n",
                strtonum($2),
                $3 ",", # Key exchange
                # $4 is SIG_ - remove
                $5 ",", # Cipher
                $6, # blocksize
                $7, # keysize
                $8, # export keysize
                $9 ",", # Digest
                $10, # mode
                comment);
     }
 
 Signed-off-by: Peter Wu <lekensteyn@xxxxxxxxx>

Directory: /trunk/epan/dissectors/
  Changes    Path                  Action
  +174 -174  packet-ssl-utils.c    Modified
  +9 -11     packet-ssl-utils.h    Modified