Skip to content

Comments

Run ssl_test_new in fips#11511

Closed
mattcaswell wants to merge 10 commits intoopenssl:masterfrom
mattcaswell:run-ssl_test_new_in-fips
Closed

Run ssl_test_new in fips#11511
mattcaswell wants to merge 10 commits intoopenssl:masterfrom
mattcaswell:run-ssl_test_new_in-fips

Conversation

@mattcaswell
Copy link
Member

We run ssl_test_new three times:

  • once with a default library context and no providers explicitly loaded
  • once with a non-default library context with the default provider loaded into it, and
  • once with a non-default library context with the FIPS provider loaded into it.

In both of the latter two cases we load the "null" provider into the default context to make sure we don't accidentally pick up algorithms from there.

We do the run with a default library context because there are some tests which only work in that configuration at the moment. Namely any which involve an RSA PSS cert/key - because we do not have provider support for that at the moment. Eventually I expect we can dispense with that run and just do the second two runs.

These tests will fail since they require all the key gen PRs to be merged first as well as #11494 and #11507 (and I have not included them here). However, aside from the dependencies this should be fairly complete and can be reviewed.

@mattcaswell mattcaswell added branch: master Applies to master branch approval: review pending This pull request needs review by a committer labels Apr 9, 2020
This was referenced Apr 10, 2020
Copy link
Member

@slontis slontis Apr 13, 2020

Choose a reason for hiding this comment

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

Will this be re-enabled at some point for FIPS_MODE? If so maybe TODO(3.0) it?
Ahh ok NO TLS 1.1 support for FIPS MODE..

Copy link
Member

Choose a reason for hiding this comment

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

TODO(3.0)?

Copy link
Member

@slontis slontis Apr 13, 2020

Choose a reason for hiding this comment

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

This reordering sure makes this a lot harder to figure out what changed in this file.. Looks ok from what I can tell.

Copy link
Member

@slontis slontis left a comment

Choose a reason for hiding this comment

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

Looks ok to me..
Maybe add a few more #TODO(3.0)
I would probably add the comment that TLS 1.1 is not supported in FIPS MODE to the commit.

@levitte
Copy link
Member

levitte commented Apr 16, 2020

You might want to edit the subject, as #11328, #11303, #11332, and #11494 are now merged

