summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* serv: use only async-signal-safe functions in signal handlerstmp-src-fixesDaiki Ueno2020-10-182-3/+14
| | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* _gnutls_asn2err: define as static inlineDaiki Ueno2020-10-182-42/+41
| | | | | | | | | | This pacifies -fanalyzer false-positive: common.c:552:3: warning: use of NULL '<unknown>' where non-null expected [CWE-690] [-Wanalyzer-null-argument] Ideally, the function should be defined as 'extern inline' to avoid code bloat by being copied across multiple translation units. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* doc/examples/ex-ocsp-client.c: check malloc return valueDaiki Ueno2020-10-181-0/+4
| | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* serv: peer_print_info: add overflow check on reallocDaiki Ueno2020-10-182-10/+16
| | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* serv: replace our own list implementation with Gnulib's gl_listDaiki Ueno2020-10-185-491/+85
| | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'tmp-kdf-tests' into 'master'Daiki Ueno2020-10-085-0/+498
|\ | | | | | | | | fips: enable self-tests for KDF algorithms and CMAC See merge request gnutls/gnutls!1341
| * fips: run CMAC self-testsDaiki Ueno2020-10-081-0/+6
| | | | | | | | | | | | FIPS140-2 IG D.8 mandates self-tests on CMAC. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * fips: add self-tests for TLS-PRFDaiki Ueno2020-10-085-0/+206
| | | | | | | | | | | | | | | | | | FIPS140-2 IG D.8 mandates self-tests on approved KDF algorithms. As the guidance only requires to run a single instance of each KDF mechanism, this only exercises TLS1.2 PRF with HMAC-SHA-256 as the underlying MAC algorithm. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * fips: add self-tests for PBKDF2Daiki Ueno2020-10-065-0/+117
| | | | | | | | | | | | | | | | | | FIPS140-2 IG D.8 mandates self-tests on approved KDF algorithms. As the guidance only requires running a single instance of each KDF mechanism, this only exercises PBKDF2 with HMAC-SHA-256 as the underlying MAC algorithm. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * fips: add self-tests for HKDFDaiki Ueno2020-10-065-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | FIPS140-2 IG D.8 mandates self-test on approved KDF algorithms. As the guidance only requires running a single instance of each KDF mechanism, this only exercises HKDF-Extract and HKDF-Expand operations with HMAC-SHA-256 as the underlying MAC. Although HKDF is non-approved, it would be sensible to do that as it will be approved in FIPS140-3. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-dh-2048' into 'master'Daiki Ueno2020-10-082-16/+130
|\ \ | |/ |/| | | | | fips: use 2048-bit prime for DH self-tests See merge request gnutls/gnutls!1342
| * fips: use larger prime for DH self-teststmp-dh-2048Daiki Ueno2020-10-072-16/+130
|/ | | | | | | | According to FIPS140-2 IG 7.5, the minimum key size of FFC through 2030 is defined as 2048 bits. This updates the relevant self-test using ffdhe3072 defined in RFC 7919. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'tmp-sh-tests' into 'master'Daiki Ueno2020-10-03159-815/+801
|\ | | | | | | | | tests: simplify shell-script usage See merge request gnutls/gnutls!1337
| * tests: add missing ${EXEEXT}Daiki Ueno2020-10-035-6/+6
| | | | | | | | | | | | Pointed by Andreas Metzler. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: prolong timeout in wait_for_portDaiki Ueno2020-10-031-6/+7
| | | | | | | | | | | | | | gnutls-serv invocations in cert-tests/dsa can take long time to launch if valgrind tests are enabled. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: remove unused lock facility using lockfile-createDaiki Ueno2020-10-031-8/+0
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: create lock for tests using GETPORTDaiki Ueno2020-10-032-3/+23
| | | | | | | | | | | | | | This fixes a race condition in the timings between when a free port is detected and when the port is actually used. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: simplify program detectionDaiki Ueno2020-10-037-56/+54
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: rewrite launch_server using launch_bare_serverDaiki Ueno2020-10-036-158/+150
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: remove launch_pkcs11_serverDaiki Ueno2020-09-252-10/+1
| | | | | | | | | | | | This function is only used by testpkcs11.sh. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: remove unused first argument from launch_serverDaiki Ueno2020-09-2533-176/+168
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: use ": ${FOO=BAR}" syntax for default handling in shell scriptsDaiki Ueno2020-09-25157-438/+438
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-verify-output' into 'master'Daiki Ueno2020-09-281-2/+3
|\ \ | | | | | | | | | | | | x509: correct argument of gnutls_verify_output_function See merge request gnutls/gnutls!1338
| * | x509: correct argument of gnutls_verify_output_functiontmp-verify-outputDaiki Ueno2020-09-271-2/+3
|/ / | | | | | | | | | | | | | | This is a leftover of 52e78f1e. We need to call gnutls_verify_output_function with the replaced CA cert instead of the original cert. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'fix-x86-padlock' into 'master'Daiki Ueno2020-09-231-1/+0
|\ \ | |/ |/| | | | | padlock:fix exception in wrap_padlock_hmac_fast See merge request gnutls/gnutls!1336
| * padlock:fix exception in wrap_padlock_hmac_fastJonasZhou2020-09-231-1/+0
| | | | | | | | | | | | | | In function wrap_padlock_hmac_fast, use free to release local variables ctx. Remove a call to wrap_padlock_hmac_deinit() to fix a crash. Signed-off-by: JonasZhou <JonasZhou@zhaoxin.com>
* | Merge branch 'tmp-default-prio' into 'master'Daiki Ueno2020-09-231-0/+1
|\ \ | | | | | | | | | | | | priority: add Ed448 to SECURE192 signing algorithms See merge request gnutls/gnutls!1332
| * | priority: add Ed448 to SECURE192 signing algorithmstmp-default-prioDaiki Ueno2020-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | Reported Vladimír Čunát in: https://gitlab.com/gnutls/gnutls/-/merge_requests/984#note_349374656 Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | Merge branch 'tmp-clock_nanosleep' into 'master'Daiki Ueno2020-09-2120-215/+100
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | tests: allow clock_nanosleep in seccomp tests Closes #1086 See merge request gnutls/gnutls!1325
| * | testcompat-openssl: specify -sigalgsDaiki Ueno2020-09-211-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The default selection of signature schemes is also affected by the crypto-policies, and needs to be explicitly enabled with -sigalgs. Suggested by Tomas Mraz. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | inih: remove unused codeDaiki Ueno2020-09-212-94/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids -fanalyzer false-positive in GCC 10: https://bugzilla.redhat.com/show_bug.cgi?id=1878600 as well as the cppcheck warning: "variableScope:lib/inih/ini.c:99,style,The scope of the variable 'start' can be reduced." Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | build: remove dead assignmentsDaiki Ueno2020-09-1811-78/+57
| | | | | | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | spki: work around GCC 10 -Warray-bounds false-positiveDaiki Ueno2020-09-182-4/+8
| | | | | | | | | | | | | | | | | | | | | Suggested by Martin Sebor in: https://bugzilla.redhat.com/show_bug.cgi?id=1876801#c1 Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | tls13/session_ticket: remove _gnutls13_session_ticket_unsetDaiki Ueno2020-09-183-33/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function was not really useful because _gnutls_free_datum() has a NULL check as in free(). This also makes GCC 10 happy if -Warray-bounds=2 is specified: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96984 Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | tests: allow clock_nanosleep in seccomp testsDaiki Ueno2020-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The nanosleep wrapper in glibc has changed the implementation using the clock_nanosleep syscall: https://sourceware.org/git/?p=glibc.git;a=commit;h=3537ecb49cf7177274607004c562d6f9ecc99474 Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | .gitlab-ci.yml: bump build environment to Fedora 32Daiki Ueno2020-09-181-1/+1
| | | | | | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | Merge branch 'tmp-ametzler-1090-testsuite' into 'master'Daiki Ueno2020-09-215-7/+11
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Fix inconsistent handling of $SERV environment variable in testsuite Closes #1090 See merge request gnutls/gnutls!1331
| * | testsuite: Fix $SERV / $GNUTLS_SERV inconsistencyAndreas Metzler2020-09-194-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests did not support overriding the PATH to gnutls-serv by setting the environment variable SERV but used GNUTLS_SERV instead. Closes #1090 Signed-off-by: Andreas Metzler <ametzler@bebt.de>
| * | In testsuite scripts use "$@" instead of $*.Andreas Metzler2020-09-181-3/+3
| |/ | | | | | | Signed-off-by: Andreas Metzler <ametzler@bebt.de>
* | Merge branch 'rsa_privkey_prive' into 'master'Daiki Ueno2020-09-204-21/+93
|\ \ | |/ |/| | | | | Make private exponent optional in gnutls_privkey_import_rsa_raw() See merge request gnutls/gnutls!1323
| * Make private exponent optional in gnutls_privkey_import_rsa_raw().Nikolay Sivov2020-09-064-7/+79
| | | | | | | | Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
| * Use symbols defined for RSA key parameter indices in some more places.Nikolay Sivov2020-09-061-14/+14
| | | | | | | | Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
* | Merge branch 'max_seed' into 'master'Daiki Ueno2020-09-172-19/+8
|\ \ | | | | | | | | | | | | | | | | | | Modifies P_hash() to hash the seed and label separately. Closes #1013 See merge request gnutls/gnutls!1329
| * | Modifies P_hash() to hash the seed and label separatelySahana Prasad2020-09-172-19/+8
| | | | | | | | | | | | | | | | | | | | | Thereby not restricting the implementation of prf to MAX_SEED_SIZE MAX_SEED_SIZE is not used anymore Signed-off-by: Sahana Prasad <sahana@redhat.com>
* | | Merge branch 'tmp-ametzler-1091-gost' into 'master'Daiki Ueno2020-09-172-1/+8
|\ \ \ | |/ / |/| | | | | | | | Fix and enable GOST test in tests/gnutls-cli-debug.sh See merge request gnutls/gnutls!1328
| * | testsuite: Run GOST part of tests/gnutls-cli-debug.shAndreas Metzler2020-09-171-0/+7
| | | | | | | | | | | | | | | | | | Closes #1097 Signed-off-by: Andreas Metzler <ametzler@bebt.de>
| * | testsuite: Fix GOST gnutls-cli-debug testAndreas Metzler2020-09-171-1/+1
|/ / | | | | | | | | | | | | GOST algorithms are not enabled by default, explicitely request them in priority string. Signed-off-by: Andreas Metzler <ametzler@bebt.de>
* | Merge branch 'tmp-gnulib' into 'master'Daiki Ueno2020-09-177-3/+14
|\ \ | |/ |/| | | | | gnulib: update git submodule See merge request gnutls/gnutls!1330
| * build: ignore pointless -Wformat-nonliteral warningtmp-gnulibDaiki Ueno2020-09-171-0/+3
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * configure.ac: don't enable warning only available in decent gccDaiki Ueno2020-09-171-0/+1
| | | | | | | | | | | | -Warith-conversion is new in GCC 10. Signed-off-by: Daiki Ueno <ueno@gnu.org>