Address WPACKET review comments
A few style tweaks here and there. The main change is that curr and
packet_len are now offsets into the buffer to account for the fact that
the pointers can change if the buffer grows. Also dropped support for the
WPACKET_set_packet_len() function. I thought that was going to be needed
but so far it hasn't been. It doesn't really work any more due to the
offsets change.
Reviewed-by: Rich Salz <rsalz@openssl.org>
diff --git a/ssl/t1_ext.c b/ssl/t1_ext.c
index cf4f5b0..664906c 100644
--- a/ssl/t1_ext.c
+++ b/ssl/t1_ext.c
@@ -172,7 +172,7 @@
}
if (!WPACKET_put_bytes(pkt, meth->ext_type, 2)
- || !WPACKET_start_sub_packet_len(pkt, 2)
+ || !WPACKET_start_sub_packet_u16(pkt)
|| (outlen > 0 && !WPACKET_memcpy(pkt, out, outlen))
|| !WPACKET_close(pkt)) {
*al = SSL_AD_INTERNAL_ERROR;