Fix PSK handling.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 1 Jul 2015 22:40:03 +0000 (23:40 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 2 Jul 2015 12:04:25 +0000 (13:04 +0100)
commitd6be3124f22870f1888c532523b74ea5d89795eb
treeb3cc1e1d3d4c64376450f9dfe71047507380995e
parenteb0e2a5c5d904c3f74a9387d27bfbad4861469a9
Fix PSK handling.

The PSK identity hint should be stored in the SSL_SESSION structure
and not in the parent context (which will overwrite values used
by other SSL structures with the same SSL_CTX).

Use BUF_strndup when copying identity as it may not be null terminated.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 3c66a669dfc7b3792f7af0758ea26fe8502ce70c)
ssl/s3_clnt.c
ssl/s3_srvr.c