-
Notifications
You must be signed in to change notification settings - Fork 0
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
Contributions to OpenVPN #1
base: upstream
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -424,3 +424,61 @@ jobs: | |
run: echo 'RUN_SUDO="sudo -E"' >tests/t_server_null.rc | ||
- name: make check | ||
run: make -j3 check VERBOSE=1 | ||
|
||
aws-lc: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
ssllib: [ awslc ] | ||
build: [ normal, asan ] | ||
include: | ||
- build: asan | ||
cflags: "-fsanitize=address -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" | ||
ldflags: -fsanitize=address -fno-sanitize-recover=all | ||
cc: clang | ||
- build: normal | ||
cflags: "-O2 -g" | ||
ldflags: "" | ||
cc: gcc | ||
|
||
name: "${{matrix.cc}} ${{matrix.build}} - ${{matrix.os}} - ${{matrix.ssllib}}" | ||
runs-on: ${{matrix.os}} | ||
env: | ||
CFLAGS: ${{ matrix.cflags }} | ||
LDFLAGS: ${{ matrix.ldflags }} | ||
CC: ${{matrix.cc}} | ||
UBSAN_OPTIONS: print_stacktrace=1 | ||
AWS_LC_INSTALL: ${{ github.workspace }}/aws-lc/aws-lc-install | ||
|
||
steps: | ||
- name: Install dependencies | ||
run: sudo apt update && sudo apt install -y cmake gcc ninja-build golang make liblzo2-dev libpam0g-dev liblz4-dev linux-libc-dev man2html clang libcmocka-dev python3-docutils python3-jinja2 python3-jsonschema libtool automake autoconf pkg-config libcap-ng-dev libnl-genl-3-dev | ||
- name: "AWS-LC: checkout" | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
path: aws-lc | ||
repository: aws/aws-lc | ||
ref: main | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For their other libcryptos do they use a specific release or follow main? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mbedtls and libressl use a tagged release, but I think we should be following main to have two way compatibility checks. I guess we're testing mainline LC in our CI with OpenVPN anyway so we don't need to. I don't have a preference, thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, if we're building their main and not running into any breaking changes then this is probably fine. I just don't want to create noise in their CI if something subtle changes. |
||
- name: "AWS-LC: build" | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../aws-lc-install -DBUILD_SHARED_LIBS=1 ../ | ||
smittals2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ninja install | ||
working-directory: aws-lc | ||
- name: Checkout OpenVPN | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: autoconf | ||
run: autoreconf -fvi | ||
- name: configure with AWS-LC | ||
run: | | ||
OPENSSL_CFLAGS="-I/${{ env.AWS_LC_INSTALL }}/include" \ | ||
OPENSSL_LIBS="-L/${{ env.AWS_LC_INSTALL }}/lib -lssl -lcrypto" \ | ||
./configure --with-crypto-library=openssl | ||
- name: make all | ||
run: make -j3 | ||
- name: configure checks | ||
run: echo 'RUN_SUDO="sudo -E"' >tests/t_server_null.rc | ||
- name: make check | ||
run: LD_LIBRARY_PATH="${{ env.AWS_LC_INSTALL }}/lib" make -j3 check VERBOSE=1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
This version of OpenVPN supports AWS-LC (AWS Libcrypto), AWS's open-source cryptographic library. | ||
AWS-LC has been FIPS validated by NIST and has 140-3 certificates for both dynamic and static builds. | ||
|
||
If you encounter bugs in OpenVPN while using AWS-LC: | ||
1. Try compiling OpenVPN with OpenSSL to determine if the issue is specific to AWS-LC | ||
2. For AWS-LC-specific issues, please report them at: https://github.com/aws/aws-lc | ||
|
||
To build and install OpenVPN with AWS-LC: | ||
|
||
OPENSSL_CFLAGS="-I/${AWS_LC_INSTALL_FOLDER}/include" \ | ||
OPENSSL_LIBS="-L/${AWS_LC_INSTALL_FOLDER}/lib -lssl -lcrypto" \ | ||
./configure --with-crypto-library=openssl | ||
make | ||
make install | ||
|
||
export LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib" | ||
|
||
When running tests, LD_LIBRARY_PATH must be passed in again: | ||
|
||
LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib" make check | ||
|
||
************************************************************************* | ||
Due to limitations in AWS-LC, the following features are missing | ||
* Windows CryptoAPI support | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this effect OpenVPN customers? Can you use OpenVPN through the Windows CryptoAPI? Or does OpenVPN use Windows CryptoAPI to do something that doesn't work with AWS-LC now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like OpenVPN has some support for the Windows CryptoAPI. OpenSSL has some APIs that seem to work with CryptoAPI but we don't support these like wolfssl and mbedtls |
||
* Using TLS1_PRF through the EVP_PKEY API | ||
smittals2 marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do they use specific versions or
ubuntu-latest
in other builds?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using ubuntu 22.04. Copied most of the boilerplate from other tests. Changed all the build steps tho