Wireshark-dev: [Wireshark-dev] Code sharing between TLS and DTLS
From: Hauke Mehrtens <[email protected]>
Date: Wed, 15 May 2013 17:02:24 +0200
The DTLS rfc6347 describes just the differences to tls (ssl) and these
two protocols are very similar. Currently the wireshark dissectors for
tls and dtls are not sharing much code, just at little in ssl-utils.c.

I did some improvements for the DTLS dissector and much of this was
copying the code from tls and doing some small modifications to it. I
would like to place more code like the parsing of a some handshake
messages to ssl-utils.c, so the code is shared between the dissectors.
At first I want to copy dissect_ssl3_hnd_cert_req() to ssl-utils.c and
use it also in dtls. What is the best way to do this? Are there any
examples? I saw that a similar thing was done with the x509 certificates
in the tls handshake.