@mattcaswell mattcaswell changed the title [WIP, pending on #11328, #11303, #11332, #11371, #11494, #11507]: Run ssl_test_new in fips [WIP, pending on #11371, #11507]: Run ssl_test_new in fips Apr 16, 2020
@mattcaswell
Copy link
Member Author

You might want to edit the subject, as #11328, #11303, #11332, and #11494 are now merged

Done

@mattcaswell
Copy link
Member Author

Fixups pushed. Please take another look.

@levitte
Copy link
Member

levitte commented Apr 16, 2020

Looks much more sane from a perl perspective

@levitte levitte changed the title [WIP, pending on #11371, #11507]: Run ssl_test_new in fips [WIP, pending on #11371]: Run ssl_test_new in fips Apr 16, 2020
Copy link
Contributor

@paulidale paulidale left a comment

Choose a reason for hiding this comment

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

The TODOs in test/ssl-tests/20-cert-select.cnf.in and test/ssl-tests/28-seclevel.cnf.in are possible once #11371 is in and this PR already depends on that. We should probably fix them before pushing this, although it isn't critical.

Otherwise, I'd approve subject to #11371 going in first and the CIs here working.

@slontis
Copy link
Member

slontis commented Apr 17, 2020

Woohoo.. No longer pending on #11371

@mattcaswell mattcaswell changed the title [WIP, pending on #11371]: Run ssl_test_new in fips [Pending on #11508]: Run ssl_test_new in fips Apr 17, 2020
@mattcaswell mattcaswell force-pushed the run-ssl_test_new_in-fips branch from eec4b32 to 52226ef Compare April 17, 2020 13:02
@mattcaswell
Copy link
Member Author

Rebased now that #11371 has been merged. I have had to include the same libssl fixup commit that I've added to #11508 here, in order to get the tests to pass.

Please don't review the libssl changes in this PR. Please provide any review comments on that aspect in #11508 instead.

I've taken this out of WIP, although it cannot now be pushed until #11508 goes in.

@mattcaswell
Copy link
Member Author

Fixup push addressing @paulidale's comment above.

@paulidale
Copy link
Contributor

Travis looks unhappy :(

@slontis
Copy link
Member

slontis commented Apr 18, 2020

This also needs the no_fips checks added to the .t file.
There seems to be some other issues with these tests.

@mattcaswell
Copy link
Member Author

Fixups pushed hopefully addressing the Travis failures.

I've applied a similar fix to the one that @slontis applied to #11135

There's also a fix to ssl3_cbc_digest_record in libssl to make sure we use fetched digests where applicable. So now the fixes related to ssl3_cbc_digest_record in libssl should be reviewed - but the other changes in libssl remain out of scope of this PR (review them in #11508)

@mattcaswell
Copy link
Member Author

Darn - travis was still not happy. Another fixup pushed.

@mattcaswell
Copy link
Member Author

Sigh. Third time lucky...another fixup.

@mattcaswell
Copy link
Member Author

Travis is green!!

@slontis slontis removed the approval: review pending This pull request needs review by a committer label Apr 19, 2020
@slontis slontis added the approval: done This pull request has the required number of approvals label Apr 19, 2020
We also prepare the way for a future commit to run ssl_test_new with
just the FIPS provider loaded.
…ders

We now run the tests twice: Once with no specific providers loaded and
just using the default libctx, and a second time with a non-default libctx
and the default provider.

In the second run we disable tests which use a PSS cert/key because we
don't yet have support for that.
We load the FIPS module and make sure it is configured before running
the ssl_test_new tests.
HMACs used via the legacy EVP_DigestSign interface are strange in
that they use legacy codepath's which eventually (under the covers)
transform the operation into a new style EVP_MAC. This can mean the
digest in use can be a legacy one, so we need to be careful with any
digest we extract from the ctx.
@mattcaswell mattcaswell force-pushed the run-ssl_test_new_in-fips branch from f307c3f to 66ae5d3 Compare April 19, 2020 13:57
@mattcaswell mattcaswell changed the title [Pending on #11508]: Run ssl_test_new in fips Run ssl_test_new in fips Apr 19, 2020
@mattcaswell
Copy link
Member Author

Rebased now that #11508 has gone in. No other changes were made.

@mattcaswell
Copy link
Member Author

@levitte - I would prefer to push this as is, and modify the fipsinstall stuff with a follow on PR since this PR is now otherwise ready-to-merge.

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@levitte
Copy link
Member

levitte commented Apr 20, 2020

with a follow on PR

Okie

@mattcaswell mattcaswell 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 Apr 20, 2020
openssl-machine pushed a commit that referenced this pull request Apr 20, 2020
We also prepare the way for a future commit to run ssl_test_new with
just the FIPS provider loaded.

Reviewed-by: Shane Lontis <[email protected]>
(Merged from #11511)
openssl-machine pushed a commit that referenced this pull request Apr 20, 2020
…ders

We now run the tests twice: Once with no specific providers loaded and
just using the default libctx, and a second time with a non-default libctx
and the default provider.

In the second run we disable tests which use a PSS cert/key because we
don't yet have support for that.

Reviewed-by: Shane Lontis <[email protected]>
(Merged from #11511)
openssl-machine pushed a commit that referenced this pull request Apr 20, 2020
We load the FIPS module and make sure it is configured before running
the ssl_test_new tests.

Reviewed-by: Shane Lontis <[email protected]>
(Merged from #11511)
openssl-machine pushed a commit that referenced this pull request Apr 20, 2020
HMACs used via the legacy EVP_DigestSign interface are strange in
that they use legacy codepath's which eventually (under the covers)
transform the operation into a new style EVP_MAC. This can mean the
digest in use can be a legacy one, so we need to be careful with any
digest we extract from the ctx.

Reviewed-by: Shane Lontis <[email protected]>
(Merged from #11511)
@mattcaswell
Copy link
Member Author

Pushed. Thanks!

@mattcaswell
Copy link
Member Author

I would prefer to push this as is, and modify the fipsinstall stuff with a follow on PR since this PR is now otherwise ready-to-merge.

#11580

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.

5 participants