summaryrefslogtreecommitdiff
path: root/tests/t-rsa-15.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix memory leaks in testsJakub Jelen2022-05-311-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | * tests/aeswrap.c (check_one_with_padding): Free hd on error paths * tests/basic.c (check_ccm_cipher): Free context on error paths (check_ocb_cipher_checksum): Ditto. (do_check_xts_cipher): Ditto. (check_gost28147_cipher_basic): Ditto. * tests/bench-slope.c (bench_ecc_init): Free memory on invalid input. * tests/t-cv25519.c (test_it): Free memory on error path * tests/t-dsa.c (hex2buffer): Free memory on error path * tests/t-ecdsa.c (hex2buffer): Free memory on error path (one_test_sexp): Cleanup memory on exit * tests/t-mpi-point.c (check_ec_mul): Free memory on error (check_ec_mul_reduction): Ditto * tests/t-rsa-15.c (hex2buffer): Ditto * tests/t-rsa-pss.c (hex2buffer): Ditto * tests/t-x448.c (test_it): Free memory on error path * tests/testdrv.c (my_spawn): Free memory on error paths -- GnuPG-bug-id: 5973 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
* tests: Fix variable initialization for tests.NIIBE Yutaka2022-01-251-1/+1
| | | | | | | | | | * tests/t-rsa-15.c (one_test_sexp): Initialize OUT_LEN. * tests/t-rsa-pss.c (one_test_sexp): Initialize CTX and OUT_LEN. Fix the if condition. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tests,fips: Align the use of variable in_fips_mode.NIIBE Yutaka2021-12-091-1/+1
| | | | | | | | | | | | | * tests/pubkey.c (check_run): Fix use of pkey and skey. * tests/*.c (in_fips_mode): No initialize by 0. -- There are no cases where *_key_new allocates pkey and skey when IN_FIPS_MODE!=0. Nevertheless, from viewpoint of resource management, calling gcry_sexp_release always is easier for maintenance. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tests: Add tests for gcry_pk_hash_sign/verify API.NIIBE Yutaka2021-12-081-0/+478
* tests/Makefile.am (tests_bin): Add t-dsa t-ecdsa t-rsa-pss t-rsa-15. * tests/t-dsa.c, tests/t-ecdsa.c: New tests. * tests/t-rsa-15.c, tests/t-rsa-pss.c: New tests. * tests/t-dsa.inp, tests/t-ecdsa.inp: New data for tests. * tests/t-rsa-15.inp, tests/t-rsa-pss.inp: New data for tests. -- GnuPG-bug-id: 4894 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>