Andrzej Kurek
7a32072038
Setup / deinitialize PSA in pk tests only if no MD is used
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-02 04:07:15 -04:00
Andrzej Kurek
26909f348f
Add PSA initialization and teardown to tests using pkcs5
...
If PSA is defined and there is no MD - an initialization
is required.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-02 04:05:37 -04:00
Andrzej Kurek
ed98e95c81
Adjust pkcs5 test dependencies
...
Hashing via PSA is now supported
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-02 04:03:25 -04:00
Andrzej Kurek
dd36c76f09
Provide a version of pkcs5_pbkdf2_hmac without MD usage
...
Use the new implementation locally
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-09-02 04:03:25 -04:00
Ronald Cron
2dbba99708
tests: Reformating due to hexcmp() renaming
...
Command to find the files in which lines have gone
larger than 79 characters due to the renaming:
grep '.\{80\}' \
`git diff-tree --no-commit-id --name-only -r HEAD` \
| grep hexcmp
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2020-06-12 14:33:08 +02:00
Ronald Cron
de70b165a4
tests: Add mbedtls_test_ prefix to hexcmp()
...
Add mbedtls_test_ prefix to hexcmp() test helper
function.
Command to change *.function files:
find . -name "*.function" -exec awk -i inplace \
'{sub(/hexcmp\>/,"mbedtls_test_&")}1' {} \;
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2020-06-12 14:33:08 +02:00
Ronald Cron
690f3ebe92
tests: Add mbedtls_test_ prefix to zero_alloc()
...
Add mbedtls_test_ prefix to zero_alloc() test helper
function.
Command to change *.function files:
find . -name "*.function" -exec awk -i inplace \
'{sub(/zero_alloc/,"mbedtls_test_&")}1' {} \;
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2020-06-12 14:33:08 +02:00
Azim Khan
5fcca46a3a
Rename HexParam_t -> data_t for consistent coding style
2018-08-06 11:42:06 +01:00
Azim Khan
d30ca130e8
Combine hex parameters in a struct
2018-08-06 11:40:57 +01:00
Azim Khan
f1aaec9888
Intermediate hexify out change
2018-08-06 11:40:57 +01:00
Andres Amaya Garcia
576d474704
Fix test dependencies of pkcs5 pbs2 on asn1 parse
2018-03-27 20:53:56 +01:00
Antonio Quartulli
bfa440e9fb
tests/pkcs5/pbkdf2_hmac: extend array to accommodate longer results
...
Some unit tests for pbkdf2_hmac() have results longer than
99bytes when represented in hexadecimal form.
For this reason extend the result array to accommodate
longer strings.
At the same time make memset() parametric to avoid
bugs in the future.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-02-08 17:18:19 +08:00
Andres AG
93012e8bce
Set selftest verbose flag to boost coverage
2016-09-27 17:29:22 +01:00
Paul Bakker
81c60910e1
Run PKCS#5 selftest in test suites
2016-08-25 16:36:35 +01:00
Manuel Pégourié-Gonnard
ac5361f7dc
Fix small issues in tests found by Coverity
2015-06-24 01:08:09 +02:00
Manuel Pégourié-Gonnard
2cf5a7c98e
The Great Renaming
...
A simple execution of tmp/invoke-rename.pl
2015-04-08 13:25:31 +02:00
Manuel Pégourié-Gonnard
abb674467b
Rename md_init_ctx() to md_setup()
2015-03-25 21:55:56 +01:00
Manuel Pégourié-Gonnard
4063ceb281
Make hmac_ctx optional
...
Note from future self: actually md_init_ctx will be re-introduced with the
same signature later, and a new function with the additional argument will be
added.
2015-03-25 21:55:56 +01:00
Manuel Pégourié-Gonnard
7f8099773e
Rename include directory to mbedtls
2015-03-10 11:23:56 +00:00
Rich Evans
ce2f237697
change test function includes to use one convention
2015-02-10 11:28:46 +00:00
Paul Bakker
bd51b262d1
Add 'exit' label and variable initialization to relevant test suite functions
2014-07-10 16:37:50 +02:00
Paul Bakker
d2a2d61a68
Adapt programs / test suites
2014-07-09 10:19:24 +02:00
Manuel Pégourié-Gonnard
0dc5e0d80b
Add helper function zero_malloc for tests
2014-06-23 11:54:57 +02:00
Manuel Pégourié-Gonnard
66aca931bc
Add tests for pkcs5_pbes2
2014-06-23 11:52:59 +02:00
Paul Bakker
68a4fce8aa
Added missing dependencies on functions and tests
2013-08-20 12:42:31 +02:00
Paul Bakker
33b43f1ec3
Converted .function file to c-like format and adapted generator code
2013-08-20 11:48:36 +02:00
Paul Bakker
dbd443dca6
Adapted .function files and .data files to new test framework
...
Changes include:
- Integers marked with '#' in the .function files.
- Strings should have "" in .data files.
- String comparison instead of preprocessor-like replace for e.g. '=='
- Params and variables cannot have the same name in .function files
2013-08-16 13:51:37 +02:00
Paul Bakker
92b8dc0535
Fixed memory leaks in tests
2013-07-03 17:22:31 +02:00
Paul Bakker
b0c19a4b3d
PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated
...
old PBKDF2 module.
(cherry picked from commit 19bd297dc896410e0d859729f9e8d4b1e107e6c8)
Conflicts:
include/polarssl/error.h
scripts/generate_errors.pl
2013-06-25 15:06:52 +02:00