aboutsummaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorPiotr Sikora <piotr@cloudflare.com>2013-11-13 15:20:22 -0800
committerDr. Stephen Henson <steve@openssl.org>2013-11-14 01:20:12 +0000
commit2911575c6e790541e495927a60121d7546a66962 (patch)
treef41125d3a9c716eb9a0f0e33d34930c4c9dd48e2 /apps/s_server.c
parentafa23c46d966fc3862804612be999d403a755cd7 (diff)
downloadopenssl-2911575c6e790541e495927a60121d7546a66962.tar.gz
Fix compilation with no-nextprotoneg.
PR#3106
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index c4fe72dba0..1bac3b438f 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1066,9 +1066,9 @@ int MAIN(int argc, char *argv[])
# ifndef OPENSSL_NO_NEXTPROTONEG
const char *next_proto_neg_in = NULL;
tlsextnextprotoctx next_proto = { NULL, 0};
+# endif
const char *alpn_in = NULL;
tlsextalpnctx alpn_ctx = { NULL, 0};
-# endif
#endif
#ifndef OPENSSL_NO_PSK
/* by default do not send a PSK identity hint */
@@ -1525,12 +1525,12 @@ int MAIN(int argc, char *argv[])
if (--argc < 1) goto bad;
next_proto_neg_in = *(++argv);
}
+# endif
else if (strcmp(*argv,"-alpn") == 0)
{
if (--argc < 1) goto bad;
alpn_in = *(++argv);
}
-# endif
#endif
#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK)
else if (strcmp(*argv,"-jpake") == 0)
@@ -2159,8 +2159,10 @@ end:
EVP_PKEY_free(s_key2);
if (serverinfo_in != NULL)
BIO_free(serverinfo_in);
+# ifndef OPENSSL_NO_NEXTPROTONEG
if (next_proto.data)
OPENSSL_free(next_proto.data);
+# endif
if (alpn_ctx.data)
OPENSSL_free(alpn_ctx.data);
#endif