Skip to content
Snippets Groups Projects

lib: improve external file loading

Merged Daiki Ueno requested to merge tmp-fileio into master

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Daiki Ueno added 7 commits

    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

    Compare with previous version

  • Daiki Ueno added 4 commits

    added 4 commits

    • cd6bf76c - gnulib: update git submodule
    • e8fede2d - lib: avoid file descriptor leak when application forks
    • e2a8f092 - cert-cred: clear private key data loaded from file
    • 58419f2b - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

  • Daiki Ueno added 4 commits

    added 4 commits

    • 86c58b5b - gnulib: update git submodule
    • e529deb9 - lib: avoid file descriptor leak when application forks
    • ae058b3d - cert-cred: clear private key data loaded from file
    • ebd0f53e - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

  • Tim Rühsen
  • Tim Rühsen
  • Tim Rühsen
  • Tim Rühsen
  • Daiki Ueno added 4 commits

    added 4 commits

    • eb583b8a - gnulib: update git submodule
    • b0f441f4 - lib: avoid file descriptor leak when application forks
    • ab442d77 - cert-cred: clear private key data loaded from file
    • 594ff841 - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

  • 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))
  • Tim Rühsen
  • Daiki Ueno added 4 commits

    added 4 commits

    • 8b248d83 - gnulib: update git submodule
    • e2f50ba2 - lib: avoid file descriptor leak when application forks
    • 9ad8f22a - cert-cred: clear private key data loaded from file
    • 1b0b45ac - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

  • Tim Rühsen resolved all threads

    resolved all threads

  • Daiki Ueno added 4 commits

    added 4 commits

    • 021525ca - gnulib: update git submodule
    • c81c0b9d - lib: avoid file descriptor leak when application forks
    • 90c50e89 - cert-cred: clear private key data loaded from file
    • 5e9a7fdf - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

  • Daiki Ueno added 4 commits

    added 4 commits

    • 1c64b924 - gnulib: update git submodule
    • 163ef1aa - lib: avoid file descriptor leak when application forks
    • 86a52001 - cert-cred: clear private key data loaded from file
    • 21c73c4d - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

  • Daiki Ueno added 4 commits

    added 4 commits

    • 92ca5da9 - gnulib: update git submodule
    • 96890cc8 - lib: avoid file descriptor leak when application forks
    • 426b482f - cert-cred: clear private key data loaded from file
    • fec09dfc - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

  • Daiki Ueno added 4 commits

    added 4 commits

    • 5b4989dc - gnulib: update git submodule
    • 947810d0 - lib: avoid file descriptor leak when application forks
    • 5050e97f - cert-cred: clear private key data loaded from file
    • ee886808 - gnutls_load_file: document limitation regarding partial failure

    Compare with previous version

    • 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.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading