From 2b03b41bd0a894576b59c2dc6bf1d581c970cf16 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Sun, 12 Nov 2017 16:49:56 +0100 Subject: ssl-utils: Add export ssl_data_alloc For reuse on QUIC dissector Change-Id: I005fc3fe7a559fdb7a62e3d40450a4a6b25bf2f5 Reviewed-on: https://code.wireshark.org/review/24383 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-ssl-utils.c | 2 +- epan/dissectors/packet-ssl-utils.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index e5cedb6456..96e4e76c58 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -1780,7 +1780,7 @@ gint ssl_get_keyex_alg(gint cipher) /* StringInfo structure (len + data) functions {{{ */ -static gint +gint ssl_data_alloc(StringInfo* str, size_t len) { str->data = (guchar *)g_malloc(len); diff --git a/epan/dissectors/packet-ssl-utils.h b/epan/dissectors/packet-ssl-utils.h index 508d7c96ab..130f48bc40 100644 --- a/epan/dissectors/packet-ssl-utils.h +++ b/epan/dissectors/packet-ssl-utils.h @@ -569,6 +569,12 @@ ssl_find_appdata_dissector(const char *name); extern void ssl_data_set(StringInfo* buf, const guchar* src, guint len); +/** alloc the data with the specified len for the stringInfo buffer. + @param src the data source + @param len the source data len */ +extern gint +ssl_data_alloc(StringInfo* str, size_t len); + extern gint ssl_cipher_setiv(SSL_CIPHER_CTX *cipher, guchar* iv, gint iv_len); -- cgit v1.2.3