summaryrefslogtreecommitdiff
path: root/main/openssl/ssl/ssl_sess.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/openssl/ssl/ssl_sess.c')
-rw-r--r--main/openssl/ssl/ssl_sess.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/openssl/ssl/ssl_sess.c b/main/openssl/ssl/ssl_sess.c
index 920b763e..ec088404 100644
--- a/main/openssl/ssl/ssl_sess.c
+++ b/main/openssl/ssl/ssl_sess.c
@@ -427,6 +427,18 @@ int ssl_get_new_session(SSL *s, int session)
}
#endif
#endif
+#ifndef OPENSSL_NO_PSK
+ if (s->psk_identity_hint)
+ {
+ ss->psk_identity_hint = BUF_strdup(s->psk_identity_hint);
+ if (ss->psk_identity_hint == NULL)
+ {
+ SSLerr(SSL_F_SSL_GET_NEW_SESSION, ERR_R_MALLOC_FAILURE);
+ SSL_SESSION_free(ss);
+ return 0;
+ }
+ }
+#endif
}
else
{