From 3b924fdf65e0d560011b5636269f7b5fb080b9b2 Mon Sep 17 00:00:00 2001 From: kukosa Date: Thu, 13 Aug 2009 09:07:03 +0000 Subject: Fix SSL decryption failure if client and server have the same TCP port git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29400 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-ssl-utils.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'epan/dissectors/packet-ssl-utils.h') diff --git a/epan/dissectors/packet-ssl-utils.h b/epan/dissectors/packet-ssl-utils.h index 67b48b2542..a6556faf7d 100644 --- a/epan/dissectors/packet-ssl-utils.h +++ b/epan/dissectors/packet-ssl-utils.h @@ -307,6 +307,10 @@ typedef struct _SslDecryptSession { guint16 version_netorder; StringInfo app_data_segment; + address srv_addr; + port_type srv_ptype; + guint srv_port; + } SslDecryptSession; typedef struct _SslAssociation { @@ -339,6 +343,10 @@ ssl_lib_init(void); extern void ssl_session_init(SslDecryptSession* ssl); +/** Set server address and port */ +extern void +ssl_set_server(SslDecryptSession* ssl, address *addr, port_type ptype, guint32 port); + /** set the data and len for the stringInfo buffer. buf should be big enough to * contain the provided data @param buf the buffer to update @@ -364,6 +372,10 @@ ssl_load_pkcs12(FILE* fp, const gchar *cert_passwd); extern void ssl_free_key(Ssl_private_key_t* key); +/* Find private key in associations */ +extern gint +ssl_find_private_key(SslDecryptSession *ssl_session, GHashTable *key_hash, GTree* associations, packet_info *pinfo); + /* Search for the specified cipher souite id @param num the id of the cipher suite to be searched @param cs pointer to the cipher suite struct to be filled @@ -440,7 +452,7 @@ extern gint ssl_assoc_from_key_list(gpointer key _U_, gpointer data, gpointer user_data); extern gint -ssl_packet_from_server(GTree* associations, guint port, gboolean tcp); +ssl_packet_from_server(SslDecryptSession* ssl, GTree* associations, packet_info *pinfo); /* add to packet data a newly allocated tvb with the specified real data*/ extern void -- cgit v1.2.3