Simplify new session ticket encoding/generation.
authorjsing <jsing@openbsd.org>
Mon, 27 Aug 2018 16:42:48 +0000 (16:42 +0000)
committerjsing <jsing@openbsd.org>
Mon, 27 Aug 2018 16:42:48 +0000 (16:42 +0000)
commit12fe7be032d9773f215e29e6d37815f9da949ef4
tree33fcf1260ddbe801064b1a3132062a275bf19662
parent222039ef54a3dbed6db338fea9c70e3ff35d45f7
Simplify new session ticket encoding/generation.

The original code did a crazy encode/malloc/encode/decode/modify/encode
dance, in order to encode a session in the form needed to encrypt then add
to a session ticket. By modifying the encoding functions slightly, we can
do this entire dance as a single encode.

Inspired by similar changes in BoringSSL.

ok inoguchi@ tb@
lib/libssl/ssl_asn1.c
lib/libssl/ssl_locl.h
lib/libssl/ssl_srvr.c