Skip to content

s_client, s_server: do generic SSL configuration first, specialization after - #5679

Closed
levitte wants to merge 2 commits into
openssl:masterfrom
levitte:fix-s_progs-20180319
Closed

levitte wants to merge 2 commits into
openssl:masterfrom
levitte:fix-s_progs-20180319

Conversation

@levitte

@levitte levitte commented Mar 19, 2018

Copy link
Copy Markdown
Member

We did the SSL_CONF_cmd() pass last of all things that could affect
the SSL ctx. However, the results of this, for example:

-max_protocol TLSv1.3 -tls1_2

... would mean that the protocol min got set to TLSv1.2 and the
protocol max to TLSv1.3, when they should clearly both be TLSv1.2.

However, if we see the SSL_CONF_cmd() switches as generic and those
internal to s_client and s_server as specialisations, we get something
that makes a little more sense.

…n after

We did the SSL_CONF_cmd() pass last of all things that could affect
the SSL ctx.  However, the results of this, for example:

    -max_protocol TLSv1.3 -tls1_2

... would mean that the protocol min got set to TLSv1.2 and the
protocol max to TLSv1.3, when they should clearly both be TLSv1.2.

However, if we see the SSL_CONF_cmd() switches as generic and those
internal to s_client and s_server as specialisations, we get something
that makes a little more sense.
@levitte levitte added branch: master Applies to master branch 1.1.0 labels Mar 19, 2018
@levitte

levitte commented Mar 19, 2018

Copy link
Copy Markdown
Member Author

Another way to handle this would be to view every setting of protocol version min and max as a refinement of whatever was set before in the same SSL ctx. In other words, one could have ssl_set_version_bound set the new version as long as it's within the min and max already set. I was unsure about the implications of such a solution, so I went for this instead, which is frankly kind of half baked. If you prefer, I can still make a PR for the ssl_set_version_bound solution instead...

@mattcaswell mattcaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved assuming the CIs pass

@levitte levitte mentioned this pull request Mar 19, 2018
2 tasks done
@mattcaswell

Copy link
Copy Markdown
Member

Another way to handle this would be to view every setting of protocol version min and max as a refinement of whatever was set before in the same SSL ctx. In other words, one could have ssl_set_version_bound set the new version as long as it's within the min and max already set. I was unsure about the implications of such a solution, so I went for this instead, which is frankly kind of half baked. If you prefer, I can still make a PR for the ssl_set_version_bound solution instead...

Lets get travis fixed first and take our time to consider your alternative solution

@levitte

levitte commented Mar 19, 2018

Copy link
Copy Markdown
Member Author

The CIs seem to be quite slugish for the moment... :-/

@levitte

levitte commented Mar 19, 2018

Copy link
Copy Markdown
Member Author

Ah, I found a small fault. If no -tlsx_y is given, the min and max versions are reset to zero no matter what. Fixup coming up

@levitte

levitte commented Mar 19, 2018

Copy link
Copy Markdown
Member Author

CIs are happy

levitte added a commit that referenced this pull request Mar 19, 2018
…n after

We did the SSL_CONF_cmd() pass last of all things that could affect
the SSL ctx.  However, the results of this, for example:

    -max_protocol TLSv1.3 -tls1_2

... would mean that the protocol min got set to TLSv1.2 and the
protocol max to TLSv1.3, when they should clearly both be TLSv1.2.

However, if we see the SSL_CONF_cmd() switches as generic and those
internal to s_client and s_server as specialisations, we get something
that makes a little more sense.

Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #5679)
levitte added a commit that referenced this pull request Mar 19, 2018
…n after

We did the SSL_CONF_cmd() pass last of all things that could affect
the SSL ctx.  However, the results of this, for example:

    -max_protocol TLSv1.3 -tls1_2

... would mean that the protocol min got set to TLSv1.2 and the
protocol max to TLSv1.3, when they should clearly both be TLSv1.2.

However, if we see the SSL_CONF_cmd() switches as generic and those
internal to s_client and s_server as specialisations, we get something
that makes a little more sense.

Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #5679)

(cherry picked from commit 8f8be10)
@mattcaswell

Copy link
Copy Markdown
Member

Pushed to master and 1.1.0.

@levitte
levitte deleted the fix-s_progs-20180319 branch July 8, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants