Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building: collect .hmac files for linux shared libraries #8288

Merged
merged 6 commits into from Feb 7, 2024

Commits on Feb 6, 2024

  1. building: collect .hmac files for linux shared libraries

    In the late analysis stage, go over all collected binaries, and
    collect their accompanying .hmac files, if they are available.
    These files are required in FIPS-enabled mode on RHEL, where the
    HMAC accompanying OpenSSL shared library is used in the library's
    self-check.
    rokm committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    ae602e7 View commit details
    Browse the repository at this point in the history
  2. building: utils: switch bincache hashes from md5 to sha1

    On FIPS-enabled RHEL systems, `hashlib.md5()` raises exception:
    ```
    ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled
    for FIPS
    ```
    
    So switch to SHA1 instead.
    rokm committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    562dbe8 View commit details
    Browse the repository at this point in the history
  3. building: process_collected_binaries: remove check for .manifest file

    Remove the check for WinSxS `.manifest` files in
    `process_collected_binaries` helper, as automatic data vs binary
    (re)classification should hopefully ensure that `.manifest` files
    never end up in this processing codepath.
    rokm committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    3fcbd4a View commit details
    Browse the repository at this point in the history
  4. building: refactor process_collected_binary

    Refactor `process_collected_binary` helper, with goal of removing
    the recursive call to itself when both strip and upx are enabled.
    
    This makes the processing flow easier to follow, and makes it
    easier to add additional steps (for example, code-signing on
    Windows), without having to worry about those steps being
    performed in intermediate recursive calls.
    rokm committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    5cd2e2f View commit details
    Browse the repository at this point in the history
  5. building: avoid applying upx/strip to linux binaries with .hmac files

    Automatically disable upx and/or strip if a linux binary has an
    accompanying .hmac file, as modification to the binary will
    invalidate the HMAC.
    rokm committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    fdbe37d View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. building: process_collected_binary: warn on strip/upx failures

    If calling `strip` or `upx` in `process_collected_binary` fails
    for whatever reason, display a warning and captured stdout/stderr.
    The failure is still considered non-fatal (warning instead of an
    error), but it should be visible to the user.
    rokm committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    551e157 View commit details
    Browse the repository at this point in the history