Skip to content

Add ssl_ctx_test to test suite.#10337

Closed
richsalz wants to merge 1 commit intoopenssl:masterfrom
richsalz:test_ssl_ctx
Closed

Add ssl_ctx_test to test suite.#10337
richsalz wants to merge 1 commit intoopenssl:masterfrom
richsalz:test_ssl_ctx

Conversation

@richsalz
Copy link
Contributor

@richsalz richsalz commented Nov 2, 2019

Did anyone try to build #6553? :)
And then run it? :(

This PR makes the test program compile. But it fails. What to do?
Ping the guilty parties: @paulidale, @levitte, @tiran.

@levitte
Copy link
Member

levitte commented Nov 2, 2019

Yup, I have run it, and think that's valuable to figure out what we do right or wrong. TDD (Test Driven Development) is a thing that we sometimes do too little of.

So basically, either the ssl code isn't quite right, or the test isn't. Fixing one or the other based on the results shown in this PR should spark another PR or two.

@richsalz
Copy link
Contributor Author

richsalz commented Nov 2, 2019

TDD is for branches, not master, IMO. :)

@levitte
Copy link
Member

levitte commented Nov 2, 2019

Feature branches, yeah. But that's what I'm saying, the presence of this failing test, even though "just" in a PR, may be reason for someone wanting to fix the problem. Quite obviously, the fixing branch will have to be merged before this test is, to not disturb the nice green colour of master builds.

@richsalz
Copy link
Contributor Author

richsalz commented Nov 2, 2019

The "quite obviously" part wasn't clear from your earlier comments.

But WTH, master's been broken for weeks anyway.

@kroeckx
Copy link
Member

kroeckx commented Nov 3, 2019

The error is most likely: #6553 (review)

@kroeckx
Copy link
Member

kroeckx commented Nov 3, 2019

That test made sense for #5127, which tried to change the behaviour, but as pointed out, is not what we wanted.

@levitte
Copy link
Member

levitte commented Nov 3, 2019

So that means we need to make some small adjustment to the test program. Would you be willing to, @kroeckx?

@kroeckx
Copy link
Member

kroeckx commented Nov 3, 2019 via email

@t8m
Copy link
Member

t8m commented Nov 5, 2019

Not just that. Also the expected max value needs to be changed.
The line should be:
{TLS1_2_VERSION, TLS1_1_VERSION, 1, 1, TLS1_2_VERSION, TLS1_1_VERSION}

@t8m
Copy link
Member

t8m commented Nov 5, 2019

@richsalz could you please fix the ssl_ctx_test.c accordingly?

@t8m t8m self-assigned this Nov 5, 2019
@richsalz
Copy link
Contributor Author

richsalz commented Nov 5, 2019

rebased and updated commit pushed. locally-run test passes.

Copy link
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

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

Please also adjust the commit message to somehow describe the ssl_ctx_test.c change - i.e. that setting min version > max version is allowed, just eventually using that context for connections should fail.
Or I can adjust the message when merging.

@richsalz
Copy link
Contributor Author

richsalz commented Nov 5, 2019

not sure what you're asking; feel free to edit the commit message yourself.

@levitte levitte added approval: done This pull request has the required number of approvals and removed approval: omc review pending labels Nov 5, 2019
@t8m t8m added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Nov 7, 2019
openssl-machine pushed a commit that referenced this pull request Nov 8, 2019
Also fix the test as min version > max version is allowed because
the API calls to set min and max versions are separate and there
can be legitimately a temporary situation when the condition is
true even with correctly working application.

The failure in this condition will be detected only during
a handshake attempt.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from #10337)
@t8m
Copy link
Member

t8m commented Nov 8, 2019

Merged to master as 3105535

@t8m t8m closed this Nov 8, 2019
@richsalz richsalz deleted the test_ssl_ctx branch November 8, 2019 14:13
liljaq added a commit to archive-br-automation-com/openssl-ar-dev that referenced this pull request Nov 14, 2024
This reverts commit 89a2668.

The fix is not needed anymore, as the test have been changed to reflect
that min is allowed to be larger than max. See link below for more
information:

openssl#10337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants