summaryrefslogtreecommitdiff
path: root/tests/dh-compute.c
Commit message (Collapse)AuthorAgeFilesLines
* build: re-indent codeDaiki Ueno2023-04-241-66/+65
| | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Indent codeZoltan Fridrich2023-01-271-60/+63
| | | | | Co-authored-by: Simon Josefsson <simon@josefsson.org> Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
* Replace FSF snail mail addresses with URLStefan Kangas2022-12-271-2/+1
| | | | | | | This is the latest recommendation, as described here: https://www.gnu.org/licenses/gpl-howto.html Signed-off-by: Stefan Kangas <stefankangas@gmail.com>
* tests: move FIPS service indicator functions to common fileDaiki Ueno2022-10-171-30/+6
| | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* fips: plumb service indicator to public key crypto operationsDaiki Ueno2022-01-081-6/+66
| | | | | | | | | | | | | | | | | | | | | | | | This installs service indicator state transitions in certain public key operations in gnutls_crypto_pk_st, namely: * fallible operations - encrypt - sign - generate_keys - derive * infallible operations - decrypt, decrypt2 - verify other operations, such as generate_params, are not considered as crypto operation. Note that fallible operations above mean that those return value could indicate error, while infallible operations do not have distinction between errors and failures: decrypt/verify failures are treated as a successful completion of the operation. Signed-off-by: Daiki Ueno <ueno@gnu.org> Co-authored-by: Pedro Monreal <pmonrealgonzalez@suse.de>
* fips: avoid memleak in (EC)DH internal APIsDaiki Ueno2021-01-221-7/+7
| | | | | | | | | | | | | | | | | | | | There were some confusions of gnutls_pk_params_clear and gnutls_pk_params_release, as well as the number of parameters to scan in the gnutls_pk_params_st structure. Flagged by address sanitizer: ==354688==ERROR: LeakSanitizer: detected memory leaks Direct leak of 192 byte(s) in 12 object(s) allocated from: #0 0x7f13506163cf in __interceptor_malloc (/lib64/libasan.so.6+0xab3cf) #1 0x7f13503b94de in wrap_nettle_mpi_init /home/ueno/devel/gnutls/lib/nettle/mpi.c:79 #2 0x7ffcb8495f07 ([stack]+0x1ef07) Direct leak of 160 byte(s) in 10 object(s) allocated from: #0 0x7f13506163cf in __interceptor_malloc (/lib64/libasan.so.6+0xab3cf) #1 0x7f13503b94de in wrap_nettle_mpi_init /home/ueno/devel/gnutls/lib/nettle/mpi.c:79 Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Add plumbing to handle Q parameter in DH exchangesSimo Sorce2019-05-231-22/+38
| | | | Signed-off-by: Simo Sorce <simo@redhat.com>
* Add test to ensure DH exchange behaves correctlySimo Sorce2019-05-231-0/+155
This test ensures that public keys are properly tested for validity before a DH exchange is computed. Signed-off-by: Simo Sorce <simo@redhat.com>