[DO NOT MERGE] Unremove tls files in preparation for the repository merge #384
No reviewers
Labels
No labels
api-spec
bug
CLA requested
CLA valid
compliance
DO NOT MERGE
duplicate
enhancement
feature branch
good first issue
HEADER FORMATTING ISSUE
help wanted
Information
invalid
Jira status: AWAITING REVIEW
Jira status: CLOSED
Jira status: DONE
Jira status: IN PROGRESS
Jira status: IN REVIEW
Jira status: OPEN
Jira status: REOPENED
Jira status: RESOLVED
mirrored
mirror internally
needs: backports
needs: ci
needs: design review
needs: preceding PR
needs: review
needs: work
notabug
open for community contribution
Product Backlog
question
ready for merge
security
stale
type: bug
type: enhancement
type: question
web pages
wontfix
writing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-ARMmbed/mbed-crypto!384
Loading…
Reference in a new issue
No description provided.
Delete branch "unremove-non-crypto"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Revert the commits in mbed-crypto that remove X.509 and TLS files and associated code. Make some additional minor changes to prepare for merging mbed-crypto into mbedtls.
This pull request is not meant to be merged as such. It is a precursor for the repository merge. It will be merged only into mbedtls. See https://github.com/ARMmbed/mbedtls/pull/3078
Reversals
Revert the following commits.
The list is in reverse order of application (each commit is a descendent of the following one). To verify, copy the list and:
They are from the following pull requests:
Additional minor changes
all.shwith the mbedtls one.History
unremove-non-crypto-1was a first set of reversals to see whether this strategy was sensible.unremove-non-crypto-2added a few more reversals and supplemental tweaks after gaining experience from merging the firstunremove-non-crypto-1.unremove-non-crypto-3reverted the same commits asunremove-non-crypto-2, but in reverse chronological order (the previous ones were close to reverse chronological order, but not exactly so). It was missing the supplemental tweaks fromunremove-non-crypto-2.unremove-non-crypto-4isunremove-non-crypto-3rebased on top of a more recentmbed-crypto/development, which some slight changes, plus the supplemental tweaks fromunremove-non-crypto-2and a few more. The slight changes in the reversal are:MBEDTLS_PARAM_FAILEDafter the newer one. This time I only keep the latest version.Goals
This pull request is intended for review purposes only.
This pull request is not intended for merging. The result builds under Linux with
makeorcmakein the default configuration, and the crypto tests pass in the default configuration. Non-default configurations and other platforms may or may not build. X509 and TLS tests are not expected to pass.I'm afraid I'm still seeing the two versions: https://github.com/gilles-peskine-arm/mbed-crypto/blob/unremove-non-crypto-4/include/mbedtls/config.h#L3359 Is git rerere playing tricks on you?
In case it might help others who want to reproduce the unremoval, here's the script I used to reproduce it myself.
I reproduced the unremoval based on the current development branch in mbed-crypto, and compared the result to your branch. All differences were insignificant (ordering of concurrent additions in ordering-insensitive contexts) except for the duplicated paragraph in
config.hmentioned above.I also reviewed the three final commits and I'm happy with them.
I fixed the duplication in
config.h. I couldn't find the problem… I'd just forgotten to push my latest version 🙀In:
Revert "scripts: Remove dependency on NET"
This reverts commit
356acc8.Conflicts:
independently changed in the meantime. Just revert the change done
in the commit that's being reverted.
This is not a line consecutive to a changed line but a line preceding a changed line it seems.
@ronald-cron-arm I don't understand: a line immediately preceding another line is consecutive to it, so in what way is the comment incorrect?
@gilles-peskine-arm Perhaps "adjacent" would be less ambiguous, as "consecutive" seems to imply an idea of one thing following the other (hence coming after it, not before it): https://dictionary.cambridge.org/dictionary/english/consecutive
@ronald-cron-arm Btw I gave more details on my review strategy for an earlier version of this branch here, in case you're interested: https://github.com/ARMmbed/mbedtls/pull/3078#pullrequestreview-367824396
I've been commit by commit through the revert process and conflict resolution. This PR does what it claims to do. I've only minor comments about some commit messages and found a minor error in a cmake file change in a commit but the code containing the error is removed by the next commit.
@ -15,7 +15,7 @@ if(INSTALL_MBEDTLS_HEADERS)commit message: for include/CmakeLists.txt, immediately after, not immediately before
@ -57,8 +57,9 @@#endifNo conflict.
#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) &&
( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_PKCS1_V21) )
#error "MBEDTLS_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites"
#endif
and
#if defined(MBEDTLS_SHA512_NO_SHA384) && !defined(MBEDTLS_SHA512_C)
#error "MBEDTLS_SHA512_NO_SHA384 defined without MBEDTLS_SHA512_C"
#endif
swapped
@ -37,3 +45,3 @@OUTPUT test_suite_${data_name}.cCOMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py -f ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function -d ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.data -t ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function -p ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function -s ${CMAKE_CURRENT_SOURCE_DIR}/suites --helpers-file ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function -o .DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py mbedcrypto ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.dataDEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py mbedtls ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.dataProbably need to remove the final ")" in this line
@ -21,1 +23,4 @@},'config-mini-tls1_1.h' => {'compat' => '-m tls1_1 -f \'^DES-CBC3-SHA$\|^TLS-RSA-WITH-3DES-EDE-CBC-SHA$\'',},Commit message
Rather:
"Keep in the list of configurations 'config-symmetrice-only.h' that was added to the list after the removal of the configurations that are added back by this revert."?
I changed "consecutive" by "adjacent".
@ -57,8 +57,9 @@#endifMoved the comment about MBEDTLS_X509_RSASSA_PSS_SUPPORT out of the "Conflicts" section.
@ -21,1 +23,4 @@},'config-mini-tls1_1.h' => {'compat' => '-m tls1_1 -f \'^DES-CBC3-SHA$\|^TLS-RSA-WITH-3DES-EDE-CBC-SHA$\'',},Changed:
config-symmetric-only.h) at the place where it was removed.
Re-add it in arbitrary order.
by:
"config-symmetric-only.h" at the place where the configurations
that are added back were removed. Keep this configuration.
@ -37,3 +45,3 @@OUTPUT test_suite_${data_name}.cCOMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py -f ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function -d ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.data -t ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function -p ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function -s ${CMAKE_CURRENT_SOURCE_DIR}/suites --helpers-file ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function -o .DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py mbedcrypto ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.dataDEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py mbedtls ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.datafixed
@ -15,7 +15,7 @@ if(INSTALL_MBEDTLS_HEADERS)Replaced:
immediately before where it was removed. Just re-add what was removed.
by:
adjacent to where it was modified. Just re-add what was removed.
I checked how the history changed compared to the version I previously approved, using:
I found that all the differences are expected and addressing one of the comments above (most about improving the commit messages, one about make one commit more correct (previously introduced an issue fixed in a later commit), except one: the addition of a blank line in a CMake file, which is harmless.
Therefore I'm happy to approve this (again, not for merging here, just as a basis for the repo merge).
The previous version of the PR ending @
bd623148e3can be found here https://github.com/ronald-cron-arm/mbed-crypto/tree/unremove-non-crypto.LGTM
I reviewed the changes made by @ronald-cron-arm: from https://github.com/gilles-peskine-arm/mbed-crypto/tree/unremove-non-crypto-4 (
bd623148e3) to https://github.com/gilles-peskine-arm/mbed-crypto/tree/unremove-non-crypto-5 (43aa905d1e). The commit histories are very similar; the differences are:~16(Revert "tests: Add a crypto prefix to submodule tests") fixes a mistake that I'd made in the conflict resolution intests/CMakeLists.txt. This code is removed in~14so there is no impact on the final content.~14(Revert "tests: Use parent module includes when used as a submodule") has an extra blank line intests/CMakeLists.txtwhich is unimportant.I hereby approve the changes made by Ronald.
This has been merged into Mbed TLS via https://github.com/ARMmbed/mbedtls/pull/3085
Pull request closed