Fix compilation with no-nextprotoneg.
PR#3106
This commit is contained in:

committed by
Dr. Stephen Henson

parent
ff0bdbed85
commit
edc687ba0f
@@ -2890,7 +2890,7 @@ void jpake_server_auth(BIO *out, BIO *conn, const char *secret)
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
/* next_protos_parse parses a comma separated list of strings into a string
|
||||
* in a format suitable for passing to SSL_CTX_set_next_protos_advertised.
|
||||
* outlen: (output) set to the length of the resulting buffer on success.
|
||||
@@ -2932,7 +2932,7 @@ unsigned char *next_protos_parse(unsigned short *outlen, const char *in)
|
||||
*outlen = len + 1;
|
||||
return out;
|
||||
}
|
||||
#endif /* !OPENSSL_NO_TLSEXT && !OPENSSL_NO_NEXTPROTONEG */
|
||||
#endif /* ndef OPENSSL_NO_TLSEXT */
|
||||
|
||||
void print_cert_checks(BIO *bio, X509 *x,
|
||||
const unsigned char *checkhost,
|
||||
|
@@ -337,9 +337,9 @@ void jpake_client_auth(BIO *out, BIO *conn, const char *secret);
|
||||
void jpake_server_auth(BIO *out, BIO *conn, const char *secret);
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
unsigned char *next_protos_parse(unsigned short *outlen, const char *in);
|
||||
#endif /* !OPENSSL_NO_TLSEXT && !OPENSSL_NO_NEXTPROTONEG */
|
||||
#endif /* ndef OPENSSL_NO_TLSEXT */
|
||||
|
||||
void print_cert_checks(BIO *bio, X509 *x,
|
||||
const unsigned char *checkhost,
|
||||
|
@@ -368,8 +368,8 @@ static void sc_usage(void)
|
||||
BIO_printf(bio_err," -proof_debug - request an audit proof and print its hex dump\n");
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
BIO_printf(bio_err," -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list)\n");
|
||||
BIO_printf(bio_err," -alpn arg - enable ALPN extension, considering named protocols supported (comma-separated list)\n");
|
||||
# endif
|
||||
BIO_printf(bio_err," -alpn arg - enable ALPN extension, considering named protocols supported (comma-separated list)\n");
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
BIO_printf(bio_err," -serverinfo types - send empty ClientHello extensions (comma-separated numbers)\n");
|
||||
#endif
|
||||
@@ -642,8 +642,8 @@ int MAIN(int argc, char **argv)
|
||||
{NULL,0};
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
const char *next_proto_neg_in = NULL;
|
||||
const char *alpn_in = NULL;
|
||||
# endif
|
||||
const char *alpn_in = NULL;
|
||||
# define MAX_SI_TYPES 100
|
||||
unsigned short serverinfo_types[MAX_SI_TYPES];
|
||||
int serverinfo_types_count = 0;
|
||||
@@ -1001,12 +1001,12 @@ static char *jpake_secret = NULL;
|
||||
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
|
||||
else if (strcmp(*argv,"-serverinfo") == 0)
|
||||
{
|
||||
char *c;
|
||||
@@ -2305,6 +2305,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
BIO_write(bio, proto, proto_len);
|
||||
BIO_write(bio, "\n", 1);
|
||||
}
|
||||
# endif
|
||||
{
|
||||
const unsigned char *proto;
|
||||
unsigned int proto_len;
|
||||
@@ -2318,7 +2319,6 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
else
|
||||
BIO_printf(bio, "No ALPN negotiated\n");
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
{
|
||||
|
@@ -1025,9 +1025,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 */
|
||||
@@ -1477,12 +1477,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)
|
||||
@@ -2101,8 +2101,10 @@ end:
|
||||
BIO_free(authz_in);
|
||||
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
|
||||
|
Reference in New Issue
Block a user