Ethereal-dev: Re: [Ethereal-dev] SSL decryption patch for ethereal 0.10.13

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Paolo Abeni <paolo.abeni@xxxxxxxx>
Date: Mon, 05 Dec 2005 10:46:09 +0100
On Mon, 2005-12-05 at 10:18 +0100, Paolo Abeni wrote:
> The attached version should work
> better and (at least on my machine) does not produce compilation warning

oops...

I just notice a couple of nasty things that compiles only with some gcc
versions. The attached incremental patch [referred to latest previous
version] should fix them.

Paolo


 

 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 America, Africa, Australia, Asia...con Email Phone Card chiami ovunque spendendo meno di una telefonata interurbana
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2688&d=5-12
diff -urp ethereal-0.10.13/epan/dissectors/packet-ssl.c /home/luca/src/ethereal-0.10.13/epan/dissectors/packet-ssl.c
--- ethereal-0.10.13/epan/dissectors/packet-ssl.c	2005-12-02 15:39:43.000000000 +0100
+++ /home/luca/src/ethereal-0.10.13/epan/dissectors/packet-ssl.c	2005-12-02 14:48:12.000000000 +0100
@@ -1461,11 +1461,13 @@ dissect_ssl3_record(tvbuff_t *tvb, packe
          decrypted = p_get_proto_data(pinfo->fd, proto_ssl);
          if (decrypted && ssl_record_tree)
          {
+             tvbuff_t* new_tvb;
+
              /* try to dissect decrypted data*/
              ssl_debug_printf("dissect_ssl3_record decrypted len %d\n", decrypted->data_len);
              
              /* create new tvbuff for the decrypted data */
-             tvbuff_t* new_tvb = tvb_new_real_data(decrypted->data, 
+             new_tvb = tvb_new_real_data(decrypted->data, 
                  decrypted->data_len, decrypted->data_len);
              tvb_set_free_cb(new_tvb, g_free);
              //tvb_set_child_real_data_tvbuff(tvb, new_tvb);
@@ -4173,10 +4175,11 @@ void
 proto_reg_handoff_ssl(void)
 {
     dissector_handle_t ssl_handle;
+    dissector_table_t tcp_dissectors;
 
     ssl_handle = find_dissector("ssl");
     
-    dissector_table_t tcp_dissectors = find_dissector_table( "tcp.port");
+    tcp_dissectors = find_dissector_table( "tcp.port");
     if (tcp_dissectors)
     {
         ssl_associations[0].handle = dissector_get_port_handle(tcp_dissectors, 80);