lib: improve external file loading
This tightens the logic loading private keys from the file, and also improves thread safety as pointed in #985 (closed).
Checklist
-
Commits have Signed-off-by:
with name/author being identical to the commit author -
Code modified for feature -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated / NEWS entry present (for non-trivial changes) -
CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)
Reviewer's checklist:
-
Any issues marked for closing are addressed -
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md
-
This feature/change has adequate documentation added -
No obvious mistakes in the code
Edited by Daiki Ueno
Merge request reports
Activity
Filter activity
- Resolved by Daiki Ueno
added 7 commits
- f1bebac6 - gnulib: update git submodule
- f3b5aa81 - lib: avoid file descriptor leak when application forks
- 3794bba1 - .gitignore: stop ignoring gl/override/*
- 7f12b92e - gl/override: add clear-realloc module
- a36deeaf - gl/override: add read-file-secure module
- 4df5b19b - cert-cred: clear private key data loaded from file
- c0f0d155 - gnutls_load_file: document limitation regarding partial failure
Toggle commit list- Resolved by Tim Rühsen
- Resolved by Tim Rühsen
- Resolved by Tim Rühsen
- Resolved by Tim Rühsen
The gnulib update should remove
#define FALLTHROUGH
in utils.h:In file included from ../lib/gnutls_int.h:58, from pkcs12_s2k.c:30: ../gl/attribute.h:142: error: "FALLTHROUGH" redefined [-Werror] 142 | #define FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH | In file included from pkcs12_s2k.c:29: ./utils.h:46: note: this is the location of the previous definition 46 | #define FALLTHROUGH __attribute__ ((fallthrough))
- Resolved by Tim Rühsen
- Resolved by Daiki Ueno
I still see
fd = fopen
, but I leave it to you to amend that or not, as it is just cosmetics. Maybe we can add the proposed syntax-check rule sometimes later. Else LGTM.
Please register or sign in to reply