aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/s3_clnt.c
diff options
context:
space:
mode:
authorMike DePaulo <mikedep333@gmail.com>2015-07-10 08:13:00 -0400
committerMike DePaulo <mikedep333@gmail.com>2015-07-10 08:23:07 -0400
commitca7b8d357638d3f7d22b5df91e325022f3517368 (patch)
treea6f0421e63b9efc3f9036f86e27b1bfe96fc9121 /openssl/ssl/s3_clnt.c
parentab75afbcc58c927654b75d8b3c179f423e38cfbd (diff)
downloadvcxsrv-ca7b8d357638d3f7d22b5df91e325022f3517368.tar.gz
vcxsrv-ca7b8d357638d3f7d22b5df91e325022f3517368.tar.bz2
vcxsrv-ca7b8d357638d3f7d22b5df91e325022f3517368.zip
Update openssl: 1.0.1o -> 1.0.1p
Diffstat (limited to 'openssl/ssl/s3_clnt.c')
-rw-r--r--openssl/ssl/s3_clnt.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/openssl/ssl/s3_clnt.c b/openssl/ssl/s3_clnt.c
index 0879a0f8b..35ad1217a 100644
--- a/openssl/ssl/s3_clnt.c
+++ b/openssl/ssl/s3_clnt.c
@@ -1381,8 +1381,6 @@ int ssl3_get_key_exchange(SSL *s)
#ifndef OPENSSL_NO_PSK
if (alg_k & SSL_kPSK) {
- char tmp_id_hint[PSK_MAX_IDENTITY_LEN + 1];
-
param_len = 2;
if (param_len > n) {
SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE, SSL_R_LENGTH_TOO_SHORT);
@@ -1408,17 +1406,8 @@ int ssl3_get_key_exchange(SSL *s)
}
param_len += i;
- /*
- * If received PSK identity hint contains NULL characters, the hint
- * is truncated from the first NULL. p may not be ending with NULL,
- * so create a NULL-terminated string.
- */
- memcpy(tmp_id_hint, p, i);
- memset(tmp_id_hint + i, 0, PSK_MAX_IDENTITY_LEN + 1 - i);
- if (s->ctx->psk_identity_hint != NULL)
- OPENSSL_free(s->ctx->psk_identity_hint);
- s->ctx->psk_identity_hint = BUF_strdup(tmp_id_hint);
- if (s->ctx->psk_identity_hint == NULL) {
+ s->session->psk_identity_hint = BUF_strndup((char *)p, i);
+ if (s->session->psk_identity_hint == NULL) {
al = SSL_AD_HANDSHAKE_FAILURE;
SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE, ERR_R_MALLOC_FAILURE);
goto f_err;
@@ -2951,7 +2940,7 @@ int ssl3_send_client_key_exchange(SSL *s)
}
memset(identity, 0, sizeof(identity));
- psk_len = s->psk_client_callback(s, s->ctx->psk_identity_hint,
+ psk_len = s->psk_client_callback(s, s->session->psk_identity_hint,
identity, sizeof(identity) - 1,
psk_or_pre_ms,
sizeof(psk_or_pre_ms));