Skip to content

Commit

Permalink
Add FIPS workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirov-dd committed Dec 3, 2024
1 parent c08fd42 commit 83c8f4b
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ concurrency:

jobs:
test:
uses: ./.github/workflows/pr-test.yml
uses: ./.github/workflows/test-fips.yml
with:
repo: core
platform: linux
runner: '["ubuntu-22.04"]'
secrets: inherit
67 changes: 67 additions & 0 deletions .github/workflows/test-fips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test FIPS

on:
workflow_call:
inputs:
platform:
required: true
type: string
runner:
required: true
type: string

defaults:
run:
shell: bash

jobs:
run:
name: FIPS test on "${{ inputs.platform }}"
runs-on: ${{ fromJson(inputs.runner) }}

env:
FORCE_COLOR: "1"
DEBIAN_FRONTEND: "noninteractive"
LD_LIBRARY_PATH: /usr/local/lib
OPENSSL_CONF: /usr/local/ssl/openssl.cnf
OPENSSL_FIPS: 1
PYTHON_VERSION: "3.12"

steps:

- uses: actions/checkout@v4

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
cache: 'pip'

- name: Install packages
run: |
apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
python3-pip \
wget \
gcc+ \
make \
linux-libc-dev \
libc6-dev \
perl \
cargo \
python3-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
- name: Install OpenSSL
run: |
wget https://www.openssl.org/source/openssl-3.0.0.tar.gz \
&& tar -xvzf openssl-3.0.0.tar.gz \
&& cd openssl-3.0.0 \
&& ./Configure enable-fips \
&& make \
&& make install
- name: Install Cryptography
run: pip install cryptography

0 comments on commit 83c8f4b

Please sign in to comment.