diff options
author | Matt Caswell <matt@openssl.org> | 2016-11-18 16:34:01 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-12-05 17:05:40 +0000 |
commit | 3171bad66e461052e584e1628693db67b990e94e (patch) | |
tree | 9e453c5ad0a658d5717ef9750da9e368a1147d0c /ssl/packet_locl.h | |
parent | c53f7355b93885d1f12237f94b363ad747f03dad (diff) | |
download | openssl-new-3171bad66e461052e584e1628693db67b990e94e.tar.gz |
Add an ability to find out the current write location from a WPACKET
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/packet_locl.h')
-rw-r--r-- | ssl/packet_locl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ssl/packet_locl.h b/ssl/packet_locl.h index 4658734bd8..61233d9b6a 100644 --- a/ssl/packet_locl.h +++ b/ssl/packet_locl.h @@ -728,7 +728,7 @@ int WPACKET_start_sub_packet(WPACKET *pkt); /* * Allocate bytes in the WPACKET for the output. This reserves the bytes * and counts them as "written", but doesn't actually do the writing. A pointer - * to the allocated bytes is stored in |*allocbytes|. + * to the allocated bytes is stored in |*allocbytes|. |allocbytes| may be NULL. * WARNING: the allocated bytes must be filled in immediately, without further * WPACKET_* calls. If not then the underlying buffer may be realloc'd and * change its location. @@ -854,6 +854,12 @@ int WPACKET_get_total_written(WPACKET *pkt, size_t *written); */ int WPACKET_get_length(WPACKET *pkt, size_t *len); +/* + * Returns a pointer to the current write location, but does not allocate any + * bytes. + */ +unsigned char *WPACKET_get_curr(WPACKET *pkt); + /* Release resources in a WPACKET if a failure has occurred. */ void WPACKET_cleanup(WPACKET *pkt); |