aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-27Merge pull request #748 from ARMmbed/mbedtls-2.24.0r0-prv2.24.0mbedtls-2.24.0Janos Follath44-262/+2159
Prepare Release Candidate for Mbed TLS 2.24.0
2020-08-26Finalize ChangeLogJanos Follath1-4/+6
Fix alignment where necessary and update ChangeLog header. Signed-off-by: Janos Follath <janos.follath@arm.com>
2020-08-26Bump version to Mbed TLS 2.24.0Janos Follath5-11/+11
Executed "./scripts/bump_version.sh --version 2.24.0" Signed-off-by: Janos Follath <janos.follath@arm.com>
2020-08-26Assemble ChangeLogJanos Follath23-122/+111
Executed scripts/assemble_changelog.py. Signed-off-by: Janos Follath <janos.follath@arm.com>
2020-08-26Merge branch 'development-restricted'Janos Follath24-154/+2060
2020-08-26Merge pull request #3611 from gilles-peskine-arm/psa-coverity-cleanups-202008Gilles Peskine7-11/+63
Minor fixes in PSA code and tests
2020-08-26Merge pull request #3433 from raoulstrackx/raoul/verify_crl_without_timeGilles Peskine9-4/+66
Always revoke certificate on CRL
2020-08-26Merge pull request #3612 from gilles-peskine-arm/psa-mac-negative-testsManuel Pégourié-Gonnard1-21/+79
PSA: add negative MAC tests
2020-08-26Fix the documentation of has_even_parityGilles Peskine1-1/+1
The documentation had the boolean meaning of the return value inverted. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Merge pull request #737 from mpg/changelog-for-local-lucky13-dev-restrictedManuel Pégourié-Gonnard1-0/+11
Add a ChangeLog entry for local Lucky13 variant
2020-08-26Clearer function name for parity checkGilles Peskine1-2/+2
Return a name that more clearly returns nonzero=true=good, 0=bad. We'd normally expect check_xxx to return 0=pass, nonzero=fail so check_parity was a bad name. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Explain the purpose of check_parityGilles Peskine1-0/+10
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Add missing cleanup to hash multipart operation testsGilles Peskine1-0/+4
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Clarify that the Lucky 13 fix is quite generalManuel Pégourié-Gonnard1-7/+9
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-26Add negative tests for MAC verificationGilles Peskine1-0/+41
Add negative tests for psa_mac_verify_finish: too large, too small, or a changed byte. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Don't destroy the key during a MAC verification operationGilles Peskine1-1/+0
An early draft of the PSA crypto specification required multipart operations to keep working after destroying the key. This is no longer the case: instead, now, operations are guaranteed to fail. Mbed TLS does not comply yet, and still allows the operation to keep going. Stop testing Mbed TLS's non-compliant behavior. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Test other output sizes for psa_mac_sign_finishGilles Peskine1-12/+34
Test psa_mac_sign_finish with a smaller or larger buffer. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Simplify output bounds check in mac_sign testGilles Peskine1-9/+4
Rely on Asan to detect a potential buffer overflow, instead of doing a manual check. This makes the code simpler and Asan can detect underflows as well as overflows. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Test PSA_MAC_FINAL_SIZE in mac_sign exactlyGilles Peskine1-1/+2
We expect PSA_MAC_FINAL_SIZE to be exact in this implementation, so check it here. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Add empty-output-buffer test cases for single-part hash functionsGilles Peskine1-0/+8
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Note that a failure in cleanup is intentionalGilles Peskine1-1/+1
In the cleanup code for persistent_key_load_key_from_storage(), we only attempt to reopen the key so that it will be deleted if it exists at that point. It's intentional that we do nothing if psa_open_key() fails here. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-26Add missing cleanup to some multipart operation testsGilles Peskine1-0/+12
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-25test cleanup: Annotate file removal after a failed creationGilles Peskine1-3/+10
Let static analyzers know that it's ok if remove() fails here. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-25psa_crypto_storage: Annotate file removal after a failed creationGilles Peskine1-1/+7
Let static analyzers know that it's ok if psa_its_remove() fails here. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-25psa_its: Annotate file removal after a failed creationGilles Peskine1-1/+6
Let static analyzers know that it's ok if remove() fails here. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-25Fix parity tests to actually fail the test on errorGilles Peskine1-4/+4
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-08-25Merge pull request #736 from mpg/cf-varpos-copy-dev-restrictedJanos Follath11-39/+211
Constant-flow copy of HMAC from variable position
2020-08-25Fix potential use of uninitialised variableManuel Pégourié-Gonnard1-1/+1
If any of the TEST_ASSERT()s that are before the call to mbedtls_pk_warp_as_opaque() failed, when reaching the exit label psa_destroy_key() would be called with an uninitialized argument. Found by Clang. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-25Merge pull request #3574 from makise-homura/e2k_supportGilles Peskine5-5/+15
Support building on e2k (Elbrus) architecture
2020-08-24A different approach of signed-to-unsigned comparisonmakise-homura1-2/+2
Suggsted by @hanno-arm Signed-off-by: makise-homura <akemi_homura@kurisa.ch>
2020-08-24Fix a typo in a commentManuel Pégourié-Gonnard1-1/+1
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-24Improve comments on constant-flow testing in config.hManuel Pégourié-Gonnard1-4/+7
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-24Merge pull request #3528 from gufe44/helpers-redirect-restore-outputGilles Peskine3-30/+35
Fix bug in redirection of unit test outputs
2020-08-24Fix "unused function" warning in some configsManuel Pégourié-Gonnard1-2/+8
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-24Merge pull request #2182 from hanno-arm/key_pwdManuel Pégourié-Gonnard9-15/+130
Add support for password protected key files to ssl_server2 and ssl_client2
2020-08-22Don't forget to free G, P, Q, ctr_drbg, and entropymakise-homura1-1/+1
I might be wrong, but lcc's optimizer is curious about this, and I am too: shouldn't we free allocated stuff correctly before exiting `dh_genprime` in this certain point of code? Signed-off-by: makise-homura <akemi_homura@kurisa.ch>
2020-08-21Merge pull request #3590 from mpg/fix-compat.sh-with-ubuntu-16.04-gnutlsGilles Peskine1-19/+9
Fix compat.sh with ubuntu 16.04 gnutls
2020-08-21compat.sh: stop using allow_sha1Manuel Pégourié-Gonnard1-10/+0
After the changes of certificates, it's no longer needed. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-21compat.sh: quit using SHA-1 certificatesManuel Pégourié-Gonnard1-8/+8
Replace server2.crt with server2-sha256.crt which, as the name implies, is just the SHA-256 version of the same certificate. Replace server1.crt with cert_sha256.crt which, as the name doesn't imply, is associated with the same key and just have a slightly different Subject Name, which doesn't matter in this instance. The other certificates used in this script (server5.crt and server6.crt) are already signed with SHA-256. This change is motivated by the fact that recent versions of GnuTLS (or older versions with the Debian patches) reject SHA-1 in certificates by default, as they should. There are options to still accept it (%VERIFY_ALLOW_BROKEN and %VERIFY_ALLOW_SIGN_WITH_SHA1) but: - they're not available in all versions that reject SHA-1-signed certs; - moving to SHA-2 just seems cleaner anyway. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-21compat.sh: enable CBC-SHA-2 suites for GnuTLSManuel Pégourié-Gonnard1-1/+1
Recent GnuTLS packages on Ubuntu 16.04 have them disabled. From /usr/share/doc/libgnutls30/changelog.Debian.gz: gnutls28 (3.4.10-4ubuntu1.5) xenial-security; urgency=medium * SECURITY UPDATE: Lucky-13 issues [...] - debian/patches/CVE-2018-1084x-4.patch: hmac-sha384 and sha256 ciphersuites were removed from defaults in lib/gnutls_priority.c, tests/priorities.c. Since we do want to test the ciphersuites, explicitly re-enable them in the server's priority string. (This is a no-op with versions of GnuTLS where those are already enabled by default.) Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-21Merge pull request #3578 from gilles-peskine-arm/md_setup-leak-developmentManuel Pégourié-Gonnard2-2/+7
Fix memory leak in mbedtls_md_setup with HMAC
2020-08-21Fix bug in redirection of unit test outputsgufe443-30/+35
Avoid replacing handle. stdout is defined as a macro on several platforms. Signed-off-by: gufe44 <gu981@protonmail.com>
2020-08-20Merge pull request #738 from danh-arm/dh/remaining-lf-copyrightGilles Peskine2-6/+2
Update remaining copyright notices to use Linux Foundation guidance
2020-08-20Update remaining copyright notices to use Linux Foundation guidanceDan Handley2-6/+2
Update copyright notices to newly added files since merge of original PR #3546 "Update copyright notices to use Linux Foundation guidance". Generated using the same script. Signed-off-by: Dan Handley <dan.handley@arm.com>
2020-08-20Add a ChangeLog entry for local Lucky13 variantManuel Pégourié-Gonnard1-0/+9
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-20Merge development into development-restrictedDan Handley341-1000/+432
* development: Update copyright notices to use Linux Foundation guidance Undef ASSERT before defining it to ensure that no previous definition has sneaked in through included files. Add ChangeLog entry for X.509 CN-type vulnerability Improve documentation of cn in x509_crt_verify() Fix comparison between different name types Add test: DNS names should not match IP addresses Remove obsolete buildbot reference in compat.sh Fix misuse of printf in shell script Fix added proxy command when IPv6 is used Simplify test syntax Fix logic error in setting client port ssl-opt.sh: include test name in log files ssl-opt.sh: remove old buildbot-specific condition ssl-opt.sh: add proxy to all DTLS tests Signed-off-by: Dan Handley <dan.handley@arm.com>
2020-08-20Merge pull request #3584 from mpg/fix-changelog-file-locationGilles Peskine1-0/+0
Fix location of a ChangeLog entry file
2020-08-20Fix location of a ChangeLog entry fileManuel Pégourié-Gonnard1-0/+0
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-20Make mbedtls_ssl_cf_memcpy_offset() constant-flowManuel Pégourié-Gonnard1-25/+7
all.sh component test_valgrind_constant_flow is now passing. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-08-20Add option to test constant-flow with valgrindManuel Pégourié-Gonnard6-2/+85
Currently the new component in all.sh fails because mbedtls_ssl_cf_memcpy_offset() is not actually constant flow - this is on purpose to be able to verify that the new test works. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>