diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-11-12 16:49:56 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-11-12 17:47:32 +0000 |
commit | 2b03b41bd0a894576b59c2dc6bf1d581c970cf16 (patch) | |
tree | 63a835e4ee0c8790dcfbdc5d8741898db6baebce /epan | |
parent | d283939303f9ebad95ccd845930417f18851c6b9 (diff) |
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 <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ssl-utils.h | 6 |
2 files changed, 7 insertions, 1 deletions
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); |