Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incomplete no-nextprotoneg build option #757

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/s_client.c
Expand Up @@ -1311,9 +1311,11 @@ int s_client_main(int argc, char **argv)
goto end;
}
break;
#ifndef OPENSSL_NO_NEXTPROTONEG
case OPT_NEXTPROTONEG:
next_proto_neg_in = opt_arg();
break;
#endif
case OPT_ALPN:
alpn_in = opt_arg();
break;
Expand Down
2 changes: 2 additions & 0 deletions ssl/t1_ext.c
Expand Up @@ -272,7 +272,9 @@ int SSL_extension_supported(unsigned int ext_type)
case TLSEXT_TYPE_ec_point_formats:
case TLSEXT_TYPE_elliptic_curves:
case TLSEXT_TYPE_heartbeat:
#ifndef OPENSSL_NO_NEXTPROTONEG
case TLSEXT_TYPE_next_proto_neg:
#endif
case TLSEXT_TYPE_padding:
case TLSEXT_TYPE_renegotiate:
case TLSEXT_TYPE_server_name:
Expand Down
1 change: 1 addition & 0 deletions util/mk1mf.pl
Expand Up @@ -304,6 +304,7 @@
$cflags.=" -DOPENSSL_NO_ASYNC" if $no_async;
$cflags.=" -DOPENSSL_NO_AUTOALGINIT" if $no_autoalginit;
$cflags.=" -DOPENSSL_NO_AUTOERRINIT" if $no_autoerrinit;
$cflags.=" -DOPENSSL_NO_NEXTPROTONEG" if $no_nextprotoneg;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this change is required as this definition gets generated in include/openssl/opensslconf.h

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@levitte probably knows this better, but I think it also requires a change in the valid_options

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are both correct. Toss the $cflags.=... line, but add this in %valid_options:

        "no-nextprotoneg" => 0,

$cflags.=" -DOPENSSL_FIPS" if $fips;
$cflags.=" -DOPENSSL_NO_EC2M" if $no_ec2m;
$cflags.= " -DZLIB" if $zlib_opt;
Expand Down