diff options
author | Todd Short <tshort@akamai.com> | 2017-04-05 12:35:25 -0400 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-02 09:44:43 +0100 |
commit | c649d10d3fee9fe22e4ae6bdf7f8117b91b92b03 (patch) | |
tree | e72effbded8ac2531b21ead7c2d95ee26d1652cc /ssl/packet.c | |
parent | 20ee2bf138323c6688b6e8d71d695cf2bd53f857 (diff) |
TLS1.3 Padding
Add padding callback for application control
Standard block_size callback
Documentation and tests included
Configuration file/s_client/s_srver option
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3130)
Diffstat (limited to 'ssl/packet.c')
-rw-r--r-- | ssl/packet.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ssl/packet.c b/ssl/packet.c index 3479f1fed8..d081f557e7 100644 --- a/ssl/packet.c +++ b/ssl/packet.c @@ -350,6 +350,21 @@ int WPACKET_set_max_size(WPACKET *pkt, size_t maxsize) return 1; } +int WPACKET_memset(WPACKET *pkt, int ch, size_t len) +{ + unsigned char *dest; + + if (len == 0) + return 1; + + if (!WPACKET_allocate_bytes(pkt, len, &dest)) + return 0; + + memset(dest, ch, len); + + return 1; +} + int WPACKET_memcpy(WPACKET *pkt, const void *src, size_t len) { unsigned char *dest; |