summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-06-16 14:17:24 -0400
committerMatt Caswell <matt@openssl.org>2015-09-02 00:16:30 +0100
commit27bc0555aa4f5f95a54bef79ecc20b0655bb6451 (patch)
tree95404d6a51b7b5c71ff6efe4a698f9ec11adda8f
parent1cbe0ff56900126fbf67ff03b1fd2e84c2a61f69 (diff)
downloadopenssl-new-27bc0555aa4f5f95a54bef79ecc20b0655bb6451.tar.gz
Fix building with OPENSSL_NO_TLSEXT.
Builds using no-tlsext in 1.0.0 and 0.9.8 are broken. This commit fixes the issue. The same commit is applied to 1.0.1 and 1.0.2 branches for code consistency. However this commit will not fix no-tlsext in those branches which have always been broken for other reasons. The commit is not applied to master at all, because no-tlsext has been completely removed from that branch. Based on a patch by Marc Branchaud <marcnarc@xiplink.com> Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 9a931208d7fc8a3596dda005cdbd6439938f01b0) Conflicts: ssl/ssl_sess.c
-rw-r--r--ssl/ssl_sess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index e1695ab406..51c02dc9ed 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -156,8 +156,8 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
dest->ciphers = NULL;
#ifndef OPENSSL_NO_TLSEXT
dest->tlsext_hostname = NULL;
-#endif
dest->tlsext_tick = NULL;
+#endif
memset(&dest->ex_data, 0, sizeof(dest->ex_data));
/* We deliberately don't copy the prev and next pointers */
@@ -190,7 +190,6 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
goto err;
}
}
-#endif
if (ticket != 0) {
dest->tlsext_tick = BUF_memdup(src->tlsext_tick, src->tlsext_ticklen);
@@ -200,6 +199,7 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
dest->tlsext_tick_lifetime_hint = 0;
dest->tlsext_ticklen = 0;
}
+#endif
return dest;
err: