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

Support OPENSSL v3.0.0 & more #311

Merged
merged 1 commit into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@


# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

# Indentation override for all JS under lib directory
[lib/**.js]
indent_style = space
indent_size = 2

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

24 changes: 20 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,25 @@ module.exports = {
'mocha': true,
'node': true
},
'extends': 'standard',
'plugins': [
'markdown',
'json'
'extends': [
"eslint:recommended",
"plugin:promise/recommended",
"plugin:n/recommended",
"plugin:eslint-plugin/recommended",
"plugin:mocha/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:markdown/recommended",
"plugin:json/recommended",
"plugin:chai-friendly/recommended",
"plugin:eslint-plugin/recommended"
],
"overrides": [
{
"files": ["test/*.js"],
"rules": {
"n/no-unpublished-require": "off"
}
}
]
}
107 changes: 107 additions & 0 deletions .github/workflows/build_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: "Build OpenSSL Binaries"
on:
push:
branches:
- master
- devel/v1
paths:
- .github/workflows/build.yml
- bin/**.sh
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TARGET: "x86_64-unknown-linux-gnu"
jobs:
build:
if: github.ref != 'refs/heads/master'
name: "Build and Test"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- LIBRARY: openssl
VERSION: 0.9.8zh
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.0.1u
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.0.2u
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.1.0l
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.1.1l
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 3.0.0
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.4.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.5.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.6.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.7.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.8.3
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.9.2
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.0.2
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.1.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.2.7
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.3.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.4.2
OPENSSL_DIR: "/openssl"
steps:
- uses: actions/checkout@v2
- run: |
sudo apt-get install -y haveged ca-certificates
sudo haveged -w 2048
mkdir openssl
- name: Cache OpenSSL Binary - ${{ runner.os }}-build-openssl-tests-v2-${{ matrix.LIBRARY }}-${{ matrix.VERSION }}
id: openssl_cache
uses: actions/cache@v2
with:
path: ./openssl/
key: ${{ runner.os }}-build-openssl-tests-v2-${{ matrix.LIBRARY }}-${{ matrix.VERSION }}
- name: Set ENV
shell: "bash"
run: |
set -x
if [[ -d "$GITHUB_WORKSPACE${{ matrix.OPENSSL_DIR }}" ]] && [[ "${{ matrix.OPENSSL_DIR }}" == "/openssl" ]] ; then echo "OPENSSL_DIR=$GITHUB_WORKSPACE${{ matrix.OPENSSL_DIR }}" >> $GITHUB_ENV ; echo "OPENSSL_BIN=$GITHUB_WORKSPACE${{ matrix.OPENSSL_DIR }}/bin/openssl" >> $GITHUB_ENV ; fi
echo "LIBRARY=$(echo ${LIBRARY})" >> $GITHUB_ENV
echo "VERSION=$(echo ${VERSION})" >> $GITHUB_ENV
env:
LIBRARY: ${{ matrix.LIBRARY }}
VERSION: ${{ matrix.VERSION }}
- name: Run Prepare
if: steps.openssl_cache.outputs.cache-hit != 'true'
shell: "bash"
run: |
set +e
echo $PWD
openssl version
echo "OPENSSL_DIR=$OPENSSL_DIR"
if [[ ! -z "$OPENSSL_DIR" ]] ; then "./bin/test_build_openssl.sh" ; fi
if [[ "$CI" == 'true' ]] && [[ -f "$OPENSSL_BIN" ]]; then $OPENSSL_BIN version; else openssl version; fi
125 changes: 125 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: "Test PEM module"
on:
push:
branches:
- master
- devel/v1
paths:
- .github/workflows/tests.yml
- package.json
- lib/**.js
- bin/**.sh
- test/**.js
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TARGET: "x86_64-unknown-linux-gnu"
jobs:
build:
if: github.ref != 'refs/heads/master'
name: "Build and Test"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node_js: [ '14', '16' ]
OPENSSL_DIR: [""]
LIBRARY: [""]
VERSION: [""]
include:
- LIBRARY: openssl
VERSION: 0.9.8zh
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.0.1u
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.0.2u
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.1.0l
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.1.1l
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 3.0.0
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.4.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.5.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.6.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.7.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.8.3
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.9.2
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.0.2
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.1.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.2.7
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.3.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.4.2
OPENSSL_DIR: "/openssl"
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install -y haveged ca-certificates
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_js }}
cache: 'yarn'
- run: |
sudo haveged -w 2048
mkdir openssl
- name: Cache OpenSSL Binary - ${{ runner.os }}-build-openssl-tests-v2-${{ matrix.LIBRARY }}-${{ matrix.VERSION }}
id: openssl_cache
uses: actions/cache@v2
with:
path: ./openssl/
key: ${{ runner.os }}-build-openssl-tests-v2-${{ matrix.LIBRARY }}-${{ matrix.VERSION }}

- name: Set ENV
shell: "bash"
run: |
set -x
if [[ -d "$GITHUB_WORKSPACE${{ matrix.OPENSSL_DIR }}" ]] && [[ "${{ matrix.OPENSSL_DIR }}" == "/openssl" ]] ; then echo "OPENSSL_DIR=$GITHUB_WORKSPACE${{ matrix.OPENSSL_DIR }}" >> $GITHUB_ENV ; echo "OPENSSL_BIN=$GITHUB_WORKSPACE${{ matrix.OPENSSL_DIR }}/bin/openssl" >> $GITHUB_ENV ; fi
echo "LIBRARY=$(echo ${LIBRARY})" >> $GITHUB_ENV
echo "VERSION=$(echo ${VERSION})" >> $GITHUB_ENV
env:
LIBRARY: ${{ matrix.LIBRARY }}
VERSION: ${{ matrix.VERSION }}
- name: Run Prepare
if: steps.openssl_cache.outputs.cache-hit != 'true'
shell: "bash"
run: |
set +e
echo $PWD
openssl version
echo "OPENSSL_DIR=$OPENSSL_DIR"
if [[ ! -z "$OPENSSL_DIR" ]] ; then "./bin/test_build_openssl.sh" ; fi
if [[ "$CI" == 'true' ]] && [[ -f "$OPENSSL_BIN" ]]; then $OPENSSL_BIN version; else openssl version; fi
- name: Run Tests
shell: "bash"
run: |
yarn install
yarn run test
92 changes: 92 additions & 0 deletions .github/workflows/tests_output.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: "Test Different Outputs"
on:
workflow_dispatch:
env:
TARGET: "x86_64-unknown-linux-gnu"
jobs:
build:
if: github.ref != 'refs/heads/master'
name: "RuN!!!!"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
OPENSSL_DIR: [""]
LIBRARY: [""]
VERSION: [""]
include:
- LIBRARY: openssl
VERSION: 0.9.8zh
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.0.1u
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.0.2u
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.1.0l
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 1.1.1l
OPENSSL_DIR: "/openssl"
- LIBRARY: openssl
VERSION: 3.0.0
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.4.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.5.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.6.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.7.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.8.3
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 2.9.2
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.0.2
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.1.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.2.7
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.3.5
OPENSSL_DIR: "/openssl"
- LIBRARY: libressl
VERSION: 3.4.2
OPENSSL_DIR: "/openssl"
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install -y haveged ca-certificates
- run: |
sudo haveged -w 2048
mkdir openssl
- name: Cache OpenSSL Binary
uses: actions/cache@v2
with:
path: ./openssl/
key: ${{ runner.os }}-build-openssl-output-v1-${{ matrix.LIBRARY }}-${{ matrix.VERSION }}
- name: "Build and run command"
run: |
set +e -x
if [[ "$OPENSSL_DIR" != "" ]]; then "./bin/test_build_openssl.sh" ; fi
if [[ "$CI" == 'true' ]] && [[ -f "./openssl/bin/openssl" ]]; then
./openssl/bin/openssl version
else
openssl version
fi
env:
OPENSSL_DIR: ${{ matrix.OPENSSL_DIR }}
LIBRARY: ${{ matrix.LIBRARY }}
VERSION: ${{ matrix.VERSION }}
Loading