mbedtls/tests/suites
Gilles Peskine ee46fe7b9b Fix output size calculations in cipher tests
Some calls to psa_cipher_finish or psa_cipher_update append to a
buffer. Several of these calls were not calculating the offset into
the buffer or the remaining buffer size correctly.

This did not lead to buffer overflows before because the buffer sizes
were sufficiently large for our test inputs. This did not lead to
incorrect output when the test was designed to append but actually
wrote too early because all the existing test cases either have no
output from finish (stream cipher) or have no output from update (CBC,
with less than one block of input).
2019-02-19 19:05:33 +01:00
..
helpers.function Merge branch 'development-psa-proposed' into development 2019-02-14 15:58:43 +00:00
host_test.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
main_test.function psa: Initialize crypto in tests that need to 2019-02-13 07:34:54 -05:00
target_test.function Style fixes 2018-08-06 11:42:56 +01:00
test_suite_aes.cbc.data
test_suite_aes.cfb.data
test_suite_aes.ecb.data
test_suite_aes.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_aes.ofb.data Add test cases for AES OFB block mode 2018-06-11 14:03:22 +01:00
test_suite_aes.rest.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_aes.xts.data tests: Remove NIST AES-XTS test vectors 2018-06-13 12:13:58 +01:00
test_suite_arc4.data
test_suite_arc4.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_aria.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_aria.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_asn1write.data
test_suite_asn1write.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_base64.data
test_suite_base64.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_blowfish.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_blowfish.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_camellia.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_camellia.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ccm.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ccm.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_chacha20.data chacha20: add test for parameter validation 2018-05-24 13:37:31 +02:00
test_suite_chacha20.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_chachapoly.data chachapoly: add test for state flow 2018-05-24 13:37:31 +02:00
test_suite_chachapoly.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_cipher.aes.data Add AES-*-CBC test vectors for PSA-based cipher contexts 2018-11-22 16:33:01 +00:00
test_suite_cipher.arc4.data Add tests for "return plaintext data faster on unpadded decryption" 2018-03-27 19:25:35 -07:00
test_suite_cipher.blowfish.data Add tests for "return plaintext data faster on unpadded decryption" 2018-03-27 19:25:35 -07:00
test_suite_cipher.camellia.data Add tests for "return plaintext data faster on unpadded decryption" 2018-03-27 19:25:35 -07:00
test_suite_cipher.ccm.data Test PSA-based CCM cipher operations 2018-11-22 16:33:01 +00:00
test_suite_cipher.chacha20.data cipher: add stream test vectors for chacha20(poly1305) 2018-05-24 13:37:31 +02:00
test_suite_cipher.chachapoly.data Test PSA-based CCM cipher operations 2018-11-22 16:33:01 +00:00
test_suite_cipher.des.data Add tests for "return plaintext data faster on unpadded decryption" 2018-03-27 19:25:35 -07:00
test_suite_cipher.function psa: Initialize crypto in tests that need to 2019-02-13 07:34:54 -05:00
test_suite_cipher.gcm.data Add missing newline at the end of test_suite_cipher.gcm.data 2018-11-22 16:33:01 +00:00
test_suite_cipher.misc.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_cipher.null.data Add tests for "return plaintext data faster on unpadded decryption" 2018-03-27 19:25:35 -07:00
test_suite_cipher.padding.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_cmac.data
test_suite_cmac.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_ctr_drbg.data Refactor test code for CTR DRBG to clarify test functions 2018-08-29 23:38:57 +03:00
test_suite_ctr_drbg.function test_suite_ctr_drbg: use ctr_drbg_update_ret instead of ctr_drbg_update 2019-02-01 02:53:16 -05:00
test_suite_debug.data
test_suite_debug.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_des.data
test_suite_des.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_dhm.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_dhm.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ecdh.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ecdh.function Use ecdh_setup instead of ecp_group_load 2019-02-01 02:50:36 -05:00
test_suite_ecdsa.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ecdsa.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ecjpake.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ecjpake.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ecp.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ecp.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_entropy.data
test_suite_entropy.function Fix typo in test_suite_entropy.function 2018-08-15 13:55:37 +01:00
test_suite_error.data The Great Renaming 2015-04-08 13:25:31 +02:00
test_suite_error.function Intermediate hexify out change 2018-08-06 11:40:57 +01:00
test_suite_gcm.aes128_de.data Fix test functions and data after moving hexify/unhexify out 2018-08-06 11:40:57 +01:00
test_suite_gcm.aes128_en.data
test_suite_gcm.aes192_de.data Fix test functions and data after moving hexify/unhexify out 2018-08-06 11:40:57 +01:00
test_suite_gcm.aes192_en.data
test_suite_gcm.aes256_de.data Fix test functions and data after moving hexify/unhexify out 2018-08-06 11:40:57 +01:00
test_suite_gcm.aes256_en.data
test_suite_gcm.camellia.data Fix test functions and data after moving hexify/unhexify out 2018-08-06 11:40:57 +01:00
test_suite_gcm.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_gcm.misc.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_hkdf.data hkdf: Add negative tests 2018-06-11 13:10:14 +01:00
test_suite_hkdf.function hkdf: Add negative tests 2018-06-11 13:10:14 +01:00
test_suite_hmac_drbg.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_hmac_drbg.misc.data
test_suite_hmac_drbg.no_reseed.data
test_suite_hmac_drbg.nopr.data
test_suite_hmac_drbg.pr.data
test_suite_md.data
test_suite_md.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_mdx.data
test_suite_mdx.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_memory_buffer_alloc.data Test corner case uses of memory_buffer_alloc.c 2018-01-23 19:37:44 +00:00
test_suite_memory_buffer_alloc.function Intermediate hexify out change 2018-08-06 11:40:57 +01:00
test_suite_mpi.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_mpi.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_nist_kw.data Enhance nist_kw with some NULL buffers tests 2018-08-13 14:46:45 +03:00
test_suite_nist_kw.function Fix #2370, minor typos and spelling mistakes 2019-01-24 10:37:40 +01:00
test_suite_pem.data Add negative testing for mbedtls_pem_read_buffer() 2017-05-30 16:54:23 +01:00
test_suite_pem.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_pk.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_pk.function psa: Initialize crypto in tests that need to 2019-02-13 07:34:54 -05:00
test_suite_pkcs1_v15.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_pkcs1_v15.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_pkcs1_v21.data rsa: pss: Add no possible salt size tests 2018-09-27 18:23:08 +01:00
test_suite_pkcs1_v21.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_pkcs5.data tests/pkcs5/pbkdf2_hmac: add unit tests for additional SHA algorithms 2018-02-08 17:18:19 +08:00
test_suite_pkcs5.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_pkparse.data Change test dependencies to RC4 from DES 2018-07-27 17:15:39 +01:00
test_suite_pkparse.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_pkwrite.data
test_suite_pkwrite.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_poly1305.data poly1305: add test for parameter validation 2018-05-24 13:37:31 +02:00
test_suite_poly1305.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_psa_crypto.data Merge pull request #43 from Patater/update-2.16-dev 2019-02-08 08:13:41 +00:00
test_suite_psa_crypto.function Fix output size calculations in cipher tests 2019-02-19 19:05:33 +01:00
test_suite_psa_crypto_entropy.data Adjust psa entropy inject tests to take as minimum seed size 2018-11-21 16:24:53 +02:00
test_suite_psa_crypto_entropy.function Replace ITS specific types with more generic PSA storage types 2019-02-18 13:56:26 +02:00
test_suite_psa_crypto_hash.data Update hash tests documentation 2018-11-05 18:36:05 +02:00
test_suite_psa_crypto_hash.function New function psa_hash_clone 2019-01-19 12:03:41 +01:00
test_suite_psa_crypto_init.data Create the NV seed file for the tests if needed 2018-11-23 22:58:40 +01:00
test_suite_psa_crypto_init.function Move MIN and MAX macros from PSA tests to helpers.function 2018-12-20 18:47:53 +01:00
test_suite_psa_crypto_metadata.data Add a hash wildcard value for hash-and-sign algorithm 2019-01-14 19:38:56 +01:00
test_suite_psa_crypto_metadata.function Add a hash wildcard value for hash-and-sign algorithm 2019-01-14 19:38:56 +01:00
test_suite_psa_crypto_persistent_key.data psa: Simplify RSA public key format 2019-01-23 17:31:50 +00:00
test_suite_psa_crypto_persistent_key.function Replace PSA error code definitions with the ones defined in PSA spec 2019-02-18 13:53:13 +02:00
test_suite_psa_crypto_slot_management.data Replace PSA error code definitions with the ones defined in PSA spec 2019-02-18 13:53:13 +02:00
test_suite_psa_crypto_slot_management.function Replace PSA error code definitions with the ones defined in PSA spec 2019-02-18 13:53:13 +02:00
test_suite_psa_crypto_storage_file.data Replace PSA error code definitions with the ones defined in PSA spec 2019-02-18 13:53:13 +02:00
test_suite_psa_crypto_storage_file.function Prefer ASSERT_ALLOC to calloc+TEST_ASSERT in PSA tests 2018-12-20 18:47:53 +01:00
test_suite_rsa.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_rsa.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_shax.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_shax.function Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_ssl.data Combine hex parameters in a struct 2018-08-06 11:40:57 +01:00
test_suite_ssl.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00
test_suite_timing.data Unit test for mbedtls_timing_hardclock 2017-12-20 21:57:48 +01:00
test_suite_timing.function Remove git conflict marker from test_suite_timing.function 2018-08-06 11:40:58 +01:00
test_suite_version.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_version.function Intermediate hexify out change 2018-08-06 11:40:57 +01:00
test_suite_x509parse.data Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
test_suite_x509parse.function psa: Initialize crypto in tests that need to 2019-02-13 07:34:54 -05:00
test_suite_x509write.data Cosmetic changes 2018-11-22 12:43:53 -05:00
test_suite_x509write.function Adapt to the new key allocation mechanism 2019-01-23 06:22:32 -05:00
test_suite_xtea.data
test_suite_xtea.function Rename HexParam_t -> data_t for consistent coding style 2018-08-06 11:42:06 +01:00