diff options
127 files changed, 3093 insertions, 1244 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index d095d6d..7bc59c5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml | |||
@@ -10,7 +10,7 @@ concurrency: | |||
10 | jobs: | 10 | jobs: |
11 | test: | 11 | test: |
12 | name: "Test ${{ matrix.name }}" | 12 | name: "Test ${{ matrix.name }}" |
13 | runs-on: ubuntu-latest | 13 | runs-on: ubuntu-24.04 |
14 | permissions: | 14 | permissions: |
15 | contents: read | 15 | contents: read |
16 | strategy: | 16 | strategy: |
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 966d92a..f994f99 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml | |||
@@ -9,7 +9,7 @@ concurrency: | |||
9 | 9 | ||
10 | jobs: | 10 | jobs: |
11 | Fuzzing: | 11 | Fuzzing: |
12 | runs-on: ubuntu-latest | 12 | runs-on: ubuntu-24.04 |
13 | steps: | 13 | steps: |
14 | - name: Build Fuzzers | 14 | - name: Build Fuzzers |
15 | id: build | 15 | id: build |
@@ -26,7 +26,7 @@ jobs: | |||
26 | dry-run: false | 26 | dry-run: false |
27 | language: c++ | 27 | language: c++ |
28 | - name: Upload Crash | 28 | - name: Upload Crash |
29 | uses: actions/upload-artifact@v3 | 29 | uses: actions/upload-artifact@v4 |
30 | if: failure() && steps.build.outcome == 'success' | 30 | if: failure() && steps.build.outcome == 'success' |
31 | with: | 31 | with: |
32 | name: artifacts | 32 | name: artifacts |
diff --git a/.github/workflows/cmake-config.yml b/.github/workflows/cmake-config.yml new file mode 100644 index 0000000..0988102 --- /dev/null +++ b/.github/workflows/cmake-config.yml | |||
@@ -0,0 +1,98 @@ | |||
1 | # GitHub Actions workflow to check CMake config. | ||
2 | name: "CMake Check" | ||
3 | |||
4 | on: | ||
5 | push: {} | ||
6 | pull_request: {} | ||
7 | |||
8 | concurrency: | ||
9 | group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | ||
10 | cancel-in-progress: true | ||
11 | |||
12 | jobs: | ||
13 | check: | ||
14 | name: "${{ matrix.os }}" | ||
15 | runs-on: "${{ matrix.os }}" | ||
16 | strategy: | ||
17 | fail-fast: true | ||
18 | matrix: | ||
19 | os: [ "windows-2022", "macos-14", "ubuntu-24.04" ] | ||
20 | defaults: | ||
21 | run: | ||
22 | shell: "bash" | ||
23 | permissions: | ||
24 | contents: read | ||
25 | steps: | ||
26 | - name: "Checkout repository" | ||
27 | uses: actions/checkout@v4 | ||
28 | |||
29 | - name: "Setup Windows dependencies" | ||
30 | if: runner.os == 'Windows' | ||
31 | uses: msys2/setup-msys2@v2 | ||
32 | with: | ||
33 | update: true | ||
34 | install: >- | ||
35 | autoconf | ||
36 | automake | ||
37 | diffutils | ||
38 | libtool | ||
39 | gcc | ||
40 | git | ||
41 | patch | ||
42 | perl | ||
43 | |||
44 | - name: "Setup macOS dependencies" | ||
45 | if: runner.os == 'macOS' | ||
46 | run: brew install automake libtool | ||
47 | |||
48 | - name: "Prepare source tree for build (Windows)" | ||
49 | if: runner.os == 'Windows' | ||
50 | shell: "msys2 {0}" | ||
51 | run: ./autogen.sh | ||
52 | |||
53 | - name: "Prepare source tree for build (Unix)" | ||
54 | if: runner.os != 'Windows' | ||
55 | run: ./autogen.sh | ||
56 | |||
57 | - name: "Configure" | ||
58 | run: | | ||
59 | cmake -S . \ | ||
60 | -B build \ | ||
61 | -D CMAKE_BUILD_TYPE=Release \ | ||
62 | -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../local | ||
63 | |||
64 | - name: "Build" | ||
65 | run: cmake --build build --config Release --verbose | ||
66 | |||
67 | - name: "Install" | ||
68 | run: cmake --install build --config Release | ||
69 | |||
70 | - name: "Consume from the build directory - Configure" | ||
71 | run: | | ||
72 | cmake -S tests/cmake \ | ||
73 | -B consumer-build \ | ||
74 | -D CMAKE_BUILD_TYPE=Release \ | ||
75 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/build | ||
76 | |||
77 | - name: "Consume from the build directory - Build" | ||
78 | run: cmake --build consumer-build --config Release --verbose | ||
79 | |||
80 | - name: "Consume from the install directory (CMAKE_PREFIX_PATH) - Configure" | ||
81 | run: | | ||
82 | cmake -S tests/cmake \ | ||
83 | -B consumer-install-prefix \ | ||
84 | -D CMAKE_BUILD_TYPE=Release \ | ||
85 | -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/../local | ||
86 | |||
87 | - name: "Consume from the install directory (CMAKE_PREFIX_PATH) - Build" | ||
88 | run: cmake --build consumer-install-prefix --config Release --verbose | ||
89 | |||
90 | - name: "Consume from the install directory (LibreSSL_DIR) - Configure" | ||
91 | run: | | ||
92 | cmake -S tests/cmake \ | ||
93 | -B consumer-install-dir \ | ||
94 | -D CMAKE_BUILD_TYPE=Release \ | ||
95 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/../local/lib/cmake/LibreSSL | ||
96 | |||
97 | - name: "Consume from the install directory (LibreSSL_DIR) - Build" | ||
98 | run: cmake --build consumer-install-dir --config Release --verbose | ||
diff --git a/.github/workflows/cmake_config.yml b/.github/workflows/cmake_config.yml deleted file mode 100644 index be9f114..0000000 --- a/.github/workflows/cmake_config.yml +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | name: cmake_config | ||
2 | |||
3 | on: [push, pull_request] | ||
4 | |||
5 | concurrency: | ||
6 | group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | ||
7 | cancel-in-progress: true | ||
8 | |||
9 | jobs: | ||
10 | cmake-check: | ||
11 | defaults: | ||
12 | run: | ||
13 | shell: bash | ||
14 | strategy: | ||
15 | matrix: | ||
16 | os: [windows-latest, macos-latest, ubuntu-latest] | ||
17 | runs-on: ${{ matrix.os }} | ||
18 | continue-on-error: false | ||
19 | name: ${{ matrix.os }} | ||
20 | steps: | ||
21 | - name: Setup Windows dependencies | ||
22 | if: runner.os == 'Windows' | ||
23 | uses: msys2/setup-msys2@v2 | ||
24 | with: | ||
25 | update: true | ||
26 | install: >- | ||
27 | autoconf | ||
28 | automake | ||
29 | diffutils | ||
30 | libtool | ||
31 | gcc | ||
32 | git | ||
33 | patch | ||
34 | perl | ||
35 | |||
36 | - name: Setup macOS dependencies | ||
37 | if: runner.os == 'macOS' | ||
38 | run: brew install automake libtool | ||
39 | |||
40 | - uses: actions/checkout@main | ||
41 | |||
42 | - name: Prepare source tree for build (Windows) | ||
43 | if: runner.os == 'Windows' | ||
44 | run: ./autogen.sh | ||
45 | shell: msys2 {0} | ||
46 | |||
47 | - name: Prepare source tree for build (Unix) | ||
48 | if: runner.os != 'Windows' | ||
49 | run: ./autogen.sh | ||
50 | |||
51 | - name: Configure | ||
52 | run: | | ||
53 | cmake -S . \ | ||
54 | -B build \ | ||
55 | -D CMAKE_BUILD_TYPE=Release \ | ||
56 | -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../local | ||
57 | |||
58 | - name: Build | ||
59 | run: cmake --build build --config Release --verbose | ||
60 | |||
61 | - name: Install | ||
62 | run: cmake --install build --config Release | ||
63 | |||
64 | - name: Consume from the build directory - Configure | ||
65 | run: | | ||
66 | cmake -S tests/cmake \ | ||
67 | -B consumer-build \ | ||
68 | -D CMAKE_BUILD_TYPE=Release \ | ||
69 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/build | ||
70 | - name: Consume from the build directory - Build | ||
71 | run: cmake --build consumer-build --config Release --verbose | ||
72 | |||
73 | - name: Consume from the install directory (CMAKE_PREFIX_PATH) - Configure | ||
74 | run: | | ||
75 | cmake -S tests/cmake \ | ||
76 | -B consumer-install-prefix \ | ||
77 | -D CMAKE_BUILD_TYPE=Release \ | ||
78 | -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/../local | ||
79 | - name: Consume from the install directory (CMAKE_PREFIX_PATH) - Build | ||
80 | run: cmake --build consumer-install-prefix --config Release --verbose | ||
81 | |||
82 | - name: Consume from the install directory (LibreSSL_DIR) - Configure | ||
83 | run: | | ||
84 | cmake -S tests/cmake \ | ||
85 | -B consumer-install-dir \ | ||
86 | -D CMAKE_BUILD_TYPE=Release \ | ||
87 | -D LibreSSL_DIR=$GITHUB_WORKSPACE/../local/lib/cmake/LibreSSL | ||
88 | - name: Consume from the install directory (LibreSSL_DIR) - Build | ||
89 | run: cmake --build consumer-install-dir --config Release --verbose | ||
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 112678f..ae43398 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml | |||
@@ -13,7 +13,7 @@ concurrency: | |||
13 | jobs: | 13 | jobs: |
14 | scan: | 14 | scan: |
15 | name: "Scan" | 15 | name: "Scan" |
16 | runs-on: "ubuntu-latest" | 16 | runs-on: "ubuntu-24.04" |
17 | if: github.repository_owner == 'libressl' # Prevent running on forks | 17 | if: github.repository_owner == 'libressl' # Prevent running on forks |
18 | permissions: | 18 | permissions: |
19 | contents: read | 19 | contents: read |
@@ -31,7 +31,7 @@ jobs: | |||
31 | PROJECT: "libressl-portable%2Fportable" | 31 | PROJECT: "libressl-portable%2Fportable" |
32 | COVERITY_SCAN_TOKEN: "${{ secrets.COVERITY_SCAN_TOKEN }}" | 32 | COVERITY_SCAN_TOKEN: "${{ secrets.COVERITY_SCAN_TOKEN }}" |
33 | run: | | 33 | run: | |
34 | wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$PROJECT" -O coverity_tool.tar.gz | 34 | wget -nv https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$PROJECT" -O coverity_tool.tar.gz |
35 | mkdir coverity_tool | 35 | mkdir coverity_tool |
36 | tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool | 36 | tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool |
37 | 37 | ||
diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 07f140d..013480f 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml | |||
@@ -14,7 +14,7 @@ concurrency: | |||
14 | jobs: | 14 | jobs: |
15 | test: | 15 | test: |
16 | name: "Emscripten" | 16 | name: "Emscripten" |
17 | runs-on: "ubuntu-latest" | 17 | runs-on: "ubuntu-24.04" |
18 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} | 18 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} |
19 | permissions: | 19 | permissions: |
20 | contents: read | 20 | contents: read |
@@ -42,7 +42,7 @@ jobs: | |||
42 | # Test ASAN with and without ASM enabled. | 42 | # Test ASAN with and without ASM enabled. |
43 | test-asan: | 43 | test-asan: |
44 | name: "ASAN (no-asm)" | 44 | name: "ASAN (no-asm)" |
45 | runs-on: "ubuntu-latest" | 45 | runs-on: "ubuntu-24.04" |
46 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} | 46 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} |
47 | permissions: | 47 | permissions: |
48 | contents: read | 48 | contents: read |
diff --git a/.github/workflows/fedora-rawhide.yml b/.github/workflows/fedora-rawhide.yml index ec3c63d..dff4b6a 100644 --- a/.github/workflows/fedora-rawhide.yml +++ b/.github/workflows/fedora-rawhide.yml | |||
@@ -18,15 +18,15 @@ jobs: | |||
18 | matrix: | 18 | matrix: |
19 | cc: [ gcc, clang ] | 19 | cc: [ gcc, clang ] |
20 | name: ${{ matrix.cc }} | 20 | name: ${{ matrix.cc }} |
21 | runs-on: ubuntu-latest | 21 | runs-on: ubuntu-24.04 |
22 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} | 22 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} |
23 | container: | 23 | container: |
24 | image: fedora:rawhide | 24 | image: fedora:rawhide |
25 | steps: | 25 | steps: |
26 | - uses: actions/checkout@v3 | 26 | - uses: actions/checkout@v4 |
27 | - name: Install dependencies | 27 | - name: Install dependencies |
28 | run: | | 28 | run: | |
29 | dnf -y install git make clang cmake ninja-build autoconf automake libtool diffutils patch | 29 | dnf -y install git make clang cmake ninja-build autoconf automake libtool diffutils patch gawk |
30 | - name: Pull upstream source | 30 | - name: Pull upstream source |
31 | run: | | 31 | run: | |
32 | ./update.sh | 32 | ./update.sh |
diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml new file mode 100644 index 0000000..850dbe2 --- /dev/null +++ b/.github/workflows/freebsd.yml | |||
@@ -0,0 +1,71 @@ | |||
1 | # GitHub Actions workflow to run tests on a FreeBSD VM. | ||
2 | name: "FreeBSD" | ||
3 | |||
4 | on: | ||
5 | workflow_dispatch: | ||
6 | schedule: | ||
7 | - cron: "0 0 * * *" # At 00:00 daily. | ||
8 | |||
9 | concurrency: | ||
10 | group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | ||
11 | cancel-in-progress: true | ||
12 | |||
13 | env: | ||
14 | FREEBSD_VERSION: "14.1" | ||
15 | |||
16 | jobs: | ||
17 | autoconf: | ||
18 | name: "autoconf" | ||
19 | runs-on: ubuntu-24.04 | ||
20 | if: github.repository_owner == 'libressl' || github.event_name != 'schedule' | ||
21 | permissions: | ||
22 | contents: read | ||
23 | steps: | ||
24 | - name: "Checkout repository" | ||
25 | uses: actions/checkout@v4 | ||
26 | |||
27 | - name: "Setup" | ||
28 | run: | | ||
29 | sudo apt-get update | ||
30 | sudo apt-get install -y automake autoconf libtool | ||
31 | ./autogen.sh | ||
32 | |||
33 | - name: "Build on VM" | ||
34 | uses: vmactions/freebsd-vm@v1 | ||
35 | with: | ||
36 | release: "${{ env.FREEBSD_VERSION }}" | ||
37 | copyback: false | ||
38 | prepare: | | ||
39 | pkg install -y autoconf automake libtool | ||
40 | run: | | ||
41 | ./configure | ||
42 | make -j2 check || (cat tests/test-suite.log && exit 1) | ||
43 | |||
44 | cmake: | ||
45 | name: "cmake" | ||
46 | runs-on: ubuntu-24.04 | ||
47 | if: github.repository_owner == 'libressl' || github.event_name != 'schedule' | ||
48 | permissions: | ||
49 | contents: read | ||
50 | steps: | ||
51 | - name: "Checkout repository" | ||
52 | uses: actions/checkout@v4 | ||
53 | |||
54 | - name: "Setup" | ||
55 | run: | | ||
56 | sudo apt-get update | ||
57 | sudo apt-get install -y automake autoconf libtool | ||
58 | ./autogen.sh | ||
59 | |||
60 | - name: "Build on VM" | ||
61 | uses: vmactions/freebsd-vm@v1 | ||
62 | with: | ||
63 | release: "${{ env.FREEBSD_VERSION }}" | ||
64 | copyback: false | ||
65 | prepare: | | ||
66 | pkg install -y cmake ninja | ||
67 | run: | | ||
68 | export CTEST_OUTPUT_ON_FAILURE=1 | ||
69 | cmake -G Ninja -B build | ||
70 | ninja -C build | ||
71 | ninja -C build test | ||
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5c85d4b..de9d8d3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml | |||
@@ -22,30 +22,40 @@ jobs: | |||
22 | strategy: | 22 | strategy: |
23 | fail-fast: false | 23 | fail-fast: false |
24 | matrix: | 24 | matrix: |
25 | os: ["ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"] | 25 | os: ["ubuntu-22.04", "ubuntu-24.04"] |
26 | arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips32", "mips64"] | 26 | arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips32", "mips64"] |
27 | compiler: ["gcc"] | 27 | compiler: ["gcc"] |
28 | include: | 28 | include: |
29 | - os: "ubuntu-20.04" | 29 | - os: "ubuntu-22.04" |
30 | arch: "native" | 30 | arch: "native" |
31 | compiler: "clang" | 31 | compiler: "clang" |
32 | - os: "ubuntu-22.04" | 32 | - os: "ubuntu-24.04" |
33 | arch: "native" | ||
34 | compiler: "clang" | ||
35 | - os: "ubuntu-24.04" # loong64 | ||
36 | arch: "loong64" | ||
37 | compiler: "gcc" | ||
38 | - os: "ubuntu-24.04-arm" | ||
39 | arch: "native" | ||
40 | compiler: "gcc" | ||
41 | - os: "ubuntu-24.04-arm" | ||
33 | arch: "native" | 42 | arch: "native" |
34 | compiler: "clang" | 43 | compiler: "clang" |
44 | |||
35 | steps: | 45 | steps: |
36 | - name: "Checkout repository" | 46 | - name: "Checkout repository" |
37 | uses: actions/checkout@v4 | 47 | uses: actions/checkout@v4 |
38 | 48 | ||
39 | - name: "Run tests" | 49 | - name: "Run tests" |
40 | run: ./scripts/test | 50 | run: ./scripts/test || (status=$?; cat tests/test-suite.log; exit $status) |
41 | env: | 51 | env: |
42 | ARCH: "${{ matrix.arch }}" | 52 | ARCH: "${{ matrix.arch }}" |
43 | CC: "${{ matrix.compiler }}" | 53 | CC: "${{ matrix.compiler }}" |
44 | 54 | ||
45 | # Test ASAN with and without ASM enabled. | 55 | # Test ASAN with and without ASM enabled. |
46 | test-asan: | 56 | test-asan: |
47 | name: "ASAN (${{ matrix.asm == 'ON' && 'asm' || 'no-asm' }})" | 57 | name: "${{ matrix.os }} - ASAN (${{ matrix.asm == 'ON' && 'asm' || 'no-asm' }})" |
48 | runs-on: "ubuntu-latest" | 58 | runs-on: "${{ matrix.os }}" |
49 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} | 59 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} |
50 | permissions: | 60 | permissions: |
51 | contents: read | 61 | contents: read |
@@ -53,6 +63,7 @@ jobs: | |||
53 | fail-fast: false | 63 | fail-fast: false |
54 | matrix: | 64 | matrix: |
55 | asm: [ON, OFF] | 65 | asm: [ON, OFF] |
66 | os: ["ubuntu-24.04", "ubuntu-24.04-arm"] | ||
56 | steps: | 67 | steps: |
57 | - name: "Checkout repository" | 68 | - name: "Checkout repository" |
58 | uses: actions/checkout@v4 | 69 | uses: actions/checkout@v4 |
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d5dd3eb..ac29bc0 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml | |||
@@ -21,7 +21,7 @@ jobs: | |||
21 | strategy: | 21 | strategy: |
22 | fail-fast: false | 22 | fail-fast: false |
23 | matrix: | 23 | matrix: |
24 | os: ["macos-14", "macos-13", "macos-12"] | 24 | os: ["macos-15", "macos-14", "macos-13"] |
25 | arch: ["arm64", "x86_64"] | 25 | arch: ["arm64", "x86_64"] |
26 | steps: | 26 | steps: |
27 | - name: "Install required packages" | 27 | - name: "Install required packages" |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2e94b8..c135920 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml | |||
@@ -15,7 +15,7 @@ permissions: | |||
15 | jobs: | 15 | jobs: |
16 | release: | 16 | release: |
17 | name: "Release" | 17 | name: "Release" |
18 | runs-on: "ubuntu-latest" | 18 | runs-on: "ubuntu-24.04" |
19 | outputs: | 19 | outputs: |
20 | upload_url: "${{ steps.create_release.outputs.upload_url }}" | 20 | upload_url: "${{ steps.create_release.outputs.upload_url }}" |
21 | steps: | 21 | steps: |
@@ -29,7 +29,7 @@ jobs: | |||
29 | 29 | ||
30 | - name: "Create GitHub release" | 30 | - name: "Create GitHub release" |
31 | id: create_release | 31 | id: create_release |
32 | uses: softprops/action-gh-release@v1 | 32 | uses: softprops/action-gh-release@v2 |
33 | with: | 33 | with: |
34 | body_path: "${{ github.workspace }}/release-changelog.txt" | 34 | body_path: "${{ github.workspace }}/release-changelog.txt" |
35 | 35 | ||
@@ -72,14 +72,10 @@ jobs: | |||
72 | run: cmake --install build --config Release | 72 | run: cmake --install build --config Release |
73 | 73 | ||
74 | - shell: pwsh | 74 | - shell: pwsh |
75 | run: Compress-Archive -Path local\* local.zip | 75 | run: Compress-Archive -Path local\* "libressl_${{ github.ref_name }}_windows_${{ matrix.arch }}.zip" |
76 | 76 | ||
77 | - name: "Upload release artifact" | 77 | - name: "Upload release artifact" |
78 | uses: actions/upload-release-asset@v1 | 78 | uses: softprops/action-gh-release@v2 |
79 | env: | ||
80 | GITHUB_TOKEN: "${{ github.token }}" | ||
81 | with: | 79 | with: |
82 | upload_url: "${{ needs.release.outputs.upload_url }}" | 80 | files: | |
83 | asset_path: "local.zip" | 81 | libressl_${{ github.ref_name }}_windows_${{ matrix.arch }}.zip |
84 | asset_name: "libressl_${{ github.ref_name }}_windows_${{ matrix.arch }}.zip" | ||
85 | asset_content_type: "application/zip" | ||
diff --git a/.github/workflows/rust-openssl.yml b/.github/workflows/rust-openssl.yml index b707c4b..d3b2bee 100644 --- a/.github/workflows/rust-openssl.yml +++ b/.github/workflows/rust-openssl.yml | |||
@@ -13,7 +13,7 @@ concurrency: | |||
13 | jobs: | 13 | jobs: |
14 | test: | 14 | test: |
15 | name: "Test" | 15 | name: "Test" |
16 | runs-on: "ubuntu-latest" | 16 | runs-on: "ubuntu-24.04" |
17 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} | 17 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} |
18 | permissions: | 18 | permissions: |
19 | contents: read | 19 | contents: read |
@@ -34,6 +34,10 @@ jobs: | |||
34 | - name: "Run rust-openssl tests" | 34 | - name: "Run rust-openssl tests" |
35 | run: | | 35 | run: | |
36 | cd rust-openssl | 36 | cd rust-openssl |
37 | |||
38 | # apply patch - see #1187 | ||
39 | curl -L https://raw.githubusercontent.com/openbsd/ports/refs/heads/master/security/rust-openssl-tests/patches/patch-openssl-sys_src_handwritten_evp_rs | patch -p0 | ||
40 | |||
37 | # instead of erroring use the last supported version | 41 | # instead of erroring use the last supported version |
38 | ed -s openssl-sys/build/main.rs <<-EOF | 42 | ed -s openssl-sys/build/main.rs <<-EOF |
39 | /_ => version_error/-1 | 43 | /_ => version_error/-1 |
diff --git a/.github/workflows/solaris.yml b/.github/workflows/solaris.yml index f68a2aa..902e488 100644 --- a/.github/workflows/solaris.yml +++ b/.github/workflows/solaris.yml | |||
@@ -13,7 +13,7 @@ concurrency: | |||
13 | jobs: | 13 | jobs: |
14 | test: | 14 | test: |
15 | name: "Solaris" | 15 | name: "Solaris" |
16 | runs-on: ubuntu-latest | 16 | runs-on: ubuntu-24.04 |
17 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} | 17 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} |
18 | permissions: | 18 | permissions: |
19 | contents: read | 19 | contents: read |
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6aca153..7494a21 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml | |||
@@ -21,14 +21,15 @@ jobs: | |||
21 | strategy: | 21 | strategy: |
22 | fail-fast: false | 22 | fail-fast: false |
23 | matrix: | 23 | matrix: |
24 | os: ["windows-2022", "windows-2019"] | 24 | os: ["windows-2022", "windows-2025"] |
25 | arch: ["ARM64", "x64", "Win32"] | 25 | arch: ["ARM64", "x64", "Win32"] |
26 | shared: ["ON", "OFF"] | 26 | shared: ["ON", "OFF"] |
27 | include: | 27 | include: |
28 | - os: "windows-2022" | 28 | - os: "windows-2022" |
29 | generator: "Visual Studio 17 2022" | 29 | generator: "Visual Studio 17 2022" |
30 | - os: "windows-2019" | 30 | - os: "windows-2025" |
31 | generator: "Visual Studio 16 2019" | 31 | # XXX - use appropriate value |
32 | generator: "Visual Studio 17 2022" | ||
32 | steps: | 33 | steps: |
33 | - name: "Checkout repository" | 34 | - name: "Checkout repository" |
34 | uses: actions/checkout@v4 | 35 | uses: actions/checkout@v4 |
@@ -50,7 +51,7 @@ jobs: | |||
50 | 51 | ||
51 | - name: "Configure CMake" | 52 | - name: "Configure CMake" |
52 | shell: cmd | 53 | shell: cmd |
53 | run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} DBUILD_SHARED_LIBS=${{ matrix.shared }} -DCMAKE_INSTALL_PREFIX=../local | 54 | run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -D BUILD_SHARED_LIBS=${{ matrix.shared }} -D CMAKE_INSTALL_PREFIX=../local |
54 | 55 | ||
55 | - name: "Build" | 56 | - name: "Build" |
56 | shell: cmd | 57 | shell: cmd |
@@ -38,7 +38,8 @@ Makefile | |||
38 | Makefile.in | 38 | Makefile.in |
39 | 39 | ||
40 | # CMake stuff | 40 | # CMake stuff |
41 | build | 41 | build* |
42 | cmake-build-debug/ | ||
42 | 43 | ||
43 | # Libtool stuff | 44 | # Libtool stuff |
44 | .libs | 45 | .libs |
@@ -107,17 +108,20 @@ tests/constraints* | |||
107 | tests/crypto_test* | 108 | tests/crypto_test* |
108 | tests/ctlog.conf | 109 | tests/ctlog.conf |
109 | tests/*.crt | 110 | tests/*.crt |
111 | tests/ec_arithmetic* | ||
110 | tests/ec_point_conversion* | 112 | tests/ec_point_conversion* |
111 | tests/ecc_cdh* | 113 | tests/ecc_cdh* |
112 | tests/evp_pkey_check* | ||
113 | tests/evp_pkey_cleanup* | 114 | tests/evp_pkey_cleanup* |
114 | tests/explicit_bzero* | 115 | tests/explicit_bzero* |
115 | tests/freenull* | 116 | tests/freenull* |
116 | tests/gost2814789t* | 117 | tests/gost2814789t* |
117 | tests/key_schedule* | 118 | tests/key_schedule* |
118 | tests/lhash_test* | 119 | tests/lhash_test* |
120 | tests/mlkem* | ||
119 | tests/mont* | 121 | tests/mont* |
122 | tests/parse* | ||
120 | tests/policy* | 123 | tests/policy* |
124 | tests/renegotiation_test* | ||
121 | tests/rfc3779* | 125 | tests/rfc3779* |
122 | tests/rfc5280time* | 126 | tests/rfc5280time* |
123 | tests/ssl_get_shared_ciphers* | 127 | tests/ssl_get_shared_ciphers* |
@@ -130,6 +134,7 @@ tests/tls_ext_alpn* | |||
130 | tests/tls_prf* | 134 | tests/tls_prf* |
131 | tests/*test | 135 | tests/*test |
132 | tests/tests.h | 136 | tests/tests.h |
137 | tests/test.h | ||
133 | tests/*test.c | 138 | tests/*test.c |
134 | tests/pbkdf2* | 139 | tests/pbkdf2* |
135 | tests/*.pem | 140 | tests/*.pem |
@@ -141,6 +146,7 @@ tests/x509_algor* | |||
141 | tests/x509_asn1* | 146 | tests/x509_asn1* |
142 | tests/x509_extensions_test* | 147 | tests/x509_extensions_test* |
143 | tests/x509_info* | 148 | tests/x509_info* |
149 | tests/x509_name_test* | ||
144 | tests/x509attribute* | 150 | tests/x509attribute* |
145 | tests/x509name* | 151 | tests/x509name* |
146 | tests/x509req_ext* | 152 | tests/x509req_ext* |
@@ -149,7 +155,7 @@ tests/x509req_ext* | |||
149 | tests/client.c | 155 | tests/client.c |
150 | tests/init_pledge.c | 156 | tests/init_pledge.c |
151 | tests/server.c | 157 | tests/server.c |
152 | tests/util.c | 158 | tests/*util.c |
153 | tests/valid_handshakes_terminate* | 159 | tests/valid_handshakes_terminate* |
154 | tests/handshake_table* | 160 | tests/handshake_table* |
155 | 161 | ||
@@ -169,7 +175,6 @@ autom4te.cache | |||
169 | 175 | ||
170 | # Libtool adds these, at least sometimes | 176 | # Libtool adds these, at least sometimes |
171 | INSTALL | 177 | INSTALL |
172 | /COPYING | ||
173 | !m4/check*.m4 | 178 | !m4/check*.m4 |
174 | m4/l* | 179 | m4/l* |
175 | 180 | ||
@@ -200,6 +205,7 @@ ssl/VERSION | |||
200 | tls/VERSION | 205 | tls/VERSION |
201 | libtls-standalone/VERSION | 206 | libtls-standalone/VERSION |
202 | 207 | ||
208 | crypto/*.mk | ||
203 | ssl/hidden | 209 | ssl/hidden |
204 | ssl/*.c | 210 | ssl/*.c |
205 | ssl/*.h | 211 | ssl/*.h |
@@ -233,29 +239,89 @@ include/openssl/*.h | |||
233 | !/apps/openssl/apps_win.c | 239 | !/apps/openssl/apps_win.c |
234 | !/apps/openssl/certhash_win.c | 240 | !/apps/openssl/certhash_win.c |
235 | 241 | ||
236 | /crypto/* | 242 | /crypto/*.c |
237 | !/crypto/Makefile.am.* | 243 | /crypto/*.h |
238 | !/crypto/compat/arc4random.h | 244 | /crypto/aes/ |
239 | !/crypto/compat/b_win.c | 245 | /crypto/arch/aarch64/crypto_arch.h |
240 | !/crypto/compat/explicit_bzero_win.c | 246 | /crypto/arch/aarch64/crypto_cpu_caps.c |
241 | !/crypto/compat/freezero.c | 247 | /crypto/arch/alpha/ |
242 | !/crypto/compat/getpagesize.c | 248 | /crypto/arch/amd64/ |
243 | !/crypto/compat/posix_win.c | 249 | /crypto/arch/arm/ |
244 | !/crypto/compat/bsd_asprintf.c | 250 | /crypto/arch/hppa/ |
245 | !/crypto/compat/ui_openssl_win.c | 251 | /crypto/arch/i386/ |
246 | !/crypto/compat/crypto_lock_win.c | 252 | /crypto/arch/m88k/ |
247 | !/crypto/CMakeLists.txt | 253 | /crypto/arch/mips64/ |
248 | 254 | /crypto/arch/powerpc/ | |
249 | !/libtls-standalone/compat/Makefile.am | 255 | /crypto/arch/powerpc64/ |
250 | /libtls-standalone/include/*.h | 256 | /crypto/arch/riscv64/ |
251 | /libtls-standalone/src/*.c | 257 | /crypto/arch/sh/ |
252 | /libtls-standalone/src/*.h | 258 | /crypto/arch/sparc64/ |
253 | /libtls-standalone/src | 259 | /crypto/asn1/ |
254 | /libtls-standalone/tests/test | 260 | /crypto/bf/ |
255 | /libtls-standalone/compat | 261 | /crypto/bio/ |
256 | /libtls-standalone/VERSION | 262 | /crypto/bn/*.c |
257 | /libtls-standalone/m4 | 263 | /crypto/bn/*.h |
258 | /libtls-standalone/man | 264 | /crypto/bn/arch/aarch64/ |
265 | /crypto/bn/arch/alpha/ | ||
266 | /crypto/bn/arch/amd64/ | ||
267 | /crypto/bn/arch/arm/ | ||
268 | /crypto/bn/arch/hppa/ | ||
269 | /crypto/bn/arch/i386/ | ||
270 | /crypto/bn/arch/m88k/ | ||
271 | /crypto/bn/arch/mips64/ | ||
272 | /crypto/bn/arch/powerpc/ | ||
273 | /crypto/bn/arch/powerpc64/ | ||
274 | /crypto/bn/arch/riscv64/ | ||
275 | /crypto/bn/arch/sh/ | ||
276 | /crypto/bn/arch/sparc64/ | ||
277 | /crypto/buffer/ | ||
278 | /crypto/bytestring/ | ||
279 | /crypto/camellia/ | ||
280 | /crypto/cast/ | ||
281 | /crypto/chacha/ | ||
282 | /crypto/cmac/ | ||
283 | /crypto/cms/ | ||
284 | /crypto/conf/ | ||
285 | /crypto/ct/ | ||
286 | /crypto/curve25519/ | ||
287 | /crypto/des/ | ||
288 | /crypto/dh/ | ||
289 | /crypto/dsa/ | ||
290 | /crypto/ec/ | ||
291 | /crypto/ecdh/ | ||
292 | /crypto/ecdsa/ | ||
293 | /crypto/engine/ | ||
294 | /crypto/err/ | ||
295 | /crypto/evp/ | ||
296 | /crypto/hidden/ | ||
297 | /crypto/hkdf/ | ||
298 | /crypto/hmac/ | ||
299 | /crypto/idea/ | ||
300 | /crypto/kdf/ | ||
301 | /crypto/lhash/ | ||
302 | /crypto/md4/ | ||
303 | /crypto/md5/ | ||
304 | /crypto/mlkem/ | ||
305 | /crypto/modes/ | ||
306 | /crypto/objects/ | ||
307 | /crypto/ocsp/ | ||
308 | /crypto/pem/ | ||
309 | /crypto/pkcs12/ | ||
310 | /crypto/pkcs7/ | ||
311 | /crypto/poly1305/ | ||
312 | /crypto/rand/ | ||
313 | /crypto/rc2/ | ||
314 | /crypto/rc4/ | ||
315 | /crypto/ripemd/ | ||
316 | /crypto/rsa/ | ||
317 | /crypto/sha/ | ||
318 | /crypto/sm3/ | ||
319 | /crypto/sm4/ | ||
320 | /crypto/stack/ | ||
321 | /crypto/ts/ | ||
322 | /crypto/txt_db/ | ||
323 | /crypto/ui/ | ||
324 | /crypto/x509/ | ||
259 | 325 | ||
260 | openbsd/ | 326 | openbsd/ |
261 | 327 | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt index c496ad9..17e5a0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -1,9 +1,25 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | cmake_minimum_required (VERSION 3.16.4) | 16 | cmake_minimum_required (VERSION 3.16.4) |
17 | |||
2 | if(MSVC) | 18 | if(MSVC) |
3 | cmake_policy(SET CMP0091 NEW) | 19 | cmake_policy(SET CMP0091 NEW) |
4 | endif() | 20 | endif() |
5 | 21 | ||
6 | project (LibreSSL C ASM) | 22 | project(LibreSSL LANGUAGES C ASM) |
7 | 23 | ||
8 | include(CheckFunctionExists) | 24 | include(CheckFunctionExists) |
9 | include(CheckSymbolExists) | 25 | include(CheckSymbolExists) |
@@ -72,10 +88,6 @@ endforeach() | |||
72 | 88 | ||
73 | set(BUILD_NC true) | 89 | set(BUILD_NC true) |
74 | 90 | ||
75 | if(CMAKE_SYSTEM_NAME MATCHES "Darwin") | ||
76 | add_definitions(-fno-common) | ||
77 | endif() | ||
78 | |||
79 | if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") | 91 | if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
80 | add_definitions(-DHAVE_ATTRIBUTE__BOUNDED__) | 92 | add_definitions(-DHAVE_ATTRIBUTE__BOUNDED__) |
81 | add_definitions(-DHAVE_ATTRIBUTE__DEAD__) | 93 | add_definitions(-DHAVE_ATTRIBUTE__DEAD__) |
@@ -89,6 +101,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") | |||
89 | set(PLATFORM_LIBS ${PLATFORM_LIBS} pthread) | 101 | set(PLATFORM_LIBS ${PLATFORM_LIBS} pthread) |
90 | endif() | 102 | endif() |
91 | 103 | ||
104 | if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") | ||
105 | set(PLATFORM_LIBS ${PLATFORM_LIBS} pthread) | ||
106 | endif() | ||
107 | |||
92 | if(WIN32) | 108 | if(WIN32) |
93 | set(BUILD_NC false) | 109 | set(BUILD_NC false) |
94 | if(MINGW) | 110 | if(MINGW) |
@@ -127,7 +143,7 @@ add_definitions(-D__END_HIDDEN_DECLS=) | |||
127 | set(CMAKE_POSITION_INDEPENDENT_CODE true) | 143 | set(CMAKE_POSITION_INDEPENDENT_CODE true) |
128 | 144 | ||
129 | if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") | 145 | if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") |
130 | add_definitions(-Wno-pointer-sign) | 146 | add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wno-pointer-sign>) |
131 | endif() | 147 | endif() |
132 | 148 | ||
133 | if(WIN32) | 149 | if(WIN32) |
@@ -158,17 +174,21 @@ if(MSVC) | |||
158 | set(MSVC_DISABLED_WARNINGS_LIST | 174 | set(MSVC_DISABLED_WARNINGS_LIST |
159 | "C4018" # 'expression' : signed/unsigned mismatch | 175 | "C4018" # 'expression' : signed/unsigned mismatch |
160 | "C4057" # 'operator' : 'identifier1' indirection to | 176 | "C4057" # 'operator' : 'identifier1' indirection to |
161 | # slightly different base types from 'identifier2' | 177 | # slightly different base types from 'identifier2' |
162 | "C4100" # 'identifier' : unreferenced formal parameter | 178 | "C4100" # 'identifier' : unreferenced formal parameter |
163 | "C4127" # conditional expression is constant | 179 | "C4127" # conditional expression is constant |
180 | "C4132" # 'object' : const object should be initialized | ||
164 | "C4146" # unary minus operator applied to unsigned type, | 181 | "C4146" # unary minus operator applied to unsigned type, |
165 | # result still unsigned | 182 | # result still unsigned |
183 | "C4206" # nonstandard extension used : translation unit is empty | ||
166 | "C4244" # 'argument' : conversion from 'type1' to 'type2', | 184 | "C4244" # 'argument' : conversion from 'type1' to 'type2', |
167 | # possible loss of data | 185 | # possible loss of data |
168 | "C4245" # 'conversion' : conversion from 'type1' to 'type2', | 186 | "C4245" # 'conversion' : conversion from 'type1' to 'type2', |
169 | # signed/unsigned mismatch | 187 | # signed/unsigned mismatch |
170 | "C4267" # 'var' : conversion from 'size_t' to 'type', | 188 | "C4267" # 'var' : conversion from 'size_t' to 'type', |
171 | # possible loss of data | 189 | # possible loss of data |
190 | "C4295" # 'array' : array is too small to include a terminating | ||
191 | # null character | ||
172 | "C4389" # 'operator' : signed/unsigned mismatch | 192 | "C4389" # 'operator' : signed/unsigned mismatch |
173 | "C4706" # assignment within conditional expression | 193 | "C4706" # assignment within conditional expression |
174 | "C4996" # The POSIX name for this item is deprecated. | 194 | "C4996" # The POSIX name for this item is deprecated. |
@@ -200,21 +220,33 @@ else() | |||
200 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | 220 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") |
201 | endif() | 221 | endif() |
202 | 222 | ||
223 | # XXX - needs _GNU_SOURCE on linux | ||
203 | check_function_exists(asprintf HAVE_ASPRINTF) | 224 | check_function_exists(asprintf HAVE_ASPRINTF) |
204 | if(HAVE_ASPRINTF) | 225 | if(HAVE_ASPRINTF) |
205 | add_definitions(-DHAVE_ASPRINTF) | 226 | add_definitions(-DHAVE_ASPRINTF) |
206 | endif() | 227 | endif() |
207 | 228 | ||
208 | check_function_exists(getopt HAVE_GETOPT) | 229 | check_symbol_exists(getdelim "stdio.h" HAVE_GETDELIM) |
230 | if(HAVE_GETDELIM) | ||
231 | add_definitions(-DHAVE_GETDELIM) | ||
232 | endif() | ||
233 | |||
234 | check_symbol_exists(getline "stdio.h" HAVE_GETLINE) | ||
235 | if(HAVE_GETLINE) | ||
236 | add_definitions(-DHAVE_GETLINE) | ||
237 | endif() | ||
238 | |||
239 | check_symbol_exists(getopt "unistd.h" HAVE_GETOPT) | ||
209 | if(HAVE_GETOPT) | 240 | if(HAVE_GETOPT) |
210 | add_definitions(-DHAVE_GETOPT) | 241 | add_definitions(-DHAVE_GETOPT) |
211 | endif() | 242 | endif() |
212 | 243 | ||
213 | check_function_exists(reallocarray HAVE_REALLOCARRAY) | 244 | check_symbol_exists(reallocarray "stdlib.h" HAVE_REALLOCARRAY) |
214 | if(HAVE_REALLOCARRAY) | 245 | if(HAVE_REALLOCARRAY) |
215 | add_definitions(-DHAVE_REALLOCARRAY) | 246 | add_definitions(-DHAVE_REALLOCARRAY) |
216 | endif() | 247 | endif() |
217 | 248 | ||
249 | # XXX strcasecmp() is in strings.h which isn't available everywhere | ||
218 | check_function_exists(strcasecmp HAVE_STRCASECMP) | 250 | check_function_exists(strcasecmp HAVE_STRCASECMP) |
219 | if(HAVE_STRCASECMP) | 251 | if(HAVE_STRCASECMP) |
220 | add_definitions(-DHAVE_STRCASECMP) | 252 | add_definitions(-DHAVE_STRCASECMP) |
@@ -222,18 +254,18 @@ endif() | |||
222 | 254 | ||
223 | # Emscripten's strlcat and strlcpy triggers ASAN errors | 255 | # Emscripten's strlcat and strlcpy triggers ASAN errors |
224 | if(NOT EMSCRIPTEN) | 256 | if(NOT EMSCRIPTEN) |
225 | check_function_exists(strlcat HAVE_STRLCAT) | 257 | check_symbol_exists(strlcat "string.h" HAVE_STRLCAT) |
226 | if(HAVE_STRLCAT) | 258 | if(HAVE_STRLCAT) |
227 | add_definitions(-DHAVE_STRLCAT) | 259 | add_definitions(-DHAVE_STRLCAT) |
228 | endif() | 260 | endif() |
229 | 261 | ||
230 | check_function_exists(strlcpy HAVE_STRLCPY) | 262 | check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY) |
231 | if(HAVE_STRLCPY) | 263 | if(HAVE_STRLCPY) |
232 | add_definitions(-DHAVE_STRLCPY) | 264 | add_definitions(-DHAVE_STRLCPY) |
233 | endif() | 265 | endif() |
234 | endif() | 266 | endif() |
235 | 267 | ||
236 | check_function_exists(strndup HAVE_STRNDUP) | 268 | check_symbol_exists(strndup "string.h" HAVE_STRNDUP) |
237 | if(HAVE_STRNDUP) | 269 | if(HAVE_STRNDUP) |
238 | add_definitions(-DHAVE_STRNDUP) | 270 | add_definitions(-DHAVE_STRNDUP) |
239 | endif() | 271 | endif() |
@@ -242,62 +274,64 @@ if(WIN32) | |||
242 | set(HAVE_STRNLEN true) | 274 | set(HAVE_STRNLEN true) |
243 | add_definitions(-DHAVE_STRNLEN) | 275 | add_definitions(-DHAVE_STRNLEN) |
244 | else() | 276 | else() |
245 | check_function_exists(strnlen HAVE_STRNLEN) | 277 | check_symbol_exists(strnlen "string.h" HAVE_STRNLEN) |
246 | if(HAVE_STRNLEN) | 278 | if(HAVE_STRNLEN) |
247 | add_definitions(-DHAVE_STRNLEN) | 279 | add_definitions(-DHAVE_STRNLEN) |
248 | endif() | 280 | endif() |
249 | endif() | 281 | endif() |
250 | 282 | ||
251 | check_function_exists(strsep HAVE_STRSEP) | 283 | check_symbol_exists(strsep "string.h" HAVE_STRSEP) |
252 | if(HAVE_STRSEP) | 284 | if(HAVE_STRSEP) |
253 | add_definitions(-DHAVE_STRSEP) | 285 | add_definitions(-DHAVE_STRSEP) |
254 | endif() | 286 | endif() |
255 | 287 | ||
256 | check_function_exists(strtonum HAVE_STRTONUM) | 288 | check_symbol_exists(strtonum "stdlib.h" HAVE_STRTONUM) |
257 | if(HAVE_STRTONUM) | 289 | if(HAVE_STRTONUM) |
258 | add_definitions(-DHAVE_STRTONUM) | 290 | add_definitions(-DHAVE_STRTONUM) |
259 | endif() | 291 | endif() |
260 | 292 | ||
261 | check_function_exists(arc4random_buf HAVE_ARC4RANDOM_BUF) | 293 | check_symbol_exists(arc4random_buf "stdlib.h" HAVE_ARC4RANDOM_BUF) |
262 | if(HAVE_ARC4RANDOM_BUF) | 294 | if(HAVE_ARC4RANDOM_BUF) |
263 | add_definitions(-DHAVE_ARC4RANDOM_BUF) | 295 | add_definitions(-DHAVE_ARC4RANDOM_BUF) |
264 | endif() | 296 | endif() |
265 | 297 | ||
266 | check_function_exists(arc4random_uniform HAVE_ARC4RANDOM_UNIFORM) | 298 | check_symbol_exists(arc4random_uniform "stdlib.h" HAVE_ARC4RANDOM_UNIFORM) |
267 | if(HAVE_ARC4RANDOM_UNIFORM) | 299 | if(HAVE_ARC4RANDOM_UNIFORM) |
268 | add_definitions(-DHAVE_ARC4RANDOM_UNIFORM) | 300 | add_definitions(-DHAVE_ARC4RANDOM_UNIFORM) |
269 | endif() | 301 | endif() |
270 | 302 | ||
271 | check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO) | 303 | check_symbol_exists(explicit_bzero "string.h" HAVE_EXPLICIT_BZERO) |
272 | if(HAVE_EXPLICIT_BZERO) | 304 | if(HAVE_EXPLICIT_BZERO) |
273 | add_definitions(-DHAVE_EXPLICIT_BZERO) | 305 | add_definitions(-DHAVE_EXPLICIT_BZERO) |
274 | endif() | 306 | endif() |
275 | 307 | ||
276 | check_function_exists(getauxval HAVE_GETAUXVAL) | 308 | check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL) |
277 | if(HAVE_GETAUXVAL) | 309 | if(HAVE_GETAUXVAL) |
278 | add_definitions(-DHAVE_GETAUXVAL) | 310 | add_definitions(-DHAVE_GETAUXVAL) |
279 | endif() | 311 | endif() |
280 | 312 | ||
313 | # XXX macos fails to find getentropy with check_symbol_exists() | ||
281 | check_function_exists(getentropy HAVE_GETENTROPY) | 314 | check_function_exists(getentropy HAVE_GETENTROPY) |
282 | if(HAVE_GETENTROPY) | 315 | if(HAVE_GETENTROPY) |
283 | add_definitions(-DHAVE_GETENTROPY) | 316 | add_definitions(-DHAVE_GETENTROPY) |
284 | endif() | 317 | endif() |
285 | 318 | ||
286 | check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) | 319 | check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE) |
287 | if(HAVE_GETPAGESIZE) | 320 | if(HAVE_GETPAGESIZE) |
288 | add_definitions(-DHAVE_GETPAGESIZE) | 321 | add_definitions(-DHAVE_GETPAGESIZE) |
289 | endif() | 322 | endif() |
290 | 323 | ||
291 | check_function_exists(getprogname HAVE_GETPROGNAME) | 324 | check_symbol_exists(getprogname "stdlib.h" HAVE_GETPROGNAME) |
292 | if(HAVE_GETPROGNAME) | 325 | if(HAVE_GETPROGNAME) |
293 | add_definitions(-DHAVE_GETPROGNAME) | 326 | add_definitions(-DHAVE_GETPROGNAME) |
294 | endif() | 327 | endif() |
295 | 328 | ||
296 | check_function_exists(syslog_r HAVE_SYSLOG_R) | 329 | check_symbol_exists(syslog_r "syslog.h;stdarg.h" HAVE_SYSLOG_R) |
297 | if(HAVE_SYSLOG_R) | 330 | if(HAVE_SYSLOG_R) |
298 | add_definitions(-DHAVE_SYSLOG_R) | 331 | add_definitions(-DHAVE_SYSLOG_R) |
299 | endif() | 332 | endif() |
300 | 333 | ||
334 | # XXX - needs _GNU_SOURCE on linux | ||
301 | check_function_exists(syslog HAVE_SYSLOG) | 335 | check_function_exists(syslog HAVE_SYSLOG) |
302 | if(HAVE_SYSLOG) | 336 | if(HAVE_SYSLOG) |
303 | add_definitions(-DHAVE_SYSLOG) | 337 | add_definitions(-DHAVE_SYSLOG) |
@@ -308,16 +342,17 @@ if(HAVE_TIMESPECSUB) | |||
308 | add_definitions(-DHAVE_TIMESPECSUB) | 342 | add_definitions(-DHAVE_TIMESPECSUB) |
309 | endif() | 343 | endif() |
310 | 344 | ||
311 | check_function_exists(timingsafe_bcmp HAVE_TIMINGSAFE_BCMP) | 345 | check_symbol_exists(timingsafe_bcmp "string.h" HAVE_TIMINGSAFE_BCMP) |
312 | if(HAVE_TIMINGSAFE_BCMP) | 346 | if(HAVE_TIMINGSAFE_BCMP) |
313 | add_definitions(-DHAVE_TIMINGSAFE_BCMP) | 347 | add_definitions(-DHAVE_TIMINGSAFE_BCMP) |
314 | endif() | 348 | endif() |
315 | 349 | ||
316 | check_function_exists(timingsafe_memcmp HAVE_TIMINGSAFE_MEMCMP) | 350 | check_symbol_exists(timingsafe_memcmp "string.h" HAVE_TIMINGSAFE_MEMCMP) |
317 | if(HAVE_TIMINGSAFE_MEMCMP) | 351 | if(HAVE_TIMINGSAFE_MEMCMP) |
318 | add_definitions(-DHAVE_TIMINGSAFE_MEMCMP) | 352 | add_definitions(-DHAVE_TIMINGSAFE_MEMCMP) |
319 | endif() | 353 | endif() |
320 | 354 | ||
355 | # XXX - needs _GNU_SOURCE on linux | ||
321 | check_function_exists(memmem HAVE_MEMMEM) | 356 | check_function_exists(memmem HAVE_MEMMEM) |
322 | if(HAVE_MEMMEM) | 357 | if(HAVE_MEMMEM) |
323 | add_definitions(-DHAVE_MEMMEM) | 358 | add_definitions(-DHAVE_MEMMEM) |
@@ -343,6 +378,16 @@ if(HAVE_NETINET_IP_H) | |||
343 | add_definitions(-DHAVE_NETINET_IP_H) | 378 | add_definitions(-DHAVE_NETINET_IP_H) |
344 | endif() | 379 | endif() |
345 | 380 | ||
381 | check_include_files(resolv.h HAVE_RESOLV_H) | ||
382 | if(HAVE_RESOLV_H) | ||
383 | add_definitions(-DHAVE_RESOLV_H) | ||
384 | endif() | ||
385 | |||
386 | check_include_files(arpa/nameser.h HAVE_ARPA_NAMESER_H) | ||
387 | if(HAVE_ARPA_NAMESER_H) | ||
388 | add_definitions(-DHAVE_ARPA_NAMESER_H) | ||
389 | endif() | ||
390 | |||
346 | # This isn't ready for universal binaries yet, since we do conditional | 391 | # This isn't ready for universal binaries yet, since we do conditional |
347 | # compilation based on the architecture, but this makes cross compiling for a | 392 | # compilation based on the architecture, but this makes cross compiling for a |
348 | # single architecture work on macOS at least. | 393 | # single architecture work on macOS at least. |
@@ -352,20 +397,27 @@ if(APPLE AND (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "")) | |||
352 | set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}") | 397 | set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}") |
353 | endif() | 398 | endif() |
354 | 399 | ||
400 | # CMAKE_SYSTEM_PROCESSOR is not consistently set to the target architecture. | ||
401 | # https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html | ||
402 | if (WIN32 AND (NOT CMAKE_GENERATOR_PLATFORM STREQUAL "")) | ||
403 | message("CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") | ||
404 | message("CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM}") | ||
405 | set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_GENERATOR_PLATFORM}") | ||
406 | endif() | ||
407 | |||
355 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64|ARM64)") | 408 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64|ARM64)") |
356 | set(HOST_AARCH64 true) | 409 | set(HOST_AARCH64 true) |
357 | if(WIN32) | ||
358 | set(ENABLE_ASM false) | ||
359 | endif() | ||
360 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") | 410 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") |
361 | set(HOST_ARM true) | 411 | set(HOST_ARM true) |
362 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386") | 412 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386") |
363 | set(HOST_X86_64 true) | 413 | set(HOST_X86_64 true) |
364 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64|AMD64)") | 414 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|x64|amd64|AMD64)") |
365 | set(HOST_X86_64 true) | 415 | set(HOST_X86_64 true) |
366 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|[xX]86)") | 416 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|[xX]86|Win32)") |
367 | set(ENABLE_ASM false) | 417 | set(ENABLE_ASM false) |
368 | set(HOST_I386 true) | 418 | set(HOST_I386 true) |
419 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64") | ||
420 | set(HOST_LOONGARCH64 true) | ||
369 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips64") | 421 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips64") |
370 | set(HOST_MIPS64 true) | 422 | set(HOST_MIPS64 true) |
371 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips") | 423 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips") |
@@ -373,7 +425,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips") | |||
373 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc") | 425 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc") |
374 | set(HOST_POWERPC true) | 426 | set(HOST_POWERPC true) |
375 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64") | 427 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64") |
376 | set(HOST_PPC64 true) | 428 | set(HOST_POWERPC64 true) |
377 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64") | 429 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64") |
378 | set(HOST_RISCV64 true) | 430 | set(HOST_RISCV64 true) |
379 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64") | 431 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64") |
@@ -384,21 +436,18 @@ endif() | |||
384 | 436 | ||
385 | if(ENABLE_ASM) | 437 | if(ENABLE_ASM) |
386 | if(CMAKE_C_COMPILER_ABI STREQUAL "ELF") | 438 | if(CMAKE_C_COMPILER_ABI STREQUAL "ELF") |
387 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64)") | 439 | if(HOST_X86_64) |
388 | set(HOST_ASM_ELF_X86_64 true) | 440 | set(HOST_ASM_ELF_X86_64 true) |
389 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm" AND | 441 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND HOST_I386) |
390 | NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") | ||
391 | set(HOST_ASM_ELF_ARMV4 true) | ||
392 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386") | ||
393 | set(HOST_ASM_ELF_X86_64 true) | 442 | set(HOST_ASM_ELF_X86_64 true) |
394 | endif() | 443 | endif() |
395 | add_definitions(-DHAVE_GNU_STACK) | 444 | add_definitions(-DHAVE_GNU_STACK) |
396 | elseif(APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") | 445 | elseif(APPLE AND HOST_X86_64) |
397 | set(HOST_ASM_MACOSX_X86_64 true) | 446 | set(HOST_ASM_MACOSX_X86_64 true) |
398 | elseif(MSVC AND (CMAKE_GENERATOR MATCHES "Win64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64")) | 447 | elseif(MSVC AND (CMAKE_GENERATOR MATCHES "Win64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64")) |
399 | set(HOST_ASM_MASM_X86_64 true) | 448 | set(HOST_ASM_MASM_X86_64 true) |
400 | ENABLE_LANGUAGE(ASM_MASM) | 449 | ENABLE_LANGUAGE(ASM_MASM) |
401 | elseif(MINGW AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") | 450 | elseif(MINGW AND HOST_X86_64) |
402 | set(HOST_ASM_MINGW64_X86_64 true) | 451 | set(HOST_ASM_MINGW64_X86_64 true) |
403 | endif() | 452 | endif() |
404 | endif() | 453 | endif() |
@@ -441,10 +490,10 @@ if(OPENSSLDIR STREQUAL "") | |||
441 | if(WIN32) | 490 | if(WIN32) |
442 | set(OPENSSLDIR "C:/Windows/libressl/ssl") | 491 | set(OPENSSLDIR "C:/Windows/libressl/ssl") |
443 | else() | 492 | else() |
444 | set(OPENSSLDIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | 493 | set(OPENSSLDIR "${CMAKE_INSTALL_SYSCONFDIR}/ssl") |
445 | endif() | 494 | endif() |
446 | 495 | ||
447 | set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | 496 | set(CONF_DIR "${CMAKE_INSTALL_SYSCONFDIR}/ssl") |
448 | else() | 497 | else() |
449 | set(CONF_DIR "${OPENSSLDIR}") | 498 | set(CONF_DIR "${OPENSSLDIR}") |
450 | endif() | 499 | endif() |
@@ -513,7 +562,7 @@ if(ENABLE_LIBRESSL_INSTALL) | |||
513 | set(prefix ${CMAKE_INSTALL_PREFIX}) | 562 | set(prefix ${CMAKE_INSTALL_PREFIX}) |
514 | set(exec_prefix \${prefix}) | 563 | set(exec_prefix \${prefix}) |
515 | set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) | 564 | set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) |
516 | set(includedir \${prefix}/include) | 565 | set(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) |
517 | if(PLATFORM_LIBS) | 566 | if(PLATFORM_LIBS) |
518 | string(REGEX REPLACE ";" " -l" PLATFORM_LDADD ";${PLATFORM_LIBS}") | 567 | string(REGEX REPLACE ";" " -l" PLATFORM_LDADD ";${PLATFORM_LIBS}") |
519 | endif() | 568 | endif() |
@@ -0,0 +1,133 @@ | |||
1 | |||
2 | LibreSSL files are retained under the copyright of the authors. New | ||
3 | additions are ISC licensed as per OpenBSD's normal licensing policy, | ||
4 | or are placed in the public domain. | ||
5 | |||
6 | The OpenSSL code is distributed under the terms of the original OpenSSL | ||
7 | licenses which follow: | ||
8 | |||
9 | LICENSE ISSUES | ||
10 | ============== | ||
11 | |||
12 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of | ||
13 | the OpenSSL License and the original SSLeay license apply to the toolkit. | ||
14 | See below for the actual license texts. In case of any license issues | ||
15 | related to OpenSSL please contact openssl-core@openssl.org. | ||
16 | |||
17 | OpenSSL License | ||
18 | --------------- | ||
19 | |||
20 | /* ==================================================================== | ||
21 | * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * | ||
27 | * 1. Redistributions of source code must retain the above copyright | ||
28 | * notice, this list of conditions and the following disclaimer. | ||
29 | * | ||
30 | * 2. Redistributions in binary form must reproduce the above copyright | ||
31 | * notice, this list of conditions and the following disclaimer in | ||
32 | * the documentation and/or other materials provided with the | ||
33 | * distribution. | ||
34 | * | ||
35 | * 3. All advertising materials mentioning features or use of this | ||
36 | * software must display the following acknowledgment: | ||
37 | * "This product includes software developed by the OpenSSL Project | ||
38 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
39 | * | ||
40 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
41 | * endorse or promote products derived from this software without | ||
42 | * prior written permission. For written permission, please contact | ||
43 | * openssl-core@openssl.org. | ||
44 | * | ||
45 | * 5. Products derived from this software may not be called "OpenSSL" | ||
46 | * nor may "OpenSSL" appear in their names without prior written | ||
47 | * permission of the OpenSSL Project. | ||
48 | * | ||
49 | * 6. Redistributions of any form whatsoever must retain the following | ||
50 | * acknowledgment: | ||
51 | * "This product includes software developed by the OpenSSL Project | ||
52 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
53 | * | ||
54 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
55 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
57 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
58 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
59 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
60 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
61 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
62 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
63 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
64 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
65 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
66 | * ==================================================================== | ||
67 | * | ||
68 | * This product includes cryptographic software written by Eric Young | ||
69 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
70 | * Hudson (tjh@cryptsoft.com). | ||
71 | * | ||
72 | */ | ||
73 | |||
74 | Original SSLeay License | ||
75 | ----------------------- | ||
76 | |||
77 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
78 | * All rights reserved. | ||
79 | * | ||
80 | * This package is an SSL implementation written | ||
81 | * by Eric Young (eay@cryptsoft.com). | ||
82 | * The implementation was written so as to conform with Netscapes SSL. | ||
83 | * | ||
84 | * This library is free for commercial and non-commercial use as long as | ||
85 | * the following conditions are aheared to. The following conditions | ||
86 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
87 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
88 | * included with this distribution is covered by the same copyright terms | ||
89 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
90 | * | ||
91 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
92 | * the code are not to be removed. | ||
93 | * If this package is used in a product, Eric Young should be given attribution | ||
94 | * as the author of the parts of the library used. | ||
95 | * This can be in the form of a textual message at program startup or | ||
96 | * in documentation (online or textual) provided with the package. | ||
97 | * | ||
98 | * Redistribution and use in source and binary forms, with or without | ||
99 | * modification, are permitted provided that the following conditions | ||
100 | * are met: | ||
101 | * 1. Redistributions of source code must retain the copyright | ||
102 | * notice, this list of conditions and the following disclaimer. | ||
103 | * 2. Redistributions in binary form must reproduce the above copyright | ||
104 | * notice, this list of conditions and the following disclaimer in the | ||
105 | * documentation and/or other materials provided with the distribution. | ||
106 | * 3. All advertising materials mentioning features or use of this software | ||
107 | * must display the following acknowledgement: | ||
108 | * "This product includes cryptographic software written by | ||
109 | * Eric Young (eay@cryptsoft.com)" | ||
110 | * The word 'cryptographic' can be left out if the rouines from the library | ||
111 | * being used are not cryptographic related :-). | ||
112 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
113 | * the apps directory (application code) you must include an acknowledgement: | ||
114 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
115 | * | ||
116 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
117 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
118 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
119 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
120 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
121 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
122 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
123 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
124 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
125 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
126 | * SUCH DAMAGE. | ||
127 | * | ||
128 | * The licence and distribution terms for any publically available version or | ||
129 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
130 | * copied and put under another distribution licence | ||
131 | * [including the GNU Public Licence.] | ||
132 | */ | ||
133 | |||
@@ -1,7 +1,7 @@ | |||
1 | Because this project is maintained both in the OpenBSD tree using CVS and in | 1 | Because this project is maintained both in the OpenBSD tree using CVS and in |
2 | Git, it can be confusing following all of the changes. | 2 | Git, it can be confusing following all of the changes. |
3 | 3 | ||
4 | Most of the libssl and libcrypto source code is is here in OpenBSD CVS: | 4 | Most of the libssl and libcrypto source code is here in OpenBSD CVS: |
5 | 5 | ||
6 | https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/ | 6 | https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/ |
7 | 7 | ||
@@ -28,12 +28,138 @@ history is also available from Git. | |||
28 | 28 | ||
29 | LibreSSL Portable Release Notes: | 29 | LibreSSL Portable Release Notes: |
30 | 30 | ||
31 | 4.0.0 - In development | 31 | 4.2.0 - In development |
32 | 32 | ||
33 | * Portable changes | 33 | * Portable changes |
34 | - Added initial Emscripten support in CMake builds | 34 | * Internal improvements |
35 | - Cleaned up code implementing block cipher modes of operation. | ||
36 | Includes untangling a horrible #ifdef mess and removing a few | ||
37 | instances of undefined behavior. | ||
38 | - Removed assembly implementations of AES using bit slicing (BS-AES) | ||
39 | and vector permutation (VP-AES). | ||
40 | - Integrated AES-NI into the AES API. | ||
41 | - Removed OPENSSL_SMALL_FOOTPRINT and OPENSSL_FIPSAPI. | ||
42 | - Lots of cleanup and removal of code with undefined behavior in | ||
43 | the block cipher modes of operation implementations. | ||
44 | - Implemented constant time EC field element operations to allow | ||
45 | implementing elliptic curve operations without bignum arithmetic. | ||
46 | - Implemented an EC method using homogeneous projective coordinates. | ||
47 | This allows exception-free elliptic curve arithmetic in constant | ||
48 | time. | ||
49 | - Started cleaning up the openssl speed implementation. | ||
50 | - The last SIGILL-based CPU capability detection was removed. | ||
51 | Instead, capabilities are now detected using a constructor on | ||
52 | library load, which improves the incomplete coverage by calls | ||
53 | to OPENSSL_init_crypto() on various entry points. | ||
54 | * Compatibility changes | ||
55 | - Removed the -msie_hack option from the openssl(1) ca subcommand. | ||
56 | - Removed parameters of the 239-bit prime curves from X9.62, H.5.2: | ||
57 | prime239v1, prime239v2, prime239v3. | ||
58 | - Increased default MAC salt length used by PKCS12_set_mac(3) to 16 | ||
59 | per recommendation of NIST SP 800-132. | ||
60 | - Encrypted PKCS#8 key files now use a default password-based key | ||
61 | derivation function that is acceptable in the present millenium. | ||
62 | - Of the old *err() only PEMerr(), RSAerr(), and SSLerr() remain. | ||
63 | * New features | ||
64 | - Allow specifying ALPN in nc(1) via -Talpn="http/1.1,http:/1.0". | ||
65 | * Bug fixes | ||
66 | - Avoid pointer arithmetic on NULL for memory BIOs. | ||
67 | * Documentation | ||
68 | - Rewrote most of the EC documentation from scratch to be at least | ||
69 | somewhat accurate and intelligible. | ||
70 | * Testing and proactive security | ||
71 | - Added a testing framework that will help deduplicating lots of | ||
72 | ad-hoc code in the regression tests. | ||
73 | |||
74 | 4.1.0 - Stable release | ||
75 | |||
76 | * Portable changes | ||
77 | - Added initial experimental support for loongarch64. | ||
78 | - Fixed compilation for mips32 and reenable CI. | ||
79 | - Fixed CMake builds on FreeBSD. | ||
80 | - Fixed the --prefix option for cmake --install. | ||
81 | - Fixed tests for MinGW due to missing sh(1). | ||
82 | * Internal improvements | ||
83 | - Cleaned up the error implementation. | ||
84 | - Many bug fixes and simplifications in the EC ASN.1 code. | ||
85 | - Corrected DER encoding for EC keys and parameters. | ||
86 | - Polished EC_POINT_{oct2point,point2oct}() internals. | ||
87 | - Rewrote the wNAF code for fast ECDSA verification. | ||
88 | - Improved the code setting compressed coordinates for EC points. | ||
89 | - Reworked CPU capabilities detection for amd64 and aarch64. | ||
90 | - New SHA-1, SHA-256 and SHA-512 assembly implementations for amd64. | ||
91 | These make use of the SHA-NI instruction if it is available and | ||
92 | replace the perl-generated assembly optimized for museum pieces. | ||
93 | These are not yet enabled in libressl-portable. | ||
94 | - New SHA-256 and SHA-512 assembly implementations for aarch64 | ||
95 | making use of the ARM Cryptographic Extension (CE). Not yet | ||
96 | enabled in libressl-portable. | ||
97 | - New simplified, readable MD5 implementation for amd64. | ||
98 | - Rewrote BN_bn2binpad() and its lebin siblings. | ||
99 | - The BIGNUMs in EC_GROUP and EC_POINT are now heap allocated. | ||
100 | - Rewrote TS_ASN1_INTEGER_print_bio(). | ||
101 | - Improved bit counter handling in MD5. | ||
102 | - Simplified and cleaned up the BN_RECP_CTX internals. | ||
103 | - Improved SM4 to match other symmetric ciphers more closely. | ||
104 | - Rewrote X509_NAME_oneline() and X509_NAME_print() using CBS/CBB. | ||
105 | - CRLs are now cached in the issuer cache like certificates. | ||
106 | - Replaced combinations of BN_MONT_CTX_new/set with an internal | ||
107 | BN_MONT_CTX_create(). | ||
108 | - Replaced BN_bn2hex() reimplementation in openssl(1) ca with | ||
109 | a proper API call. | ||
110 | - Fixed integer overflows due to signed shift in obj_dat.c. | ||
111 | - Improved some X509_VERIFY_PARAM internals and avoid an out of | ||
112 | bounds read from public API. | ||
113 | - Imported ML-KEM 768 and 1024 from BoringSSL (not yet public API). | ||
114 | * Compatibility changes | ||
115 | - Added an OPENSSL_INIT_NO_ATEXIT flag for OPENSSL_init_crypto(). | ||
116 | It has no effect since LibreSSL doesn't call atexit(). | ||
117 | - Elliptic curve parameters are only accepted if they encode a | ||
118 | built-in curve. | ||
119 | - EC_METHOD is no longer public and the API exposing it has been | ||
120 | removed. This includes EC_GROUP_new(), EC_GFp_mont_method(), | ||
121 | EC_GROUP_method_of() and EC_METHOD_get_field_type(). | ||
122 | - The precomputation stubs for EC_GROUP were removed. | ||
123 | - The API setting Jacobian projective coordinates for a point was | ||
124 | removed as were EC_POINTs_{mul,make_affine}(). | ||
125 | - All elliptic curves over fields with less than 224 bits and a | ||
126 | few more were removed from the built-in curves. This includes | ||
127 | all WTLS curves and P-192. | ||
128 | - It is no longer necessary to set RSA_FLAG_SIGN_VER to use the | ||
129 | sign and verify handlers set with RSA_meth_set_{sign,verify}. | ||
130 | - Removed the -C option to generate "C code" from the openssl(1) | ||
131 | dh, dhparam, dsaparam, ecparam, and x509 subcommands. | ||
132 | - Removed #error in headers when OPENSSL_NO_* is defined. | ||
133 | - CRYPTO_set_mem_functions() now matches OpenSSL 1.1 and | ||
134 | CRYPTO_set_mem_ex_functions() was removed. | ||
135 | - The tls_session_secret_cb_fn type now matches OpenSSL 1.1. | ||
136 | - Unexport X509_NAME_print() and X509_OBJECT_up_ref_count(). | ||
137 | - const corrected UI_OpenSSL() and BN_MONT_CTX_copy(). | ||
138 | - Support OPENSSL_NO_FILENAMES. | ||
139 | - Support SSL_OP_NO_RENEGOTIATION and SSL_OP_ALLOW_CLIENT_RENEGOTIATION. | ||
140 | - Export PKCS12_key_gen_uni() again. | ||
141 | * New features | ||
142 | - libtls has a new tls_peer_cert_common_name() API call to retrieve | ||
143 | the peer's common name without having to inspect the PEM. | ||
144 | * Bug fixes | ||
145 | - Plugged a leak in eckey_compute_pubkey(). | ||
146 | - Again allow the magic values -1, -2 and -3 for the salt length | ||
147 | of an RSA-PSS key in the EVP_PKEY_CTX_ctrl_str() interface. | ||
148 | - Fixed a few memory leaks in legacy code. | ||
149 | * Documentation | ||
150 | - The remaining undocumented public EVP API is now documented. | ||
151 | - Reorganization of existing documentation for clarity and accuracy. | ||
152 | * Testing and proactive security | ||
153 | - Improved regress coverage of the EC code. | ||
154 | |||
155 | 4.0.0 - Stable release | ||
156 | |||
157 | * Portable changes | ||
158 | - Added initial Emscripten support in CMake builds. | ||
35 | - Removed timegm() compatibility layer since all uses were replaced | 159 | - Removed timegm() compatibility layer since all uses were replaced |
36 | with OPENSSL_timegm(). Cleaned up the corresponding test harness. | 160 | with OPENSSL_timegm(). Cleaned up the corresponding test harness. |
161 | - The mips32 platform is no longer actively supported. | ||
162 | - Fixed Windows support for dates beyond 2038. | ||
37 | * Internal improvements | 163 | * Internal improvements |
38 | - Cleaned up parts of the conf directory. Simplified some logic, | 164 | - Cleaned up parts of the conf directory. Simplified some logic, |
39 | fixed memory leaks. | 165 | fixed memory leaks. |
@@ -66,29 +192,68 @@ LibreSSL Portable Release Notes: | |||
66 | - Made most error string tables const. | 192 | - Made most error string tables const. |
67 | - Removed handling for SSLv2 client hello messages. | 193 | - Removed handling for SSLv2 client hello messages. |
68 | - Improvements in the openssl(1) speed app's signal handler. | 194 | - Improvements in the openssl(1) speed app's signal handler. |
69 | - Added support for TLS PRF in the EVP KDF API. | 195 | - Cleaned up various X509v3_* extension API. |
196 | - Unified the X.509v3 extension methods. | ||
197 | - Cleaned up cipher handling in SSL_SESSION. | ||
198 | - Removed get_cipher from SSL_METHOD. | ||
199 | - Rewrote CRYPTO_EX_DATA from scratch. The only intentional change of | ||
200 | behavior is that there is now a hard limit on the number of indexes | ||
201 | that can be allocated. | ||
202 | - Removed bogus connect() call from netcat. | ||
203 | - Uses of atoi() and strtol() in libcrypto were replaced with | ||
204 | strtonum(). | ||
205 | - Introduced crypto_arch.h which will contain the architecture | ||
206 | dependent code and defines rather than the public opensslconf.h. | ||
207 | - OPENSSL_cpu_caps() is now architecture independent. | ||
208 | - Reorganized the DES implementation to use fewer files and removed | ||
209 | optimizations for ancient processors and compilers. | ||
210 | * New features | ||
211 | - Added CRLfile option to the cms command of openssl(1) to specify | ||
212 | additional CRLs for use during verification. | ||
70 | * Documentation improvements | 213 | * Documentation improvements |
71 | - Removed documentation of no longer existing API. | 214 | - Removed documentation of no longer existing API. |
215 | - Unified the description of the obsolete ENGINE parameter that | ||
216 | needs to remain in many functions and should always be NULL. | ||
72 | * Testing and proactive security | 217 | * Testing and proactive security |
73 | - Switched the remaining tests to new certs. | 218 | - Switched the remaining tests to new certs. |
74 | * Compatibility changes | 219 | * Compatibility changes |
220 | - Protocol parsing in libtls was changed. The unsupported TLSv1.1 | ||
221 | and TLSv1.0 protocols are ignored and no longer enable or disable | ||
222 | TLSv1.2 in surprising ways. | ||
223 | - The dangerous EVP_PKEY*_check(3) family of functions was removed. | ||
224 | The openssl(1) pkey and pkeyparam commands no longer support the | ||
225 | -check and -pubcheck flags. | ||
75 | - The one-step hashing functions, MD4(), MD5(), RIPEMD160(), SHA1(), | 226 | - The one-step hashing functions, MD4(), MD5(), RIPEMD160(), SHA1(), |
76 | all SHA-2, and HMAC() no longer support returning a static buffer. | 227 | all SHA-2, and HMAC() no longer support returning a static buffer. |
77 | Callers must pass in a correctly sized buffer. | 228 | Callers must pass in a correctly sized buffer. |
229 | - Support for Whirlpool was removed. Applications still using this | ||
230 | should honor OPENSSL_NO_WHIRLPOOL. | ||
78 | - Removed workaround for F5 middle boxes. | 231 | - Removed workaround for F5 middle boxes. |
79 | - Removed the useless pem2.h, a public header that was added since | 232 | - Removed the useless pem2.h, a public header that was added since |
80 | it was too hard to add a prototype to one file. | 233 | it was too hard to add a single prototype to one file. |
234 | - Removed conf_api.h and the public API therein. | ||
235 | - Removed ssl2.h, ssl23.h and ui_compat.h. | ||
236 | - Numerous conf and attribute functions were removed. Some unused | ||
237 | types were removed, others were made opaque. | ||
238 | - Removed the deprecated HMAC_Init() function. | ||
239 | - Removed OPENSSL_load_builtin_modules(). | ||
240 | - Removed X509_REQ_{get,set}_extension_nids(). | ||
241 | - X509_check_trust() and was removed, X509_VAL was made opaque. | ||
81 | - Only specified versions can be set on certs, CRLs and CSRs. | 242 | - Only specified versions can be set on certs, CRLs and CSRs. |
82 | - Prepared X509_REQ_{get,set}_extension_nids() for removal. | ||
83 | - Removed unused PEM_USER and PEM_CTX types from pem.h. | 243 | - Removed unused PEM_USER and PEM_CTX types from pem.h. |
84 | - Removed typdefs for COMP_CTX, COMP_METHOD, X509_CRL_METHOD, STORE, | 244 | - Removed typdefs for COMP_CTX, COMP_METHOD, X509_CRL_METHOD, STORE, |
85 | STORE_METHOD, and SSL_AEAD_CTX. | 245 | STORE_METHOD, and SSL_AEAD_CTX. |
86 | - i2d_ASN1_OBJECT() now returns -1 on error like most other i2d_*. | 246 | - i2d_ASN1_OBJECT() now returns -1 on error like most other i2d_*. |
87 | - SPKAC support was removed from openssl(1) | 247 | - SPKAC support was removed from openssl(1). |
88 | - Added TLS1-PRF support to the EVP interface. | 248 | - Added TLS1-PRF support to the EVP interface. |
89 | - Cleaned up various X509v3_* extension API. | 249 | - Support for attributes in EVP_PKEYs was removed. |
90 | - Unified the X.509v3 extension methods. | 250 | - The X509at_* API is no longer public. |
91 | - Removed ssl2.h and ssl23.h. | 251 | - SSL_CTX_set1_cert_store() and SSL_CIPHER_get_handshake_digest() |
252 | were added to libssl. | ||
253 | - The completely broken UI_UTIL password API was removed. | ||
254 | - The OpenSSL pkcs12 command and PKCS12_create() no longer support | ||
255 | setting the Microsoft-specific Local Key Set and Cryptographic | ||
256 | Service Provider attributes. | ||
92 | * Bug fixes | 257 | * Bug fixes |
93 | - Made ASN1_TIME_set_string() and ASN1_TIME_set_string_X509() match | 258 | - Made ASN1_TIME_set_string() and ASN1_TIME_set_string_X509() match |
94 | their documentation. They always set an RFC 5280 conformant time. | 259 | their documentation. They always set an RFC 5280 conformant time. |
@@ -115,6 +280,20 @@ LibreSSL Portable Release Notes: | |||
115 | ALPN callback. | 280 | ALPN callback. |
116 | - Avoid pushing a spurious error onto the error stack in | 281 | - Avoid pushing a spurious error onto the error stack in |
117 | ssl_sigalg_select(). | 282 | ssl_sigalg_select(). |
283 | - Made fatal alerts fatal in QUIC. | ||
284 | |||
285 | 3.9.2 - Stable release | ||
286 | |||
287 | * Bugfixes | ||
288 | - OpenBSD 7.5 errata 003. A missing bounds check could lead to a crash | ||
289 | due to dereferencing a zero-sized allocation. | ||
290 | |||
291 | 3.9.1 - Stable release | ||
292 | |||
293 | * Portable changes | ||
294 | - Updated tests with expiring certificates | ||
295 | - CET-related build fixes for Windows and macOS targets | ||
296 | - update libtls linker script to include libssl and libcrypto again | ||
118 | 297 | ||
119 | 3.9.0 - Development release | 298 | 3.9.0 - Development release |
120 | 299 | ||
@@ -193,6 +372,13 @@ LibreSSL Portable Release Notes: | |||
193 | stack. | 372 | stack. |
194 | - Made in-place decryption work for EVP_chacha20_poly1305(). | 373 | - Made in-place decryption work for EVP_chacha20_poly1305(). |
195 | 374 | ||
375 | 3.8.4 - Stable release | ||
376 | |||
377 | * Portable changes | ||
378 | - Updated tests with expiring certificates | ||
379 | - CET-related build fixes for Windows and macOS targets | ||
380 | - update libtls linker script to include libssl and libcrypto again | ||
381 | |||
196 | 3.8.3 - Stable release | 382 | 3.8.3 - Stable release |
197 | 383 | ||
198 | * Portable changes | 384 | * Portable changes |
diff --git a/FindLibreSSL.cmake b/FindLibreSSL.cmake index 6bdc069..6779371 100644 --- a/FindLibreSSL.cmake +++ b/FindLibreSSL.cmake | |||
@@ -81,6 +81,11 @@ if (WIN32) | |||
81 | "${_programfiles}/LibreSSL" | 81 | "${_programfiles}/LibreSSL" |
82 | ) | 82 | ) |
83 | unset(_programfiles) | 83 | unset(_programfiles) |
84 | elseif(APPLE) | ||
85 | # Homebrew installs LibreSSL here | ||
86 | set(_LIBRESSL_ROOT_PATHS | ||
87 | "/usr/local/opt/libressl" | ||
88 | ) | ||
84 | else() | 89 | else() |
85 | set(_LIBRESSL_ROOT_PATHS | 90 | set(_LIBRESSL_ROOT_PATHS |
86 | "/usr/local/" | 91 | "/usr/local/" |
diff --git a/Makefile.am b/Makefile.am index 3f62cd9..eca5a27 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | SUBDIRS = include crypto ssl tls apps man | 16 | SUBDIRS = include crypto ssl tls apps man |
2 | if ENABLE_TESTS | 17 | if ENABLE_TESTS |
3 | SUBDIRS += tests | 18 | SUBDIRS += tests |
diff --git a/Makefile.am.common b/Makefile.am.common index 5405704..4257cf8 100644 --- a/Makefile.am.common +++ b/Makefile.am.common | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | AM_CFLAGS = | 16 | AM_CFLAGS = |
2 | AM_CPPFLAGS = -I$(top_srcdir)/include | 17 | AM_CPPFLAGS = -I$(top_srcdir)/include |
3 | AM_CPPFLAGS += -I$(abs_top_builddir)/include | 18 | AM_CPPFLAGS += -I$(abs_top_builddir)/include |
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 08a5a41..754990a 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | add_subdirectory(ocspcheck) | 16 | add_subdirectory(ocspcheck) |
2 | add_subdirectory(openssl) | 17 | add_subdirectory(openssl) |
3 | add_subdirectory(nc) | 18 | add_subdirectory(nc) |
diff --git a/apps/nc/CMakeLists.txt b/apps/nc/CMakeLists.txt index 7bbdb02..b1eed1b 100644 --- a/apps/nc/CMakeLists.txt +++ b/apps/nc/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2016 Kinichiro Inoguchi | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | if(BUILD_NC) | 16 | if(BUILD_NC) |
2 | 17 | ||
3 | set( | 18 | set( |
@@ -22,7 +37,7 @@ else() | |||
22 | set(NC_SRC ${NC_SRC} compat/accept4.c) | 37 | set(NC_SRC ${NC_SRC} compat/accept4.c) |
23 | endif() | 38 | endif() |
24 | 39 | ||
25 | check_function_exists(readpassphrase HAVE_READPASSPHRASE) | 40 | check_symbol_exists(readpassphrase "readpassphrase.h" HAVE_READPASSPHRASE) |
26 | if(HAVE_READPASSPHRASE) | 41 | if(HAVE_READPASSPHRASE) |
27 | add_definitions(-DHAVE_READPASSPHRASE) | 42 | add_definitions(-DHAVE_READPASSPHRASE) |
28 | else() | 43 | else() |
diff --git a/apps/nc/Makefile.am b/apps/nc/Makefile.am index aba306e..a3911a2 100644 --- a/apps/nc/Makefile.am +++ b/apps/nc/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2015 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | 18 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk |
diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt index 778e837..ed2ec1b 100644 --- a/apps/ocspcheck/CMakeLists.txt +++ b/apps/ocspcheck/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2017 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | set( | 16 | set( |
2 | OCSPCHECK_SRC | 17 | OCSPCHECK_SRC |
3 | http.c | 18 | http.c |
diff --git a/apps/ocspcheck/Makefile.am b/apps/ocspcheck/Makefile.am index e6f3c54..554bd5c 100644 --- a/apps/ocspcheck/Makefile.am +++ b/apps/ocspcheck/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2017 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | 18 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk |
diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt index bca60e1..3040d01 100644 --- a/apps/openssl/CMakeLists.txt +++ b/apps/openssl/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2016 Kinichiro Inoguchi | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | set( | 16 | set( |
2 | OPENSSL_SRC | 17 | OPENSSL_SRC |
3 | apps.c | 18 | apps.c |
diff --git a/apps/openssl/Makefile.am b/apps/openssl/Makefile.am index 810408d..40804c5 100644 --- a/apps/openssl/Makefile.am +++ b/apps/openssl/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2015 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | 18 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk |
@@ -88,11 +103,6 @@ endif | |||
88 | endif | 103 | endif |
89 | 104 | ||
90 | noinst_HEADERS = apps.h | 105 | noinst_HEADERS = apps.h |
91 | noinst_HEADERS += progs.h | ||
92 | noinst_HEADERS += s_apps.h | ||
93 | noinst_HEADERS += testdsa.h | ||
94 | noinst_HEADERS += testrsa.h | ||
95 | noinst_HEADERS += timeouts.h | ||
96 | 106 | ||
97 | EXTRA_DIST = CMakeLists.txt | 107 | EXTRA_DIST = CMakeLists.txt |
98 | 108 | ||
diff --git a/apps/openssl/compat/poll_win.c b/apps/openssl/compat/poll_win.c index c9422b9..30f6b60 100644 --- a/apps/openssl/compat/poll_win.c +++ b/apps/openssl/compat/poll_win.c | |||
@@ -248,12 +248,12 @@ poll(struct pollfd *pfds, nfds_t nfds, int timeout_ms) | |||
248 | timespent_ms = 0; | 248 | timespent_ms = 0; |
249 | wait_rc = WAIT_FAILED; | 249 | wait_rc = WAIT_FAILED; |
250 | 250 | ||
251 | if (timeout_ms < 0) | 251 | looptime_ms = (timeout_ms > 100 || timeout_ms == -1) ? 100 : timeout_ms; |
252 | if (timeout_ms == -1) | ||
252 | timeout_ms = INFINITE; | 253 | timeout_ms = INFINITE; |
253 | looptime_ms = timeout_ms > 100 ? 100 : timeout_ms; | ||
254 | 254 | ||
255 | do { | 255 | do { |
256 | struct timeval tv; | 256 | TIMEVAL tv; |
257 | tv.tv_sec = 0; | 257 | tv.tv_sec = 0; |
258 | tv.tv_usec = looptime_ms * 1000; | 258 | tv.tv_usec = looptime_ms * 1000; |
259 | int handle_signaled = 0; | 259 | int handle_signaled = 0; |
diff --git a/check-release.sh b/check-release.sh index c5f9c5f..723a051 100755 --- a/check-release.sh +++ b/check-release.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | ver=$1 | 19 | ver=$1 |
diff --git a/cmake_export_symbol.cmake b/cmake_export_symbol.cmake index 0883001..9fe61f2 100644 --- a/cmake_export_symbol.cmake +++ b/cmake_export_symbol.cmake | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2017 Kinichiro Inoguchi | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | macro(export_symbol TARGET SYMBOLS_PATH) | 16 | macro(export_symbol TARGET SYMBOLS_PATH) |
2 | 17 | ||
3 | set(FLAG "") | 18 | set(FLAG "") |
diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in index bb8055d..2887382 100644 --- a/cmake_uninstall.cmake.in +++ b/cmake_uninstall.cmake.in | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2016 Kinichiro Inoguchi | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | 16 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") |
2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | 17 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") |
3 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | 18 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") |
diff --git a/configure.ac b/configure.ac index 87a80cc..8d347b0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,3 +1,4 @@ | |||
1 | # | ||
1 | # Copyright (c) 2014-2015 Brent Cook | 2 | # Copyright (c) 2014-2015 Brent Cook |
2 | # | 3 | # |
3 | # Permission to use, copy, modify, and distribute this software for any | 4 | # Permission to use, copy, modify, and distribute this software for any |
@@ -32,10 +33,6 @@ LT_INIT([pic-only]) | |||
32 | 33 | ||
33 | CHECK_OS_OPTIONS | 34 | CHECK_OS_OPTIONS |
34 | 35 | ||
35 | if test "$HOST_OS" = "unsupported"; then | ||
36 | AC_MSG_ERROR([unsupported platform: $host_os]) | ||
37 | fi | ||
38 | |||
39 | CHECK_C_HARDENING_OPTIONS | 36 | CHECK_C_HARDENING_OPTIONS |
40 | 37 | ||
41 | DISABLE_AS_EXECUTABLE_STACK | 38 | DISABLE_AS_EXECUTABLE_STACK |
@@ -90,16 +87,17 @@ AS_CASE([$host_cpu], | |||
90 | ) | 87 | ) |
91 | AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"]) | 88 | AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"]) |
92 | 89 | ||
93 | AM_CONDITIONAL([HOST_AARCH64], [test "$host_cpu" = "aarch64"]) | 90 | AM_CONDITIONAL([HOST_AARCH64], [test "$host_cpu" = "aarch64"]) |
94 | AM_CONDITIONAL([HOST_ARM], [test "$host_cpu" = "arm"]) | 91 | AM_CONDITIONAL([HOST_ARM], [test "$host_cpu" = "arm"]) |
95 | AM_CONDITIONAL([HOST_I386], [test "$host_cpu" = "i386"]) | 92 | AM_CONDITIONAL([HOST_I386], [test "$host_cpu" = "i386"]) |
96 | AM_CONDITIONAL([HOST_MIPS], [test "$host_cpu" = "mips"]) | 93 | AM_CONDITIONAL([HOST_LOONGARCH64], [test "$host_cpu" = "loongarch64"]) |
97 | AM_CONDITIONAL([HOST_MIPS64], [test "$host_cpu" = "mips64"]) | 94 | AM_CONDITIONAL([HOST_MIPS], [test "$host_cpu" = "mips"]) |
98 | AM_CONDITIONAL([HOST_POWERPC], [test "$host_cpu" = "powerpc"]) | 95 | AM_CONDITIONAL([HOST_MIPS64], [test "$host_cpu" = "mips64"]) |
99 | AM_CONDITIONAL([HOST_POWERPC64], [test "$host_cpu" = "ppc64"]) | 96 | AM_CONDITIONAL([HOST_POWERPC], [test "$host_cpu" = "powerpc"]) |
100 | AM_CONDITIONAL([HOST_RISCV64], [test "$host_cpu" = "riscv64"]) | 97 | AM_CONDITIONAL([HOST_POWERPC64], [test "$host_cpu" = "ppc64"]) |
101 | AM_CONDITIONAL([HOST_SPARC64], [test "$host_cpu" = "sparc64"]) | 98 | AM_CONDITIONAL([HOST_RISCV64], [test "$host_cpu" = "riscv64"]) |
102 | AM_CONDITIONAL([HOST_X86_64], [test "$host_cpu" = "x86_64"]) | 99 | AM_CONDITIONAL([HOST_SPARC64], [test "$host_cpu" = "sparc64"]) |
100 | AM_CONDITIONAL([HOST_X86_64], [test "$host_cpu" = "x86_64"]) | ||
103 | 101 | ||
104 | AC_MSG_CHECKING([if .gnu.warning accepts long strings]) | 102 | AC_MSG_CHECKING([if .gnu.warning accepts long strings]) |
105 | AC_LINK_IFELSE([AC_LANG_SOURCE([[ | 103 | AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
@@ -117,8 +115,6 @@ AC_ARG_ENABLE([asm], AS_HELP_STRING([--disable-asm], [Disable assembly])) | |||
117 | AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) | 115 | AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) |
118 | 116 | ||
119 | # Conditionally enable assembly by default | 117 | # Conditionally enable assembly by default |
120 | AM_CONDITIONAL([HOST_ASM_ELF_ARM], | ||
121 | [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "arm" -a "x$enable_asm" != "xno"]) | ||
122 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS], | 118 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS], |
123 | [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "mips" -a "x$enable_asm" != "xno"]) | 119 | [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "mips" -a "x$enable_asm" != "xno"]) |
124 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS64], | 120 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS64], |
@@ -163,3 +159,7 @@ AM_CONDITIONAL([ENABLE_LIBTLS_ONLY], [test "x$enable_libtls_only" = xyes]) | |||
163 | AC_REQUIRE_AUX_FILE([tap-driver.sh]) | 159 | AC_REQUIRE_AUX_FILE([tap-driver.sh]) |
164 | 160 | ||
165 | AC_OUTPUT | 161 | AC_OUTPUT |
162 | |||
163 | if test "$HOST_OS" = "unsupported"; then | ||
164 | AC_MSG_WARN([unsupported platform: $host_os]) | ||
165 | fi | ||
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 5ee20ff..f67d2bd 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt | |||
@@ -1,236 +1,198 @@ | |||
1 | add_definitions(-DLIBRESSL_CRYPTO_INTERNAL) | 1 | # |
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
2 | 15 | ||
3 | if(HOST_ASM_ELF_ARMV4) | 16 | add_definitions(-DLIBRESSL_CRYPTO_INTERNAL) |
4 | set( | ||
5 | ASM_ARMV4_ELF_SRC | ||
6 | aes/aes-elf-armv4.S | ||
7 | bn/mont-elf-armv4.S | ||
8 | sha/sha1-elf-armv4.S | ||
9 | sha/sha512-elf-armv4.S | ||
10 | sha/sha256-elf-armv4.S | ||
11 | modes/ghash-elf-armv4.S | ||
12 | armv4cpuid.S | ||
13 | armcap.c | ||
14 | ) | ||
15 | add_definitions(-DAES_ASM) | ||
16 | add_definitions(-DOPENSSL_BN_ASM_MONT) | ||
17 | add_definitions(-DGHASH_ASM) | ||
18 | add_definitions(-DSHA1_ASM) | ||
19 | add_definitions(-DSHA256_ASM) | ||
20 | add_definitions(-DSHA512_ASM) | ||
21 | add_definitions(-DOPENSSL_CPUID_OBJ) | ||
22 | set_property(SOURCE ${ASM_ARMV4_ELF_SRC} PROPERTY LANGUAGE C) | ||
23 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_ARMV4_ELF_SRC}) | ||
24 | endif() | ||
25 | 17 | ||
26 | if(HOST_ASM_ELF_X86_64) | 18 | if(HOST_ASM_ELF_X86_64) |
19 | set(CRYPTO_SRC ${CRYPTO_SRC} aes/aes_amd64.c) | ||
20 | set(CRYPTO_SRC ${CRYPTO_SRC} bn/arch/amd64/bn_arch.c) | ||
21 | set(CRYPTO_SRC ${CRYPTO_SRC} modes/gcm128_amd64.c) | ||
22 | |||
27 | set( | 23 | set( |
28 | ASM_X86_64_ELF_SRC | 24 | ASM_X86_64_ELF_SRC |
29 | aes/aes-elf-x86_64.S | 25 | aes/aes-elf-x86_64.S |
30 | aes/bsaes-elf-x86_64.S | ||
31 | aes/vpaes-elf-x86_64.S | ||
32 | aes/aesni-elf-x86_64.S | 26 | aes/aesni-elf-x86_64.S |
33 | bn/modexp512-elf-x86_64.S | 27 | bn/modexp512-elf-x86_64.S |
34 | bn/mont-elf-x86_64.S | 28 | bn/mont-elf-x86_64.S |
35 | bn/mont5-elf-x86_64.S | 29 | bn/mont5-elf-x86_64.S |
36 | md5/md5-elf-x86_64.S | ||
37 | modes/ghash-elf-x86_64.S | 30 | modes/ghash-elf-x86_64.S |
38 | rc4/rc4-elf-x86_64.S | 31 | rc4/rc4-elf-x86_64.S |
39 | sha/sha1-elf-x86_64.S | ||
40 | sha/sha256-elf-x86_64.S | ||
41 | sha/sha512-elf-x86_64.S | ||
42 | cpuid-elf-x86_64.S | ||
43 | 32 | ||
44 | bn/arch/amd64/bignum_add.S | 33 | bn/arch/amd64/bignum_add.S |
45 | bn/arch/amd64/bignum_cmadd.S | 34 | bn/arch/amd64/bignum_cmadd.S |
46 | bn/arch/amd64/bignum_cmul.S | 35 | bn/arch/amd64/bignum_cmul.S |
36 | bn/arch/amd64/bignum_modadd.S | ||
37 | bn/arch/amd64/bignum_modsub.S | ||
47 | bn/arch/amd64/bignum_mul.S | 38 | bn/arch/amd64/bignum_mul.S |
39 | bn/arch/amd64/bignum_mul_4_8.S | ||
48 | bn/arch/amd64/bignum_mul_4_8_alt.S | 40 | bn/arch/amd64/bignum_mul_4_8_alt.S |
41 | bn/arch/amd64/bignum_mul_6_12.S | ||
42 | bn/arch/amd64/bignum_mul_6_12_alt.S | ||
43 | bn/arch/amd64/bignum_mul_8_16.S | ||
49 | bn/arch/amd64/bignum_mul_8_16_alt.S | 44 | bn/arch/amd64/bignum_mul_8_16_alt.S |
50 | bn/arch/amd64/bignum_sqr.S | 45 | bn/arch/amd64/bignum_sqr.S |
46 | bn/arch/amd64/bignum_sqr_4_8.S | ||
51 | bn/arch/amd64/bignum_sqr_4_8_alt.S | 47 | bn/arch/amd64/bignum_sqr_4_8_alt.S |
48 | bn/arch/amd64/bignum_sqr_6_12.S | ||
49 | bn/arch/amd64/bignum_sqr_6_12_alt.S | ||
50 | bn/arch/amd64/bignum_sqr_8_16.S | ||
52 | bn/arch/amd64/bignum_sqr_8_16_alt.S | 51 | bn/arch/amd64/bignum_sqr_8_16_alt.S |
53 | bn/arch/amd64/bignum_sub.S | 52 | bn/arch/amd64/bignum_sub.S |
54 | bn/arch/amd64/word_clz.S | 53 | bn/arch/amd64/word_clz.S |
55 | bn/arch/amd64/bn_arch.c | ||
56 | ) | 54 | ) |
57 | add_definitions(-DAES_ASM) | 55 | add_definitions(-DAES_ASM) |
58 | add_definitions(-DBSAES_ASM) | 56 | add_definitions(-DBSAES_ASM) |
59 | add_definitions(-DVPAES_ASM) | 57 | add_definitions(-DVPAES_ASM) |
60 | add_definitions(-DHAVE_AES_CBC_ENCRYPT_INTERNAL) | ||
61 | add_definitions(-DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL) | ||
62 | add_definitions(-DHAVE_AES_SET_DECRYPT_KEY_INTERNAL) | ||
63 | add_definitions(-DHAVE_AES_ENCRYPT_INTERNAL) | ||
64 | add_definitions(-DHAVE_AES_DECRYPT_INTERNAL) | ||
65 | add_definitions(-DOPENSSL_IA32_SSE2) | 58 | add_definitions(-DOPENSSL_IA32_SSE2) |
66 | add_definitions(-DOPENSSL_BN_ASM_MONT) | 59 | add_definitions(-DOPENSSL_BN_ASM_MONT) |
67 | add_definitions(-DOPENSSL_BN_ASM_MONT5) | 60 | add_definitions(-DOPENSSL_BN_ASM_MONT5) |
68 | add_definitions(-DMD5_ASM) | ||
69 | add_definitions(-DGHASH_ASM) | 61 | add_definitions(-DGHASH_ASM) |
70 | add_definitions(-DRSA_ASM) | 62 | add_definitions(-DRSA_ASM) |
71 | add_definitions(-DSHA1_ASM) | ||
72 | add_definitions(-DSHA256_ASM) | ||
73 | add_definitions(-DSHA512_ASM) | ||
74 | add_definitions(-DWHIRLPOOL_ASM) | ||
75 | add_definitions(-DOPENSSL_CPUID_OBJ) | ||
76 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_ELF_SRC}) | 63 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_ELF_SRC}) |
77 | set_property(SOURCE ${ASM_X86_64_ELF_SRC} PROPERTY LANGUAGE C) | ||
78 | endif() | 64 | endif() |
79 | 65 | ||
80 | if(HOST_ASM_MACOSX_X86_64) | 66 | if(HOST_ASM_MACOSX_X86_64) |
67 | set(CRYPTO_SRC ${CRYPTO_SRC} aes/aes_amd64.c) | ||
68 | set(CRYPTO_SRC ${CRYPTO_SRC} bn/arch/amd64/bn_arch.c) | ||
69 | set(CRYPTO_SRC ${CRYPTO_SRC} modes/gcm128_amd64.c) | ||
70 | |||
81 | set( | 71 | set( |
82 | ASM_X86_64_MACOSX_SRC | 72 | ASM_X86_64_MACOSX_SRC |
83 | aes/aes-macosx-x86_64.S | 73 | aes/aes-macosx-x86_64.S |
84 | aes/bsaes-macosx-x86_64.S | ||
85 | aes/vpaes-macosx-x86_64.S | ||
86 | aes/aesni-macosx-x86_64.S | 74 | aes/aesni-macosx-x86_64.S |
87 | bn/modexp512-macosx-x86_64.S | 75 | bn/modexp512-macosx-x86_64.S |
88 | bn/mont-macosx-x86_64.S | 76 | bn/mont-macosx-x86_64.S |
89 | bn/mont5-macosx-x86_64.S | 77 | bn/mont5-macosx-x86_64.S |
90 | md5/md5-macosx-x86_64.S | ||
91 | modes/ghash-macosx-x86_64.S | 78 | modes/ghash-macosx-x86_64.S |
92 | rc4/rc4-macosx-x86_64.S | 79 | rc4/rc4-macosx-x86_64.S |
93 | sha/sha1-macosx-x86_64.S | ||
94 | sha/sha256-macosx-x86_64.S | ||
95 | sha/sha512-macosx-x86_64.S | ||
96 | cpuid-macosx-x86_64.S | ||
97 | 80 | ||
98 | bn/arch/amd64/bignum_add.S | 81 | bn/arch/amd64/bignum_add.S |
99 | bn/arch/amd64/bignum_cmadd.S | 82 | bn/arch/amd64/bignum_cmadd.S |
100 | bn/arch/amd64/bignum_cmul.S | 83 | bn/arch/amd64/bignum_cmul.S |
84 | bn/arch/amd64/bignum_modadd.S | ||
85 | bn/arch/amd64/bignum_modsub.S | ||
101 | bn/arch/amd64/bignum_mul.S | 86 | bn/arch/amd64/bignum_mul.S |
87 | bn/arch/amd64/bignum_mul_4_8.S | ||
102 | bn/arch/amd64/bignum_mul_4_8_alt.S | 88 | bn/arch/amd64/bignum_mul_4_8_alt.S |
89 | bn/arch/amd64/bignum_mul_6_12.S | ||
90 | bn/arch/amd64/bignum_mul_6_12_alt.S | ||
91 | bn/arch/amd64/bignum_mul_8_16.S | ||
103 | bn/arch/amd64/bignum_mul_8_16_alt.S | 92 | bn/arch/amd64/bignum_mul_8_16_alt.S |
104 | bn/arch/amd64/bignum_sqr.S | 93 | bn/arch/amd64/bignum_sqr.S |
94 | bn/arch/amd64/bignum_sqr_4_8.S | ||
105 | bn/arch/amd64/bignum_sqr_4_8_alt.S | 95 | bn/arch/amd64/bignum_sqr_4_8_alt.S |
96 | bn/arch/amd64/bignum_sqr_6_12.S | ||
97 | bn/arch/amd64/bignum_sqr_6_12_alt.S | ||
98 | bn/arch/amd64/bignum_sqr_8_16.S | ||
106 | bn/arch/amd64/bignum_sqr_8_16_alt.S | 99 | bn/arch/amd64/bignum_sqr_8_16_alt.S |
107 | bn/arch/amd64/bignum_sub.S | 100 | bn/arch/amd64/bignum_sub.S |
108 | bn/arch/amd64/word_clz.S | 101 | bn/arch/amd64/word_clz.S |
109 | bn/arch/amd64/bn_arch.c | ||
110 | ) | 102 | ) |
111 | add_definitions(-DAES_ASM) | 103 | add_definitions(-DAES_ASM) |
112 | add_definitions(-DBSAES_ASM) | 104 | add_definitions(-DBSAES_ASM) |
113 | add_definitions(-DVPAES_ASM) | 105 | add_definitions(-DVPAES_ASM) |
114 | add_definitions(-DHAVE_AES_CBC_ENCRYPT_INTERNAL) | ||
115 | add_definitions(-DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL) | ||
116 | add_definitions(-DHAVE_AES_SET_DECRYPT_KEY_INTERNAL) | ||
117 | add_definitions(-DHAVE_AES_ENCRYPT_INTERNAL) | ||
118 | add_definitions(-DHAVE_AES_DECRYPT_INTERNAL) | ||
119 | add_definitions(-DOPENSSL_IA32_SSE2) | 106 | add_definitions(-DOPENSSL_IA32_SSE2) |
120 | add_definitions(-DOPENSSL_BN_ASM_MONT) | 107 | add_definitions(-DOPENSSL_BN_ASM_MONT) |
121 | add_definitions(-DOPENSSL_BN_ASM_MONT5) | 108 | add_definitions(-DOPENSSL_BN_ASM_MONT5) |
122 | add_definitions(-DMD5_ASM) | ||
123 | add_definitions(-DGHASH_ASM) | 109 | add_definitions(-DGHASH_ASM) |
124 | add_definitions(-DRSA_ASM) | 110 | add_definitions(-DRSA_ASM) |
125 | add_definitions(-DSHA1_ASM) | ||
126 | add_definitions(-DSHA256_ASM) | ||
127 | add_definitions(-DSHA512_ASM) | ||
128 | add_definitions(-DWHIRLPOOL_ASM) | ||
129 | add_definitions(-DOPENSSL_CPUID_OBJ) | ||
130 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MACOSX_SRC}) | 111 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MACOSX_SRC}) |
131 | set_property(SOURCE ${ASM_X86_64_MACOSX_SRC} PROPERTY LANGUAGE C) | ||
132 | set_property(SOURCE ${ASM_X86_64_MACOSX_SRC} PROPERTY XCODE_EXPLICIT_FILE_TYPE "sourcecode.asm") | 112 | set_property(SOURCE ${ASM_X86_64_MACOSX_SRC} PROPERTY XCODE_EXPLICIT_FILE_TYPE "sourcecode.asm") |
133 | endif() | 113 | endif() |
134 | 114 | ||
135 | if(HOST_ASM_MASM_X86_64) | 115 | if(HOST_ASM_MASM_X86_64) |
116 | set(CRYPTO_SRC ${CRYPTO_SRC} aes/aes_amd64.c) | ||
117 | set(CRYPTO_SRC ${CRYPTO_SRC} modes/gcm128_amd64.c) | ||
118 | |||
136 | set( | 119 | set( |
137 | ASM_X86_64_MASM_SRC | 120 | ASM_X86_64_MASM_SRC |
138 | aes/aes-masm-x86_64.S | 121 | aes/aes-masm-x86_64.S |
139 | aes/bsaes-masm-x86_64.S | ||
140 | aes/vpaes-masm-x86_64.S | ||
141 | aes/aesni-masm-x86_64.S | 122 | aes/aesni-masm-x86_64.S |
142 | #bn/modexp512-masm-x86_64.S | 123 | #bn/modexp512-masm-x86_64.S |
143 | #bn/mont-masm-x86_64.S | 124 | #bn/mont-masm-x86_64.S |
144 | #bn/mont5-masm-x86_64.S | 125 | #bn/mont5-masm-x86_64.S |
145 | md5/md5-masm-x86_64.S | ||
146 | modes/ghash-masm-x86_64.S | 126 | modes/ghash-masm-x86_64.S |
147 | rc4/rc4-masm-x86_64.S | 127 | rc4/rc4-masm-x86_64.S |
148 | sha/sha1-masm-x86_64.S | ||
149 | sha/sha256-masm-x86_64.S | ||
150 | sha/sha512-masm-x86_64.S | ||
151 | cpuid-masm-x86_64.S | ||
152 | ) | 128 | ) |
153 | add_definitions(-Dendbr64=) | 129 | add_definitions(-Dendbr64=) |
154 | add_definitions(-DAES_ASM) | 130 | add_definitions(-DAES_ASM) |
155 | add_definitions(-DBSAES_ASM) | 131 | add_definitions(-DBSAES_ASM) |
156 | add_definitions(-DVPAES_ASM) | 132 | add_definitions(-DVPAES_ASM) |
157 | add_definitions(-DHAVE_AES_CBC_ENCRYPT_INTERNAL) | ||
158 | add_definitions(-DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL) | ||
159 | add_definitions(-DHAVE_AES_SET_DECRYPT_KEY_INTERNAL) | ||
160 | add_definitions(-DHAVE_AES_ENCRYPT_INTERNAL) | ||
161 | add_definitions(-DHAVE_AES_DECRYPT_INTERNAL) | ||
162 | add_definitions(-DOPENSSL_IA32_SSE2) | 133 | add_definitions(-DOPENSSL_IA32_SSE2) |
163 | #add_definitions(-DOPENSSL_BN_ASM_MONT) | 134 | #add_definitions(-DOPENSSL_BN_ASM_MONT) |
164 | #add_definitions(-DOPENSSL_BN_ASM_MONT5) | 135 | #add_definitions(-DOPENSSL_BN_ASM_MONT5) |
165 | add_definitions(-DMD5_ASM) | ||
166 | add_definitions(-DGHASH_ASM) | 136 | add_definitions(-DGHASH_ASM) |
167 | add_definitions(-DRSA_ASM) | 137 | add_definitions(-DRSA_ASM) |
168 | add_definitions(-DSHA1_ASM) | ||
169 | add_definitions(-DSHA256_ASM) | ||
170 | add_definitions(-DSHA512_ASM) | ||
171 | add_definitions(-DWHIRLPOOL_ASM) | ||
172 | add_definitions(-DOPENSSL_CPUID_OBJ) | ||
173 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MASM_SRC}) | 138 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MASM_SRC}) |
174 | set_property(SOURCE ${ASM_X86_64_MASM_SRC} PROPERTY LANGUAGE ASM_MASM) | 139 | set_property(SOURCE ${ASM_X86_64_MASM_SRC} PROPERTY LANGUAGE ASM_MASM) |
175 | endif() | 140 | endif() |
176 | 141 | ||
177 | if(HOST_ASM_MINGW64_X86_64) | 142 | if(HOST_ASM_MINGW64_X86_64) |
143 | set(CRYPTO_SRC ${CRYPTO_SRC} aes/aes_amd64.c) | ||
144 | set(CRYPTO_SRC ${CRYPTO_SRC} modes/gcm128_amd64.c) | ||
145 | |||
178 | set( | 146 | set( |
179 | ASM_X86_64_MINGW64_SRC | 147 | ASM_X86_64_MINGW64_SRC |
180 | aes/aes-mingw64-x86_64.S | 148 | aes/aes-mingw64-x86_64.S |
181 | aes/bsaes-mingw64-x86_64.S | ||
182 | aes/vpaes-mingw64-x86_64.S | ||
183 | aes/aesni-mingw64-x86_64.S | 149 | aes/aesni-mingw64-x86_64.S |
184 | #bn/modexp512-mingw64-x86_64.S | 150 | #bn/modexp512-mingw64-x86_64.S |
185 | #bn/mont-mingw64-x86_64.S | 151 | #bn/mont-mingw64-x86_64.S |
186 | #bn/mont5-mingw64-x86_64.S | 152 | #bn/mont5-mingw64-x86_64.S |
187 | md5/md5-mingw64-x86_64.S | ||
188 | modes/ghash-mingw64-x86_64.S | 153 | modes/ghash-mingw64-x86_64.S |
189 | rc4/rc4-mingw64-x86_64.S | 154 | rc4/rc4-mingw64-x86_64.S |
190 | sha/sha1-mingw64-x86_64.S | ||
191 | sha/sha256-mingw64-x86_64.S | ||
192 | sha/sha512-mingw64-x86_64.S | ||
193 | cpuid-mingw64-x86_64.S | ||
194 | ) | 155 | ) |
195 | add_definitions(-Dendbr32=endbr64) | 156 | add_definitions(-Dendbr32=endbr64) |
196 | add_definitions(-DAES_ASM) | 157 | add_definitions(-DAES_ASM) |
197 | add_definitions(-DBSAES_ASM) | 158 | add_definitions(-DBSAES_ASM) |
198 | add_definitions(-DVPAES_ASM) | 159 | add_definitions(-DVPAES_ASM) |
199 | add_definitions(-DHAVE_AES_CBC_ENCRYPT_INTERNAL) | ||
200 | add_definitions(-DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL) | ||
201 | add_definitions(-DHAVE_AES_SET_DECRYPT_KEY_INTERNAL) | ||
202 | add_definitions(-DHAVE_AES_ENCRYPT_INTERNAL) | ||
203 | add_definitions(-DHAVE_AES_DECRYPT_INTERNAL) | ||
204 | add_definitions(-DOPENSSL_IA32_SSE2) | 160 | add_definitions(-DOPENSSL_IA32_SSE2) |
205 | #add_definitions(-DOPENSSL_BN_ASM_MONT) | 161 | #add_definitions(-DOPENSSL_BN_ASM_MONT) |
206 | #add_definitions(-DOPENSSL_BN_ASM_MONT5) | 162 | #add_definitions(-DOPENSSL_BN_ASM_MONT5) |
207 | add_definitions(-DMD5_ASM) | ||
208 | add_definitions(-DGHASH_ASM) | 163 | add_definitions(-DGHASH_ASM) |
209 | add_definitions(-DRSA_ASM) | 164 | add_definitions(-DRSA_ASM) |
210 | add_definitions(-DSHA1_ASM) | ||
211 | add_definitions(-DSHA256_ASM) | ||
212 | add_definitions(-DSHA512_ASM) | ||
213 | add_definitions(-DWHIRLPOOL_ASM) | ||
214 | add_definitions(-DOPENSSL_CPUID_OBJ) | ||
215 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MINGW64_SRC}) | 165 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_X86_64_MINGW64_SRC}) |
216 | set_property(SOURCE ${ASM_X86_64_MINGW64_SRC} PROPERTY LANGUAGE C) | 166 | endif() |
167 | |||
168 | if(HOST_AARCH64) | ||
169 | if(APPLE) | ||
170 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_darwin.c) | ||
171 | elseif(LINUX) | ||
172 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_linux.c) | ||
173 | elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") | ||
174 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps.c) | ||
175 | elseif(WIN32) | ||
176 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_windows.c) | ||
177 | else() | ||
178 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_none.c) | ||
179 | endif() | ||
180 | elseif(HOST_X86_64) | ||
181 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/amd64/crypto_cpu_caps.c) | ||
182 | elseif(HOST_I386) | ||
183 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/i386/crypto_cpu_caps.c) | ||
217 | endif() | 184 | endif() |
218 | 185 | ||
219 | set( | 186 | set( |
220 | CRYPTO_SRC | 187 | CRYPTO_SRC |
221 | ${CRYPTO_SRC} | 188 | ${CRYPTO_SRC} |
222 | cpt_err.c | 189 | crypto_err.c |
223 | cryptlib.c | 190 | crypto_ex_data.c |
224 | crypto_init.c | 191 | crypto_init.c |
225 | cversion.c | 192 | crypto_legacy.c |
226 | ex_data.c | 193 | crypto_memory.c |
227 | malloc-wrapper.c | ||
228 | mem_clr.c | ||
229 | mem_dbg.c | ||
230 | o_fips.c | ||
231 | aes/aes.c | 194 | aes/aes.c |
232 | aes/aes_core.c | 195 | aes/aes_core.c |
233 | aes/aes_ige.c | ||
234 | asn1/a_bitstr.c | 196 | asn1/a_bitstr.c |
235 | asn1/a_enum.c | 197 | asn1/a_enum.c |
236 | asn1/a_int.c | 198 | asn1/a_int.c |
@@ -280,10 +242,8 @@ set( | |||
280 | asn1/x_bignum.c | 242 | asn1/x_bignum.c |
281 | asn1/x_crl.c | 243 | asn1/x_crl.c |
282 | asn1/x_exten.c | 244 | asn1/x_exten.c |
283 | asn1/x_info.c | ||
284 | asn1/x_long.c | 245 | asn1/x_long.c |
285 | asn1/x_name.c | 246 | asn1/x_name.c |
286 | asn1/x_pkey.c | ||
287 | asn1/x_pubkey.c | 247 | asn1/x_pubkey.c |
288 | asn1/x_req.c | 248 | asn1/x_req.c |
289 | asn1/x_sig.c | 249 | asn1/x_sig.c |
@@ -312,6 +272,7 @@ set( | |||
312 | bio/bss_null.c | 272 | bio/bss_null.c |
313 | bio/bss_sock.c | 273 | bio/bss_sock.c |
314 | bn/bn_add.c | 274 | bn/bn_add.c |
275 | bn/bn_add_sub.c | ||
315 | bn/bn_bpsw.c | 276 | bn/bn_bpsw.c |
316 | bn/bn_const.c | 277 | bn/bn_const.c |
317 | bn/bn_convert.c | 278 | bn/bn_convert.c |
@@ -325,6 +286,7 @@ set( | |||
325 | bn/bn_lib.c | 286 | bn/bn_lib.c |
326 | bn/bn_mod.c | 287 | bn/bn_mod.c |
327 | bn/bn_mod_sqrt.c | 288 | bn/bn_mod_sqrt.c |
289 | bn/bn_mod_words.c | ||
328 | bn/bn_mont.c | 290 | bn/bn_mont.c |
329 | bn/bn_mul.c | 291 | bn/bn_mul.c |
330 | bn/bn_prime.c | 292 | bn/bn_prime.c |
@@ -364,7 +326,6 @@ set( | |||
364 | conf/conf_def.c | 326 | conf/conf_def.c |
365 | conf/conf_err.c | 327 | conf/conf_err.c |
366 | conf/conf_lib.c | 328 | conf/conf_lib.c |
367 | conf/conf_mall.c | ||
368 | conf/conf_mod.c | 329 | conf/conf_mod.c |
369 | conf/conf_sap.c | 330 | conf/conf_sap.c |
370 | ct/ct_b64.c | 331 | ct/ct_b64.c |
@@ -379,26 +340,11 @@ set( | |||
379 | ct/ct_x509v3.c | 340 | ct/ct_x509v3.c |
380 | curve25519/curve25519-generic.c | 341 | curve25519/curve25519-generic.c |
381 | curve25519/curve25519.c | 342 | curve25519/curve25519.c |
382 | des/cbc_cksm.c | 343 | des/des.c |
383 | des/cbc_enc.c | 344 | des/des_cksum.c |
384 | des/cfb64ede.c | ||
385 | des/cfb64enc.c | ||
386 | des/cfb_enc.c | ||
387 | des/des_enc.c | 345 | des/des_enc.c |
388 | des/ecb3_enc.c | 346 | des/des_fcrypt.c |
389 | des/ecb_enc.c | 347 | des/des_key.c |
390 | des/ede_cbcm_enc.c | ||
391 | des/enc_read.c | ||
392 | des/fcrypt.c | ||
393 | des/fcrypt_b.c | ||
394 | des/ofb64ede.c | ||
395 | des/ofb64enc.c | ||
396 | des/ofb_enc.c | ||
397 | des/pcbc_enc.c | ||
398 | des/qud_cksm.c | ||
399 | des/set_key.c | ||
400 | des/str2key.c | ||
401 | des/xcbc_enc.c | ||
402 | dh/dh_ameth.c | 348 | dh/dh_ameth.c |
403 | dh/dh_asn1.c | 349 | dh/dh_asn1.c |
404 | dh/dh_check.c | 350 | dh/dh_check.c |
@@ -419,21 +365,17 @@ set( | |||
419 | dsa/dsa_prn.c | 365 | dsa/dsa_prn.c |
420 | ec/ec_ameth.c | 366 | ec/ec_ameth.c |
421 | ec/ec_asn1.c | 367 | ec/ec_asn1.c |
422 | ec/ec_check.c | 368 | ec/ec_convert.c |
423 | ec/ec_curve.c | 369 | ec/ec_curve.c |
424 | ec/ec_cvt.c | ||
425 | ec/ec_err.c | 370 | ec/ec_err.c |
371 | ec/ec_field.c | ||
426 | ec/ec_key.c | 372 | ec/ec_key.c |
427 | ec/ec_kmeth.c | ||
428 | ec/ec_lib.c | 373 | ec/ec_lib.c |
429 | ec/ec_mult.c | 374 | ec/ec_mult.c |
430 | ec/ec_oct.c | ||
431 | ec/ec_pmeth.c | 375 | ec/ec_pmeth.c |
432 | ec/ec_print.c | ||
433 | ec/eck_prn.c | 376 | ec/eck_prn.c |
434 | ec/ecp_mont.c | 377 | ec/ecp_hp_methods.c |
435 | ec/ecp_oct.c | 378 | ec/ecp_methods.c |
436 | ec/ecp_smpl.c | ||
437 | ec/ecx_methods.c | 379 | ec/ecx_methods.c |
438 | ecdh/ecdh.c | 380 | ecdh/ecdh.c |
439 | ecdsa/ecdsa.c | 381 | ecdsa/ecdsa.c |
@@ -476,7 +418,6 @@ set( | |||
476 | evp/m_sha3.c | 418 | evp/m_sha3.c |
477 | evp/m_sigver.c | 419 | evp/m_sigver.c |
478 | evp/m_sm3.c | 420 | evp/m_sm3.c |
479 | evp/m_wp.c | ||
480 | evp/p_legacy.c | 421 | evp/p_legacy.c |
481 | evp/p_lib.c | 422 | evp/p_lib.c |
482 | evp/p_sign.c | 423 | evp/p_sign.c |
@@ -495,6 +436,10 @@ set( | |||
495 | lhash/lhash.c | 436 | lhash/lhash.c |
496 | md4/md4.c | 437 | md4/md4.c |
497 | md5/md5.c | 438 | md5/md5.c |
439 | mlkem/mlkem.c | ||
440 | mlkem/mlkem1024.c | ||
441 | mlkem/mlkem768.c | ||
442 | mlkem/mlkem_key.c | ||
498 | modes/cbc128.c | 443 | modes/cbc128.c |
499 | modes/ccm128.c | 444 | modes/ccm128.c |
500 | modes/cfb128.c | 445 | modes/cfb128.c |
@@ -552,11 +497,7 @@ set( | |||
552 | rand/rand_err.c | 497 | rand/rand_err.c |
553 | rand/rand_lib.c | 498 | rand/rand_lib.c |
554 | rand/randfile.c | 499 | rand/randfile.c |
555 | rc2/rc2_cbc.c | 500 | rc2/rc2.c |
556 | rc2/rc2_ecb.c | ||
557 | rc2/rc2_skey.c | ||
558 | rc2/rc2cfb64.c | ||
559 | rc2/rc2ofb64.c | ||
560 | rc4/rc4.c | 501 | rc4/rc4.c |
561 | ripemd/ripemd.c | 502 | ripemd/ripemd.c |
562 | rsa/rsa_ameth.c | 503 | rsa/rsa_ameth.c |
@@ -599,8 +540,6 @@ set( | |||
599 | ui/ui_err.c | 540 | ui/ui_err.c |
600 | ui/ui_lib.c | 541 | ui/ui_lib.c |
601 | ui/ui_null.c | 542 | ui/ui_null.c |
602 | ui/ui_util.c | ||
603 | whrlpool/whirlpool.c | ||
604 | x509/by_dir.c | 543 | x509/by_dir.c |
605 | x509/by_file.c | 544 | x509/by_file.c |
606 | x509/by_mem.c | 545 | x509/by_mem.c |
@@ -641,6 +580,7 @@ set( | |||
641 | x509/x509_r2x.c | 580 | x509/x509_r2x.c |
642 | x509/x509_req.c | 581 | x509/x509_req.c |
643 | x509/x509_set.c | 582 | x509/x509_set.c |
583 | x509/x509_siginfo.c | ||
644 | x509/x509_skey.c | 584 | x509/x509_skey.c |
645 | x509/x509_trs.c | 585 | x509/x509_trs.c |
646 | x509/x509_txt.c | 586 | x509/x509_txt.c |
@@ -659,17 +599,17 @@ set( | |||
659 | 599 | ||
660 | set(COMPAT_SRC empty.c) | 600 | set(COMPAT_SRC empty.c) |
661 | 601 | ||
602 | set(CRYPTO_UNEXPORT ${CRYPTO_UNEXPORT} BIO_s_log) | ||
603 | |||
662 | if(UNIX) | 604 | if(UNIX) |
663 | set(CRYPTO_SRC ${CRYPTO_SRC} crypto_lock.c) | 605 | set(CRYPTO_SRC ${CRYPTO_SRC} crypto_lock.c) |
664 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_posix.c) | 606 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_posix.c) |
665 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/bss_log.c) | ||
666 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl.c) | 607 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl.c) |
667 | endif() | 608 | endif() |
668 | 609 | ||
669 | if(WIN32) | 610 | if(WIN32) |
670 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/crypto_lock_win.c) | 611 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/crypto_lock_win.c) |
671 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_win.c) | 612 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_win.c) |
672 | set(CRYPTO_UNEXPORT ${CRYPTO_UNEXPORT} BIO_s_log) | ||
673 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl_win.c) | 613 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl_win.c) |
674 | endif() | 614 | endif() |
675 | 615 | ||
@@ -685,6 +625,14 @@ if(NOT HAVE_FREEZERO) | |||
685 | set(COMPAT_SRC ${COMPAT_SRC} compat/freezero.c) | 625 | set(COMPAT_SRC ${COMPAT_SRC} compat/freezero.c) |
686 | endif() | 626 | endif() |
687 | 627 | ||
628 | if(NOT HAVE_GETDELIM) | ||
629 | set(COMPAT_SRC ${COMPAT_SRC} compat/getdelim.c) | ||
630 | endif() | ||
631 | |||
632 | if(NOT HAVE_GETLINE) | ||
633 | set(COMPAT_SRC ${COMPAT_SRC} compat/getline.c) | ||
634 | endif() | ||
635 | |||
688 | if(NOT HAVE_GETOPT) | 636 | if(NOT HAVE_GETOPT) |
689 | set(COMPAT_SRC ${COMPAT_SRC} compat/getopt_long.c) | 637 | set(COMPAT_SRC ${COMPAT_SRC} compat/getopt_long.c) |
690 | endif() | 638 | endif() |
@@ -817,10 +765,12 @@ add_library(crypto_obj OBJECT ${CRYPTO_SRC}) | |||
817 | target_include_directories(crypto_obj | 765 | target_include_directories(crypto_obj |
818 | PRIVATE | 766 | PRIVATE |
819 | . | 767 | . |
768 | aes | ||
820 | asn1 | 769 | asn1 |
821 | bio | 770 | bio |
822 | bn | 771 | bn |
823 | bytestring | 772 | bytestring |
773 | conf | ||
824 | dh | 774 | dh |
825 | dsa | 775 | dsa |
826 | curve25519 | 776 | curve25519 |
@@ -832,6 +782,7 @@ target_include_directories(crypto_obj | |||
832 | hidden | 782 | hidden |
833 | hmac | 783 | hmac |
834 | lhash | 784 | lhash |
785 | mlkem | ||
835 | modes | 786 | modes |
836 | ocsp | 787 | ocsp |
837 | pkcs12 | 788 | pkcs12 |
@@ -845,41 +796,65 @@ target_include_directories(crypto_obj | |||
845 | ${CMAKE_BINARY_DIR}/include) | 796 | ${CMAKE_BINARY_DIR}/include) |
846 | 797 | ||
847 | if(HOST_AARCH64) | 798 | if(HOST_AARCH64) |
799 | target_include_directories(crypto_obj PRIVATE arch/aarch64/) | ||
848 | target_include_directories(crypto_obj PRIVATE bn/arch/aarch64/) | 800 | target_include_directories(crypto_obj PRIVATE bn/arch/aarch64/) |
849 | elseif(HOST_ARM) | 801 | elseif(HOST_ARM) |
802 | target_include_directories(crypto_obj PRIVATE arch/arm/) | ||
850 | target_include_directories(crypto_obj PRIVATE bn/arch/arm/) | 803 | target_include_directories(crypto_obj PRIVATE bn/arch/arm/) |
851 | elseif(HOST_I386) | 804 | elseif(HOST_I386) |
805 | target_include_directories(crypto_obj PRIVATE arch/i386/) | ||
852 | target_include_directories(crypto_obj PRIVATE bn/arch/i386/) | 806 | target_include_directories(crypto_obj PRIVATE bn/arch/i386/) |
807 | elseif(HOST_LOONGARCH64) | ||
808 | target_include_directories(crypto_obj PRIVATE arch/loongarch64) | ||
809 | target_include_directories(crypto_obj PRIVATE bn/arch/loongarch64) | ||
853 | elseif(HOST_MIPS64) | 810 | elseif(HOST_MIPS64) |
811 | target_include_directories(crypto_obj PRIVATE arch/mips64) | ||
854 | target_include_directories(crypto_obj PRIVATE bn/arch/mips64) | 812 | target_include_directories(crypto_obj PRIVATE bn/arch/mips64) |
855 | elseif(HOST_MIPS) | 813 | elseif(HOST_MIPS) |
814 | target_include_directories(crypto_obj PRIVATE arch/mips) | ||
856 | target_include_directories(crypto_obj PRIVATE bn/arch/mips) | 815 | target_include_directories(crypto_obj PRIVATE bn/arch/mips) |
857 | elseif(HOST_POWERPC) | 816 | elseif(HOST_POWERPC) |
817 | target_include_directories(crypto_obj PRIVATE arch/powerpc) | ||
858 | target_include_directories(crypto_obj PRIVATE bn/arch/powerpc) | 818 | target_include_directories(crypto_obj PRIVATE bn/arch/powerpc) |
859 | elseif(HOST_POWERPC64) | 819 | elseif(HOST_POWERPC64) |
820 | target_include_directories(crypto_obj PRIVATE arch/powerpc64) | ||
860 | target_include_directories(crypto_obj PRIVATE bn/arch/powerpc64) | 821 | target_include_directories(crypto_obj PRIVATE bn/arch/powerpc64) |
861 | elseif(HOST_RISCV64) | 822 | elseif(HOST_RISCV64) |
823 | target_include_directories(crypto_obj PRIVATE arch/riscv64) | ||
862 | target_include_directories(crypto_obj PRIVATE bn/arch/riscv64) | 824 | target_include_directories(crypto_obj PRIVATE bn/arch/riscv64) |
863 | elseif(HOST_SPARC64) | 825 | elseif(HOST_SPARC64) |
826 | target_include_directories(crypto_obj PRIVATE arch/sparc64) | ||
864 | target_include_directories(crypto_obj PRIVATE bn/arch/sparc64) | 827 | target_include_directories(crypto_obj PRIVATE bn/arch/sparc64) |
865 | elseif(HOST_X86_64) | 828 | elseif(HOST_X86_64) |
829 | target_include_directories(crypto_obj PRIVATE arch/amd64) | ||
866 | target_include_directories(crypto_obj PRIVATE bn/arch/amd64) | 830 | target_include_directories(crypto_obj PRIVATE bn/arch/amd64) |
867 | endif() | 831 | endif() |
868 | 832 | ||
833 | if(MSVC) | ||
834 | # "C4701" - Potentially uninitialized local variable 'name' used | ||
835 | set_source_files_properties(bn/bn_convert.c pem/pem_lib.c PROPERTIES | ||
836 | COMPILE_OPTIONS /wd4701 | ||
837 | ) | ||
838 | # "C4702" - unreachable code | ||
839 | set_source_files_properties(pkcs7/pk7_doit.c PROPERTIES | ||
840 | COMPILE_OPTIONS /wd4702 | ||
841 | ) | ||
842 | endif() | ||
843 | |||
869 | add_library(crypto $<TARGET_OBJECTS:crypto_obj> $<TARGET_OBJECTS:compat_obj> empty.c) | 844 | add_library(crypto $<TARGET_OBJECTS:crypto_obj> $<TARGET_OBJECTS:compat_obj> empty.c) |
870 | 845 | ||
871 | export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym) | 846 | export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym) |
872 | target_link_libraries(crypto ${PLATFORM_LIBS}) | 847 | target_link_libraries(crypto ${PLATFORM_LIBS}) |
873 | if (WIN32) | ||
874 | set(CRYPTO_POSTFIX -${CRYPTO_MAJOR_VERSION} PARENT_SCOPE) | ||
875 | endif() | ||
876 | set_target_properties(crypto PROPERTIES | 848 | set_target_properties(crypto PROPERTIES |
877 | OUTPUT_NAME crypto${CRYPTO_POSTFIX} | 849 | OUTPUT_NAME crypto |
878 | ARCHIVE_OUTPUT_NAME crypto${CRYPTO_POSTFIX} | 850 | ARCHIVE_OUTPUT_NAME crypto |
879 | EXPORT_NAME Crypto | 851 | EXPORT_NAME Crypto |
880 | VERSION ${CRYPTO_VERSION} | 852 | VERSION ${CRYPTO_VERSION} |
881 | SOVERSION ${CRYPTO_MAJOR_VERSION} | 853 | SOVERSION ${CRYPTO_MAJOR_VERSION} |
882 | ) | 854 | ) |
855 | if(NOT CMAKE_VERSION VERSION_LESS 3.27.0) | ||
856 | set_target_properties(crypto PROPERTIES DLL_NAME_WITH_SOVERSION TRUE) | ||
857 | endif() | ||
883 | 858 | ||
884 | target_include_directories( | 859 | target_include_directories( |
885 | crypto | 860 | crypto |
@@ -919,4 +894,3 @@ if(BUILD_SHARED_LIBS) | |||
919 | add_library(crypto-static STATIC $<TARGET_OBJECTS:crypto_obj>) | 894 | add_library(crypto-static STATIC $<TARGET_OBJECTS:crypto_obj>) |
920 | target_link_libraries(crypto-static ${PLATFORM_LIBS}) | 895 | target_link_libraries(crypto-static ${PLATFORM_LIBS}) |
921 | endif() | 896 | endif() |
922 | |||
diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 6e1e975..610341a 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am | |||
@@ -1,10 +1,27 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | AM_CPPFLAGS += -DLIBRESSL_CRYPTO_INTERNAL | 18 | AM_CPPFLAGS += -DLIBRESSL_CRYPTO_INTERNAL |
19 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/aes | ||
4 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/asn1 | 20 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/asn1 |
5 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/bio | 21 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/bio |
6 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/bn | 22 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/bn |
7 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/bytestring | 23 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/bytestring |
24 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/conf | ||
8 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/curve25519 | 25 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/curve25519 |
9 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/dh | 26 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/dh |
10 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/dsa | 27 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/dsa |
@@ -15,6 +32,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/crypto/err | |||
15 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/evp | 32 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/evp |
16 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/hmac | 33 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/hmac |
17 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/lhash | 34 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/lhash |
35 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/mlkem | ||
18 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes | 36 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes |
19 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/ocsp | 37 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/ocsp |
20 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/pkcs12 | 38 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/pkcs12 |
@@ -49,20 +67,18 @@ crypto_portable.sym: crypto.sym Makefile | |||
49 | -echo "generating crypto_portable.sym ..." | 67 | -echo "generating crypto_portable.sym ..." |
50 | -cp $(top_srcdir)/crypto/crypto.sym crypto_portable.sym | 68 | -cp $(top_srcdir)/crypto/crypto.sym crypto_portable.sym |
51 | -chmod u+w crypto_portable.sym | 69 | -chmod u+w crypto_portable.sym |
52 | if HOST_WIN | ||
53 | -grep -v BIO_s_log crypto_portable.sym > crypto_portable.sym.tmp | 70 | -grep -v BIO_s_log crypto_portable.sym > crypto_portable.sym.tmp |
54 | -mv crypto_portable.sym.tmp crypto_portable.sym | 71 | -mv crypto_portable.sym.tmp crypto_portable.sym |
55 | endif | ||
56 | 72 | ||
57 | libcrypto_la_objects.mk: Makefile | 73 | libcrypto_la_objects.mk: Makefile |
58 | @echo "libcrypto_la_objects= $(libcrypto_la_OBJECTS)" \ | 74 | @echo "libcrypto_la_objects= $(libcrypto_la_OBJECTS)" \ |
59 | | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \ | 75 | | sed 's/ */ $$\(top_builddir\)\/crypto\//g' \ |
60 | > libcrypto_la_objects.mk | 76 | > libcrypto_la_objects.mk |
61 | @echo "libcompat_la_objects= $(libcompat_la_OBJECTS)" \ | 77 | @echo "libcompat_la_objects= $(libcompat_la_OBJECTS)" \ |
62 | | sed 's/compat\// $$\(abs_top_builddir\)\/crypto\/&/g' \ | 78 | | sed 's/compat\// $$\(top_builddir\)\/crypto\/&/g' \ |
63 | >> libcrypto_la_objects.mk | 79 | >> libcrypto_la_objects.mk |
64 | @echo "libcompatnoopt_la_objects= $(libcompatnoopt_la_OBJECTS)" \ | 80 | @echo "libcompatnoopt_la_objects= $(libcompatnoopt_la_OBJECTS)" \ |
65 | | sed 's/compat\// $$\(abs_top_builddir\)\/crypto\/&/g' \ | 81 | | sed 's/compat\// $$\(top_builddir\)\/crypto\/&/g' \ |
66 | >> libcrypto_la_objects.mk | 82 | >> libcrypto_la_objects.mk |
67 | 83 | ||
68 | libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym | 84 | libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym |
@@ -132,6 +148,14 @@ if !HAVE_FREEZERO | |||
132 | libcompat_la_SOURCES += compat/freezero.c | 148 | libcompat_la_SOURCES += compat/freezero.c |
133 | endif | 149 | endif |
134 | 150 | ||
151 | if !HAVE_GETDELIM | ||
152 | libcompat_la_SOURCES += compat/getdelim.c | ||
153 | endif | ||
154 | |||
155 | if !HAVE_GETLINE | ||
156 | libcompat_la_SOURCES += compat/getline.c | ||
157 | endif | ||
158 | |||
135 | if !HAVE_GETPAGESIZE | 159 | if !HAVE_GETPAGESIZE |
136 | libcompat_la_SOURCES += compat/getpagesize.c | 160 | libcompat_la_SOURCES += compat/getpagesize.c |
137 | endif | 161 | endif |
@@ -177,7 +201,6 @@ include Makefile.am.arc4random | |||
177 | libcrypto_la_SOURCES = | 201 | libcrypto_la_SOURCES = |
178 | EXTRA_libcrypto_la_SOURCES = | 202 | EXTRA_libcrypto_la_SOURCES = |
179 | 203 | ||
180 | include Makefile.am.elf-arm | ||
181 | include Makefile.am.elf-mips | 204 | include Makefile.am.elf-mips |
182 | include Makefile.am.elf-mips64 | 205 | include Makefile.am.elf-mips64 |
183 | include Makefile.am.elf-x86_64 | 206 | include Makefile.am.elf-x86_64 |
@@ -185,7 +208,6 @@ include Makefile.am.macosx-x86_64 | |||
185 | include Makefile.am.masm-x86_64 | 208 | include Makefile.am.masm-x86_64 |
186 | include Makefile.am.mingw64-x86_64 | 209 | include Makefile.am.mingw64-x86_64 |
187 | 210 | ||
188 | if !HOST_ASM_ELF_ARM | ||
189 | if !HOST_ASM_ELF_MIPS | 211 | if !HOST_ASM_ELF_MIPS |
190 | if !HOST_ASM_ELF_MIPS64 | 212 | if !HOST_ASM_ELF_MIPS64 |
191 | if !HOST_ASM_ELF_X86_64 | 213 | if !HOST_ASM_ELF_X86_64 |
@@ -199,25 +221,41 @@ endif | |||
199 | endif | 221 | endif |
200 | endif | 222 | endif |
201 | endif | 223 | endif |
224 | |||
225 | if HOST_AARCH64 | ||
226 | if HOST_DARWIN | ||
227 | libcrypto_la_SOURCES += arch/aarch64/crypto_cpu_caps_darwin.c | ||
228 | else | ||
229 | if HOST_LINUX | ||
230 | libcrypto_la_SOURCES += arch/aarch64/crypto_cpu_caps_linux.c | ||
231 | else | ||
232 | if HOST_OPENBSD | ||
233 | libcrypto_la_SOURCES += arch/aarch64/crypto_cpu_caps.c | ||
234 | else | ||
235 | libcrypto_la_SOURCES += arch/aarch64/crypto_cpu_caps_none.c | ||
236 | endif | ||
237 | endif | ||
238 | endif | ||
239 | endif | ||
240 | |||
241 | if HOST_X86_64 | ||
242 | libcrypto_la_SOURCES += arch/amd64/crypto_cpu_caps.c | ||
243 | endif | ||
244 | if HOST_I386 | ||
245 | libcrypto_la_SOURCES += arch/i386/crypto_cpu_caps.c | ||
202 | endif | 246 | endif |
203 | 247 | ||
204 | libcrypto_la_SOURCES += cpt_err.c | 248 | libcrypto_la_SOURCES += crypto_err.c |
205 | libcrypto_la_SOURCES += cryptlib.c | 249 | libcrypto_la_SOURCES += crypto_ex_data.c |
206 | libcrypto_la_SOURCES += crypto_init.c | 250 | libcrypto_la_SOURCES += crypto_init.c |
251 | libcrypto_la_SOURCES += crypto_legacy.c | ||
207 | if !HOST_WIN | 252 | if !HOST_WIN |
208 | libcrypto_la_SOURCES += crypto_lock.c | 253 | libcrypto_la_SOURCES += crypto_lock.c |
209 | else | 254 | else |
210 | libcrypto_la_SOURCES += compat/crypto_lock_win.c | 255 | libcrypto_la_SOURCES += compat/crypto_lock_win.c |
211 | endif | 256 | endif |
212 | libcrypto_la_SOURCES += cversion.c | 257 | libcrypto_la_SOURCES += crypto_memory.c |
213 | libcrypto_la_SOURCES += ex_data.c | ||
214 | libcrypto_la_SOURCES += malloc-wrapper.c | ||
215 | libcrypto_la_SOURCES += mem_clr.c | ||
216 | libcrypto_la_SOURCES += mem_dbg.c | ||
217 | libcrypto_la_SOURCES += o_fips.c | ||
218 | noinst_HEADERS += arm_arch.h | ||
219 | noinst_HEADERS += constant_time.h | 258 | noinst_HEADERS += constant_time.h |
220 | noinst_HEADERS += cryptlib.h | ||
221 | noinst_HEADERS += crypto_internal.h | 259 | noinst_HEADERS += crypto_internal.h |
222 | noinst_HEADERS += crypto_local.h | 260 | noinst_HEADERS += crypto_local.h |
223 | noinst_HEADERS += x86_arch.h | 261 | noinst_HEADERS += x86_arch.h |
@@ -225,7 +263,6 @@ noinst_HEADERS += x86_arch.h | |||
225 | # aes | 263 | # aes |
226 | libcrypto_la_SOURCES += aes/aes.c | 264 | libcrypto_la_SOURCES += aes/aes.c |
227 | libcrypto_la_SOURCES += aes/aes_core.c | 265 | libcrypto_la_SOURCES += aes/aes_core.c |
228 | libcrypto_la_SOURCES += aes/aes_ige.c | ||
229 | noinst_HEADERS += aes/aes_local.h | 266 | noinst_HEADERS += aes/aes_local.h |
230 | 267 | ||
231 | # asn1 | 268 | # asn1 |
@@ -278,10 +315,8 @@ libcrypto_la_SOURCES += asn1/x_attrib.c | |||
278 | libcrypto_la_SOURCES += asn1/x_bignum.c | 315 | libcrypto_la_SOURCES += asn1/x_bignum.c |
279 | libcrypto_la_SOURCES += asn1/x_crl.c | 316 | libcrypto_la_SOURCES += asn1/x_crl.c |
280 | libcrypto_la_SOURCES += asn1/x_exten.c | 317 | libcrypto_la_SOURCES += asn1/x_exten.c |
281 | libcrypto_la_SOURCES += asn1/x_info.c | ||
282 | libcrypto_la_SOURCES += asn1/x_long.c | 318 | libcrypto_la_SOURCES += asn1/x_long.c |
283 | libcrypto_la_SOURCES += asn1/x_name.c | 319 | libcrypto_la_SOURCES += asn1/x_name.c |
284 | libcrypto_la_SOURCES += asn1/x_pkey.c | ||
285 | libcrypto_la_SOURCES += asn1/x_pubkey.c | 320 | libcrypto_la_SOURCES += asn1/x_pubkey.c |
286 | libcrypto_la_SOURCES += asn1/x_req.c | 321 | libcrypto_la_SOURCES += asn1/x_req.c |
287 | libcrypto_la_SOURCES += asn1/x_sig.c | 322 | libcrypto_la_SOURCES += asn1/x_sig.c |
@@ -319,9 +354,6 @@ libcrypto_la_SOURCES += bio/bss_conn.c | |||
319 | libcrypto_la_SOURCES += bio/bss_dgram.c | 354 | libcrypto_la_SOURCES += bio/bss_dgram.c |
320 | libcrypto_la_SOURCES += bio/bss_fd.c | 355 | libcrypto_la_SOURCES += bio/bss_fd.c |
321 | libcrypto_la_SOURCES += bio/bss_file.c | 356 | libcrypto_la_SOURCES += bio/bss_file.c |
322 | if !HOST_WIN | ||
323 | libcrypto_la_SOURCES += bio/bss_log.c | ||
324 | endif | ||
325 | libcrypto_la_SOURCES += bio/bss_mem.c | 357 | libcrypto_la_SOURCES += bio/bss_mem.c |
326 | libcrypto_la_SOURCES += bio/bss_null.c | 358 | libcrypto_la_SOURCES += bio/bss_null.c |
327 | libcrypto_la_SOURCES += bio/bss_sock.c | 359 | libcrypto_la_SOURCES += bio/bss_sock.c |
@@ -329,6 +361,7 @@ noinst_HEADERS += bio/bio_local.h | |||
329 | 361 | ||
330 | # bn | 362 | # bn |
331 | libcrypto_la_SOURCES += bn/bn_add.c | 363 | libcrypto_la_SOURCES += bn/bn_add.c |
364 | libcrypto_la_SOURCES += bn/bn_add_sub.c | ||
332 | libcrypto_la_SOURCES += bn/bn_bpsw.c | 365 | libcrypto_la_SOURCES += bn/bn_bpsw.c |
333 | libcrypto_la_SOURCES += bn/bn_const.c | 366 | libcrypto_la_SOURCES += bn/bn_const.c |
334 | libcrypto_la_SOURCES += bn/bn_convert.c | 367 | libcrypto_la_SOURCES += bn/bn_convert.c |
@@ -342,6 +375,7 @@ libcrypto_la_SOURCES += bn/bn_kron.c | |||
342 | libcrypto_la_SOURCES += bn/bn_lib.c | 375 | libcrypto_la_SOURCES += bn/bn_lib.c |
343 | libcrypto_la_SOURCES += bn/bn_mod.c | 376 | libcrypto_la_SOURCES += bn/bn_mod.c |
344 | libcrypto_la_SOURCES += bn/bn_mod_sqrt.c | 377 | libcrypto_la_SOURCES += bn/bn_mod_sqrt.c |
378 | libcrypto_la_SOURCES += bn/bn_mod_words.c | ||
345 | libcrypto_la_SOURCES += bn/bn_mont.c | 379 | libcrypto_la_SOURCES += bn/bn_mont.c |
346 | libcrypto_la_SOURCES += bn/bn_mul.c | 380 | libcrypto_la_SOURCES += bn/bn_mul.c |
347 | libcrypto_la_SOURCES += bn/bn_prime.c | 381 | libcrypto_la_SOURCES += bn/bn_prime.c |
@@ -359,55 +393,82 @@ noinst_HEADERS += bn/bn_prime.h | |||
359 | noinst_HEADERS += bn/s2n_bignum.h | 393 | noinst_HEADERS += bn/s2n_bignum.h |
360 | noinst_HEADERS += bn/s2n_bignum_internal.h | 394 | noinst_HEADERS += bn/s2n_bignum_internal.h |
361 | 395 | ||
362 | # bn/arch | 396 | # arch, bn/arch |
363 | if HOST_AARCH64 | 397 | if HOST_AARCH64 |
398 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/aarch64/ | ||
364 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/aarch64/ | 399 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/aarch64/ |
365 | endif | 400 | endif |
401 | noinst_HEADERS += arch/aarch64/crypto_arch.h | ||
366 | noinst_HEADERS += bn/arch/aarch64/bn_arch.h | 402 | noinst_HEADERS += bn/arch/aarch64/bn_arch.h |
367 | 403 | ||
368 | if HOST_ARM | 404 | if HOST_ARM |
405 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/arm/ | ||
369 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/arm/ | 406 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/arm/ |
370 | endif | 407 | endif |
408 | noinst_HEADERS += arch/arm/crypto_arch.h | ||
371 | noinst_HEADERS += bn/arch/arm/bn_arch.h | 409 | noinst_HEADERS += bn/arch/arm/bn_arch.h |
372 | 410 | ||
373 | if HOST_I386 | 411 | if HOST_I386 |
412 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/i386/ | ||
374 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/i386/ | 413 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/i386/ |
375 | endif | 414 | endif |
415 | noinst_HEADERS += arch/i386/crypto_arch.h | ||
376 | noinst_HEADERS += bn/arch/i386/bn_arch.h | 416 | noinst_HEADERS += bn/arch/i386/bn_arch.h |
377 | 417 | ||
418 | if HOST_LOONGARCH64 | ||
419 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/ | ||
420 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/loongarch64/ | ||
421 | endif | ||
422 | noinst_HEADERS += arch/loongarch64/crypto_arch.h | ||
423 | noinst_HEADERS += bn/arch/loongarch64/bn_arch.h | ||
424 | |||
378 | if HOST_MIPS | 425 | if HOST_MIPS |
426 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/ | ||
379 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/ | 427 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/ |
380 | endif | 428 | endif |
429 | noinst_HEADERS += arch/mips/crypto_arch.h | ||
381 | noinst_HEADERS += bn/arch/mips/bn_arch.h | 430 | noinst_HEADERS += bn/arch/mips/bn_arch.h |
382 | 431 | ||
383 | if HOST_MIPS64 | 432 | if HOST_MIPS64 |
433 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/ | ||
384 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips64/ | 434 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips64/ |
385 | endif | 435 | endif |
436 | noinst_HEADERS += arch/mips64/crypto_arch.h | ||
386 | noinst_HEADERS += bn/arch/mips64/bn_arch.h | 437 | noinst_HEADERS += bn/arch/mips64/bn_arch.h |
387 | 438 | ||
388 | if HOST_POWERPC | 439 | if HOST_POWERPC |
440 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc/ | ||
389 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/powerpc/ | 441 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/powerpc/ |
390 | endif | 442 | endif |
443 | noinst_HEADERS += arch/powerpc/crypto_arch.h | ||
391 | noinst_HEADERS += bn/arch/powerpc/bn_arch.h | 444 | noinst_HEADERS += bn/arch/powerpc/bn_arch.h |
392 | 445 | ||
393 | if HOST_POWERPC64 | 446 | if HOST_POWERPC64 |
447 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc64/ | ||
394 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/powerpc64/ | 448 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/powerpc64/ |
395 | endif | 449 | endif |
450 | noinst_HEADERS += arch/powerpc64/crypto_arch.h | ||
396 | noinst_HEADERS += bn/arch/powerpc64/bn_arch.h | 451 | noinst_HEADERS += bn/arch/powerpc64/bn_arch.h |
397 | 452 | ||
398 | if HOST_RISCV64 | 453 | if HOST_RISCV64 |
454 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/riscv64/ | ||
399 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/riscv64/ | 455 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/riscv64/ |
400 | endif | 456 | endif |
457 | noinst_HEADERS += arch/riscv64/crypto_arch.h | ||
401 | noinst_HEADERS += bn/arch/riscv64/bn_arch.h | 458 | noinst_HEADERS += bn/arch/riscv64/bn_arch.h |
402 | 459 | ||
403 | if HOST_SPARC64 | 460 | if HOST_SPARC64 |
461 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/sparc64/ | ||
404 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/sparc64/ | 462 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/sparc64/ |
405 | endif | 463 | endif |
464 | noinst_HEADERS += arch/sparc64/crypto_arch.h | ||
406 | noinst_HEADERS += bn/arch/sparc64/bn_arch.h | 465 | noinst_HEADERS += bn/arch/sparc64/bn_arch.h |
407 | 466 | ||
408 | if HOST_X86_64 | 467 | if HOST_X86_64 |
468 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/amd64/ | ||
409 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/amd64/ | 469 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/amd64/ |
410 | endif | 470 | endif |
471 | noinst_HEADERS += arch/amd64/crypto_arch.h | ||
411 | noinst_HEADERS += bn/arch/amd64/bn_arch.h | 472 | noinst_HEADERS += bn/arch/amd64/bn_arch.h |
412 | 473 | ||
413 | # buffer | 474 | # buffer |
@@ -458,10 +519,10 @@ libcrypto_la_SOURCES += conf/conf_api.c | |||
458 | libcrypto_la_SOURCES += conf/conf_def.c | 519 | libcrypto_la_SOURCES += conf/conf_def.c |
459 | libcrypto_la_SOURCES += conf/conf_err.c | 520 | libcrypto_la_SOURCES += conf/conf_err.c |
460 | libcrypto_la_SOURCES += conf/conf_lib.c | 521 | libcrypto_la_SOURCES += conf/conf_lib.c |
461 | libcrypto_la_SOURCES += conf/conf_mall.c | ||
462 | libcrypto_la_SOURCES += conf/conf_mod.c | 522 | libcrypto_la_SOURCES += conf/conf_mod.c |
463 | libcrypto_la_SOURCES += conf/conf_sap.c | 523 | libcrypto_la_SOURCES += conf/conf_sap.c |
464 | noinst_HEADERS += conf/conf_def.h | 524 | noinst_HEADERS += conf/conf_def.h |
525 | noinst_HEADERS += conf/conf_local.h | ||
465 | 526 | ||
466 | # ct | 527 | # ct |
467 | libcrypto_la_SOURCES += ct/ct_b64.c | 528 | libcrypto_la_SOURCES += ct/ct_b64.c |
@@ -483,29 +544,12 @@ noinst_HEADERS += curve25519/curve25519_internal.h | |||
483 | 544 | ||
484 | 545 | ||
485 | # des | 546 | # des |
486 | libcrypto_la_SOURCES += des/cbc_cksm.c | 547 | libcrypto_la_SOURCES += des/des.c |
487 | libcrypto_la_SOURCES += des/cbc_enc.c | 548 | libcrypto_la_SOURCES += des/des_cksum.c |
488 | libcrypto_la_SOURCES += des/cfb64ede.c | ||
489 | libcrypto_la_SOURCES += des/cfb64enc.c | ||
490 | libcrypto_la_SOURCES += des/cfb_enc.c | ||
491 | libcrypto_la_SOURCES += des/des_enc.c | 549 | libcrypto_la_SOURCES += des/des_enc.c |
492 | libcrypto_la_SOURCES += des/ecb3_enc.c | 550 | libcrypto_la_SOURCES += des/des_fcrypt.c |
493 | libcrypto_la_SOURCES += des/ecb_enc.c | 551 | libcrypto_la_SOURCES += des/des_key.c |
494 | libcrypto_la_SOURCES += des/ede_cbcm_enc.c | ||
495 | libcrypto_la_SOURCES += des/enc_read.c | ||
496 | libcrypto_la_SOURCES += des/fcrypt.c | ||
497 | libcrypto_la_SOURCES += des/fcrypt_b.c | ||
498 | EXTRA_libcrypto_la_SOURCES += des/ncbc_enc.c | ||
499 | libcrypto_la_SOURCES += des/ofb64ede.c | ||
500 | libcrypto_la_SOURCES += des/ofb64enc.c | ||
501 | libcrypto_la_SOURCES += des/ofb_enc.c | ||
502 | libcrypto_la_SOURCES += des/pcbc_enc.c | ||
503 | libcrypto_la_SOURCES += des/qud_cksm.c | ||
504 | libcrypto_la_SOURCES += des/set_key.c | ||
505 | libcrypto_la_SOURCES += des/str2key.c | ||
506 | libcrypto_la_SOURCES += des/xcbc_enc.c | ||
507 | noinst_HEADERS += des/des_local.h | 552 | noinst_HEADERS += des/des_local.h |
508 | noinst_HEADERS += des/spr.h | ||
509 | 553 | ||
510 | # dh | 554 | # dh |
511 | libcrypto_la_SOURCES += dh/dh_ameth.c | 555 | libcrypto_la_SOURCES += dh/dh_ameth.c |
@@ -534,22 +578,19 @@ noinst_HEADERS += dsa/dsa_local.h | |||
534 | # ec | 578 | # ec |
535 | libcrypto_la_SOURCES += ec/ec_ameth.c | 579 | libcrypto_la_SOURCES += ec/ec_ameth.c |
536 | libcrypto_la_SOURCES += ec/ec_asn1.c | 580 | libcrypto_la_SOURCES += ec/ec_asn1.c |
537 | libcrypto_la_SOURCES += ec/ec_check.c | 581 | libcrypto_la_SOURCES += ec/ec_convert.c |
538 | libcrypto_la_SOURCES += ec/ec_curve.c | 582 | libcrypto_la_SOURCES += ec/ec_curve.c |
539 | libcrypto_la_SOURCES += ec/ec_cvt.c | ||
540 | libcrypto_la_SOURCES += ec/ec_err.c | 583 | libcrypto_la_SOURCES += ec/ec_err.c |
584 | libcrypto_la_SOURCES += ec/ec_field.c | ||
541 | libcrypto_la_SOURCES += ec/ec_key.c | 585 | libcrypto_la_SOURCES += ec/ec_key.c |
542 | libcrypto_la_SOURCES += ec/ec_kmeth.c | ||
543 | libcrypto_la_SOURCES += ec/ec_lib.c | 586 | libcrypto_la_SOURCES += ec/ec_lib.c |
544 | libcrypto_la_SOURCES += ec/ec_mult.c | 587 | libcrypto_la_SOURCES += ec/ec_mult.c |
545 | libcrypto_la_SOURCES += ec/ec_oct.c | ||
546 | libcrypto_la_SOURCES += ec/ec_pmeth.c | 588 | libcrypto_la_SOURCES += ec/ec_pmeth.c |
547 | libcrypto_la_SOURCES += ec/ec_print.c | ||
548 | libcrypto_la_SOURCES += ec/eck_prn.c | 589 | libcrypto_la_SOURCES += ec/eck_prn.c |
549 | libcrypto_la_SOURCES += ec/ecp_mont.c | 590 | libcrypto_la_SOURCES += ec/ecp_hp_methods.c |
550 | libcrypto_la_SOURCES += ec/ecp_oct.c | 591 | libcrypto_la_SOURCES += ec/ecp_methods.c |
551 | libcrypto_la_SOURCES += ec/ecp_smpl.c | ||
552 | libcrypto_la_SOURCES += ec/ecx_methods.c | 592 | libcrypto_la_SOURCES += ec/ecx_methods.c |
593 | noinst_HEADERS += ec/ec_internal.h | ||
553 | noinst_HEADERS += ec/ec_local.h | 594 | noinst_HEADERS += ec/ec_local.h |
554 | 595 | ||
555 | # ecdh | 596 | # ecdh |
@@ -604,7 +645,6 @@ libcrypto_la_SOURCES += evp/m_sha1.c | |||
604 | libcrypto_la_SOURCES += evp/m_sha3.c | 645 | libcrypto_la_SOURCES += evp/m_sha3.c |
605 | libcrypto_la_SOURCES += evp/m_sigver.c | 646 | libcrypto_la_SOURCES += evp/m_sigver.c |
606 | libcrypto_la_SOURCES += evp/m_sm3.c | 647 | libcrypto_la_SOURCES += evp/m_sm3.c |
607 | libcrypto_la_SOURCES += evp/m_wp.c | ||
608 | libcrypto_la_SOURCES += evp/p_legacy.c | 648 | libcrypto_la_SOURCES += evp/p_legacy.c |
609 | libcrypto_la_SOURCES += evp/p_lib.c | 649 | libcrypto_la_SOURCES += evp/p_lib.c |
610 | libcrypto_la_SOURCES += evp/p_sign.c | 650 | libcrypto_la_SOURCES += evp/p_sign.c |
@@ -629,7 +669,6 @@ noinst_HEADERS += hidden/openssl/chacha.h | |||
629 | noinst_HEADERS += hidden/openssl/cmac.h | 669 | noinst_HEADERS += hidden/openssl/cmac.h |
630 | noinst_HEADERS += hidden/openssl/cms.h | 670 | noinst_HEADERS += hidden/openssl/cms.h |
631 | noinst_HEADERS += hidden/openssl/conf.h | 671 | noinst_HEADERS += hidden/openssl/conf.h |
632 | noinst_HEADERS += hidden/openssl/conf_api.h | ||
633 | noinst_HEADERS += hidden/openssl/crypto.h | 672 | noinst_HEADERS += hidden/openssl/crypto.h |
634 | noinst_HEADERS += hidden/openssl/ct.h | 673 | noinst_HEADERS += hidden/openssl/ct.h |
635 | noinst_HEADERS += hidden/openssl/curve25519.h | 674 | noinst_HEADERS += hidden/openssl/curve25519.h |
@@ -646,6 +685,7 @@ noinst_HEADERS += hidden/openssl/idea.h | |||
646 | noinst_HEADERS += hidden/openssl/lhash.h | 685 | noinst_HEADERS += hidden/openssl/lhash.h |
647 | noinst_HEADERS += hidden/openssl/md4.h | 686 | noinst_HEADERS += hidden/openssl/md4.h |
648 | noinst_HEADERS += hidden/openssl/md5.h | 687 | noinst_HEADERS += hidden/openssl/md5.h |
688 | noinst_HEADERS += hidden/openssl/mlkem.h | ||
649 | noinst_HEADERS += hidden/openssl/modes.h | 689 | noinst_HEADERS += hidden/openssl/modes.h |
650 | noinst_HEADERS += hidden/openssl/objects.h | 690 | noinst_HEADERS += hidden/openssl/objects.h |
651 | noinst_HEADERS += hidden/openssl/ocsp.h | 691 | noinst_HEADERS += hidden/openssl/ocsp.h |
@@ -666,7 +706,6 @@ noinst_HEADERS += hidden/openssl/stack.h | |||
666 | noinst_HEADERS += hidden/openssl/ts.h | 706 | noinst_HEADERS += hidden/openssl/ts.h |
667 | noinst_HEADERS += hidden/openssl/txt_db.h | 707 | noinst_HEADERS += hidden/openssl/txt_db.h |
668 | noinst_HEADERS += hidden/openssl/ui.h | 708 | noinst_HEADERS += hidden/openssl/ui.h |
669 | noinst_HEADERS += hidden/openssl/whrlpool.h | ||
670 | noinst_HEADERS += hidden/openssl/x509.h | 709 | noinst_HEADERS += hidden/openssl/x509.h |
671 | noinst_HEADERS += hidden/openssl/x509_vfy.h | 710 | noinst_HEADERS += hidden/openssl/x509_vfy.h |
672 | noinst_HEADERS += hidden/openssl/x509v3.h | 711 | noinst_HEADERS += hidden/openssl/x509v3.h |
@@ -698,6 +737,13 @@ libcrypto_la_SOURCES += md4/md4.c | |||
698 | # md5 | 737 | # md5 |
699 | libcrypto_la_SOURCES += md5/md5.c | 738 | libcrypto_la_SOURCES += md5/md5.c |
700 | 739 | ||
740 | # mlkem | ||
741 | libcrypto_la_SOURCES += mlkem/mlkem.c | ||
742 | libcrypto_la_SOURCES += mlkem/mlkem1024.c | ||
743 | libcrypto_la_SOURCES += mlkem/mlkem768.c | ||
744 | libcrypto_la_SOURCES += mlkem/mlkem_key.c | ||
745 | noinst_HEADERS += mlkem/mlkem_internal.h | ||
746 | |||
701 | # modes | 747 | # modes |
702 | libcrypto_la_SOURCES += modes/cbc128.c | 748 | libcrypto_la_SOURCES += modes/cbc128.c |
703 | libcrypto_la_SOURCES += modes/ccm128.c | 749 | libcrypto_la_SOURCES += modes/ccm128.c |
@@ -777,11 +823,7 @@ libcrypto_la_SOURCES += rand/rand_lib.c | |||
777 | libcrypto_la_SOURCES += rand/randfile.c | 823 | libcrypto_la_SOURCES += rand/randfile.c |
778 | 824 | ||
779 | # rc2 | 825 | # rc2 |
780 | libcrypto_la_SOURCES += rc2/rc2_cbc.c | 826 | libcrypto_la_SOURCES += rc2/rc2.c |
781 | libcrypto_la_SOURCES += rc2/rc2_ecb.c | ||
782 | libcrypto_la_SOURCES += rc2/rc2_skey.c | ||
783 | libcrypto_la_SOURCES += rc2/rc2cfb64.c | ||
784 | libcrypto_la_SOURCES += rc2/rc2ofb64.c | ||
785 | noinst_HEADERS += rc2/rc2_local.h | 827 | noinst_HEADERS += rc2/rc2_local.h |
786 | 828 | ||
787 | # rc4 | 829 | # rc4 |
@@ -856,12 +898,8 @@ endif | |||
856 | if HOST_WIN | 898 | if HOST_WIN |
857 | libcrypto_la_SOURCES += ui/ui_openssl_win.c | 899 | libcrypto_la_SOURCES += ui/ui_openssl_win.c |
858 | endif | 900 | endif |
859 | libcrypto_la_SOURCES += ui/ui_util.c | ||
860 | noinst_HEADERS += ui/ui_local.h | 901 | noinst_HEADERS += ui/ui_local.h |
861 | 902 | ||
862 | # whrlpool | ||
863 | libcrypto_la_SOURCES += whrlpool/whirlpool.c | ||
864 | |||
865 | # x509 | 903 | # x509 |
866 | libcrypto_la_SOURCES += x509/by_dir.c | 904 | libcrypto_la_SOURCES += x509/by_dir.c |
867 | libcrypto_la_SOURCES += x509/by_file.c | 905 | libcrypto_la_SOURCES += x509/by_file.c |
@@ -903,6 +941,7 @@ libcrypto_la_SOURCES += x509/x509_purp.c | |||
903 | libcrypto_la_SOURCES += x509/x509_r2x.c | 941 | libcrypto_la_SOURCES += x509/x509_r2x.c |
904 | libcrypto_la_SOURCES += x509/x509_req.c | 942 | libcrypto_la_SOURCES += x509/x509_req.c |
905 | libcrypto_la_SOURCES += x509/x509_set.c | 943 | libcrypto_la_SOURCES += x509/x509_set.c |
944 | libcrypto_la_SOURCES += x509/x509_siginfo.c | ||
906 | libcrypto_la_SOURCES += x509/x509_skey.c | 945 | libcrypto_la_SOURCES += x509/x509_skey.c |
907 | libcrypto_la_SOURCES += x509/x509_trs.c | 946 | libcrypto_la_SOURCES += x509/x509_trs.c |
908 | libcrypto_la_SOURCES += x509/x509_txt.c | 947 | libcrypto_la_SOURCES += x509/x509_txt.c |
diff --git a/crypto/Makefile.am.elf-arm b/crypto/Makefile.am.elf-arm deleted file mode 100644 index 4f88994..0000000 --- a/crypto/Makefile.am.elf-arm +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | ASM_ARM_ELF = aes/aes-elf-armv4.S | ||
2 | ASM_ARM_ELF += bn/mont-elf-armv4.S | ||
3 | ASM_ARM_ELF += sha/sha1-elf-armv4.S | ||
4 | ASM_ARM_ELF += sha/sha512-elf-armv4.S | ||
5 | ASM_ARM_ELF += sha/sha256-elf-armv4.S | ||
6 | ASM_ARM_ELF += modes/ghash-elf-armv4.S | ||
7 | ASM_ARM_ELF += armv4cpuid.S | ||
8 | ASM_ARM_ELF += armcap.c | ||
9 | |||
10 | EXTRA_DIST += $(ASM_ARM_ELF) | ||
11 | |||
12 | if HOST_ASM_ELF_ARM | ||
13 | libcrypto_la_CPPFLAGS += -DAES_ASM | ||
14 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT | ||
15 | libcrypto_la_CPPFLAGS += -DGHASH_ASM | ||
16 | libcrypto_la_CPPFLAGS += -DSHA1_ASM | ||
17 | libcrypto_la_CPPFLAGS += -DSHA256_ASM | ||
18 | libcrypto_la_CPPFLAGS += -DSHA512_ASM | ||
19 | libcrypto_la_CPPFLAGS += -DOPENSSL_CPUID_OBJ | ||
20 | libcrypto_la_SOURCES += $(ASM_ARM_ELF) | ||
21 | endif | ||
diff --git a/crypto/Makefile.am.elf-mips b/crypto/Makefile.am.elf-mips index ea0a730..f7a44f2 100644 --- a/crypto/Makefile.am.elf-mips +++ b/crypto/Makefile.am.elf-mips | |||
@@ -10,8 +10,5 @@ EXTRA_DIST += $(ASM_MIPS_ELF) | |||
10 | if HOST_ASM_ELF_MIPS | 10 | if HOST_ASM_ELF_MIPS |
11 | libcrypto_la_CPPFLAGS += -DAES_ASM | 11 | libcrypto_la_CPPFLAGS += -DAES_ASM |
12 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT | 12 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT |
13 | libcrypto_la_CPPFLAGS += -DSHA1_ASM | ||
14 | libcrypto_la_CPPFLAGS += -DSHA256_ASM | ||
15 | libcrypto_la_CPPFLAGS += -DSHA512_ASM | ||
16 | libcrypto_la_SOURCES += $(ASM_MIPS_ELF) | 13 | libcrypto_la_SOURCES += $(ASM_MIPS_ELF) |
17 | endif | 14 | endif |
diff --git a/crypto/Makefile.am.elf-mips64 b/crypto/Makefile.am.elf-mips64 index 8f851f3..7d90bc0 100644 --- a/crypto/Makefile.am.elf-mips64 +++ b/crypto/Makefile.am.elf-mips64 | |||
@@ -10,8 +10,5 @@ EXTRA_DIST += $(ASM_MIPS64_ELF) | |||
10 | if HOST_ASM_ELF_MIPS64 | 10 | if HOST_ASM_ELF_MIPS64 |
11 | libcrypto_la_CPPFLAGS += -DAES_ASM | 11 | libcrypto_la_CPPFLAGS += -DAES_ASM |
12 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT | 12 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT |
13 | libcrypto_la_CPPFLAGS += -DSHA1_ASM | ||
14 | libcrypto_la_CPPFLAGS += -DSHA256_ASM | ||
15 | libcrypto_la_CPPFLAGS += -DSHA512_ASM | ||
16 | libcrypto_la_SOURCES += $(ASM_MIPS64_ELF) | 13 | libcrypto_la_SOURCES += $(ASM_MIPS64_ELF) |
17 | endif | 14 | endif |
diff --git a/crypto/Makefile.am.elf-x86_64 b/crypto/Makefile.am.elf-x86_64 index 6933a11..df67ad2 100644 --- a/crypto/Makefile.am.elf-x86_64 +++ b/crypto/Makefile.am.elf-x86_64 | |||
@@ -1,53 +1,48 @@ | |||
1 | 1 | ||
2 | ASM_X86_64_ELF = aes/aes-elf-x86_64.S | 2 | ASM_X86_64_ELF = aes/aes-elf-x86_64.S |
3 | ASM_X86_64_ELF += aes/bsaes-elf-x86_64.S | ||
4 | ASM_X86_64_ELF += aes/vpaes-elf-x86_64.S | ||
5 | ASM_X86_64_ELF += aes/aesni-elf-x86_64.S | 3 | ASM_X86_64_ELF += aes/aesni-elf-x86_64.S |
6 | ASM_X86_64_ELF += bn/modexp512-elf-x86_64.S | 4 | ASM_X86_64_ELF += bn/modexp512-elf-x86_64.S |
7 | ASM_X86_64_ELF += bn/mont-elf-x86_64.S | 5 | ASM_X86_64_ELF += bn/mont-elf-x86_64.S |
8 | ASM_X86_64_ELF += bn/mont5-elf-x86_64.S | 6 | ASM_X86_64_ELF += bn/mont5-elf-x86_64.S |
9 | ASM_X86_64_ELF += md5/md5-elf-x86_64.S | ||
10 | ASM_X86_64_ELF += modes/ghash-elf-x86_64.S | 7 | ASM_X86_64_ELF += modes/ghash-elf-x86_64.S |
11 | ASM_X86_64_ELF += rc4/rc4-elf-x86_64.S | 8 | ASM_X86_64_ELF += rc4/rc4-elf-x86_64.S |
12 | ASM_X86_64_ELF += sha/sha1-elf-x86_64.S | ||
13 | ASM_X86_64_ELF += sha/sha256-elf-x86_64.S | ||
14 | ASM_X86_64_ELF += sha/sha512-elf-x86_64.S | ||
15 | ASM_X86_64_ELF += cpuid-elf-x86_64.S | ||
16 | 9 | ||
17 | ASM_X86_64_ELF += bn/arch/amd64/bignum_add.S | 10 | ASM_X86_64_ELF += bn/arch/amd64/bignum_add.S |
18 | ASM_X86_64_ELF += bn/arch/amd64/bignum_cmadd.S | 11 | ASM_X86_64_ELF += bn/arch/amd64/bignum_cmadd.S |
19 | ASM_X86_64_ELF += bn/arch/amd64/bignum_cmul.S | 12 | ASM_X86_64_ELF += bn/arch/amd64/bignum_cmul.S |
13 | ASM_X86_64_ELF += bn/arch/amd64/bignum_modadd.S | ||
14 | ASM_X86_64_ELF += bn/arch/amd64/bignum_modsub.S | ||
20 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul.S | 15 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul.S |
16 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_4_8.S | ||
21 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_4_8_alt.S | 17 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_4_8_alt.S |
18 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_6_12.S | ||
19 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_6_12_alt.S | ||
20 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_8_16.S | ||
22 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_8_16_alt.S | 21 | ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_8_16_alt.S |
23 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr.S | 22 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr.S |
23 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_4_8.S | ||
24 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_4_8_alt.S | 24 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_4_8_alt.S |
25 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_6_12.S | ||
26 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_6_12_alt.S | ||
27 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16.S | ||
25 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16_alt.S | 28 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16_alt.S |
26 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sub.S | 29 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sub.S |
27 | ASM_X86_64_ELF += bn/arch/amd64/word_clz.S | 30 | ASM_X86_64_ELF += bn/arch/amd64/word_clz.S |
28 | ASM_X86_64_ELF += bn/arch/amd64/bn_arch.c | ||
29 | 31 | ||
30 | EXTRA_DIST += $(ASM_X86_64_ELF) | 32 | EXTRA_DIST += $(ASM_X86_64_ELF) |
31 | 33 | ||
32 | if HOST_ASM_ELF_X86_64 | 34 | if HOST_ASM_ELF_X86_64 |
35 | libcrypto_la_SOURCES += aes/aes_amd64.c | ||
36 | libcrypto_la_SOURCES += bn/arch/amd64/bn_arch.c | ||
37 | libcrypto_la_SOURCES += modes/gcm128_amd64.c | ||
38 | |||
33 | libcrypto_la_CPPFLAGS += -DAES_ASM | 39 | libcrypto_la_CPPFLAGS += -DAES_ASM |
34 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 40 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
35 | libcrypto_la_CPPFLAGS += -DVPAES_ASM | 41 | libcrypto_la_CPPFLAGS += -DVPAES_ASM |
36 | libcrypto_la_CPPFLAGS += -DHAVE_AES_CBC_ENCRYPT_INTERNAL | ||
37 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
38 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
39 | libcrypto_la_CPPFLAGS += -DHAVE_AES_ENCRYPT_INTERNAL | ||
40 | libcrypto_la_CPPFLAGS += -DHAVE_AES_DECRYPT_INTERNAL | ||
41 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 | 42 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 |
42 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT | 43 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT |
43 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 | 44 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 |
44 | libcrypto_la_CPPFLAGS += -DMD5_ASM | ||
45 | libcrypto_la_CPPFLAGS += -DGHASH_ASM | 45 | libcrypto_la_CPPFLAGS += -DGHASH_ASM |
46 | libcrypto_la_CPPFLAGS += -DRSA_ASM | 46 | libcrypto_la_CPPFLAGS += -DRSA_ASM |
47 | libcrypto_la_CPPFLAGS += -DSHA1_ASM | ||
48 | libcrypto_la_CPPFLAGS += -DSHA256_ASM | ||
49 | libcrypto_la_CPPFLAGS += -DSHA512_ASM | ||
50 | libcrypto_la_CPPFLAGS += -DWHIRLPOOL_ASM | ||
51 | libcrypto_la_CPPFLAGS += -DOPENSSL_CPUID_OBJ | ||
52 | libcrypto_la_SOURCES += $(ASM_X86_64_ELF) | 47 | libcrypto_la_SOURCES += $(ASM_X86_64_ELF) |
53 | endif | 48 | endif |
diff --git a/crypto/Makefile.am.macosx-x86_64 b/crypto/Makefile.am.macosx-x86_64 index 1020567..23e27e6 100644 --- a/crypto/Makefile.am.macosx-x86_64 +++ b/crypto/Makefile.am.macosx-x86_64 | |||
@@ -1,53 +1,48 @@ | |||
1 | 1 | ||
2 | ASM_X86_64_MACOSX = aes/aes-macosx-x86_64.S | 2 | ASM_X86_64_MACOSX = aes/aes-macosx-x86_64.S |
3 | ASM_X86_64_MACOSX += aes/bsaes-macosx-x86_64.S | ||
4 | ASM_X86_64_MACOSX += aes/vpaes-macosx-x86_64.S | ||
5 | ASM_X86_64_MACOSX += aes/aesni-macosx-x86_64.S | 3 | ASM_X86_64_MACOSX += aes/aesni-macosx-x86_64.S |
6 | ASM_X86_64_MACOSX += bn/modexp512-macosx-x86_64.S | 4 | ASM_X86_64_MACOSX += bn/modexp512-macosx-x86_64.S |
7 | ASM_X86_64_MACOSX += bn/mont-macosx-x86_64.S | 5 | ASM_X86_64_MACOSX += bn/mont-macosx-x86_64.S |
8 | ASM_X86_64_MACOSX += bn/mont5-macosx-x86_64.S | 6 | ASM_X86_64_MACOSX += bn/mont5-macosx-x86_64.S |
9 | ASM_X86_64_MACOSX += md5/md5-macosx-x86_64.S | ||
10 | ASM_X86_64_MACOSX += modes/ghash-macosx-x86_64.S | 7 | ASM_X86_64_MACOSX += modes/ghash-macosx-x86_64.S |
11 | ASM_X86_64_MACOSX += rc4/rc4-macosx-x86_64.S | 8 | ASM_X86_64_MACOSX += rc4/rc4-macosx-x86_64.S |
12 | ASM_X86_64_MACOSX += sha/sha1-macosx-x86_64.S | ||
13 | ASM_X86_64_MACOSX += sha/sha256-macosx-x86_64.S | ||
14 | ASM_X86_64_MACOSX += sha/sha512-macosx-x86_64.S | ||
15 | ASM_X86_64_MACOSX += cpuid-macosx-x86_64.S | ||
16 | 9 | ||
17 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_add.S | 10 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_add.S |
18 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmadd.S | 11 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmadd.S |
19 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmul.S | 12 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmul.S |
13 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_modadd.S | ||
14 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_modsub.S | ||
20 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul.S | 15 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul.S |
16 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8.S | ||
21 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8_alt.S | 17 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8_alt.S |
18 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_6_12.S | ||
19 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_6_12_alt.S | ||
20 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16.S | ||
22 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16_alt.S | 21 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16_alt.S |
23 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr.S | 22 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr.S |
23 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8.S | ||
24 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8_alt.S | 24 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8_alt.S |
25 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_6_12.S | ||
26 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_6_12_alt.S | ||
27 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16.S | ||
25 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S | 28 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S |
26 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S | 29 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S |
27 | ASM_X86_64_MACOSX += bn/arch/amd64/word_clz.S | 30 | ASM_X86_64_MACOSX += bn/arch/amd64/word_clz.S |
28 | ASM_X86_64_MACOSX += bn/arch/amd64/bn_arch.c | ||
29 | 31 | ||
30 | EXTRA_DIST += $(ASM_X86_64_MACOSX) | 32 | EXTRA_DIST += $(ASM_X86_64_MACOSX) |
31 | 33 | ||
32 | if HOST_ASM_MACOSX_X86_64 | 34 | if HOST_ASM_MACOSX_X86_64 |
35 | libcrypto_la_SOURCES += aes/aes_amd64.c | ||
36 | libcrypto_la_SOURCES += bn/arch/amd64/bn_arch.c | ||
37 | libcrypto_la_SOURCES += modes/gcm128_amd64.c | ||
38 | |||
33 | libcrypto_la_CPPFLAGS += -DAES_ASM | 39 | libcrypto_la_CPPFLAGS += -DAES_ASM |
34 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 40 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
35 | libcrypto_la_CPPFLAGS += -DVPAES_ASM | 41 | libcrypto_la_CPPFLAGS += -DVPAES_ASM |
36 | libcrypto_la_CPPFLAGS += -DHAVE_AES_CBC_ENCRYPT_INTERNAL | ||
37 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
38 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
39 | libcrypto_la_CPPFLAGS += -DHAVE_AES_ENCRYPT_INTERNAL | ||
40 | libcrypto_la_CPPFLAGS += -DHAVE_AES_DECRYPT_INTERNAL | ||
41 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 | 42 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 |
42 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT | 43 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT |
43 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 | 44 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 |
44 | libcrypto_la_CPPFLAGS += -DMD5_ASM | ||
45 | libcrypto_la_CPPFLAGS += -DGHASH_ASM | 45 | libcrypto_la_CPPFLAGS += -DGHASH_ASM |
46 | libcrypto_la_CPPFLAGS += -DRSA_ASM | 46 | libcrypto_la_CPPFLAGS += -DRSA_ASM |
47 | libcrypto_la_CPPFLAGS += -DSHA1_ASM | ||
48 | libcrypto_la_CPPFLAGS += -DSHA256_ASM | ||
49 | libcrypto_la_CPPFLAGS += -DSHA512_ASM | ||
50 | libcrypto_la_CPPFLAGS += -DWHIRLPOOL_ASM | ||
51 | libcrypto_la_CPPFLAGS += -DOPENSSL_CPUID_OBJ | ||
52 | libcrypto_la_SOURCES += $(ASM_X86_64_MACOSX) | 47 | libcrypto_la_SOURCES += $(ASM_X86_64_MACOSX) |
53 | endif | 48 | endif |
diff --git a/crypto/Makefile.am.masm-x86_64 b/crypto/Makefile.am.masm-x86_64 index 7da3cc2..bb94e3a 100644 --- a/crypto/Makefile.am.masm-x86_64 +++ b/crypto/Makefile.am.masm-x86_64 | |||
@@ -1,40 +1,25 @@ | |||
1 | 1 | ||
2 | ASM_X86_64_MASM = aes/aes-masm-x86_64.S | 2 | ASM_X86_64_MASM = aes/aes-masm-x86_64.S |
3 | ASM_X86_64_MASM += aes/bsaes-masm-x86_64.S | ||
4 | ASM_X86_64_MASM += aes/vpaes-masm-x86_64.S | ||
5 | ASM_X86_64_MASM += aes/aesni-masm-x86_64.S | 3 | ASM_X86_64_MASM += aes/aesni-masm-x86_64.S |
6 | ASM_X86_64_MASM += bn/modexp512-masm-x86_64.S | 4 | ASM_X86_64_MASM += bn/modexp512-masm-x86_64.S |
7 | ASM_X86_64_MASM += bn/mont-masm-x86_64.S | 5 | ASM_X86_64_MASM += bn/mont-masm-x86_64.S |
8 | ASM_X86_64_MASM += bn/mont5-masm-x86_64.S | 6 | ASM_X86_64_MASM += bn/mont5-masm-x86_64.S |
9 | ASM_X86_64_MASM += md5/md5-masm-x86_64.S | ||
10 | ASM_X86_64_MASM += modes/ghash-masm-x86_64.S | 7 | ASM_X86_64_MASM += modes/ghash-masm-x86_64.S |
11 | ASM_X86_64_MASM += rc4/rc4-masm-x86_64.S | 8 | ASM_X86_64_MASM += rc4/rc4-masm-x86_64.S |
12 | ASM_X86_64_MASM += sha/sha1-masm-x86_64.S | ||
13 | ASM_X86_64_MASM += sha/sha256-masm-x86_64.S | ||
14 | ASM_X86_64_MASM += sha/sha512-masm-x86_64.S | ||
15 | ASM_X86_64_MASM += cpuid-masm-x86_64.S | ||
16 | 9 | ||
17 | EXTRA_DIST += $(ASM_X86_64_MASM) | 10 | EXTRA_DIST += $(ASM_X86_64_MASM) |
18 | 11 | ||
19 | if HOST_ASM_MASM_X86_64 | 12 | if HOST_ASM_MASM_X86_64 |
13 | libcrypto_la_SOURCES += aes/aes_amd64.c | ||
14 | libcrypto_la_SOURCES += modes/gcm128_amd64.c | ||
15 | |||
20 | libcrypto_la_CPPFLAGS += -DAES_ASM | 16 | libcrypto_la_CPPFLAGS += -DAES_ASM |
21 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 17 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
22 | libcrypto_la_CPPFLAGS += -DVPAES_ASM | 18 | libcrypto_la_CPPFLAGS += -DVPAES_ASM |
23 | libcrypto_la_CPPFLAGS += -DHAVE_AES_CBC_ENCRYPT_INTERNAL | ||
24 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
25 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
26 | libcrypto_la_CPPFLAGS += -DHAVE_AES_ENCRYPT_INTERNAL | ||
27 | libcrypto_la_CPPFLAGS += -DHAVE_AES_DECRYPT_INTERNAL | ||
28 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 | 19 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 |
29 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT | 20 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT |
30 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 | 21 | libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 |
31 | libcrypto_la_CPPFLAGS += -DMD5_ASM | ||
32 | libcrypto_la_CPPFLAGS += -DGHASH_ASM | 22 | libcrypto_la_CPPFLAGS += -DGHASH_ASM |
33 | libcrypto_la_CPPFLAGS += -DRSA_ASM | 23 | libcrypto_la_CPPFLAGS += -DRSA_ASM |
34 | libcrypto_la_CPPFLAGS += -DSHA1_ASM | ||
35 | libcrypto_la_CPPFLAGS += -DSHA256_ASM | ||
36 | libcrypto_la_CPPFLAGS += -DSHA512_ASM | ||
37 | libcrypto_la_CPPFLAGS += -DWHIRLPOOL_ASM | ||
38 | libcrypto_la_CPPFLAGS += -DOPENSSL_CPUID_OBJ | ||
39 | libcrypto_la_SOURCES += $(ASM_X86_64_MASM) | 24 | libcrypto_la_SOURCES += $(ASM_X86_64_MASM) |
40 | endif | 25 | endif |
diff --git a/crypto/Makefile.am.mingw64-x86_64 b/crypto/Makefile.am.mingw64-x86_64 index 7d0d3f7..efe2643 100644 --- a/crypto/Makefile.am.mingw64-x86_64 +++ b/crypto/Makefile.am.mingw64-x86_64 | |||
@@ -1,41 +1,26 @@ | |||
1 | 1 | ||
2 | ASM_X86_64_MINGW64 = aes/aes-mingw64-x86_64.S | 2 | ASM_X86_64_MINGW64 = aes/aes-mingw64-x86_64.S |
3 | ASM_X86_64_MINGW64 += aes/bsaes-mingw64-x86_64.S | ||
4 | ASM_X86_64_MINGW64 += aes/vpaes-mingw64-x86_64.S | ||
5 | ASM_X86_64_MINGW64 += aes/aesni-mingw64-x86_64.S | 3 | ASM_X86_64_MINGW64 += aes/aesni-mingw64-x86_64.S |
6 | #ASM_X86_64_MINGW64 += bn/modexp512-mingw64-x86_64.S | 4 | #ASM_X86_64_MINGW64 += bn/modexp512-mingw64-x86_64.S |
7 | #ASM_X86_64_MINGW64 += bn/mont-mingw64-x86_64.S | 5 | #ASM_X86_64_MINGW64 += bn/mont-mingw64-x86_64.S |
8 | #ASM_X86_64_MINGW64 += bn/mont5-mingw64-x86_64.S | 6 | #ASM_X86_64_MINGW64 += bn/mont5-mingw64-x86_64.S |
9 | ASM_X86_64_MINGW64 += md5/md5-mingw64-x86_64.S | ||
10 | ASM_X86_64_MINGW64 += modes/ghash-mingw64-x86_64.S | 7 | ASM_X86_64_MINGW64 += modes/ghash-mingw64-x86_64.S |
11 | ASM_X86_64_MINGW64 += rc4/rc4-mingw64-x86_64.S | 8 | ASM_X86_64_MINGW64 += rc4/rc4-mingw64-x86_64.S |
12 | ASM_X86_64_MINGW64 += sha/sha1-mingw64-x86_64.S | ||
13 | ASM_X86_64_MINGW64 += sha/sha256-mingw64-x86_64.S | ||
14 | ASM_X86_64_MINGW64 += sha/sha512-mingw64-x86_64.S | ||
15 | ASM_X86_64_MINGW64 += cpuid-mingw64-x86_64.S | ||
16 | 9 | ||
17 | EXTRA_DIST += $(ASM_X86_64_MINGW64) | 10 | EXTRA_DIST += $(ASM_X86_64_MINGW64) |
18 | 11 | ||
19 | if HOST_ASM_MINGW64_X86_64 | 12 | if HOST_ASM_MINGW64_X86_64 |
13 | libcrypto_la_SOURCES += aes/aes_amd64.c | ||
14 | libcrypto_la_SOURCES += modes/gcm128_amd64.c | ||
15 | |||
20 | libcrypto_la_CPPFLAGS += -Dendbr32=endbr64 | 16 | libcrypto_la_CPPFLAGS += -Dendbr32=endbr64 |
21 | libcrypto_la_CPPFLAGS += -DAES_ASM | 17 | libcrypto_la_CPPFLAGS += -DAES_ASM |
22 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 18 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
23 | libcrypto_la_CPPFLAGS += -DVPAES_ASM | 19 | libcrypto_la_CPPFLAGS += -DVPAES_ASM |
24 | libcrypto_la_CPPFLAGS += -DHAVE_AES_CBC_ENCRYPT_INTERNAL | ||
25 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
26 | libcrypto_la_CPPFLAGS += -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
27 | libcrypto_la_CPPFLAGS += -DHAVE_AES_ENCRYPT_INTERNAL | ||
28 | libcrypto_la_CPPFLAGS += -DHAVE_AES_DECRYPT_INTERNAL | ||
29 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 | 20 | libcrypto_la_CPPFLAGS += -DOPENSSL_IA32_SSE2 |
30 | #libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT | 21 | #libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT |
31 | #libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 | 22 | #libcrypto_la_CPPFLAGS += -DOPENSSL_BN_ASM_MONT5 |
32 | libcrypto_la_CPPFLAGS += -DMD5_ASM | ||
33 | libcrypto_la_CPPFLAGS += -DGHASH_ASM | 23 | libcrypto_la_CPPFLAGS += -DGHASH_ASM |
34 | libcrypto_la_CPPFLAGS += -DRSA_ASM | 24 | libcrypto_la_CPPFLAGS += -DRSA_ASM |
35 | libcrypto_la_CPPFLAGS += -DSHA1_ASM | ||
36 | libcrypto_la_CPPFLAGS += -DSHA256_ASM | ||
37 | libcrypto_la_CPPFLAGS += -DSHA512_ASM | ||
38 | libcrypto_la_CPPFLAGS += -DWHIRLPOOL_ASM | ||
39 | libcrypto_la_CPPFLAGS += -DOPENSSL_CPUID_OBJ | ||
40 | libcrypto_la_SOURCES += $(ASM_X86_64_MINGW64) | 25 | libcrypto_la_SOURCES += $(ASM_X86_64_MINGW64) |
41 | endif | 26 | endif |
diff --git a/crypto/arch/aarch64/crypto_cpu_caps_darwin.c b/crypto/arch/aarch64/crypto_cpu_caps_darwin.c new file mode 100644 index 0000000..1dd91b2 --- /dev/null +++ b/crypto/arch/aarch64/crypto_cpu_caps_darwin.c | |||
@@ -0,0 +1,60 @@ | |||
1 | /* $OpenBSD: crypto_cpu_caps.c,v 1.2 2024/11/12 13:52:31 jsing Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2025 Brent Cook <bcook@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #include <sys/sysctl.h> | ||
19 | |||
20 | #include "crypto_arch.h" | ||
21 | |||
22 | /* Machine dependent CPU capabilities. */ | ||
23 | uint64_t crypto_cpu_caps_aarch64; | ||
24 | |||
25 | static uint64_t | ||
26 | check_cpu_cap(const char *cap_name, uint64_t cap_flag) | ||
27 | { | ||
28 | int has_cap = 0; | ||
29 | size_t len = sizeof(has_cap); | ||
30 | |||
31 | sysctlbyname(cap_name, &has_cap, &len, NULL, 0); | ||
32 | |||
33 | return has_cap ? cap_flag : 0; | ||
34 | } | ||
35 | |||
36 | void | ||
37 | crypto_cpu_caps_init(void) | ||
38 | { | ||
39 | crypto_cpu_caps_aarch64 = 0; | ||
40 | |||
41 | /* from https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics#3918855 */ | ||
42 | |||
43 | crypto_cpu_caps_aarch64 |= check_cpu_cap("hw.optional.arm.FEAT_AES", | ||
44 | CRYPTO_CPU_CAPS_AARCH64_AES); | ||
45 | |||
46 | crypto_cpu_caps_aarch64 |= check_cpu_cap("hw.optional.arm.FEAT_PMULL", | ||
47 | CRYPTO_CPU_CAPS_AARCH64_PMULL); | ||
48 | |||
49 | crypto_cpu_caps_aarch64 |= check_cpu_cap("hw.optional.arm.FEAT_SHA1", | ||
50 | CRYPTO_CPU_CAPS_AARCH64_SHA1); | ||
51 | |||
52 | crypto_cpu_caps_aarch64 |= check_cpu_cap("hw.optional.arm.FEAT_SHA256", | ||
53 | CRYPTO_CPU_CAPS_AARCH64_SHA2); | ||
54 | |||
55 | crypto_cpu_caps_aarch64 |= check_cpu_cap("hw.optional.arm.FEAT_SHA512", | ||
56 | CRYPTO_CPU_CAPS_AARCH64_SHA512); | ||
57 | |||
58 | crypto_cpu_caps_aarch64 |= check_cpu_cap("hw.optional.arm.FEAT_SHA3", | ||
59 | CRYPTO_CPU_CAPS_AARCH64_SHA3); | ||
60 | } | ||
diff --git a/crypto/arch/aarch64/crypto_cpu_caps_linux.c b/crypto/arch/aarch64/crypto_cpu_caps_linux.c new file mode 100644 index 0000000..ae28120 --- /dev/null +++ b/crypto/arch/aarch64/crypto_cpu_caps_linux.c | |||
@@ -0,0 +1,62 @@ | |||
1 | /* $OpenBSD: crypto_cpu_caps.c,v 1.2 2024/11/12 13:52:31 jsing Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2025 Brent Cook <bcook@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #include <sys/auxv.h> | ||
19 | |||
20 | /* from arch/arm64/include/uapi/asm/hwcap.h */ | ||
21 | #define HWCAP_AES (1 << 3) | ||
22 | #define HWCAP_PMULL (1 << 4) | ||
23 | #define HWCAP_SHA1 (1 << 5) | ||
24 | #define HWCAP_SHA2 (1 << 6) | ||
25 | #define HWCAP_CRC32 (1 << 7) | ||
26 | #define HWCAP_SHA3 (1 << 17) | ||
27 | #define HWCAP_SHA512 (1 << 21) | ||
28 | |||
29 | #include "crypto_arch.h" | ||
30 | |||
31 | /* Machine dependent CPU capabilities. */ | ||
32 | uint64_t crypto_cpu_caps_aarch64; | ||
33 | |||
34 | static uint64_t | ||
35 | check_cpu_cap(unsigned long hwcap, uint64_t cap_flag) | ||
36 | { | ||
37 | return (getauxval(AT_HWCAP) & hwcap) ? cap_flag : 0; | ||
38 | } | ||
39 | |||
40 | void | ||
41 | crypto_cpu_caps_init(void) | ||
42 | { | ||
43 | crypto_cpu_caps_aarch64 = 0; | ||
44 | |||
45 | crypto_cpu_caps_aarch64 |= check_cpu_cap(HWCAP_AES, | ||
46 | CRYPTO_CPU_CAPS_AARCH64_AES); | ||
47 | |||
48 | crypto_cpu_caps_aarch64 |= check_cpu_cap(HWCAP_PMULL, | ||
49 | CRYPTO_CPU_CAPS_AARCH64_PMULL); | ||
50 | |||
51 | crypto_cpu_caps_aarch64 |= check_cpu_cap(HWCAP_SHA1, | ||
52 | CRYPTO_CPU_CAPS_AARCH64_SHA1); | ||
53 | |||
54 | crypto_cpu_caps_aarch64 |= check_cpu_cap(HWCAP_SHA2, | ||
55 | CRYPTO_CPU_CAPS_AARCH64_SHA2); | ||
56 | |||
57 | crypto_cpu_caps_aarch64 |= check_cpu_cap(HWCAP_SHA512, | ||
58 | CRYPTO_CPU_CAPS_AARCH64_SHA512); | ||
59 | |||
60 | crypto_cpu_caps_aarch64 |= check_cpu_cap(HWCAP_SHA3, | ||
61 | CRYPTO_CPU_CAPS_AARCH64_SHA3); | ||
62 | } | ||
diff --git a/crypto/arch/aarch64/crypto_cpu_caps_none.c b/crypto/arch/aarch64/crypto_cpu_caps_none.c new file mode 100644 index 0000000..dcd96b7 --- /dev/null +++ b/crypto/arch/aarch64/crypto_cpu_caps_none.c | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2025 Brent Cook <bcook@openbsd.org> | ||
3 | * | ||
4 | * Permission to use, copy, modify, and distribute this software for any | ||
5 | * purpose with or without fee is hereby granted, provided that the above | ||
6 | * copyright notice and this permission notice appear in all copies. | ||
7 | * | ||
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | */ | ||
16 | |||
17 | #include "crypto_arch.h" | ||
18 | |||
19 | /* Machine dependent CPU capabilities. */ | ||
20 | uint64_t crypto_cpu_caps_aarch64; | ||
21 | |||
22 | void | ||
23 | crypto_cpu_caps_init(void) | ||
24 | { | ||
25 | crypto_cpu_caps_aarch64 = 0; | ||
26 | } | ||
diff --git a/crypto/arch/aarch64/crypto_cpu_caps_windows.c b/crypto/arch/aarch64/crypto_cpu_caps_windows.c new file mode 100644 index 0000000..e7cdded --- /dev/null +++ b/crypto/arch/aarch64/crypto_cpu_caps_windows.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* $OpenBSD: crypto_cpu_caps.c,v 1.2 2024/11/12 13:52:31 jsing Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2025 Brent Cook <bcook@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #include <windows.h> | ||
19 | |||
20 | #include "crypto_arch.h" | ||
21 | |||
22 | /* Machine dependent CPU capabilities. */ | ||
23 | uint64_t crypto_cpu_caps_aarch64; | ||
24 | |||
25 | void | ||
26 | crypto_cpu_caps_init(void) | ||
27 | { | ||
28 | crypto_cpu_caps_aarch64 = 0; | ||
29 | |||
30 | if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) { | ||
31 | crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_AES; | ||
32 | crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_PMULL; | ||
33 | crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_SHA1; | ||
34 | crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_SHA2; | ||
35 | } | ||
36 | } | ||
diff --git a/crypto/arch/loongarch64/crypto_arch.h b/crypto/arch/loongarch64/crypto_arch.h new file mode 100644 index 0000000..a3dd98d --- /dev/null +++ b/crypto/arch/loongarch64/crypto_arch.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* $OpenBSD: crypto_arch.h,v 1.1 2024/08/11 13:02:39 jsing Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #ifndef HEADER_CRYPTO_ARCH_H | ||
19 | #define HEADER_CRYPTO_ARCH_H | ||
20 | |||
21 | #endif | ||
diff --git a/crypto/arch/mips/crypto_arch.h b/crypto/arch/mips/crypto_arch.h new file mode 100644 index 0000000..274879c --- /dev/null +++ b/crypto/arch/mips/crypto_arch.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* $OpenBSD$ */ | ||
2 | /* | ||
3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #ifndef HEADER_CRYPTO_ARCH_H | ||
19 | #define HEADER_CRYPTO_ARCH_H | ||
20 | |||
21 | #endif | ||
diff --git a/crypto/bn/arch/loongarch64/bn_arch.h b/crypto/bn/arch/loongarch64/bn_arch.h new file mode 100644 index 0000000..672ac12 --- /dev/null +++ b/crypto/bn/arch/loongarch64/bn_arch.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* $OpenBSD: bn_arch.h,v 1.7 2023/07/09 10:37:32 jsing Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #include <openssl/bn.h> | ||
19 | |||
20 | #ifndef HEADER_BN_ARCH_H | ||
21 | #define HEADER_BN_ARCH_H | ||
22 | |||
23 | #endif | ||
diff --git a/crypto/compat/.gitignore b/crypto/compat/.gitignore new file mode 100644 index 0000000..7f05049 --- /dev/null +++ b/crypto/compat/.gitignore | |||
@@ -0,0 +1,31 @@ | |||
1 | arc4random.c | ||
2 | arc4random_aix.h | ||
3 | arc4random_freebsd.h | ||
4 | arc4random_hpux.h | ||
5 | arc4random_linux.h | ||
6 | arc4random_netbsd.h | ||
7 | arc4random_osx.h | ||
8 | arc4random_solaris.h | ||
9 | arc4random_uniform.c | ||
10 | arc4random_win.h | ||
11 | chacha_private.h | ||
12 | explicit_bzero.c | ||
13 | getentropy_aix.c | ||
14 | getentropy_freebsd.c | ||
15 | getentropy_hpux.c | ||
16 | getentropy_linux.c | ||
17 | getentropy_netbsd.c | ||
18 | getentropy_osx.c | ||
19 | getentropy_solaris.c | ||
20 | getentropy_win.c | ||
21 | reallocarray.c | ||
22 | recallocarray.c | ||
23 | strcasecmp.c | ||
24 | strlcat.c | ||
25 | strlcpy.c | ||
26 | strndup.c | ||
27 | strnlen.c | ||
28 | strsep.c | ||
29 | strtonum.c | ||
30 | timingsafe_bcmp.c | ||
31 | timingsafe_memcmp.c | ||
diff --git a/crypto/compat/b_win.c b/crypto/compat/b_win.c index e261cd2..45af839 100644 --- a/crypto/compat/b_win.c +++ b/crypto/compat/b_win.c | |||
@@ -8,7 +8,8 @@ | |||
8 | #include <ws2tcpip.h> | 8 | #include <ws2tcpip.h> |
9 | 9 | ||
10 | #include <openssl/bio.h> | 10 | #include <openssl/bio.h> |
11 | #include <openssl/err.h> | 11 | |
12 | #include "err_local.h" | ||
12 | 13 | ||
13 | int | 14 | int |
14 | BIO_sock_init(void) | 15 | BIO_sock_init(void) |
@@ -29,7 +30,7 @@ BIO_sock_init(void) | |||
29 | } | 30 | } |
30 | wsa_init_done = 1; | 31 | wsa_init_done = 1; |
31 | } | 32 | } |
32 | return (1); | 33 | return (1); |
33 | } | 34 | } |
34 | 35 | ||
35 | void | 36 | void |
diff --git a/crypto/compat/getdelim.c b/crypto/compat/getdelim.c new file mode 100644 index 0000000..caec3f2 --- /dev/null +++ b/crypto/compat/getdelim.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /*- | ||
2 | * Copyright (c) 2011 The NetBSD Foundation, Inc. | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This code is derived from software contributed to The NetBSD Foundation | ||
6 | * by Christos Zoulas. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * 1. Redistributions of source code must retain the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer. | ||
13 | * 2. Redistributions in binary form must reproduce the above copyright | ||
14 | * notice, this list of conditions and the following disclaimer in the | ||
15 | * documentation and/or other materials provided with the distribution. | ||
16 | * | ||
17 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | ||
18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
20 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | ||
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
27 | * POSSIBILITY OF SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | #include <stdio.h> | ||
31 | #include <stdlib.h> | ||
32 | |||
33 | #ifndef HAVE_GETDELIM | ||
34 | |||
35 | ssize_t | ||
36 | getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) | ||
37 | { | ||
38 | char *ptr, *eptr; | ||
39 | |||
40 | |||
41 | if (*buf == NULL || *bufsiz == 0) { | ||
42 | *bufsiz = BUFSIZ; | ||
43 | if ((*buf = malloc(*bufsiz)) == NULL) | ||
44 | return -1; | ||
45 | } | ||
46 | |||
47 | for (ptr = *buf, eptr = *buf + *bufsiz;;) { | ||
48 | int c = fgetc(fp); | ||
49 | if (c == -1) { | ||
50 | if (feof(fp)) { | ||
51 | ssize_t diff = (ssize_t)(ptr - *buf); | ||
52 | if (diff != 0) { | ||
53 | *ptr = '\0'; | ||
54 | return diff; | ||
55 | } | ||
56 | } | ||
57 | return -1; | ||
58 | } | ||
59 | *ptr++ = c; | ||
60 | if (c == delimiter) { | ||
61 | *ptr = '\0'; | ||
62 | return ptr - *buf; | ||
63 | } | ||
64 | if (ptr + 2 >= eptr) { | ||
65 | char *nbuf; | ||
66 | size_t nbufsiz = *bufsiz * 2; | ||
67 | ssize_t d = ptr - *buf; | ||
68 | if ((nbuf = realloc(*buf, nbufsiz)) == NULL) | ||
69 | return -1; | ||
70 | *buf = nbuf; | ||
71 | *bufsiz = nbufsiz; | ||
72 | eptr = nbuf + nbufsiz; | ||
73 | ptr = nbuf + d; | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | |||
78 | #endif /* HAVE_GETDELIM */ | ||
diff --git a/crypto/compat/getline.c b/crypto/compat/getline.c new file mode 100644 index 0000000..e6ecde0 --- /dev/null +++ b/crypto/compat/getline.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /*- | ||
2 | * Copyright (c) 2011 The NetBSD Foundation, Inc. | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This code is derived from software contributed to The NetBSD Foundation | ||
6 | * by Christos Zoulas. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * 1. Redistributions of source code must retain the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer. | ||
13 | * 2. Redistributions in binary form must reproduce the above copyright | ||
14 | * notice, this list of conditions and the following disclaimer in the | ||
15 | * documentation and/or other materials provided with the distribution. | ||
16 | * | ||
17 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | ||
18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
19 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
20 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | ||
21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
27 | * POSSIBILITY OF SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | #include <stdio.h> | ||
31 | |||
32 | #ifndef HAVE_GETLINE | ||
33 | |||
34 | ssize_t | ||
35 | getline(char **buf, size_t *bufsiz, FILE *fp) | ||
36 | { | ||
37 | return getdelim(buf, bufsiz, '\n', fp); | ||
38 | } | ||
39 | |||
40 | #endif /* HAVE_GETLINE */ | ||
diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c index bb3e653..572e527 100644 --- a/crypto/compat/posix_win.c +++ b/crypto/compat/posix_win.c | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #define NO_REDEF_POSIX_FUNCTIONS | 10 | #define NO_REDEF_POSIX_FUNCTIONS |
11 | 11 | ||
12 | #include <sys/time.h> | ||
13 | |||
12 | #include <ws2tcpip.h> | 14 | #include <ws2tcpip.h> |
13 | #include <windows.h> | 15 | #include <windows.h> |
14 | 16 | ||
@@ -20,6 +22,25 @@ | |||
20 | #include <string.h> | 22 | #include <string.h> |
21 | #include <unistd.h> | 23 | #include <unistd.h> |
22 | 24 | ||
25 | #include <sys/stat.h> | ||
26 | |||
27 | static int | ||
28 | is_socket(int fd) | ||
29 | { | ||
30 | // Border case: Don't break std* file descriptors | ||
31 | if (fd < 3) | ||
32 | return 0; | ||
33 | |||
34 | // All locally-allocated file descriptors will have the high bit set | ||
35 | return (fd & 0x80000000) == 0; | ||
36 | } | ||
37 | |||
38 | static int | ||
39 | get_real_fd(int fd) | ||
40 | { | ||
41 | return (fd & 0x7fffffff); | ||
42 | } | ||
43 | |||
23 | void | 44 | void |
24 | posix_perror(const char *s) | 45 | posix_perror(const char *s) |
25 | { | 46 | { |
@@ -42,6 +63,12 @@ posix_fopen(const char *path, const char *mode) | |||
42 | } | 63 | } |
43 | 64 | ||
44 | int | 65 | int |
66 | libressl_fstat(int fd, struct stat *statbuf) | ||
67 | { | ||
68 | return fstat(get_real_fd(fd), statbuf); | ||
69 | } | ||
70 | |||
71 | int | ||
45 | posix_open(const char *path, ...) | 72 | posix_open(const char *path, ...) |
46 | { | 73 | { |
47 | va_list ap; | 74 | va_list ap; |
@@ -60,7 +87,11 @@ posix_open(const char *path, ...) | |||
60 | flags |= O_NOINHERIT; | 87 | flags |= O_NOINHERIT; |
61 | } | 88 | } |
62 | flags &= ~O_NONBLOCK; | 89 | flags &= ~O_NONBLOCK; |
63 | return open(path, flags, mode); | 90 | |
91 | const int fh = open(path, flags, mode); | ||
92 | |||
93 | // Set high bit to mark file descriptor as a file handle | ||
94 | return fh + 0x80000000; | ||
64 | } | 95 | } |
65 | 96 | ||
66 | char * | 97 | char * |
@@ -148,52 +179,6 @@ wsa_errno(int err) | |||
148 | return -1; | 179 | return -1; |
149 | } | 180 | } |
150 | 181 | ||
151 | /* | ||
152 | * Employ a similar trick to cpython (pycore_fileutils.h) where the CRT report | ||
153 | * handler is disabled while checking if a descriptor is a socket or a file | ||
154 | */ | ||
155 | #if defined _MSC_VER && _MSC_VER >= 1900 | ||
156 | |||
157 | #include <crtdbg.h> | ||
158 | #include <stdlib.h> | ||
159 | |||
160 | static void noop_handler(const wchar_t *expression, const wchar_t *function, | ||
161 | const wchar_t *file, unsigned int line, uintptr_t pReserved) | ||
162 | { | ||
163 | return; | ||
164 | } | ||
165 | |||
166 | #define BEGIN_SUPPRESS_IPH \ | ||
167 | const int old_report_mode = _CrtSetReportMode(_CRT_ASSERT, 0); \ | ||
168 | const _invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler) | ||
169 | #define END_SUPPRESS_IPH \ | ||
170 | (void)old_report_mode; /* Silence warning in release mode when _CrtSetReportMode compiles to void. */ \ | ||
171 | _CrtSetReportMode(_CRT_ASSERT, old_report_mode); \ | ||
172 | _set_thread_local_invalid_parameter_handler(old_handler) | ||
173 | |||
174 | #else | ||
175 | |||
176 | #define BEGIN_SUPPRESS_IPH | ||
177 | #define END_SUPPRESS_IPH | ||
178 | |||
179 | #endif | ||
180 | |||
181 | static int | ||
182 | is_socket(int fd) | ||
183 | { | ||
184 | intptr_t hd; | ||
185 | |||
186 | BEGIN_SUPPRESS_IPH; | ||
187 | hd = _get_osfhandle(fd); | ||
188 | END_SUPPRESS_IPH; | ||
189 | |||
190 | if (hd == (intptr_t)INVALID_HANDLE_VALUE) { | ||
191 | return 1; /* fd is not file descriptor */ | ||
192 | } | ||
193 | |||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | int | 182 | int |
198 | posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) | 183 | posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
199 | { | 184 | { |
@@ -207,14 +192,13 @@ int | |||
207 | posix_close(int fd) | 192 | posix_close(int fd) |
208 | { | 193 | { |
209 | int rc; | 194 | int rc; |
210 | |||
211 | if (is_socket(fd)) { | 195 | if (is_socket(fd)) { |
212 | if ((rc = closesocket(fd)) == SOCKET_ERROR) { | 196 | if ((rc = closesocket(fd)) == SOCKET_ERROR) { |
213 | int err = WSAGetLastError(); | 197 | int err = WSAGetLastError(); |
214 | rc = wsa_errno(err); | 198 | rc = wsa_errno(err); |
215 | } | 199 | } |
216 | } else { | 200 | } else { |
217 | rc = close(fd); | 201 | rc = close(get_real_fd(fd)); |
218 | } | 202 | } |
219 | return rc; | 203 | return rc; |
220 | } | 204 | } |
@@ -223,14 +207,13 @@ ssize_t | |||
223 | posix_read(int fd, void *buf, size_t count) | 207 | posix_read(int fd, void *buf, size_t count) |
224 | { | 208 | { |
225 | ssize_t rc; | 209 | ssize_t rc; |
226 | |||
227 | if (is_socket(fd)) { | 210 | if (is_socket(fd)) { |
228 | if ((rc = recv(fd, buf, count, 0)) == SOCKET_ERROR) { | 211 | if ((rc = recv(fd, buf, count, 0)) == SOCKET_ERROR) { |
229 | int err = WSAGetLastError(); | 212 | int err = WSAGetLastError(); |
230 | rc = wsa_errno(err); | 213 | rc = wsa_errno(err); |
231 | } | 214 | } |
232 | } else { | 215 | } else { |
233 | rc = read(fd, buf, count); | 216 | rc = read(get_real_fd(fd), buf, count); |
234 | } | 217 | } |
235 | return rc; | 218 | return rc; |
236 | } | 219 | } |
@@ -244,7 +227,7 @@ posix_write(int fd, const void *buf, size_t count) | |||
244 | rc = wsa_errno(WSAGetLastError()); | 227 | rc = wsa_errno(WSAGetLastError()); |
245 | } | 228 | } |
246 | } else { | 229 | } else { |
247 | rc = write(fd, buf, count); | 230 | rc = write(get_real_fd(fd), buf, count); |
248 | } | 231 | } |
249 | return rc; | 232 | return rc; |
250 | } | 233 | } |
@@ -289,7 +272,7 @@ uid_t getuid(void) | |||
289 | 272 | ||
290 | #ifdef _MSC_VER | 273 | #ifdef _MSC_VER |
291 | struct timezone; | 274 | struct timezone; |
292 | int gettimeofday(struct timeval * tp, struct timezone * tzp) | 275 | int gettimeofday(struct timeval *tp, void *tzp) |
293 | { | 276 | { |
294 | /* | 277 | /* |
295 | * Note: some broken versions only have 8 trailing zero's, the correct | 278 | * Note: some broken versions only have 8 trailing zero's, the correct |
@@ -306,7 +289,7 @@ int gettimeofday(struct timeval * tp, struct timezone * tzp) | |||
306 | time = ((uint64_t)file_time.dwLowDateTime); | 289 | time = ((uint64_t)file_time.dwLowDateTime); |
307 | time += ((uint64_t)file_time.dwHighDateTime) << 32; | 290 | time += ((uint64_t)file_time.dwHighDateTime) << 32; |
308 | 291 | ||
309 | tp->tv_sec = (long)((time - EPOCH) / 10000000L); | 292 | tp->tv_sec = (long long)((time - EPOCH) / 10000000L); |
310 | tp->tv_usec = (long)(system_time.wMilliseconds * 1000); | 293 | tp->tv_usec = (long)(system_time.wMilliseconds * 1000); |
311 | return 0; | 294 | return 0; |
312 | } | 295 | } |
diff --git a/crypto/compat/ui_openssl_win.c b/crypto/compat/ui_openssl_win.c index 09705e4..4ae2c5d 100644 --- a/crypto/compat/ui_openssl_win.c +++ b/crypto/compat/ui_openssl_win.c | |||
@@ -146,7 +146,7 @@ static int echo_console(UI *ui); | |||
146 | static int noecho_console(UI *ui); | 146 | static int noecho_console(UI *ui); |
147 | static int close_console(UI *ui); | 147 | static int close_console(UI *ui); |
148 | 148 | ||
149 | static UI_METHOD ui_openssl = { | 149 | static const UI_METHOD ui_openssl = { |
150 | .name = "OpenSSL default user interface", | 150 | .name = "OpenSSL default user interface", |
151 | .ui_open_session = open_console, | 151 | .ui_open_session = open_console, |
152 | .ui_write_string = write_string, | 152 | .ui_write_string = write_string, |
@@ -155,7 +155,7 @@ static UI_METHOD ui_openssl = { | |||
155 | }; | 155 | }; |
156 | 156 | ||
157 | /* The method with all the built-in thingies */ | 157 | /* The method with all the built-in thingies */ |
158 | UI_METHOD * | 158 | const UI_METHOD * |
159 | UI_OpenSSL(void) | 159 | UI_OpenSSL(void) |
160 | { | 160 | { |
161 | return &ui_openssl; | 161 | return &ui_openssl; |
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | # | ||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | rm -f man/*.[35] include/openssl/*.h | 19 | rm -f man/*.[35] include/openssl/*.h |
diff --git a/gen-coverage-report.sh b/gen-coverage-report.sh index b11f3f9..6453ecb 100755 --- a/gen-coverage-report.sh +++ b/gen-coverage-report.sh | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | # | ||
1 | #!/bin/sh | 16 | #!/bin/sh |
2 | 17 | ||
3 | VERSION=$(cat VERSION) | 18 | VERSION=$(cat VERSION) |
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 9d015cd..4802d13 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt | |||
@@ -1,13 +1,25 @@ | |||
1 | # | ||
2 | # Copyright (c) 2016 Jeff Davey | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | if(ENABLE_LIBRESSL_INSTALL) | 16 | if(ENABLE_LIBRESSL_INSTALL) |
2 | install(DIRECTORY . | 17 | install(DIRECTORY . |
3 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | 18 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |
4 | PATTERN "CMakeLists.txt" EXCLUDE | 19 | PATTERN "CMakeLists.txt" EXCLUDE |
5 | PATTERN "compat" EXCLUDE | 20 | PATTERN "compat" EXCLUDE |
6 | PATTERN "pqueue.h" EXCLUDE | 21 | PATTERN "pqueue.h" EXCLUDE |
7 | PATTERN "Makefile*" EXCLUDE | 22 | PATTERN "Makefile*" EXCLUDE) |
8 | PATTERN "arch" EXCLUDE) | ||
9 | install(FILES ${CMAKE_BINARY_DIR}/include/openssl/opensslconf.h | ||
10 | DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/openssl") | ||
11 | endif(ENABLE_LIBRESSL_INSTALL) | 23 | endif(ENABLE_LIBRESSL_INSTALL) |
12 | 24 | ||
13 | file(COPY . | 25 | file(COPY . |
@@ -17,26 +29,3 @@ file(COPY . | |||
17 | PATTERN "pqueue.h" EXCLUDE | 29 | PATTERN "pqueue.h" EXCLUDE |
18 | PATTERN "Makefile*" EXCLUDE | 30 | PATTERN "Makefile*" EXCLUDE |
19 | PATTERN "arch" EXCLUDE) | 31 | PATTERN "arch" EXCLUDE) |
20 | |||
21 | if(HOST_AARCH64) | ||
22 | file(READ arch/aarch64/opensslconf.h OPENSSLCONF) | ||
23 | elseif(HOST_ARM) | ||
24 | file(READ arch/arm/opensslconf.h OPENSSLCONF) | ||
25 | elseif(HOST_I386) | ||
26 | file(READ arch/i386/opensslconf.h OPENSSLCONF) | ||
27 | elseif(HOST_MIPS) | ||
28 | file(READ arch/mips/opensslconf.h OPENSSLCONF) | ||
29 | elseif(HOST_MIPS64) | ||
30 | file(READ arch/mips64/opensslconf.h OPENSSLCONF) | ||
31 | elseif(HOST_POWERPC) | ||
32 | file(READ arch/powerpc/opensslconf.h OPENSSLCONF) | ||
33 | elseif(HOST_POWERPC64) | ||
34 | file(READ arch/powerpc64/opensslconf.h OPENSSLCONF) | ||
35 | elseif(HOST_RISCV64) | ||
36 | file(READ arch/riscv64/opensslconf.h OPENSSLCONF) | ||
37 | elseif(HOST_SPARC64) | ||
38 | file(READ arch/sparc64/opensslconf.h OPENSSLCONF) | ||
39 | elseif(HOST_X86_64) | ||
40 | file(READ arch/amd64/opensslconf.h OPENSSLCONF) | ||
41 | endif() | ||
42 | file(WRITE ${CMAKE_BINARY_DIR}/include/openssl/opensslconf.h "${OPENSSLCONF}") | ||
diff --git a/include/Makefile.am b/include/Makefile.am index feaaa60..04c9ea2 100644 --- a/include/Makefile.am +++ b/include/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | EXTRA_DIST = CMakeLists.txt | 18 | EXTRA_DIST = CMakeLists.txt |
@@ -46,19 +61,4 @@ noinst_HEADERS += compat/sys/time.h | |||
46 | noinst_HEADERS += compat/sys/types.h | 61 | noinst_HEADERS += compat/sys/types.h |
47 | noinst_HEADERS += compat/sys/uio.h | 62 | noinst_HEADERS += compat/sys/uio.h |
48 | 63 | ||
49 | noinst_HEADERS += arch/aarch64/opensslconf.h | ||
50 | noinst_HEADERS += arch/alpha/opensslconf.h | ||
51 | noinst_HEADERS += arch/amd64/opensslconf.h | ||
52 | noinst_HEADERS += arch/arm/opensslconf.h | ||
53 | noinst_HEADERS += arch/hppa/opensslconf.h | ||
54 | noinst_HEADERS += arch/i386/opensslconf.h | ||
55 | noinst_HEADERS += arch/m88k/opensslconf.h | ||
56 | noinst_HEADERS += arch/mips/opensslconf.h | ||
57 | noinst_HEADERS += arch/mips64/opensslconf.h | ||
58 | noinst_HEADERS += arch/powerpc/opensslconf.h | ||
59 | noinst_HEADERS += arch/powerpc64/opensslconf.h | ||
60 | noinst_HEADERS += arch/riscv64/opensslconf.h | ||
61 | noinst_HEADERS += arch/sh/opensslconf.h | ||
62 | noinst_HEADERS += arch/sparc64/opensslconf.h | ||
63 | |||
64 | include_HEADERS = tls.h | 64 | include_HEADERS = tls.h |
diff --git a/include/arch/mips/opensslconf.h b/include/arch/mips/opensslconf.h deleted file mode 100644 index f17d3d2..0000000 --- a/include/arch/mips/opensslconf.h +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | #include <openssl/opensslfeatures.h> | ||
2 | /* crypto/opensslconf.h.in */ | ||
3 | |||
4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | ||
5 | #define OPENSSLDIR "/etc/ssl" | ||
6 | #endif | ||
7 | |||
8 | #undef OPENSSL_UNISTD | ||
9 | #define OPENSSL_UNISTD <unistd.h> | ||
10 | |||
11 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION | ||
12 | |||
13 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) | ||
14 | #define IDEA_INT unsigned int | ||
15 | #endif | ||
16 | |||
17 | #if defined(HEADER_MD2_H) && !defined(MD2_INT) | ||
18 | #define MD2_INT unsigned int | ||
19 | #endif | ||
20 | |||
21 | #if defined(HEADER_RC2_H) && !defined(RC2_INT) | ||
22 | /* I need to put in a mod for the alpha - eay */ | ||
23 | #define RC2_INT unsigned int | ||
24 | #endif | ||
25 | |||
26 | #if defined(HEADER_RC4_H) | ||
27 | #if !defined(RC4_INT) | ||
28 | /* using int types make the structure larger but make the code faster | ||
29 | * on most boxes I have tested - up to %20 faster. */ | ||
30 | /* | ||
31 | * I don't know what does "most" mean, but declaring "int" is a must on: | ||
32 | * - Intel P6 because partial register stalls are very expensive; | ||
33 | * - elder Alpha because it lacks byte load/store instructions; | ||
34 | */ | ||
35 | #define RC4_INT unsigned int | ||
36 | #endif | ||
37 | #if !defined(RC4_CHUNK) | ||
38 | /* | ||
39 | * This enables code handling data aligned at natural CPU word | ||
40 | * boundary. See crypto/rc4/rc4_enc.c for further details. | ||
41 | */ | ||
42 | #undef RC4_CHUNK | ||
43 | #endif | ||
44 | #endif | ||
45 | |||
46 | #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) | ||
47 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a | ||
48 | * %20 speed up (longs are 8 bytes, int's are 4). */ | ||
49 | #ifndef DES_LONG | ||
50 | #define DES_LONG unsigned int | ||
51 | #endif | ||
52 | #endif | ||
53 | |||
54 | #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) | ||
55 | #define CONFIG_HEADER_BN_H | ||
56 | #define BN_LLONG | ||
57 | |||
58 | /* Should we define BN_DIV2W here? */ | ||
59 | |||
60 | /* Only one for the following should be defined */ | ||
61 | /* The prime number generation stuff may not work when | ||
62 | * EIGHT_BIT but I don't care since I've only used this mode | ||
63 | * for debugging the bignum libraries */ | ||
64 | #undef SIXTY_FOUR_BIT_LONG | ||
65 | #undef SIXTY_FOUR_BIT | ||
66 | #define THIRTY_TWO_BIT | ||
67 | #undef SIXTEEN_BIT | ||
68 | #undef EIGHT_BIT | ||
69 | #endif | ||
70 | |||
71 | #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) | ||
72 | #define CONFIG_HEADER_RC4_LOCL_H | ||
73 | /* if this is defined data[i] is used instead of *data, this is a %20 | ||
74 | * speedup on x86 */ | ||
75 | #define RC4_INDEX | ||
76 | #endif | ||
77 | |||
78 | #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) | ||
79 | #define CONFIG_HEADER_BF_LOCL_H | ||
80 | #undef BF_PTR | ||
81 | #endif /* HEADER_BF_LOCL_H */ | ||
82 | |||
83 | #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) | ||
84 | #define CONFIG_HEADER_DES_LOCL_H | ||
85 | #ifndef DES_DEFAULT_OPTIONS | ||
86 | /* the following is tweaked from a config script, that is why it is a | ||
87 | * protected undef/define */ | ||
88 | #ifndef DES_PTR | ||
89 | #undef DES_PTR | ||
90 | #endif | ||
91 | |||
92 | /* This helps C compiler generate the correct code for multiple functional | ||
93 | * units. It reduces register dependencies at the expense of 2 more | ||
94 | * registers */ | ||
95 | #ifndef DES_RISC1 | ||
96 | #undef DES_RISC1 | ||
97 | #endif | ||
98 | |||
99 | #ifndef DES_RISC2 | ||
100 | #undef DES_RISC2 | ||
101 | #endif | ||
102 | |||
103 | #if defined(DES_RISC1) && defined(DES_RISC2) | ||
104 | YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! | ||
105 | #endif | ||
106 | |||
107 | /* Unroll the inner loop, this sometimes helps, sometimes hinders. | ||
108 | * Very much CPU dependent */ | ||
109 | #ifndef DES_UNROLL | ||
110 | #define DES_UNROLL | ||
111 | #endif | ||
112 | |||
113 | /* These default values were supplied by | ||
114 | * Peter Gutman <pgut001@cs.auckland.ac.nz> | ||
115 | * They are only used if nothing else has been defined */ | ||
116 | #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) | ||
117 | /* Special defines which change the way the code is built depending on the | ||
118 | CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find | ||
119 | even newer MIPS CPU's, but at the moment one size fits all for | ||
120 | optimization options. Older Sparc's work better with only UNROLL, but | ||
121 | there's no way to tell at compile time what it is you're running on */ | ||
122 | |||
123 | #if defined( sun ) /* Newer Sparc's */ | ||
124 | # define DES_PTR | ||
125 | # define DES_RISC1 | ||
126 | # define DES_UNROLL | ||
127 | #elif defined( __ultrix ) /* Older MIPS */ | ||
128 | # define DES_PTR | ||
129 | # define DES_RISC2 | ||
130 | # define DES_UNROLL | ||
131 | #elif defined( __osf1__ ) /* Alpha */ | ||
132 | # define DES_PTR | ||
133 | # define DES_RISC2 | ||
134 | #elif defined ( _AIX ) /* RS6000 */ | ||
135 | /* Unknown */ | ||
136 | #elif defined( __hpux ) /* HP-PA */ | ||
137 | /* Unknown */ | ||
138 | #elif defined( __aux ) /* 68K */ | ||
139 | /* Unknown */ | ||
140 | #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ | ||
141 | # define DES_UNROLL | ||
142 | #elif defined( __sgi ) /* Newer MIPS */ | ||
143 | # define DES_PTR | ||
144 | # define DES_RISC2 | ||
145 | # define DES_UNROLL | ||
146 | #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ | ||
147 | # define DES_PTR | ||
148 | # define DES_RISC1 | ||
149 | # define DES_UNROLL | ||
150 | #endif /* Systems-specific speed defines */ | ||
151 | #endif | ||
152 | |||
153 | #endif /* DES_DEFAULT_OPTIONS */ | ||
154 | #endif /* HEADER_DES_LOCL_H */ | ||
diff --git a/include/compat/endian.h b/include/compat/endian.h index 5376c1a..af3664d 100644 --- a/include/compat/endian.h +++ b/include/compat/endian.h | |||
@@ -62,7 +62,7 @@ | |||
62 | #endif | 62 | #endif |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #if defined(__APPLE__) && !defined(HAVE_ENDIAN_H) | 65 | #if defined(__APPLE__) |
66 | #include <libkern/OSByteOrder.h> | 66 | #include <libkern/OSByteOrder.h> |
67 | #define be16toh(x) OSSwapBigToHostInt16((x)) | 67 | #define be16toh(x) OSSwapBigToHostInt16((x)) |
68 | #define htobe16(x) OSSwapHostToBigInt16((x)) | 68 | #define htobe16(x) OSSwapHostToBigInt16((x)) |
@@ -74,7 +74,7 @@ | |||
74 | #define htobe64(x) OSSwapHostToBigInt64(x) | 74 | #define htobe64(x) OSSwapHostToBigInt64(x) |
75 | #define le64toh(x) OSSwapLittleToHostInt64(x) | 75 | #define le64toh(x) OSSwapLittleToHostInt64(x) |
76 | #define be64toh(x) OSSwapBigToHostInt64(x) | 76 | #define be64toh(x) OSSwapBigToHostInt64(x) |
77 | #endif /* __APPLE__ && !HAVE_ENDIAN_H */ | 77 | #endif /* __APPLE__ */ |
78 | 78 | ||
79 | #if defined(_WIN32) && !defined(HAVE_ENDIAN_H) | 79 | #if defined(_WIN32) && !defined(HAVE_ENDIAN_H) |
80 | #include <winsock2.h> | 80 | #include <winsock2.h> |
@@ -101,6 +101,8 @@ | |||
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | #define htobe64(x) ntohll((x)) | 103 | #define htobe64(x) ntohll((x)) |
104 | #define htole64(x) (x) | ||
105 | #define le64toh(x) (x) | ||
104 | #endif /* _WIN32 && !HAVE_ENDIAN_H */ | 106 | #endif /* _WIN32 && !HAVE_ENDIAN_H */ |
105 | 107 | ||
106 | #ifdef __linux__ | 108 | #ifdef __linux__ |
@@ -151,6 +153,8 @@ | |||
151 | #define htole32(x) LE_32(x) | 153 | #define htole32(x) LE_32(x) |
152 | #define htobe32(x) BE_32(x) | 154 | #define htobe32(x) BE_32(x) |
153 | #define be64toh(x) BE_64(x) | 155 | #define be64toh(x) BE_64(x) |
156 | #define le64toh(x) LE_64(x) | ||
157 | #define htole64(x) LE_64(x) | ||
154 | #define htobe64(x) BE_64(x) | 158 | #define htobe64(x) BE_64(x) |
155 | #endif | 159 | #endif |
156 | 160 | ||
diff --git a/include/compat/stdio.h b/include/compat/stdio.h index 2af8f3e..2ccdeeb 100644 --- a/include/compat/stdio.h +++ b/include/compat/stdio.h | |||
@@ -18,6 +18,18 @@ | |||
18 | #include_next <stdio.h> | 18 | #include_next <stdio.h> |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #ifndef HAVE_GETDELIM | ||
22 | #include <sys/types.h> | ||
23 | #define getdelim libressl_getdelim | ||
24 | ssize_t getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp); | ||
25 | #endif | ||
26 | |||
27 | #ifndef HAVE_GETLINE | ||
28 | #include <sys/types.h> | ||
29 | #define getline libressl_getline | ||
30 | ssize_t getline(char **buf, size_t *bufsiz, FILE *fp); | ||
31 | #endif | ||
32 | |||
21 | #ifndef HAVE_ASPRINTF | 33 | #ifndef HAVE_ASPRINTF |
22 | #include <stdarg.h> | 34 | #include <stdarg.h> |
23 | #define vasprintf libressl_vasprintf | 35 | #define vasprintf libressl_vasprintf |
diff --git a/include/compat/sys/stat.h b/include/compat/sys/stat.h index b88da1d..57aa521 100644 --- a/include/compat/sys/stat.h +++ b/include/compat/sys/stat.h | |||
@@ -118,4 +118,12 @@ | |||
118 | 118 | ||
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | #ifdef _WIN32 | ||
122 | int libressl_fstat(int fd, struct stat *statbuf); | ||
123 | |||
124 | #ifndef NO_REDEF_POSIX_FUNCTIONS | ||
125 | #define fstat(fd, statbuf) libressl_fstat(fd, statbuf) | ||
126 | #endif | ||
127 | #endif | ||
128 | |||
121 | #endif | 129 | #endif |
diff --git a/include/compat/sys/time.h b/include/compat/sys/time.h index 76428c1..2448969 100644 --- a/include/compat/sys/time.h +++ b/include/compat/sys/time.h | |||
@@ -8,6 +8,15 @@ | |||
8 | 8 | ||
9 | #ifdef _MSC_VER | 9 | #ifdef _MSC_VER |
10 | #include <winsock2.h> | 10 | #include <winsock2.h> |
11 | |||
12 | #define timeval libressl_timeval | ||
13 | #define gettimeofday libressl_gettimeofday | ||
14 | |||
15 | struct timeval { | ||
16 | long long tv_sec; | ||
17 | long tv_usec; | ||
18 | }; | ||
19 | |||
11 | int gettimeofday(struct timeval *tp, void *tzp); | 20 | int gettimeofday(struct timeval *tp, void *tzp); |
12 | #else | 21 | #else |
13 | #include_next <sys/time.h> | 22 | #include_next <sys/time.h> |
diff --git a/include/openssl/Makefile.am.tpl b/include/openssl/Makefile.am.tpl index 303d0b9..1bea34d 100644 --- a/include/openssl/Makefile.am.tpl +++ b/include/openssl/Makefile.am.tpl | |||
@@ -3,40 +3,4 @@ include $(top_srcdir)/Makefile.am.common | |||
3 | if !ENABLE_LIBTLS_ONLY | 3 | if !ENABLE_LIBTLS_ONLY |
4 | opensslincludedir=$(includedir)/openssl | 4 | opensslincludedir=$(includedir)/openssl |
5 | 5 | ||
6 | BUILT_SOURCES = opensslconf.h | 6 | opensslinclude_HEADERS = |
7 | CLEANFILES = opensslconf.h | ||
8 | |||
9 | opensslconf.h: Makefile | ||
10 | -echo "generating opensslconf.h ..." | ||
11 | if HOST_AARCH64 | ||
12 | -cp $(top_srcdir)/include/arch/aarch64/opensslconf.h opensslconf.h | ||
13 | endif | ||
14 | if HOST_ARM | ||
15 | -cp $(top_srcdir)/include/arch/arm/opensslconf.h opensslconf.h | ||
16 | endif | ||
17 | if HOST_I386 | ||
18 | -cp $(top_srcdir)/include/arch/i386/opensslconf.h opensslconf.h | ||
19 | endif | ||
20 | if HOST_MIPS | ||
21 | -cp $(top_srcdir)/include/arch/mips/opensslconf.h opensslconf.h | ||
22 | endif | ||
23 | if HOST_MIPS64 | ||
24 | -cp $(top_srcdir)/include/arch/mips64/opensslconf.h opensslconf.h | ||
25 | endif | ||
26 | if HOST_POWERPC | ||
27 | -cp $(top_srcdir)/include/arch/powerpc/opensslconf.h opensslconf.h | ||
28 | endif | ||
29 | if HOST_POWERPC64 | ||
30 | -cp $(top_srcdir)/include/arch/powerpc64/opensslconf.h opensslconf.h | ||
31 | endif | ||
32 | if HOST_RISCV64 | ||
33 | -cp $(top_srcdir)/include/arch/riscv64/opensslconf.h opensslconf.h | ||
34 | endif | ||
35 | if HOST_SPARC64 | ||
36 | -cp $(top_srcdir)/include/arch/sparc64/opensslconf.h opensslconf.h | ||
37 | endif | ||
38 | if HOST_X86_64 | ||
39 | -cp $(top_srcdir)/include/arch/amd64/opensslconf.h opensslconf.h | ||
40 | endif | ||
41 | |||
42 | opensslinclude_HEADERS = opensslconf.h | ||
diff --git a/libcrypto.pc.in b/libcrypto.pc.in index 11d7ef0..c11fbd3 100644 --- a/libcrypto.pc.in +++ b/libcrypto.pc.in | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | # | ||
1 | #libcrypto pkg-config source file | 16 | #libcrypto pkg-config source file |
2 | 17 | ||
3 | prefix=@prefix@ | 18 | prefix=@prefix@ |
diff --git a/libssl.pc.in b/libssl.pc.in index 512ec1c..9d0d641 100644 --- a/libssl.pc.in +++ b/libssl.pc.in | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | # | ||
1 | #libssl pkg-config source file | 16 | #libssl pkg-config source file |
2 | 17 | ||
3 | prefix=@prefix@ | 18 | prefix=@prefix@ |
diff --git a/libtls.pc.in b/libtls.pc.in index 3c49391..19c8134 100644 --- a/libtls.pc.in +++ b/libtls.pc.in | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | # | ||
1 | #libtls pkg-config source file | 16 | #libtls pkg-config source file |
2 | 17 | ||
3 | prefix=@prefix@ | 18 | prefix=@prefix@ |
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4 index 40df15b..dadf0da 100644 --- a/m4/check-libc.m4 +++ b/m4/check-libc.m4 | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | AC_DEFUN([CHECK_LIBC_COMPAT], [ | 16 | AC_DEFUN([CHECK_LIBC_COMPAT], [ |
2 | # Check for libc headers | 17 | # Check for libc headers |
3 | AC_CHECK_HEADERS([endian.h machine/endian.h err.h readpassphrase.h]) | 18 | AC_CHECK_HEADERS([endian.h machine/endian.h err.h readpassphrase.h]) |
@@ -7,7 +22,7 @@ AC_CHECK_HEADERS([netinet/ip.h], [], [], | |||
7 | ]) | 22 | ]) |
8 | AC_HEADER_RESOLV | 23 | AC_HEADER_RESOLV |
9 | # Check for general libc functions | 24 | # Check for general libc functions |
10 | AC_CHECK_FUNCS([asprintf freezero memmem]) | 25 | AC_CHECK_FUNCS([asprintf freezero getdelim getline memmem]) |
11 | AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) | 26 | AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) |
12 | AC_CHECK_FUNCS([strcasecmp strlcat strlcpy strndup strnlen strsep strtonum]) | 27 | AC_CHECK_FUNCS([strcasecmp strlcat strlcpy strndup strnlen strsep strtonum]) |
13 | AC_CHECK_FUNCS([timegm _mkgmtime timespecsub]) | 28 | AC_CHECK_FUNCS([timegm _mkgmtime timespecsub]) |
@@ -24,6 +39,8 @@ AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [ | |||
24 | ]) | 39 | ]) |
25 | AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) | 40 | AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) |
26 | AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes]) | 41 | AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes]) |
42 | AM_CONDITIONAL([HAVE_GETDELIM], [test "x$ac_cv_func_getdelim" = xyes]) | ||
43 | AM_CONDITIONAL([HAVE_GETLINE], [test "x$ac_cv_func_getline" = xyes]) | ||
27 | AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes]) | 44 | AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes]) |
28 | AM_CONDITIONAL([HAVE_GETOPT], [test "x$ac_cv_func_getopt" = xyes]) | 45 | AM_CONDITIONAL([HAVE_GETOPT], [test "x$ac_cv_func_getopt" = xyes]) |
29 | AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) | 46 | AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) |
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index 91c3021..99f142e 100644 --- a/m4/check-os-options.m4 +++ b/m4/check-os-options.m4 | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | AC_DEFUN([CHECK_OS_OPTIONS], [ | 16 | AC_DEFUN([CHECK_OS_OPTIONS], [ |
2 | 17 | ||
3 | CFLAGS="$CFLAGS -Wall -std=gnu99 -fno-strict-aliasing" | 18 | CFLAGS="$CFLAGS -Wall -std=gnu99 -fno-strict-aliasing" |
@@ -133,6 +148,7 @@ char buf[1]; getentropy(buf, 1); | |||
133 | ;; | 148 | ;; |
134 | *) | 149 | *) |
135 | HOST_OS=unsupported | 150 | HOST_OS=unsupported |
151 | HOST_ABI=elf | ||
136 | ;; | 152 | ;; |
137 | esac | 153 | esac |
138 | 154 | ||
diff --git a/m4/disable-compiler-warnings.m4 b/m4/disable-compiler-warnings.m4 index 2792722..052e8ab 100644 --- a/m4/disable-compiler-warnings.m4 +++ b/m4/disable-compiler-warnings.m4 | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | AC_DEFUN([DISABLE_COMPILER_WARNINGS], [ | 16 | AC_DEFUN([DISABLE_COMPILER_WARNINGS], [ |
2 | # Clang throws a lot of warnings when it does not understand a flag. Disable | 17 | # Clang throws a lot of warnings when it does not understand a flag. Disable |
3 | # this warning for now so other warnings are visible. | 18 | # this warning for now so other warnings are visible. |
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 462a831..8f1121e 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2015 Jeff Davey | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | if(ENABLE_LIBRESSL_INSTALL) | 16 | if(ENABLE_LIBRESSL_INSTALL) |
2 | install(DIRECTORY . | 17 | install(DIRECTORY . |
3 | DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 | 18 | DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 |
@@ -185,9 +185,7 @@ BIO_ctrl.3,BIO_set_info_callback.3 | |||
185 | BIO_ctrl.3,BIO_tell.3 | 185 | BIO_ctrl.3,BIO_tell.3 |
186 | BIO_ctrl.3,BIO_wpending.3 | 186 | BIO_ctrl.3,BIO_wpending.3 |
187 | BIO_ctrl.3,bio_info_cb.3 | 187 | BIO_ctrl.3,bio_info_cb.3 |
188 | BIO_dump.3,BIO_dump_fp.3 | ||
189 | BIO_dump.3,BIO_dump_indent.3 | 188 | BIO_dump.3,BIO_dump_indent.3 |
190 | BIO_dump.3,BIO_dump_indent_fp.3 | ||
191 | BIO_dup_chain.3,BIO_dup_state.3 | 189 | BIO_dup_chain.3,BIO_dup_state.3 |
192 | BIO_f_buffer.3,BIO_get_buffer_num_lines.3 | 190 | BIO_f_buffer.3,BIO_get_buffer_num_lines.3 |
193 | BIO_f_buffer.3,BIO_set_buffer_read_data.3 | 191 | BIO_f_buffer.3,BIO_set_buffer_read_data.3 |
@@ -514,12 +512,6 @@ CONF_modules_free.3,CONF_modules_finish.3 | |||
514 | CONF_modules_free.3,CONF_modules_unload.3 | 512 | CONF_modules_free.3,CONF_modules_unload.3 |
515 | CONF_modules_load_file.3,CONF_modules_load.3 | 513 | CONF_modules_load_file.3,CONF_modules_load.3 |
516 | CONF_modules_load_file.3,X509_get_default_cert_area.3 | 514 | CONF_modules_load_file.3,X509_get_default_cert_area.3 |
517 | CRYPTO_get_mem_functions.3,CRYPTO_MEM_LEAK_CB.3 | ||
518 | CRYPTO_get_mem_functions.3,CRYPTO_mem_ctrl.3 | ||
519 | CRYPTO_get_mem_functions.3,CRYPTO_mem_leaks.3 | ||
520 | CRYPTO_get_mem_functions.3,CRYPTO_mem_leaks_cb.3 | ||
521 | CRYPTO_get_mem_functions.3,CRYPTO_mem_leaks_fp.3 | ||
522 | CRYPTO_get_mem_functions.3,CRYPTO_set_mem_functions.3 | ||
523 | CRYPTO_lock.3,CRYPTO_add.3 | 515 | CRYPTO_lock.3,CRYPTO_add.3 |
524 | CRYPTO_lock.3,CRYPTO_r_lock.3 | 516 | CRYPTO_lock.3,CRYPTO_r_lock.3 |
525 | CRYPTO_lock.3,CRYPTO_r_unlock.3 | 517 | CRYPTO_lock.3,CRYPTO_r_unlock.3 |
@@ -532,6 +524,11 @@ CRYPTO_set_ex_data.3,CRYPTO_free_ex_data.3 | |||
532 | CRYPTO_set_ex_data.3,CRYPTO_get_ex_data.3 | 524 | CRYPTO_set_ex_data.3,CRYPTO_get_ex_data.3 |
533 | CRYPTO_set_ex_data.3,CRYPTO_get_ex_new_index.3 | 525 | CRYPTO_set_ex_data.3,CRYPTO_get_ex_new_index.3 |
534 | CRYPTO_set_ex_data.3,CRYPTO_new_ex_data.3 | 526 | CRYPTO_set_ex_data.3,CRYPTO_new_ex_data.3 |
527 | CRYPTO_set_mem_functions.3,CRYPTO_MEM_LEAK_CB.3 | ||
528 | CRYPTO_set_mem_functions.3,CRYPTO_mem_ctrl.3 | ||
529 | CRYPTO_set_mem_functions.3,CRYPTO_mem_leaks.3 | ||
530 | CRYPTO_set_mem_functions.3,CRYPTO_mem_leaks_cb.3 | ||
531 | CRYPTO_set_mem_functions.3,CRYPTO_mem_leaks_fp.3 | ||
535 | ChaCha.3,CRYPTO_chacha_20.3 | 532 | ChaCha.3,CRYPTO_chacha_20.3 |
536 | ChaCha.3,CRYPTO_hchacha_20.3 | 533 | ChaCha.3,CRYPTO_hchacha_20.3 |
537 | ChaCha.3,CRYPTO_xchacha_20.3 | 534 | ChaCha.3,CRYPTO_xchacha_20.3 |
@@ -645,40 +642,33 @@ ECDSA_SIG_new.3,ECDSA_size.3 | |||
645 | ECDSA_SIG_new.3,ECDSA_verify.3 | 642 | ECDSA_SIG_new.3,ECDSA_verify.3 |
646 | ECDSA_SIG_new.3,d2i_ECDSA_SIG.3 | 643 | ECDSA_SIG_new.3,d2i_ECDSA_SIG.3 |
647 | ECDSA_SIG_new.3,i2d_ECDSA_SIG.3 | 644 | ECDSA_SIG_new.3,i2d_ECDSA_SIG.3 |
648 | EC_GFp_simple_method.3,EC_GFp_mont_method.3 | 645 | EC_GROUP_check.3,EC_GROUP_check_discriminant.3 |
649 | EC_GFp_simple_method.3,EC_METHOD_get_field_type.3 | 646 | EC_GROUP_get_curve_name.3,EC_GROUP_get0_seed.3 |
650 | EC_GROUP_copy.3,EC_GROUP_check.3 | 647 | EC_GROUP_get_curve_name.3,EC_GROUP_get_asn1_flag.3 |
651 | EC_GROUP_copy.3,EC_GROUP_check_discriminant.3 | 648 | EC_GROUP_get_curve_name.3,EC_GROUP_get_basis_type.3 |
652 | EC_GROUP_copy.3,EC_GROUP_cmp.3 | 649 | EC_GROUP_get_curve_name.3,EC_GROUP_get_point_conversion_form.3 |
653 | EC_GROUP_copy.3,EC_GROUP_dup.3 | 650 | EC_GROUP_get_curve_name.3,EC_GROUP_get_seed_len.3 |
654 | EC_GROUP_copy.3,EC_GROUP_get0_generator.3 | 651 | EC_GROUP_get_curve_name.3,EC_GROUP_set_asn1_flag.3 |
655 | EC_GROUP_copy.3,EC_GROUP_get0_seed.3 | 652 | EC_GROUP_get_curve_name.3,EC_GROUP_set_curve_name.3 |
656 | EC_GROUP_copy.3,EC_GROUP_get_asn1_flag.3 | 653 | EC_GROUP_get_curve_name.3,EC_GROUP_set_point_conversion_form.3 |
657 | EC_GROUP_copy.3,EC_GROUP_get_basis_type.3 | 654 | EC_GROUP_get_curve_name.3,EC_GROUP_set_seed.3 |
658 | EC_GROUP_copy.3,EC_GROUP_get_cofactor.3 | 655 | EC_GROUP_new_by_curve_name.3,EC_GROUP_cmp.3 |
659 | EC_GROUP_copy.3,EC_GROUP_get_curve_name.3 | 656 | EC_GROUP_new_by_curve_name.3,EC_GROUP_dup.3 |
660 | EC_GROUP_copy.3,EC_GROUP_get_degree.3 | 657 | EC_GROUP_new_by_curve_name.3,EC_GROUP_free.3 |
661 | EC_GROUP_copy.3,EC_GROUP_get_order.3 | 658 | EC_GROUP_new_by_curve_name.3,EC_curve_nid2nist.3 |
662 | EC_GROUP_copy.3,EC_GROUP_get_point_conversion_form.3 | 659 | EC_GROUP_new_by_curve_name.3,EC_curve_nist2nid.3 |
663 | EC_GROUP_copy.3,EC_GROUP_get_seed_len.3 | 660 | EC_GROUP_new_by_curve_name.3,EC_get_builtin_curves.3 |
664 | EC_GROUP_copy.3,EC_GROUP_method_of.3 | 661 | EC_GROUP_new_curve_GFp.3,EC_GROUP_clear_free.3 |
665 | EC_GROUP_copy.3,EC_GROUP_order_bits.3 | 662 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get0_generator.3 |
666 | EC_GROUP_copy.3,EC_GROUP_set_asn1_flag.3 | 663 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_cofactor.3 |
667 | EC_GROUP_copy.3,EC_GROUP_set_curve_name.3 | 664 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_curve.3 |
668 | EC_GROUP_copy.3,EC_GROUP_set_generator.3 | 665 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_curve_GFp.3 |
669 | EC_GROUP_copy.3,EC_GROUP_set_point_conversion_form.3 | 666 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_degree.3 |
670 | EC_GROUP_copy.3,EC_GROUP_set_seed.3 | 667 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_order.3 |
671 | EC_GROUP_new.3,EC_GROUP_clear_free.3 | 668 | EC_GROUP_new_curve_GFp.3,EC_GROUP_order_bits.3 |
672 | EC_GROUP_new.3,EC_GROUP_free.3 | 669 | EC_GROUP_new_curve_GFp.3,EC_GROUP_set_curve.3 |
673 | EC_GROUP_new.3,EC_GROUP_get_curve.3 | 670 | EC_GROUP_new_curve_GFp.3,EC_GROUP_set_curve_GFp.3 |
674 | EC_GROUP_new.3,EC_GROUP_get_curve_GFp.3 | 671 | EC_GROUP_new_curve_GFp.3,EC_GROUP_set_generator.3 |
675 | EC_GROUP_new.3,EC_GROUP_new_by_curve_name.3 | ||
676 | EC_GROUP_new.3,EC_GROUP_new_curve_GFp.3 | ||
677 | EC_GROUP_new.3,EC_GROUP_set_curve.3 | ||
678 | EC_GROUP_new.3,EC_GROUP_set_curve_GFp.3 | ||
679 | EC_GROUP_new.3,EC_curve_nid2nist.3 | ||
680 | EC_GROUP_new.3,EC_curve_nist2nid.3 | ||
681 | EC_GROUP_new.3,EC_get_builtin_curves.3 | ||
682 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_free.3 | 672 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_free.3 |
683 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_get_compute_key.3 | 673 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_get_compute_key.3 |
684 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_get_init.3 | 674 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_get_init.3 |
@@ -721,8 +711,6 @@ EC_KEY_new.3,EC_KEY_set_private_key.3 | |||
721 | EC_KEY_new.3,EC_KEY_set_public_key.3 | 711 | EC_KEY_new.3,EC_KEY_set_public_key.3 |
722 | EC_KEY_new.3,EC_KEY_set_public_key_affine_coordinates.3 | 712 | EC_KEY_new.3,EC_KEY_set_public_key_affine_coordinates.3 |
723 | EC_KEY_new.3,EC_KEY_up_ref.3 | 713 | EC_KEY_new.3,EC_KEY_up_ref.3 |
724 | EC_POINT_add.3,EC_GROUP_have_precompute_mult.3 | ||
725 | EC_POINT_add.3,EC_GROUP_precompute_mult.3 | ||
726 | EC_POINT_add.3,EC_POINT_cmp.3 | 714 | EC_POINT_add.3,EC_POINT_cmp.3 |
727 | EC_POINT_add.3,EC_POINT_dbl.3 | 715 | EC_POINT_add.3,EC_POINT_dbl.3 |
728 | EC_POINT_add.3,EC_POINT_invert.3 | 716 | EC_POINT_add.3,EC_POINT_invert.3 |
@@ -730,28 +718,21 @@ EC_POINT_add.3,EC_POINT_is_at_infinity.3 | |||
730 | EC_POINT_add.3,EC_POINT_is_on_curve.3 | 718 | EC_POINT_add.3,EC_POINT_is_on_curve.3 |
731 | EC_POINT_add.3,EC_POINT_make_affine.3 | 719 | EC_POINT_add.3,EC_POINT_make_affine.3 |
732 | EC_POINT_add.3,EC_POINT_mul.3 | 720 | EC_POINT_add.3,EC_POINT_mul.3 |
733 | EC_POINT_add.3,EC_POINTs_make_affine.3 | 721 | EC_POINT_get_affine_coordinates.3,EC_POINT_get_affine_coordinates_GFp.3 |
734 | EC_POINT_add.3,EC_POINTs_mul.3 | 722 | EC_POINT_get_affine_coordinates.3,EC_POINT_set_affine_coordinates.3 |
735 | EC_POINT_new.3,EC_POINT_bn2point.3 | 723 | EC_POINT_get_affine_coordinates.3,EC_POINT_set_affine_coordinates_GFp.3 |
724 | EC_POINT_get_affine_coordinates.3,EC_POINT_set_compressed_coordinates.3 | ||
725 | EC_POINT_get_affine_coordinates.3,EC_POINT_set_compressed_coordinates_GFp.3 | ||
726 | EC_POINT_get_affine_coordinates.3,EC_POINT_set_to_infinity.3 | ||
736 | EC_POINT_new.3,EC_POINT_clear_free.3 | 727 | EC_POINT_new.3,EC_POINT_clear_free.3 |
737 | EC_POINT_new.3,EC_POINT_copy.3 | 728 | EC_POINT_new.3,EC_POINT_copy.3 |
738 | EC_POINT_new.3,EC_POINT_dup.3 | 729 | EC_POINT_new.3,EC_POINT_dup.3 |
739 | EC_POINT_new.3,EC_POINT_free.3 | 730 | EC_POINT_new.3,EC_POINT_free.3 |
740 | EC_POINT_new.3,EC_POINT_get_Jprojective_coordinates_GFp.3 | 731 | EC_POINT_point2oct.3,EC_POINT_bn2point.3 |
741 | EC_POINT_new.3,EC_POINT_get_affine_coordinates.3 | 732 | EC_POINT_point2oct.3,EC_POINT_hex2point.3 |
742 | EC_POINT_new.3,EC_POINT_get_affine_coordinates_GFp.3 | 733 | EC_POINT_point2oct.3,EC_POINT_oct2point.3 |
743 | EC_POINT_new.3,EC_POINT_hex2point.3 | 734 | EC_POINT_point2oct.3,EC_POINT_point2bn.3 |
744 | EC_POINT_new.3,EC_POINT_method_of.3 | 735 | EC_POINT_point2oct.3,EC_POINT_point2hex.3 |
745 | EC_POINT_new.3,EC_POINT_oct2point.3 | ||
746 | EC_POINT_new.3,EC_POINT_point2bn.3 | ||
747 | EC_POINT_new.3,EC_POINT_point2hex.3 | ||
748 | EC_POINT_new.3,EC_POINT_point2oct.3 | ||
749 | EC_POINT_new.3,EC_POINT_set_Jprojective_coordinates_GFp.3 | ||
750 | EC_POINT_new.3,EC_POINT_set_affine_coordinates.3 | ||
751 | EC_POINT_new.3,EC_POINT_set_affine_coordinates_GFp.3 | ||
752 | EC_POINT_new.3,EC_POINT_set_compressed_coordinates.3 | ||
753 | EC_POINT_new.3,EC_POINT_set_compressed_coordinates_GFp.3 | ||
754 | EC_POINT_new.3,EC_POINT_set_to_infinity.3 | ||
755 | ENGINE_new.3,ENGINE_by_id.3 | 736 | ENGINE_new.3,ENGINE_by_id.3 |
756 | ENGINE_new.3,ENGINE_cleanup.3 | 737 | ENGINE_new.3,ENGINE_cleanup.3 |
757 | ENGINE_new.3,ENGINE_ctrl_cmd.3 | 738 | ENGINE_new.3,ENGINE_ctrl_cmd.3 |
@@ -791,8 +772,6 @@ ERR_load_strings.3,ERR_PACK.3 | |||
791 | ERR_load_strings.3,ERR_get_next_error_library.3 | 772 | ERR_load_strings.3,ERR_get_next_error_library.3 |
792 | ERR_print_errors.3,ERR_print_errors_cb.3 | 773 | ERR_print_errors.3,ERR_print_errors_cb.3 |
793 | ERR_print_errors.3,ERR_print_errors_fp.3 | 774 | ERR_print_errors.3,ERR_print_errors_fp.3 |
794 | ERR_put_error.3,ERR_add_error_data.3 | ||
795 | ERR_put_error.3,ERR_add_error_vdata.3 | ||
796 | ERR_remove_state.3,ERR_remove_thread_state.3 | 775 | ERR_remove_state.3,ERR_remove_thread_state.3 |
797 | ERR_set_mark.3,ERR_pop_to_mark.3 | 776 | ERR_set_mark.3,ERR_pop_to_mark.3 |
798 | ESS_SIGNING_CERT_new.3,ESS_CERT_ID_free.3 | 777 | ESS_SIGNING_CERT_new.3,ESS_CERT_ID_free.3 |
@@ -938,13 +917,6 @@ EVP_EncryptInit.3,EVP_idea_cfb.3 | |||
938 | EVP_EncryptInit.3,EVP_idea_cfb64.3 | 917 | EVP_EncryptInit.3,EVP_idea_cfb64.3 |
939 | EVP_EncryptInit.3,EVP_idea_ecb.3 | 918 | EVP_EncryptInit.3,EVP_idea_ecb.3 |
940 | EVP_EncryptInit.3,EVP_idea_ofb.3 | 919 | EVP_EncryptInit.3,EVP_idea_ofb.3 |
941 | EVP_EncryptInit.3,EVP_rc2_40_cbc.3 | ||
942 | EVP_EncryptInit.3,EVP_rc2_64_cbc.3 | ||
943 | EVP_EncryptInit.3,EVP_rc2_cbc.3 | ||
944 | EVP_EncryptInit.3,EVP_rc2_cfb.3 | ||
945 | EVP_EncryptInit.3,EVP_rc2_cfb64.3 | ||
946 | EVP_EncryptInit.3,EVP_rc2_ecb.3 | ||
947 | EVP_EncryptInit.3,EVP_rc2_ofb.3 | ||
948 | EVP_MD_CTX_ctrl.3,EVP_MD_CTX_clear_flags.3 | 920 | EVP_MD_CTX_ctrl.3,EVP_MD_CTX_clear_flags.3 |
949 | EVP_MD_CTX_ctrl.3,EVP_MD_CTX_md_data.3 | 921 | EVP_MD_CTX_ctrl.3,EVP_MD_CTX_md_data.3 |
950 | EVP_MD_CTX_ctrl.3,EVP_MD_CTX_pkey_ctx.3 | 922 | EVP_MD_CTX_ctrl.3,EVP_MD_CTX_pkey_ctx.3 |
@@ -992,32 +964,13 @@ EVP_PKEY_CTX_set_hkdf_md.3,EVP_PKEY_CTX_add1_hkdf_info.3 | |||
992 | EVP_PKEY_CTX_set_hkdf_md.3,EVP_PKEY_CTX_hkdf_mode.3 | 964 | EVP_PKEY_CTX_set_hkdf_md.3,EVP_PKEY_CTX_hkdf_mode.3 |
993 | EVP_PKEY_CTX_set_hkdf_md.3,EVP_PKEY_CTX_set1_hkdf_key.3 | 965 | EVP_PKEY_CTX_set_hkdf_md.3,EVP_PKEY_CTX_set1_hkdf_key.3 |
994 | EVP_PKEY_CTX_set_hkdf_md.3,EVP_PKEY_CTX_set1_hkdf_salt.3 | 966 | EVP_PKEY_CTX_set_hkdf_md.3,EVP_PKEY_CTX_set1_hkdf_salt.3 |
995 | EVP_PKEY_add1_attr.3,EVP_PKEY_add1_attr_by_NID.3 | 967 | EVP_PKEY_CTX_set_tls1_prf_md.3,EVP_PKEY_CTX_add1_tls1_prf_seed.3 |
996 | EVP_PKEY_add1_attr.3,EVP_PKEY_add1_attr_by_OBJ.3 | 968 | EVP_PKEY_CTX_set_tls1_prf_md.3,EVP_PKEY_CTX_set1_tls1_prf_secret.3 |
997 | EVP_PKEY_add1_attr.3,EVP_PKEY_add1_attr_by_txt.3 | ||
998 | EVP_PKEY_add1_attr.3,EVP_PKEY_delete_attr.3 | ||
999 | EVP_PKEY_add1_attr.3,EVP_PKEY_get_attr.3 | ||
1000 | EVP_PKEY_add1_attr.3,EVP_PKEY_get_attr_by_NID.3 | ||
1001 | EVP_PKEY_add1_attr.3,EVP_PKEY_get_attr_by_OBJ.3 | ||
1002 | EVP_PKEY_add1_attr.3,EVP_PKEY_get_attr_count.3 | ||
1003 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_find.3 | 969 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_find.3 |
1004 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_find_str.3 | 970 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_find_str.3 |
1005 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_get0.3 | 971 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_get0.3 |
1006 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_get0_info.3 | 972 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_asn1_get0_info.3 |
1007 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_get0_asn1.3 | 973 | EVP_PKEY_asn1_get_count.3,EVP_PKEY_get0_asn1.3 |
1008 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_copy.3 | ||
1009 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_free.3 | ||
1010 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_check.3 | ||
1011 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_ctrl.3 | ||
1012 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_free.3 | ||
1013 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_param.3 | ||
1014 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_param_check.3 | ||
1015 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_private.3 | ||
1016 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_public.3 | ||
1017 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_public_check.3 | ||
1018 | EVP_PKEY_asn1_new.3,EVP_PKEY_asn1_set_security_bits.3 | ||
1019 | EVP_PKEY_check.3,EVP_PKEY_param_check.3 | ||
1020 | EVP_PKEY_check.3,EVP_PKEY_public_check.3 | ||
1021 | EVP_PKEY_cmp.3,EVP_PKEY_cmp_parameters.3 | 974 | EVP_PKEY_cmp.3,EVP_PKEY_cmp_parameters.3 |
1022 | EVP_PKEY_cmp.3,EVP_PKEY_copy_parameters.3 | 975 | EVP_PKEY_cmp.3,EVP_PKEY_copy_parameters.3 |
1023 | EVP_PKEY_cmp.3,EVP_PKEY_missing_parameters.3 | 976 | EVP_PKEY_cmp.3,EVP_PKEY_missing_parameters.3 |
@@ -1028,41 +981,19 @@ EVP_PKEY_derive.3,EVP_PKEY_derive_set_peer.3 | |||
1028 | EVP_PKEY_encrypt.3,EVP_PKEY_encrypt_init.3 | 981 | EVP_PKEY_encrypt.3,EVP_PKEY_encrypt_init.3 |
1029 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_get_app_data.3 | 982 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_get_app_data.3 |
1030 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_get_cb.3 | 983 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_get_cb.3 |
984 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_get_data.3 | ||
1031 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_get_keygen_info.3 | 985 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_get_keygen_info.3 |
1032 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_set0_keygen_info.3 | 986 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_set0_keygen_info.3 |
1033 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_set_app_data.3 | 987 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_set_app_data.3 |
1034 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_set_cb.3 | 988 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_set_cb.3 |
989 | EVP_PKEY_keygen.3,EVP_PKEY_CTX_set_data.3 | ||
1035 | EVP_PKEY_keygen.3,EVP_PKEY_gen_cb.3 | 990 | EVP_PKEY_keygen.3,EVP_PKEY_gen_cb.3 |
1036 | EVP_PKEY_keygen.3,EVP_PKEY_keygen_init.3 | 991 | EVP_PKEY_keygen.3,EVP_PKEY_keygen_init.3 |
1037 | EVP_PKEY_keygen.3,EVP_PKEY_paramgen.3 | 992 | EVP_PKEY_keygen.3,EVP_PKEY_paramgen.3 |
1038 | EVP_PKEY_keygen.3,EVP_PKEY_paramgen_init.3 | 993 | EVP_PKEY_keygen.3,EVP_PKEY_paramgen_init.3 |
1039 | EVP_PKEY_meth_new.3,EVP_PKEY_CTX_get_data.3 | ||
1040 | EVP_PKEY_meth_new.3,EVP_PKEY_CTX_set_data.3 | ||
1041 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_add0.3 | ||
1042 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_copy.3 | ||
1043 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_find.3 | ||
1044 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_free.3 | ||
1045 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_check.3 | ||
1046 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_cleanup.3 | ||
1047 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_copy.3 | ||
1048 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_ctrl.3 | ||
1049 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_decrypt.3 | ||
1050 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_derive.3 | ||
1051 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_encrypt.3 | ||
1052 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_init.3 | ||
1053 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_keygen.3 | ||
1054 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_param_check.3 | ||
1055 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_paramgen.3 | ||
1056 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_public_check.3 | ||
1057 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_sign.3 | ||
1058 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_signctx.3 | ||
1059 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_verify.3 | ||
1060 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_verify_recover.3 | ||
1061 | EVP_PKEY_meth_new.3,EVP_PKEY_meth_set_verifyctx.3 | ||
1062 | EVP_PKEY_new.3,EVP_PKEY_free.3 | 994 | EVP_PKEY_new.3,EVP_PKEY_free.3 |
1063 | EVP_PKEY_new.3,EVP_PKEY_get_raw_private_key.3 | 995 | EVP_PKEY_new.3,EVP_PKEY_get_raw_private_key.3 |
1064 | EVP_PKEY_new.3,EVP_PKEY_get_raw_public_key.3 | 996 | EVP_PKEY_new.3,EVP_PKEY_get_raw_public_key.3 |
1065 | EVP_PKEY_new.3,EVP_PKEY_new_CMAC_key.3 | ||
1066 | EVP_PKEY_new.3,EVP_PKEY_new_mac_key.3 | 997 | EVP_PKEY_new.3,EVP_PKEY_new_mac_key.3 |
1067 | EVP_PKEY_new.3,EVP_PKEY_new_raw_private_key.3 | 998 | EVP_PKEY_new.3,EVP_PKEY_new_raw_private_key.3 |
1068 | EVP_PKEY_new.3,EVP_PKEY_new_raw_public_key.3 | 999 | EVP_PKEY_new.3,EVP_PKEY_new_raw_public_key.3 |
@@ -1106,41 +1037,39 @@ EVP_VerifyInit.3,EVP_VerifyFinal.3 | |||
1106 | EVP_VerifyInit.3,EVP_VerifyInit_ex.3 | 1037 | EVP_VerifyInit.3,EVP_VerifyInit_ex.3 |
1107 | EVP_VerifyInit.3,EVP_VerifyUpdate.3 | 1038 | EVP_VerifyInit.3,EVP_VerifyUpdate.3 |
1108 | EVP_aes_128_cbc.3,EVP_aes_128_cbc_hmac_sha1.3 | 1039 | EVP_aes_128_cbc.3,EVP_aes_128_cbc_hmac_sha1.3 |
1109 | EVP_aes_128_cbc.3,EVP_aes_128_ccm.3 | ||
1110 | EVP_aes_128_cbc.3,EVP_aes_128_cfb.3 | 1040 | EVP_aes_128_cbc.3,EVP_aes_128_cfb.3 |
1111 | EVP_aes_128_cbc.3,EVP_aes_128_cfb1.3 | 1041 | EVP_aes_128_cbc.3,EVP_aes_128_cfb1.3 |
1112 | EVP_aes_128_cbc.3,EVP_aes_128_cfb128.3 | 1042 | EVP_aes_128_cbc.3,EVP_aes_128_cfb128.3 |
1113 | EVP_aes_128_cbc.3,EVP_aes_128_cfb8.3 | 1043 | EVP_aes_128_cbc.3,EVP_aes_128_cfb8.3 |
1114 | EVP_aes_128_cbc.3,EVP_aes_128_ctr.3 | 1044 | EVP_aes_128_cbc.3,EVP_aes_128_ctr.3 |
1115 | EVP_aes_128_cbc.3,EVP_aes_128_ecb.3 | 1045 | EVP_aes_128_cbc.3,EVP_aes_128_ecb.3 |
1116 | EVP_aes_128_cbc.3,EVP_aes_128_gcm.3 | ||
1117 | EVP_aes_128_cbc.3,EVP_aes_128_ofb.3 | 1046 | EVP_aes_128_cbc.3,EVP_aes_128_ofb.3 |
1118 | EVP_aes_128_cbc.3,EVP_aes_128_wrap.3 | 1047 | EVP_aes_128_cbc.3,EVP_aes_128_wrap.3 |
1119 | EVP_aes_128_cbc.3,EVP_aes_128_xts.3 | 1048 | EVP_aes_128_cbc.3,EVP_aes_128_xts.3 |
1120 | EVP_aes_128_cbc.3,EVP_aes_192_cbc.3 | 1049 | EVP_aes_128_cbc.3,EVP_aes_192_cbc.3 |
1121 | EVP_aes_128_cbc.3,EVP_aes_192_ccm.3 | ||
1122 | EVP_aes_128_cbc.3,EVP_aes_192_cfb.3 | 1050 | EVP_aes_128_cbc.3,EVP_aes_192_cfb.3 |
1123 | EVP_aes_128_cbc.3,EVP_aes_192_cfb1.3 | 1051 | EVP_aes_128_cbc.3,EVP_aes_192_cfb1.3 |
1124 | EVP_aes_128_cbc.3,EVP_aes_192_cfb128.3 | 1052 | EVP_aes_128_cbc.3,EVP_aes_192_cfb128.3 |
1125 | EVP_aes_128_cbc.3,EVP_aes_192_cfb8.3 | 1053 | EVP_aes_128_cbc.3,EVP_aes_192_cfb8.3 |
1126 | EVP_aes_128_cbc.3,EVP_aes_192_ctr.3 | 1054 | EVP_aes_128_cbc.3,EVP_aes_192_ctr.3 |
1127 | EVP_aes_128_cbc.3,EVP_aes_192_ecb.3 | 1055 | EVP_aes_128_cbc.3,EVP_aes_192_ecb.3 |
1128 | EVP_aes_128_cbc.3,EVP_aes_192_gcm.3 | ||
1129 | EVP_aes_128_cbc.3,EVP_aes_192_ofb.3 | 1056 | EVP_aes_128_cbc.3,EVP_aes_192_ofb.3 |
1130 | EVP_aes_128_cbc.3,EVP_aes_192_wrap.3 | 1057 | EVP_aes_128_cbc.3,EVP_aes_192_wrap.3 |
1131 | EVP_aes_128_cbc.3,EVP_aes_256_cbc.3 | 1058 | EVP_aes_128_cbc.3,EVP_aes_256_cbc.3 |
1132 | EVP_aes_128_cbc.3,EVP_aes_256_cbc_hmac_sha1.3 | 1059 | EVP_aes_128_cbc.3,EVP_aes_256_cbc_hmac_sha1.3 |
1133 | EVP_aes_128_cbc.3,EVP_aes_256_ccm.3 | ||
1134 | EVP_aes_128_cbc.3,EVP_aes_256_cfb.3 | 1060 | EVP_aes_128_cbc.3,EVP_aes_256_cfb.3 |
1135 | EVP_aes_128_cbc.3,EVP_aes_256_cfb1.3 | 1061 | EVP_aes_128_cbc.3,EVP_aes_256_cfb1.3 |
1136 | EVP_aes_128_cbc.3,EVP_aes_256_cfb128.3 | 1062 | EVP_aes_128_cbc.3,EVP_aes_256_cfb128.3 |
1137 | EVP_aes_128_cbc.3,EVP_aes_256_cfb8.3 | 1063 | EVP_aes_128_cbc.3,EVP_aes_256_cfb8.3 |
1138 | EVP_aes_128_cbc.3,EVP_aes_256_ctr.3 | 1064 | EVP_aes_128_cbc.3,EVP_aes_256_ctr.3 |
1139 | EVP_aes_128_cbc.3,EVP_aes_256_ecb.3 | 1065 | EVP_aes_128_cbc.3,EVP_aes_256_ecb.3 |
1140 | EVP_aes_128_cbc.3,EVP_aes_256_gcm.3 | ||
1141 | EVP_aes_128_cbc.3,EVP_aes_256_ofb.3 | 1066 | EVP_aes_128_cbc.3,EVP_aes_256_ofb.3 |
1142 | EVP_aes_128_cbc.3,EVP_aes_256_wrap.3 | 1067 | EVP_aes_128_cbc.3,EVP_aes_256_wrap.3 |
1143 | EVP_aes_128_cbc.3,EVP_aes_256_xts.3 | 1068 | EVP_aes_128_cbc.3,EVP_aes_256_xts.3 |
1069 | EVP_aes_128_ccm.3,EVP_aes_192_ccm.3 | ||
1070 | EVP_aes_128_ccm.3,EVP_aes_256_ccm.3 | ||
1071 | EVP_aes_128_gcm.3,EVP_aes_192_gcm.3 | ||
1072 | EVP_aes_128_gcm.3,EVP_aes_256_gcm.3 | ||
1144 | EVP_camellia_128_cbc.3,EVP_camellia_128_cfb.3 | 1073 | EVP_camellia_128_cbc.3,EVP_camellia_128_cfb.3 |
1145 | EVP_camellia_128_cbc.3,EVP_camellia_128_cfb1.3 | 1074 | EVP_camellia_128_cbc.3,EVP_camellia_128_cfb1.3 |
1146 | EVP_camellia_128_cbc.3,EVP_camellia_128_cfb128.3 | 1075 | EVP_camellia_128_cbc.3,EVP_camellia_128_cfb128.3 |
@@ -1183,6 +1112,12 @@ EVP_des_cbc.3,EVP_des_ede_ecb.3 | |||
1183 | EVP_des_cbc.3,EVP_des_ede_ofb.3 | 1112 | EVP_des_cbc.3,EVP_des_ede_ofb.3 |
1184 | EVP_des_cbc.3,EVP_des_ofb.3 | 1113 | EVP_des_cbc.3,EVP_des_ofb.3 |
1185 | EVP_des_cbc.3,EVP_desx_cbc.3 | 1114 | EVP_des_cbc.3,EVP_desx_cbc.3 |
1115 | EVP_rc2_cbc.3,EVP_rc2_40_cbc.3 | ||
1116 | EVP_rc2_cbc.3,EVP_rc2_64_cbc.3 | ||
1117 | EVP_rc2_cbc.3,EVP_rc2_cfb.3 | ||
1118 | EVP_rc2_cbc.3,EVP_rc2_cfb64.3 | ||
1119 | EVP_rc2_cbc.3,EVP_rc2_ecb.3 | ||
1120 | EVP_rc2_cbc.3,EVP_rc2_ofb.3 | ||
1186 | EVP_rc4.3,EVP_rc4_40.3 | 1121 | EVP_rc4.3,EVP_rc4_40.3 |
1187 | EVP_rc4.3,EVP_rc4_hmac_md5.3 | 1122 | EVP_rc4.3,EVP_rc4_hmac_md5.3 |
1188 | EVP_sha1.3,EVP_md4.3 | 1123 | EVP_sha1.3,EVP_md4.3 |
@@ -1211,7 +1146,6 @@ HMAC.3,HMAC_CTX_new.3 | |||
1211 | HMAC.3,HMAC_CTX_reset.3 | 1146 | HMAC.3,HMAC_CTX_reset.3 |
1212 | HMAC.3,HMAC_CTX_set_flags.3 | 1147 | HMAC.3,HMAC_CTX_set_flags.3 |
1213 | HMAC.3,HMAC_Final.3 | 1148 | HMAC.3,HMAC_Final.3 |
1214 | HMAC.3,HMAC_Init.3 | ||
1215 | HMAC.3,HMAC_Init_ex.3 | 1149 | HMAC.3,HMAC_Init_ex.3 |
1216 | HMAC.3,HMAC_Update.3 | 1150 | HMAC.3,HMAC_Update.3 |
1217 | HMAC.3,HMAC_size.3 | 1151 | HMAC.3,HMAC_size.3 |
@@ -1240,11 +1174,6 @@ MD5.3,MD5_Update.3 | |||
1240 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_free.3 | 1174 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_free.3 |
1241 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_new.3 | 1175 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_new.3 |
1242 | NAME_CONSTRAINTS_new.3,NAME_CONSTRAINTS_free.3 | 1176 | NAME_CONSTRAINTS_new.3,NAME_CONSTRAINTS_free.3 |
1243 | OBJ_NAME_add.3,OBJ_NAME_cleanup.3 | ||
1244 | OBJ_NAME_add.3,OBJ_NAME_get.3 | ||
1245 | OBJ_NAME_add.3,OBJ_NAME_init.3 | ||
1246 | OBJ_NAME_add.3,OBJ_NAME_new_index.3 | ||
1247 | OBJ_NAME_add.3,OBJ_NAME_remove.3 | ||
1248 | OBJ_create.3,OBJ_add_object.3 | 1177 | OBJ_create.3,OBJ_add_object.3 |
1249 | OBJ_create.3,OBJ_cleanup.3 | 1178 | OBJ_create.3,OBJ_cleanup.3 |
1250 | OBJ_create.3,OBJ_create_objects.3 | 1179 | OBJ_create.3,OBJ_create_objects.3 |
@@ -1329,7 +1258,6 @@ OPENSSL_VERSION_NUMBER.3,SSLeay.3 | |||
1329 | OPENSSL_VERSION_NUMBER.3,SSLeay_version.3 | 1258 | OPENSSL_VERSION_NUMBER.3,SSLeay_version.3 |
1330 | OPENSSL_config.3,OPENSSL_no_config.3 | 1259 | OPENSSL_config.3,OPENSSL_no_config.3 |
1331 | OPENSSL_init_crypto.3,OPENSSL_init.3 | 1260 | OPENSSL_init_crypto.3,OPENSSL_init.3 |
1332 | OPENSSL_load_builtin_modules.3,ASN1_add_oid_module.3 | ||
1333 | OPENSSL_malloc.3,CRYPTO_free.3 | 1261 | OPENSSL_malloc.3,CRYPTO_free.3 |
1334 | OPENSSL_malloc.3,CRYPTO_malloc.3 | 1262 | OPENSSL_malloc.3,CRYPTO_malloc.3 |
1335 | OPENSSL_malloc.3,CRYPTO_strdup.3 | 1263 | OPENSSL_malloc.3,CRYPTO_strdup.3 |
@@ -1361,7 +1289,6 @@ OpenSSL_add_all_algorithms.3,OpenSSL_add_all_digests.3 | |||
1361 | OpenSSL_add_all_algorithms.3,SSLeay_add_all_algorithms.3 | 1289 | OpenSSL_add_all_algorithms.3,SSLeay_add_all_algorithms.3 |
1362 | PEM_ASN1_read.3,PEM_ASN1_read_bio.3 | 1290 | PEM_ASN1_read.3,PEM_ASN1_read_bio.3 |
1363 | PEM_ASN1_read.3,d2i_of_void.3 | 1291 | PEM_ASN1_read.3,d2i_of_void.3 |
1364 | PEM_X509_INFO_read.3,PEM_X509_INFO_read_bio.3 | ||
1365 | PEM_read.3,PEM_def_callback.3 | 1292 | PEM_read.3,PEM_def_callback.3 |
1366 | PEM_read.3,PEM_do_header.3 | 1293 | PEM_read.3,PEM_do_header.3 |
1367 | PEM_read.3,PEM_get_EVP_CIPHER_INFO.3 | 1294 | PEM_read.3,PEM_get_EVP_CIPHER_INFO.3 |
@@ -1522,6 +1449,12 @@ RAND_load_file.3,RAND_file_name.3 | |||
1522 | RAND_load_file.3,RAND_write_file.3 | 1449 | RAND_load_file.3,RAND_write_file.3 |
1523 | RAND_set_rand_method.3,RAND_SSLeay.3 | 1450 | RAND_set_rand_method.3,RAND_SSLeay.3 |
1524 | RAND_set_rand_method.3,RAND_get_rand_method.3 | 1451 | RAND_set_rand_method.3,RAND_get_rand_method.3 |
1452 | RC2_encrypt.3,RC2_cbc_encrypt.3 | ||
1453 | RC2_encrypt.3,RC2_cfb64_encrypt.3 | ||
1454 | RC2_encrypt.3,RC2_decrypt.3 | ||
1455 | RC2_encrypt.3,RC2_ecb_encrypt.3 | ||
1456 | RC2_encrypt.3,RC2_ofb64_encrypt.3 | ||
1457 | RC2_encrypt.3,RC2_set_key.3 | ||
1525 | RC4.3,RC4_set_key.3 | 1458 | RC4.3,RC4_set_key.3 |
1526 | RIPEMD160.3,RIPEMD160_Final.3 | 1459 | RIPEMD160.3,RIPEMD160_Final.3 |
1527 | RIPEMD160.3,RIPEMD160_Init.3 | 1460 | RIPEMD160.3,RIPEMD160_Init.3 |
@@ -1651,6 +1584,7 @@ SSL_CIPHER_get_name.3,SSL_CIPHER_get_auth_nid.3 | |||
1651 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_bits.3 | 1584 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_bits.3 |
1652 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_cipher_nid.3 | 1585 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_cipher_nid.3 |
1653 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_digest_nid.3 | 1586 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_digest_nid.3 |
1587 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_handshake_digest.3 | ||
1654 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_id.3 | 1588 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_id.3 |
1655 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_kx_nid.3 | 1589 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_kx_nid.3 |
1656 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_version.3 | 1590 | SSL_CIPHER_get_name.3,SSL_CIPHER_get_version.3 |
@@ -1739,6 +1673,7 @@ SSL_CTX_set_alpn_select_cb.3,SSL_get0_alpn_selected.3 | |||
1739 | SSL_CTX_set_alpn_select_cb.3,SSL_select_next_proto.3 | 1673 | SSL_CTX_set_alpn_select_cb.3,SSL_select_next_proto.3 |
1740 | SSL_CTX_set_alpn_select_cb.3,SSL_set_alpn_protos.3 | 1674 | SSL_CTX_set_alpn_select_cb.3,SSL_set_alpn_protos.3 |
1741 | SSL_CTX_set_cert_store.3,SSL_CTX_get_cert_store.3 | 1675 | SSL_CTX_set_cert_store.3,SSL_CTX_get_cert_store.3 |
1676 | SSL_CTX_set_cert_store.3,SSL_CTX_set1_cert_store.3 | ||
1742 | SSL_CTX_set_cipher_list.3,SSL_set_cipher_list.3 | 1677 | SSL_CTX_set_cipher_list.3,SSL_set_cipher_list.3 |
1743 | SSL_CTX_set_client_CA_list.3,SSL_CTX_add_client_CA.3 | 1678 | SSL_CTX_set_client_CA_list.3,SSL_CTX_add_client_CA.3 |
1744 | SSL_CTX_set_client_CA_list.3,SSL_add_client_CA.3 | 1679 | SSL_CTX_set_client_CA_list.3,SSL_add_client_CA.3 |
@@ -1947,7 +1882,6 @@ TS_REQ_new.3,TS_STATUS_INFO_free.3 | |||
1947 | TS_REQ_new.3,TS_STATUS_INFO_new.3 | 1882 | TS_REQ_new.3,TS_STATUS_INFO_new.3 |
1948 | TS_REQ_new.3,TS_TST_INFO_free.3 | 1883 | TS_REQ_new.3,TS_TST_INFO_free.3 |
1949 | TS_REQ_new.3,TS_TST_INFO_new.3 | 1884 | TS_REQ_new.3,TS_TST_INFO_new.3 |
1950 | UI_UTIL_read_pw.3,UI_UTIL_read_pw_string.3 | ||
1951 | UI_create_method.3,UI_destroy_method.3 | 1885 | UI_create_method.3,UI_destroy_method.3 |
1952 | UI_create_method.3,UI_method_get_closer.3 | 1886 | UI_create_method.3,UI_method_get_closer.3 |
1953 | UI_create_method.3,UI_method_get_flusher.3 | 1887 | UI_create_method.3,UI_method_get_flusher.3 |
@@ -1998,6 +1932,7 @@ X25519.3,ED25519_sign.3 | |||
1998 | X25519.3,ED25519_verify.3 | 1932 | X25519.3,ED25519_verify.3 |
1999 | X25519.3,X25519_keypair.3 | 1933 | X25519.3,X25519_keypair.3 |
2000 | X509V3_EXT_get_nid.3,X509V3_EXT_get.3 | 1934 | X509V3_EXT_get_nid.3,X509V3_EXT_get.3 |
1935 | X509V3_EXT_print.3,X509V3_EXT_print_fp.3 | ||
2001 | X509V3_get_d2i.3,X509V3_EXT_d2i.3 | 1936 | X509V3_get_d2i.3,X509V3_EXT_d2i.3 |
2002 | X509V3_get_d2i.3,X509V3_EXT_i2d.3 | 1937 | X509V3_get_d2i.3,X509V3_EXT_i2d.3 |
2003 | X509V3_get_d2i.3,X509V3_add1_i2d.3 | 1938 | X509V3_get_d2i.3,X509V3_add1_i2d.3 |
@@ -2011,6 +1946,7 @@ X509V3_get_d2i.3,X509_add1_ext_i2d.3 | |||
2011 | X509V3_get_d2i.3,X509_get0_extensions.3 | 1946 | X509V3_get_d2i.3,X509_get0_extensions.3 |
2012 | X509V3_get_d2i.3,X509_get0_uids.3 | 1947 | X509V3_get_d2i.3,X509_get0_uids.3 |
2013 | X509V3_get_d2i.3,X509_get_ext_d2i.3 | 1948 | X509V3_get_d2i.3,X509_get_ext_d2i.3 |
1949 | X509V3_parse_list.3,X509V3_conf_free.3 | ||
2014 | X509_ALGOR_dup.3,X509_ALGOR_cmp.3 | 1950 | X509_ALGOR_dup.3,X509_ALGOR_cmp.3 |
2015 | X509_ALGOR_dup.3,X509_ALGOR_free.3 | 1951 | X509_ALGOR_dup.3,X509_ALGOR_free.3 |
2016 | X509_ALGOR_dup.3,X509_ALGOR_get0.3 | 1952 | X509_ALGOR_dup.3,X509_ALGOR_get0.3 |
@@ -2051,6 +1987,7 @@ X509_EXTENSION_set_object.3,X509_EXTENSION_get_object.3 | |||
2051 | X509_EXTENSION_set_object.3,X509_EXTENSION_new.3 | 1987 | X509_EXTENSION_set_object.3,X509_EXTENSION_new.3 |
2052 | X509_EXTENSION_set_object.3,X509_EXTENSION_set_critical.3 | 1988 | X509_EXTENSION_set_object.3,X509_EXTENSION_set_critical.3 |
2053 | X509_EXTENSION_set_object.3,X509_EXTENSION_set_data.3 | 1989 | X509_EXTENSION_set_object.3,X509_EXTENSION_set_data.3 |
1990 | X509_EXTENSION_set_object.3,X509_supported_extension.3 | ||
2054 | X509_INFO_new.3,X509_INFO_free.3 | 1991 | X509_INFO_new.3,X509_INFO_free.3 |
2055 | X509_LOOKUP_hash_dir.3,X509_LOOKUP_file.3 | 1992 | X509_LOOKUP_hash_dir.3,X509_LOOKUP_file.3 |
2056 | X509_LOOKUP_hash_dir.3,X509_LOOKUP_mem.3 | 1993 | X509_LOOKUP_hash_dir.3,X509_LOOKUP_mem.3 |
@@ -2088,18 +2025,14 @@ X509_NAME_hash.3,X509_subject_name_hash.3 | |||
2088 | X509_NAME_hash.3,X509_subject_name_hash_old.3 | 2025 | X509_NAME_hash.3,X509_subject_name_hash_old.3 |
2089 | X509_NAME_new.3,X509_NAME_free.3 | 2026 | X509_NAME_new.3,X509_NAME_free.3 |
2090 | X509_NAME_print_ex.3,X509_NAME_oneline.3 | 2027 | X509_NAME_print_ex.3,X509_NAME_oneline.3 |
2091 | X509_NAME_print_ex.3,X509_NAME_print.3 | ||
2092 | X509_NAME_print_ex.3,X509_NAME_print_ex_fp.3 | 2028 | X509_NAME_print_ex.3,X509_NAME_print_ex_fp.3 |
2093 | X509_OBJECT_get0_X509.3,X509_OBJECT_free.3 | 2029 | X509_OBJECT_get0_X509.3,X509_OBJECT_free.3 |
2094 | X509_OBJECT_get0_X509.3,X509_OBJECT_free_contents.3 | ||
2095 | X509_OBJECT_get0_X509.3,X509_OBJECT_get0_X509_CRL.3 | 2030 | X509_OBJECT_get0_X509.3,X509_OBJECT_get0_X509_CRL.3 |
2096 | X509_OBJECT_get0_X509.3,X509_OBJECT_get_type.3 | 2031 | X509_OBJECT_get0_X509.3,X509_OBJECT_get_type.3 |
2097 | X509_OBJECT_get0_X509.3,X509_OBJECT_idx_by_subject.3 | 2032 | X509_OBJECT_get0_X509.3,X509_OBJECT_idx_by_subject.3 |
2098 | X509_OBJECT_get0_X509.3,X509_OBJECT_new.3 | 2033 | X509_OBJECT_get0_X509.3,X509_OBJECT_new.3 |
2099 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_by_subject.3 | 2034 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_by_subject.3 |
2100 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_match.3 | 2035 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_match.3 |
2101 | X509_OBJECT_get0_X509.3,X509_OBJECT_up_ref_count.3 | ||
2102 | X509_PKEY_new.3,X509_PKEY_free.3 | ||
2103 | X509_PUBKEY_new.3,X509_PUBKEY_free.3 | 2036 | X509_PUBKEY_new.3,X509_PUBKEY_free.3 |
2104 | X509_PUBKEY_new.3,X509_PUBKEY_get.3 | 2037 | X509_PUBKEY_new.3,X509_PUBKEY_get.3 |
2105 | X509_PUBKEY_new.3,X509_PUBKEY_get0.3 | 2038 | X509_PUBKEY_new.3,X509_PUBKEY_get0.3 |
@@ -2134,9 +2067,7 @@ X509_REQ_add1_attr.3,X509_REQ_get_attr_by_OBJ.3 | |||
2134 | X509_REQ_add1_attr.3,X509_REQ_get_attr_count.3 | 2067 | X509_REQ_add1_attr.3,X509_REQ_get_attr_count.3 |
2135 | X509_REQ_add_extensions.3,X509_REQ_add_extensions_nid.3 | 2068 | X509_REQ_add_extensions.3,X509_REQ_add_extensions_nid.3 |
2136 | X509_REQ_add_extensions.3,X509_REQ_extension_nid.3 | 2069 | X509_REQ_add_extensions.3,X509_REQ_extension_nid.3 |
2137 | X509_REQ_add_extensions.3,X509_REQ_get_extension_nids.3 | ||
2138 | X509_REQ_add_extensions.3,X509_REQ_get_extensions.3 | 2070 | X509_REQ_add_extensions.3,X509_REQ_get_extensions.3 |
2139 | X509_REQ_add_extensions.3,X509_REQ_set_extension_nids.3 | ||
2140 | X509_REQ_new.3,X509_REQ_INFO_free.3 | 2071 | X509_REQ_new.3,X509_REQ_INFO_free.3 |
2141 | X509_REQ_new.3,X509_REQ_INFO_new.3 | 2072 | X509_REQ_new.3,X509_REQ_INFO_new.3 |
2142 | X509_REQ_new.3,X509_REQ_dup.3 | 2073 | X509_REQ_new.3,X509_REQ_dup.3 |
@@ -2226,14 +2157,6 @@ X509_STORE_set1_param.3,X509_STORE_set_purpose.3 | |||
2226 | X509_STORE_set1_param.3,X509_STORE_set_trust.3 | 2157 | X509_STORE_set1_param.3,X509_STORE_set_trust.3 |
2227 | X509_STORE_set_verify_cb_func.3,X509_STORE_get_verify_cb.3 | 2158 | X509_STORE_set_verify_cb_func.3,X509_STORE_get_verify_cb.3 |
2228 | X509_STORE_set_verify_cb_func.3,X509_STORE_set_verify_cb.3 | 2159 | X509_STORE_set_verify_cb_func.3,X509_STORE_set_verify_cb.3 |
2229 | X509_TRUST_set.3,X509_TRUST_add.3 | ||
2230 | X509_TRUST_set.3,X509_TRUST_cleanup.3 | ||
2231 | X509_TRUST_set.3,X509_TRUST_get0.3 | ||
2232 | X509_TRUST_set.3,X509_TRUST_get0_name.3 | ||
2233 | X509_TRUST_set.3,X509_TRUST_get_by_id.3 | ||
2234 | X509_TRUST_set.3,X509_TRUST_get_count.3 | ||
2235 | X509_TRUST_set.3,X509_TRUST_get_flags.3 | ||
2236 | X509_TRUST_set.3,X509_TRUST_get_trust.3 | ||
2237 | X509_VERIFY_PARAM_new.3,X509_VERIFY_PARAM_add0_table.3 | 2160 | X509_VERIFY_PARAM_new.3,X509_VERIFY_PARAM_add0_table.3 |
2238 | X509_VERIFY_PARAM_new.3,X509_VERIFY_PARAM_free.3 | 2161 | X509_VERIFY_PARAM_new.3,X509_VERIFY_PARAM_free.3 |
2239 | X509_VERIFY_PARAM_new.3,X509_VERIFY_PARAM_get0.3 | 2162 | X509_VERIFY_PARAM_new.3,X509_VERIFY_PARAM_get0.3 |
@@ -2269,7 +2192,6 @@ X509_check_host.3,X509_check_email.3 | |||
2269 | X509_check_host.3,X509_check_ip.3 | 2192 | X509_check_host.3,X509_check_ip.3 |
2270 | X509_check_host.3,X509_check_ip_asc.3 | 2193 | X509_check_host.3,X509_check_ip_asc.3 |
2271 | X509_check_private_key.3,X509_REQ_check_private_key.3 | 2194 | X509_check_private_key.3,X509_REQ_check_private_key.3 |
2272 | X509_check_trust.3,X509_TRUST_set_default.3 | ||
2273 | X509_cmp.3,X509_CRL_cmp.3 | 2195 | X509_cmp.3,X509_CRL_cmp.3 |
2274 | X509_cmp.3,X509_CRL_match.3 | 2196 | X509_cmp.3,X509_CRL_match.3 |
2275 | X509_cmp.3,X509_NAME_cmp.3 | 2197 | X509_cmp.3,X509_NAME_cmp.3 |
@@ -2309,6 +2231,7 @@ X509_get0_signature.3,X509_CRL_get_signature_nid.3 | |||
2309 | X509_get0_signature.3,X509_REQ_get0_signature.3 | 2231 | X509_get0_signature.3,X509_REQ_get0_signature.3 |
2310 | X509_get0_signature.3,X509_REQ_get_signature_nid.3 | 2232 | X509_get0_signature.3,X509_REQ_get_signature_nid.3 |
2311 | X509_get0_signature.3,X509_get0_tbs_sigalg.3 | 2233 | X509_get0_signature.3,X509_get0_tbs_sigalg.3 |
2234 | X509_get0_signature.3,X509_get_signature_info.3 | ||
2312 | X509_get0_signature.3,X509_get_signature_nid.3 | 2235 | X509_get0_signature.3,X509_get_signature_nid.3 |
2313 | X509_get0_signature.3,X509_get_signature_type.3 | 2236 | X509_get0_signature.3,X509_get_signature_type.3 |
2314 | X509_get1_email.3,X509_email_free.3 | 2237 | X509_get1_email.3,X509_email_free.3 |
@@ -2361,14 +2284,6 @@ X509_sign.3,X509_REQ_verify.3 | |||
2361 | X509_sign.3,X509_sign_ctx.3 | 2284 | X509_sign.3,X509_sign_ctx.3 |
2362 | X509_sign.3,X509_verify.3 | 2285 | X509_sign.3,X509_verify.3 |
2363 | X509_signature_dump.3,X509_signature_print.3 | 2286 | X509_signature_dump.3,X509_signature_print.3 |
2364 | X509at_add1_attr.3,X509at_add1_attr_by_NID.3 | ||
2365 | X509at_add1_attr.3,X509at_add1_attr_by_OBJ.3 | ||
2366 | X509at_add1_attr.3,X509at_add1_attr_by_txt.3 | ||
2367 | X509at_add1_attr.3,X509at_delete_attr.3 | ||
2368 | X509at_get_attr.3,X509at_get0_data_by_OBJ.3 | ||
2369 | X509at_get_attr.3,X509at_get_attr_by_NID.3 | ||
2370 | X509at_get_attr.3,X509at_get_attr_by_OBJ.3 | ||
2371 | X509at_get_attr.3,X509at_get_attr_count.3 | ||
2372 | X509v3_addr_add_inherit.3,X509v3_addr_add_prefix.3 | 2287 | X509v3_addr_add_inherit.3,X509v3_addr_add_prefix.3 |
2373 | X509v3_addr_add_inherit.3,X509v3_addr_add_range.3 | 2288 | X509v3_addr_add_inherit.3,X509v3_addr_add_range.3 |
2374 | X509v3_addr_add_inherit.3,X509v3_addr_canonize.3 | 2289 | X509v3_addr_add_inherit.3,X509v3_addr_canonize.3 |
@@ -2409,6 +2324,8 @@ X509v3_get_ext_by_NID.3,X509v3_get_ext.3 | |||
2409 | X509v3_get_ext_by_NID.3,X509v3_get_ext_by_OBJ.3 | 2324 | X509v3_get_ext_by_NID.3,X509v3_get_ext_by_OBJ.3 |
2410 | X509v3_get_ext_by_NID.3,X509v3_get_ext_by_critical.3 | 2325 | X509v3_get_ext_by_NID.3,X509v3_get_ext_by_critical.3 |
2411 | X509v3_get_ext_by_NID.3,X509v3_get_ext_count.3 | 2326 | X509v3_get_ext_by_NID.3,X509v3_get_ext_count.3 |
2327 | a2i_ipadd.3,a2i_IPADDRESS.3 | ||
2328 | a2i_ipadd.3,a2i_IPADDRESS_NC.3 | ||
2412 | bn_dump.3,bn_add_words.3 | 2329 | bn_dump.3,bn_add_words.3 |
2413 | bn_dump.3,bn_div_words.3 | 2330 | bn_dump.3,bn_div_words.3 |
2414 | bn_dump.3,bn_expand.3 | 2331 | bn_dump.3,bn_expand.3 |
@@ -2790,6 +2707,7 @@ tls_conn_version.3,tls_conn_cipher_strength.3 | |||
2790 | tls_conn_version.3,tls_conn_servername.3 | 2707 | tls_conn_version.3,tls_conn_servername.3 |
2791 | tls_conn_version.3,tls_conn_session_resumed.3 | 2708 | tls_conn_version.3,tls_conn_session_resumed.3 |
2792 | tls_conn_version.3,tls_peer_cert_chain_pem.3 | 2709 | tls_conn_version.3,tls_peer_cert_chain_pem.3 |
2710 | tls_conn_version.3,tls_peer_cert_common_name.3 | ||
2793 | tls_conn_version.3,tls_peer_cert_contains_name.3 | 2711 | tls_conn_version.3,tls_peer_cert_contains_name.3 |
2794 | tls_conn_version.3,tls_peer_cert_hash.3 | 2712 | tls_conn_version.3,tls_peer_cert_hash.3 |
2795 | tls_conn_version.3,tls_peer_cert_issuer.3 | 2713 | tls_conn_version.3,tls_peer_cert_issuer.3 |
@@ -2841,6 +2759,7 @@ tls_read.3,tls_close.3 | |||
2841 | tls_read.3,tls_error.3 | 2759 | tls_read.3,tls_error.3 |
2842 | tls_read.3,tls_handshake.3 | 2760 | tls_read.3,tls_handshake.3 |
2843 | tls_read.3,tls_write.3 | 2761 | tls_read.3,tls_write.3 |
2762 | v2i_ASN1_BIT_STRING.3,i2v_ASN1_BIT_STRING.3 | ||
2844 | x509_verify.3,x509_verify_ctx_chain.3 | 2763 | x509_verify.3,x509_verify_ctx_chain.3 |
2845 | x509_verify.3,x509_verify_ctx_error_depth.3 | 2764 | x509_verify.3,x509_verify_ctx_error_depth.3 |
2846 | x509_verify.3,x509_verify_ctx_error_string.3 | 2765 | x509_verify.3,x509_verify_ctx_error_string.3 |
diff --git a/patches/aarch64_crypto_arch.h.patch b/patches/aarch64_crypto_arch.h.patch new file mode 100644 index 0000000..e6a8cbf --- /dev/null +++ b/patches/aarch64_crypto_arch.h.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | --- crypto/arch/aarch64/crypto_arch.h.orig Sun Jun 29 03:49:56 2025 | ||
2 | +++ crypto/arch/aarch64/crypto_arch.h Sun Jun 29 04:00:13 2025 | ||
3 | @@ -34,11 +34,13 @@ extern uint64_t crypto_cpu_caps_aarch64; | ||
4 | #define CRYPTO_CPU_CAPS_AARCH64_SHA3 (1ULL << 5) | ||
5 | |||
6 | #ifndef OPENSSL_NO_ASM | ||
7 | +#if 0 | ||
8 | |||
9 | #define HAVE_SHA1_BLOCK_DATA_ORDER | ||
10 | #define HAVE_SHA256_BLOCK_DATA_ORDER | ||
11 | #define HAVE_SHA512_BLOCK_DATA_ORDER | ||
12 | |||
13 | +#endif | ||
14 | #endif | ||
15 | |||
16 | #endif | ||
diff --git a/patches/amd64_crypto_arch.h.patch b/patches/amd64_crypto_arch.h.patch new file mode 100644 index 0000000..bf44458 --- /dev/null +++ b/patches/amd64_crypto_arch.h.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | --- crypto/arch/amd64/crypto_arch.h.orig Sun Aug 17 13:14:19 2025 | ||
2 | +++ crypto/arch/amd64/crypto_arch.h Sun Aug 24 23:47:56 2025 | ||
3 | @@ -48,6 +48,7 @@ extern uint64_t crypto_cpu_caps_amd64; | ||
4 | #define HAVE_RC4_INTERNAL | ||
5 | #define HAVE_RC4_SET_KEY_INTERNAL | ||
6 | |||
7 | +#if 0 | ||
8 | #define HAVE_SHA1_BLOCK_DATA_ORDER | ||
9 | #define HAVE_SHA1_BLOCK_GENERIC | ||
10 | |||
11 | @@ -56,6 +57,7 @@ extern uint64_t crypto_cpu_caps_amd64; | ||
12 | |||
13 | #define HAVE_SHA512_BLOCK_DATA_ORDER | ||
14 | #define HAVE_SHA512_BLOCK_GENERIC | ||
15 | +#endif | ||
16 | |||
17 | #endif | ||
18 | |||
diff --git a/patches/crypto_namespace.h.patch b/patches/crypto_namespace.h.patch deleted file mode 100644 index c18f0da..0000000 --- a/patches/crypto_namespace.h.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | --- crypto/hidden/crypto_namespace.h.orig 2024-04-09 10:12:22.320737957 +0200 | ||
2 | +++ crypto/hidden/crypto_namespace.h 2024-04-11 09:09:31.163350515 +0200 | ||
3 | @@ -24,6 +24,12 @@ | ||
4 | * external calls use the latter name. | ||
5 | */ | ||
6 | |||
7 | +#ifdef _MSC_VER | ||
8 | +# define LCRYPTO_UNUSED(x) | ||
9 | +# define LCRYPTO_USED(x) | ||
10 | +# define LCRYPTO_ALIAS1(pre, x) | ||
11 | +# define LCRYPTO_ALIAS(x) | ||
12 | +#else | ||
13 | #ifdef LIBRESSL_NAMESPACE | ||
14 | #ifdef LIBRESSL_CRYPTO_NAMESPACE | ||
15 | # define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \ | ||
16 | @@ -43,5 +49,6 @@ | ||
17 | # define LCRYPTO_ALIAS1(pre,x) | ||
18 | # define LCRYPTO_ALIAS(x) asm("") | ||
19 | #endif | ||
20 | +#endif /* _MSC_VER */ | ||
21 | |||
22 | #endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */ | ||
diff --git a/patches/mlkem_internal.h.patch b/patches/mlkem_internal.h.patch new file mode 100644 index 0000000..b7cbdcf --- /dev/null +++ b/patches/mlkem_internal.h.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- crypto/mlkem/mlkem_internal.h.orig Sun Aug 17 13:20:18 2025 | ||
2 | +++ crypto/mlkem/mlkem_internal.h Sun Aug 17 13:20:37 2025 | ||
3 | @@ -19,7 +19,7 @@ | ||
4 | #define OPENSSL_HEADER_CRYPTO_MLKEM_INTERNAL_H | ||
5 | |||
6 | #include "bytestring.h" | ||
7 | -#include "mlkem.h" | ||
8 | +#include <openssl/mlkem.h> | ||
9 | |||
10 | #if defined(__cplusplus) | ||
11 | extern "C" { | ||
diff --git a/patches/modes_local.h.patch b/patches/modes_local.h.patch deleted file mode 100644 index 1ff799b..0000000 --- a/patches/modes_local.h.patch +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | --- crypto/modes/modes_local.h.orig Sat Jul 8 14:03:53 2023 | ||
2 | +++ crypto/modes/modes_local.h Sat Jul 8 14:10:56 2023 | ||
3 | @@ -45,6 +45,7 @@ | ||
4 | asm ("bswapl %0" \ | ||
5 | : "+r"(ret)); ret; }) | ||
6 | # elif (defined(__arm__) || defined(__arm)) && !defined(__STRICT_ALIGNMENT) | ||
7 | +# if (__ARM_ARCH >= 6) | ||
8 | # define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ | ||
9 | asm ("rev %0,%0; rev %1,%1" \ | ||
10 | : "+r"(hi),"+r"(lo)); \ | ||
11 | @@ -53,6 +54,7 @@ | ||
12 | asm ("rev %0,%1" \ | ||
13 | : "=r"(ret) : "r"((u32)(x))); \ | ||
14 | ret; }) | ||
15 | +# endif | ||
16 | # endif | ||
17 | #endif | ||
18 | #endif | ||
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 9c3a450..345a170 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | --- apps/nc/netcat.c.orig Tue Aug 15 15:17:28 2023 | 1 | --- apps/nc/netcat.c.orig Fri Jun 27 12:39:21 2025 |
2 | +++ apps/nc/netcat.c Tue Aug 15 15:17:54 2023 | 2 | +++ apps/nc/netcat.c Fri Jun 27 12:39:29 2025 |
3 | @@ -93,9 +93,13 @@ int zflag; /* Port Scan Flag */ | 3 | @@ -93,9 +93,13 @@ int zflag; /* Port Scan Flag */ |
4 | int Dflag; /* sodebug */ | 4 | int Dflag; /* sodebug */ |
5 | int Iflag; /* TCP receive buffer size */ | 5 | int Iflag; /* TCP receive buffer size */ |
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | int usetls; /* use TLS */ | 15 | int usetls; /* use TLS */ |
16 | const char *Cflag; /* Public cert file */ | 16 | const char *Cflag; /* Public cert file */ |
17 | @@ -268,12 +272,14 @@ main(int argc, char *argv[]) | 17 | @@ -271,12 +275,14 @@ main(int argc, char *argv[]) |
18 | case 'u': | 18 | case 'u': |
19 | uflag = 1; | 19 | uflag = 1; |
20 | break; | 20 | break; |
@@ -29,7 +29,7 @@ | |||
29 | case 'v': | 29 | case 'v': |
30 | vflag = 1; | 30 | vflag = 1; |
31 | break; | 31 | break; |
32 | @@ -320,9 +326,11 @@ main(int argc, char *argv[]) | 32 | @@ -323,9 +329,11 @@ main(int argc, char *argv[]) |
33 | case 'o': | 33 | case 'o': |
34 | oflag = optarg; | 34 | oflag = optarg; |
35 | break; | 35 | break; |
@@ -41,7 +41,7 @@ | |||
41 | case 'T': | 41 | case 'T': |
42 | errstr = NULL; | 42 | errstr = NULL; |
43 | errno = 0; | 43 | errno = 0; |
44 | @@ -346,9 +354,11 @@ main(int argc, char *argv[]) | 44 | @@ -349,9 +357,11 @@ main(int argc, char *argv[]) |
45 | argc -= optind; | 45 | argc -= optind; |
46 | argv += optind; | 46 | argv += optind; |
47 | 47 | ||
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | /* Cruft to make sure options are clean, and used properly. */ | 54 | /* Cruft to make sure options are clean, and used properly. */ |
55 | if (argc == 1 && family == AF_UNIX) { | 55 | if (argc == 1 && family == AF_UNIX) { |
56 | @@ -927,7 +937,10 @@ remote_connect(const char *host, const char *port, str | 56 | @@ -928,7 +938,10 @@ remote_connect(const char *host, const char *port, str |
57 | char *ipaddr) | 57 | char *ipaddr) |
58 | { | 58 | { |
59 | struct addrinfo *res, *res0; | 59 | struct addrinfo *res, *res0; |
@@ -65,7 +65,7 @@ | |||
65 | 65 | ||
66 | if ((error = getaddrinfo(host, port, &hints, &res0))) | 66 | if ((error = getaddrinfo(host, port, &hints, &res0))) |
67 | errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, | 67 | errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, |
68 | @@ -942,8 +955,10 @@ remote_connect(const char *host, const char *port, str | 68 | @@ -943,8 +956,10 @@ remote_connect(const char *host, const char *port, str |
69 | if (sflag || pflag) { | 69 | if (sflag || pflag) { |
70 | struct addrinfo ahints, *ares; | 70 | struct addrinfo ahints, *ares; |
71 | 71 | ||
@@ -76,7 +76,7 @@ | |||
76 | memset(&ahints, 0, sizeof(struct addrinfo)); | 76 | memset(&ahints, 0, sizeof(struct addrinfo)); |
77 | ahints.ai_family = res->ai_family; | 77 | ahints.ai_family = res->ai_family; |
78 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; | 78 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; |
79 | @@ -1035,7 +1050,10 @@ int | 79 | @@ -1036,7 +1051,10 @@ int |
80 | local_listen(const char *host, const char *port, struct addrinfo hints) | 80 | local_listen(const char *host, const char *port, struct addrinfo hints) |
81 | { | 81 | { |
82 | struct addrinfo *res, *res0; | 82 | struct addrinfo *res, *res0; |
@@ -88,7 +88,7 @@ | |||
88 | int error; | 88 | int error; |
89 | 89 | ||
90 | /* Allow nodename to be null. */ | 90 | /* Allow nodename to be null. */ |
91 | @@ -1056,9 +1074,11 @@ local_listen(const char *host, const char *port, struc | 91 | @@ -1057,9 +1075,11 @@ local_listen(const char *host, const char *port, struc |
92 | res->ai_protocol)) == -1) | 92 | res->ai_protocol)) == -1) |
93 | continue; | 93 | continue; |
94 | 94 | ||
@@ -100,7 +100,7 @@ | |||
100 | 100 | ||
101 | set_common_sockopts(s, res->ai_family); | 101 | set_common_sockopts(s, res->ai_family); |
102 | 102 | ||
103 | @@ -1563,11 +1583,13 @@ set_common_sockopts(int s, int af) | 103 | @@ -1564,11 +1584,13 @@ set_common_sockopts(int s, int af) |
104 | { | 104 | { |
105 | int x = 1; | 105 | int x = 1; |
106 | 106 | ||
@@ -114,7 +114,7 @@ | |||
114 | if (Dflag) { | 114 | if (Dflag) { |
115 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, | 115 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, |
116 | &x, sizeof(x)) == -1) | 116 | &x, sizeof(x)) == -1) |
117 | @@ -1578,9 +1600,16 @@ set_common_sockopts(int s, int af) | 117 | @@ -1579,9 +1601,16 @@ set_common_sockopts(int s, int af) |
118 | IP_TOS, &Tflag, sizeof(Tflag)) == -1) | 118 | IP_TOS, &Tflag, sizeof(Tflag)) == -1) |
119 | err(1, "set IP ToS"); | 119 | err(1, "set IP ToS"); |
120 | 120 | ||
@@ -131,7 +131,7 @@ | |||
131 | } | 131 | } |
132 | if (Iflag) { | 132 | if (Iflag) { |
133 | if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, | 133 | if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, |
134 | @@ -1604,13 +1633,17 @@ set_common_sockopts(int s, int af) | 134 | @@ -1605,13 +1634,17 @@ set_common_sockopts(int s, int af) |
135 | } | 135 | } |
136 | 136 | ||
137 | if (minttl != -1) { | 137 | if (minttl != -1) { |
@@ -150,7 +150,7 @@ | |||
150 | } | 150 | } |
151 | } | 151 | } |
152 | 152 | ||
153 | @@ -1835,15 +1868,19 @@ help(void) | 153 | @@ -1841,15 +1874,19 @@ help(void) |
154 | \t-P proxyuser\tUsername for proxy authentication\n\ | 154 | \t-P proxyuser\tUsername for proxy authentication\n\ |
155 | \t-p port\t Specify local port for remote connects\n\ | 155 | \t-p port\t Specify local port for remote connects\n\ |
156 | \t-R CAfile CA bundle\n\ | 156 | \t-R CAfile CA bundle\n\ |
@@ -175,4 +175,4 @@ | |||
175 | + "\t-v Verbose\n\ | 175 | + "\t-v Verbose\n\ |
176 | \t-W recvlimit Terminate after receiving a number of packets\n\ | 176 | \t-W recvlimit Terminate after receiving a number of packets\n\ |
177 | \t-w timeout Timeout for connects and final net reads\n\ | 177 | \t-w timeout Timeout for connects and final net reads\n\ |
178 | \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ | 178 | \t-X proto Proxy protocol: \"4\", \"4A\", \"5\" (SOCKS) or \"connect\"\n\ |
diff --git a/patches/openssl.c.patch b/patches/openssl.c.patch index 15afb78..60ea9a7 100644 --- a/patches/openssl.c.patch +++ b/patches/openssl.c.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | --- apps/openssl/openssl.c.orig Mon Mar 4 13:39:56 2024 | 1 | --- apps/openssl/openssl.c.orig Sat May 31 03:18:05 2025 |
2 | +++ apps/openssl/openssl.c Mon Mar 4 13:40:15 2024 | 2 | +++ apps/openssl/openssl.c Sat May 31 03:18:17 2025 |
3 | @@ -348,7 +348,9 @@ | 3 | @@ -341,7 +341,9 @@ BIO *bio_err = NULL; |
4 | static void | 4 | static void |
5 | openssl_startup(void) | 5 | openssl_startup(void) |
6 | { | 6 | { |
diff --git a/patches/opensslfeatures.h.patch b/patches/opensslfeatures.h.patch index 618de73..d370b32 100644 --- a/patches/opensslfeatures.h.patch +++ b/patches/opensslfeatures.h.patch | |||
@@ -14,3 +14,36 @@ | |||
14 | #define OPENSSL_THREADS | 14 | #define OPENSSL_THREADS |
15 | 15 | ||
16 | #define OPENSSL_NO_BUF_FREELISTS | 16 | #define OPENSSL_NO_BUF_FREELISTS |
17 | --- crypto/crypto_internal.h.orig Sat Dec 14 14:15:39 2024 | ||
18 | +++ crypto/crypto_internal.h Sat Dec 14 14:15:52 2024 | ||
19 | @@ -15,6 +15,8 @@ | ||
20 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | +#include <openssl/opensslfeatures.h> | ||
24 | + | ||
25 | #include <endian.h> | ||
26 | #include <stddef.h> | ||
27 | #include <stdint.h> | ||
28 | --- tests/parse_test_file.h.orig Thu Dec 26 01:13:00 2024 | ||
29 | +++ tests/parse_test_file.h Thu Dec 26 01:13:27 2024 | ||
30 | @@ -22,6 +22,8 @@ | ||
31 | #include <stdint.h> | ||
32 | #include <stdio.h> | ||
33 | |||
34 | +#include <openssl/opensslfeatures.h> | ||
35 | + | ||
36 | #include "bytestring.h" | ||
37 | |||
38 | #if defined(__cplusplus) | ||
39 | --- tests/test.h.orig Sat May 31 04:48:09 2025 | ||
40 | +++ tests/test.h Sat May 31 04:48:31 2025 | ||
41 | @@ -18,6 +18,8 @@ | ||
42 | #ifndef HEADER_TEST_H | ||
43 | #define HEADER_TEST_H | ||
44 | |||
45 | +#include <openssl/opensslfeatures.h> | ||
46 | + | ||
47 | #include <stddef.h> | ||
48 | #include <stdint.h> | ||
49 | |||
diff --git a/patches/patch-amd64-crypto-cpu-caps.c.patch b/patches/patch-amd64-crypto-cpu-caps.c.patch new file mode 100644 index 0000000..5fd7524 --- /dev/null +++ b/patches/patch-amd64-crypto-cpu-caps.c.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | --- crypto/arch/amd64/crypto_cpu_caps.c.orig Sat Dec 14 13:45:16 2024 | ||
2 | +++ crypto/arch/amd64/crypto_cpu_caps.c Sat Dec 14 13:54:06 2024 | ||
3 | @@ -37,7 +37,7 @@ cpuid(uint32_t eax, uint32_t *out_eax, uint32_t *out_e | ||
4 | { | ||
5 | uint32_t ebx = 0, ecx = 0, edx = 0; | ||
6 | |||
7 | -#ifndef OPENSSL_NO_ASM | ||
8 | +#if defined(__GNUC__) && !defined(OPENSSL_NO_ASM) | ||
9 | __asm__ ("cpuid": "+a"(eax), "+b"(ebx), "+c"(ecx), "+d"(edx)); | ||
10 | #else | ||
11 | eax = 0; | ||
12 | @@ -58,7 +58,7 @@ xgetbv(uint32_t ecx, uint32_t *out_eax, uint32_t *out_ | ||
13 | { | ||
14 | uint32_t eax = 0, edx = 0; | ||
15 | |||
16 | -#ifndef OPENSSL_NO_ASM | ||
17 | +#if defined(__GNUC__) && !defined(OPENSSL_NO_ASM) | ||
18 | __asm__ ("xgetbv": "+a"(eax), "+c"(ecx), "+d"(edx)); | ||
19 | #endif | ||
20 | |||
diff --git a/patches/patch-i386-crypto-cpu-caps.c.patch b/patches/patch-i386-crypto-cpu-caps.c.patch new file mode 100644 index 0000000..0642582 --- /dev/null +++ b/patches/patch-i386-crypto-cpu-caps.c.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | --- crypto/arch/i386/crypto_cpu_caps.c.orig Mon Jun 16 10:38:27 2025 | ||
2 | +++ crypto/arch/i386/crypto_cpu_caps.c Mon Jun 16 10:38:39 2025 | ||
3 | @@ -37,7 +37,7 @@ cpuid(uint32_t eax, uint32_t *out_eax, uint32_t *out_e | ||
4 | { | ||
5 | uint32_t ebx = 0, ecx = 0, edx = 0; | ||
6 | |||
7 | -#ifndef OPENSSL_NO_ASM | ||
8 | +#if defined(__GNUC__) && !defined(OPENSSL_NO_ASM) | ||
9 | __asm__ ("cpuid": "+a"(eax), "+b"(ebx), "+c"(ecx), "+d"(edx)); | ||
10 | #else | ||
11 | eax = 0; | ||
12 | @@ -58,7 +58,7 @@ xgetbv(uint32_t ecx, uint32_t *out_eax, uint32_t *out_ | ||
13 | { | ||
14 | uint32_t eax = 0, edx = 0; | ||
15 | |||
16 | -#ifndef OPENSSL_NO_ASM | ||
17 | +#if defined(__GNUC__) && !defined(OPENSSL_NO_ASM) | ||
18 | __asm__ ("xgetbv": "+a"(eax), "+c"(ecx), "+d"(edx)); | ||
19 | #endif | ||
20 | |||
diff --git a/patches/speed.c.patch b/patches/speed.c.patch index c29ef4d..32e42b4 100644 --- a/patches/speed.c.patch +++ b/patches/speed.c.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | --- apps/openssl/speed.c.orig Sat Jul 13 11:02:51 2024 | 1 | --- apps/openssl/speed.c.orig Sat May 31 03:18:05 2025 |
2 | +++ apps/openssl/speed.c Sat Jul 13 10:27:25 2024 | 2 | +++ apps/openssl/speed.c Sat May 31 03:18:17 2025 |
3 | @@ -161,7 +161,16 @@ | 3 | @@ -154,7 +154,16 @@ static void |
4 | pkey_print_message(const char *str, const char *str2, | 4 | pkey_print_message(const char *str, const char *str2, |
5 | long num, int bits, int sec); | 5 | long num, int bits, int sec); |
6 | static void print_result(int alg, int run_no, int count, double time_used); | 6 | static void print_result(int alg, int run_no, int count, double time_used); |
@@ -15,9 +15,9 @@ | |||
15 | +#define alarm(seconds) speed_alarm((seconds)) | 15 | +#define alarm(seconds) speed_alarm((seconds)) |
16 | +#endif | 16 | +#endif |
17 | 17 | ||
18 | #define ALGOR_NUM 32 | 18 | #define ALGOR_NUM 31 |
19 | #define SIZE_NUM 5 | 19 | #define SIZE_NUM 5 |
20 | @@ -430,8 +439,10 @@ | 20 | @@ -1087,8 +1096,10 @@ speed_main(int argc, char **argv) |
21 | const EVP_CIPHER *evp_cipher = NULL; | 21 | const EVP_CIPHER *evp_cipher = NULL; |
22 | const EVP_MD *evp_md = NULL; | 22 | const EVP_MD *evp_md = NULL; |
23 | int decrypt = 0; | 23 | int decrypt = 0; |
@@ -28,7 +28,7 @@ | |||
28 | const char *errstr = NULL; | 28 | const char *errstr = NULL; |
29 | 29 | ||
30 | if (pledge("stdio proc", NULL) == -1) { | 30 | if (pledge("stdio proc", NULL) == -1) { |
31 | @@ -506,6 +517,7 @@ | 31 | @@ -1163,6 +1174,7 @@ speed_main(int argc, char **argv) |
32 | decrypt = 1; | 32 | decrypt = 1; |
33 | j--; /* Otherwise, -decrypt gets confused with an | 33 | j--; /* Otherwise, -decrypt gets confused with an |
34 | * algorithm. */ | 34 | * algorithm. */ |
@@ -36,7 +36,7 @@ | |||
36 | } else if (argc > 0 && strcmp(*argv, "-multi") == 0) { | 36 | } else if (argc > 0 && strcmp(*argv, "-multi") == 0) { |
37 | argc--; | 37 | argc--; |
38 | argv++; | 38 | argv++; |
39 | @@ -520,6 +532,7 @@ | 39 | @@ -1177,6 +1189,7 @@ speed_main(int argc, char **argv) |
40 | } | 40 | } |
41 | j--; /* Otherwise, -multi gets confused with an | 41 | j--; /* Otherwise, -multi gets confused with an |
42 | * algorithm. */ | 42 | * algorithm. */ |
@@ -44,7 +44,7 @@ | |||
44 | } else if (argc > 0 && strcmp(*argv, "-unaligned") == 0) { | 44 | } else if (argc > 0 && strcmp(*argv, "-unaligned") == 0) { |
45 | argc--; | 45 | argc--; |
46 | argv++; | 46 | argv++; |
47 | @@ -851,7 +864,9 @@ | 47 | @@ -1491,7 +1504,9 @@ speed_main(int argc, char **argv) |
48 | BIO_printf(bio_err, "-evp e use EVP e.\n"); | 48 | BIO_printf(bio_err, "-evp e use EVP e.\n"); |
49 | BIO_printf(bio_err, "-decrypt time decryption instead of encryption (only EVP).\n"); | 49 | BIO_printf(bio_err, "-decrypt time decryption instead of encryption (only EVP).\n"); |
50 | BIO_printf(bio_err, "-mr produce machine readable output.\n"); | 50 | BIO_printf(bio_err, "-mr produce machine readable output.\n"); |
@@ -54,7 +54,7 @@ | |||
54 | BIO_printf(bio_err, "-unaligned n use buffers with offset n from proper alignment.\n"); | 54 | BIO_printf(bio_err, "-unaligned n use buffers with offset n from proper alignment.\n"); |
55 | goto end; | 55 | goto end; |
56 | } | 56 | } |
57 | @@ -860,8 +875,10 @@ | 57 | @@ -1500,8 +1515,10 @@ speed_main(int argc, char **argv) |
58 | j++; | 58 | j++; |
59 | } | 59 | } |
60 | 60 | ||
@@ -65,7 +65,7 @@ | |||
65 | 65 | ||
66 | if (j == 0) { | 66 | if (j == 0) { |
67 | for (i = 0; i < ALGOR_NUM; i++) { | 67 | for (i = 0; i < ALGOR_NUM; i++) { |
68 | @@ -933,11 +950,13 @@ | 68 | @@ -1573,11 +1590,13 @@ speed_main(int argc, char **argv) |
69 | #define COND(c) (run && count<0x7fffffff) | 69 | #define COND(c) (run && count<0x7fffffff) |
70 | #define COUNT(d) (count) | 70 | #define COUNT(d) (count) |
71 | 71 | ||
@@ -79,7 +79,7 @@ | |||
79 | 79 | ||
80 | #ifndef OPENSSL_NO_MD4 | 80 | #ifndef OPENSSL_NO_MD4 |
81 | if (doit[D_MD4]) { | 81 | if (doit[D_MD4]) { |
82 | @@ -1743,7 +1762,9 @@ | 82 | @@ -2370,7 +2389,9 @@ speed_main(int argc, char **argv) |
83 | ecdh_doit[j] = 0; | 83 | ecdh_doit[j] = 0; |
84 | } | 84 | } |
85 | } | 85 | } |
@@ -89,7 +89,7 @@ | |||
89 | if (!mr) { | 89 | if (!mr) { |
90 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_VERSION)); | 90 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_VERSION)); |
91 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_BUILT_ON)); | 91 | fprintf(stdout, "%s\n", SSLeay_version(SSLEAY_BUILT_ON)); |
92 | @@ -1899,11 +1920,15 @@ | 92 | @@ -2526,11 +2547,15 @@ pkey_print_message(const char *str, const char *str2, |
93 | static void | 93 | static void |
94 | print_result(int alg, int run_no, int count, double time_used) | 94 | print_result(int alg, int run_no, int count, double time_used) |
95 | { | 95 | { |
@@ -105,9 +105,10 @@ | |||
105 | static char * | 105 | static char * |
106 | sstrsep(char **string, const char *delim) | 106 | sstrsep(char **string, const char *delim) |
107 | { | 107 | { |
108 | @@ -2104,4 +2129,5 @@ | 108 | @@ -2731,5 +2756,6 @@ do_multi(int multi) |
109 | free(fds); | 109 | free(fds); |
110 | return 1; | 110 | return 1; |
111 | } | 111 | } |
112 | +#endif | 112 | +#endif |
113 | #endif | 113 | |
114 | #endif /* OPENSSL_NO_SPEED */ | ||
diff --git a/patches/ssl_namespace.h.patch b/patches/ssl_namespace.h.patch deleted file mode 100644 index 758f8dc..0000000 --- a/patches/ssl_namespace.h.patch +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | --- openbsd/src/lib/libssl/hidden/ssl_namespace.h 2023-03-15 11:41:52.481641800 -0600 | ||
2 | +++ ssl/hidden/ssl_namespace.h 2023-03-15 17:28:04.685309300 -0600 | ||
3 | @@ -23,6 +23,11 @@ | ||
4 | * and we alias that to the normal name. | ||
5 | */ | ||
6 | |||
7 | +#ifdef _MSC_VER | ||
8 | +#define LSSL_UNUSED(x) | ||
9 | +#define LSSL_USED(x) | ||
10 | +#define LSSL_ALIAS(x) | ||
11 | +#else | ||
12 | #ifdef LIBRESSL_NAMESPACE | ||
13 | #define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated)) | ||
14 | #define LSSL_USED(x) __attribute__((visibility("hidden"))) \ | ||
15 | @@ -33,5 +38,6 @@ | ||
16 | #define LSSL_USED(x) | ||
17 | #define LSSL_ALIAS(x) asm("") | ||
18 | #endif | ||
19 | +#endif /* _MSC_VER */ | ||
20 | |||
21 | #endif /* _LIBSSL_SSL_NAMESPACE_H_ */ | ||
diff --git a/patches/tls_config.c.patch b/patches/tls_config.c.patch new file mode 100644 index 0000000..1342a60 --- /dev/null +++ b/patches/tls_config.c.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | uid_t can be 64-bit | ||
2 | |||
3 | --- tls/tls_config.c.orig 2024-11-02 21:19:47.090322191 +0100 | ||
4 | +++ tls/tls_config.c 2024-11-02 21:38:22.527071689 +0100 | ||
5 | @@ -742,8 +742,8 @@ | ||
6 | |||
7 | if (sb.st_uid != getuid()) { | ||
8 | tls_config_set_errorx(config, TLS_ERROR_UNKNOWN, | ||
9 | - "session file has incorrect owner (uid %u != %u)", | ||
10 | - sb.st_uid, getuid()); | ||
11 | + "session file has incorrect owner (uid %llu != %llu)", | ||
12 | + (unsigned long long)sb.st_uid, (unsigned long long)getuid()); | ||
13 | return (-1); | ||
14 | } | ||
15 | mugo = sb.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO); | ||
diff --git a/patches/win32_amd64_bn_arch.h.patch b/patches/win32_amd64_bn_arch.h.patch index b7926e3..baa82f8 100644 --- a/patches/win32_amd64_bn_arch.h.patch +++ b/patches/win32_amd64_bn_arch.h.patch | |||
@@ -1,8 +1,8 @@ | |||
1 | We should consider a OPENSSL_NO_BN_ASM if we can't figure | 1 | We should consider a OPENSSL_NO_BN_ASM if we can't figure |
2 | out how to fix BIGNUM on this OS | 2 | out how to fix BIGNUM on this OS |
3 | 3 | ||
4 | --- crypto/bn/arch/amd64/bn_arch.h.orig Wed Mar 27 22:17:03 2024 | 4 | --- crypto/bn/arch/amd64/bn_arch.h.orig Sun Aug 17 13:14:19 2025 |
5 | +++ crypto/bn/arch/amd64/bn_arch.h Wed Mar 27 22:17:31 2024 | 5 | +++ crypto/bn/arch/amd64/bn_arch.h Sun Aug 24 23:47:56 2025 |
6 | @@ -20,8 +20,14 @@ | 6 | @@ -20,8 +20,14 @@ |
7 | #ifndef HEADER_BN_ARCH_H | 7 | #ifndef HEADER_BN_ARCH_H |
8 | #define HEADER_BN_ARCH_H | 8 | #define HEADER_BN_ARCH_H |
@@ -18,7 +18,7 @@ out how to fix BIGNUM on this OS | |||
18 | #define HAVE_BN_ADD | 18 | #define HAVE_BN_ADD |
19 | #define HAVE_BN_ADD_WORDS | 19 | #define HAVE_BN_ADD_WORDS |
20 | 20 | ||
21 | @@ -104,6 +110,7 @@ bn_subw(BN_ULONG a, BN_ULONG b, BN_ULONG *out_borrow, | 21 | @@ -109,6 +115,7 @@ bn_subw(BN_ULONG a, BN_ULONG b, BN_ULONG *out_borrow, |
22 | } | 22 | } |
23 | 23 | ||
24 | #endif /* __GNUC__ */ | 24 | #endif /* __GNUC__ */ |
diff --git a/scripts/test b/scripts/test index e389728..a7ce1ea 100755 --- a/scripts/test +++ b/scripts/test | |||
@@ -2,7 +2,14 @@ | |||
2 | set -e | 2 | set -e |
3 | set -x | 3 | set -x |
4 | 4 | ||
5 | unset CC | 5 | if [ "$ARCH" = "" ]; then |
6 | ARCH=`uname -m` | ||
7 | fi | ||
8 | |||
9 | if [ "$ARCH" = "mingw32" -o "$ARCH" = "mingw64" -o "$ARCH" = "arm32" ]; then | ||
10 | unset CC | ||
11 | fi | ||
12 | |||
6 | ENABLE_ASM="${ENABLE_ASM:=ON}" | 13 | ENABLE_ASM="${ENABLE_ASM:=ON}" |
7 | 14 | ||
8 | if type apt-get >/dev/null 2>&1; then | 15 | if type apt-get >/dev/null 2>&1; then |
@@ -15,10 +22,6 @@ fi | |||
15 | 22 | ||
16 | VERSION=`cat VERSION` | 23 | VERSION=`cat VERSION` |
17 | 24 | ||
18 | if [ "$ARCH" = "" ]; then | ||
19 | ARCH=`uname -m` | ||
20 | fi | ||
21 | |||
22 | # test macOS | 25 | # test macOS |
23 | if [ `uname` = "Darwin" ]; then | 26 | if [ `uname` = "Darwin" ]; then |
24 | # test autotools | 27 | # test autotools |
@@ -129,6 +132,21 @@ elif [ "$ARCH" = "arm32" -o "$ARCH" = "arm64" ]; then | |||
129 | 132 | ||
130 | file apps/openssl/.libs/openssl | 133 | file apps/openssl/.libs/openssl |
131 | 134 | ||
135 | elif [ "$ARCH" = "loong64" ]; then | ||
136 | sudo apt install -y qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu | ||
137 | sudo ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64 | ||
138 | |||
139 | CC=loongarch64-linux-gnu-gcc-14 | ||
140 | CXX=loongarch64-linux-gnu++-14 | ||
141 | AR=loongarch64-linux-gnu-ar | ||
142 | STRIP=loongarch64-linux-gnu-strip-14 | ||
143 | RANLIB=loongarch64-linux-gnu-ranlib | ||
144 | |||
145 | ./configure --host=loongarch64-linux-gnu | ||
146 | LD_LIBRARY_PATH=/usr/loongarch64-linux-gnu/lib make -j 4 check | ||
147 | |||
148 | file apps/openssl/openssl | ||
149 | |||
132 | elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then | 150 | elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then |
133 | sudo apt-get install -y qemu-user-static binfmt-support | 151 | sudo apt-get install -y qemu-user-static binfmt-support |
134 | 152 | ||
@@ -173,7 +191,7 @@ elif [ "$ARCH" = "android" ]; then | |||
173 | 191 | ||
174 | ( | 192 | ( |
175 | build_dir=build-$NAL_$ABI | 193 | build_dir=build-$NAL_$ABI |
176 | rm -fr $build_dir include/openssl/opensslconf.h | 194 | rm -fr $build_dir |
177 | mkdir $build_dir | 195 | mkdir $build_dir |
178 | cd $build_dir | 196 | cd $build_dir |
179 | echo "##### cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja -DANDROID_NDK=$ANDROID_NDK_HOME -DCMAKE_TOOLCHAIN_FILE=$TC_FILE -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL .." | 197 | echo "##### cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja -DANDROID_NDK=$ANDROID_NDK_HOME -DCMAKE_TOOLCHAIN_FILE=$TC_FILE -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL .." |
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index e2eeab5..637e0f0 100644 --- a/ssl/CMakeLists.txt +++ b/ssl/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | set( | 16 | set( |
2 | SSL_SRC | 17 | SSL_SRC |
3 | bio_ssl.c | 18 | bio_ssl.c |
@@ -72,6 +87,13 @@ target_include_directories(ssl_obj | |||
72 | ../include | 87 | ../include |
73 | ${CMAKE_BINARY_DIR}/include) | 88 | ${CMAKE_BINARY_DIR}/include) |
74 | 89 | ||
90 | if(MSVC) | ||
91 | # "C4702" - unreachable code | ||
92 | set_source_files_properties(d1_pkt.c s3_cbc.c PROPERTIES | ||
93 | COMPILE_OPTIONS /wd4702 | ||
94 | ) | ||
95 | endif() | ||
96 | |||
75 | add_library(bs_obj OBJECT ${BS_SRC}) | 97 | add_library(bs_obj OBJECT ${BS_SRC}) |
76 | target_include_directories(bs_obj | 98 | target_include_directories(bs_obj |
77 | PRIVATE | 99 | PRIVATE |
@@ -86,16 +108,16 @@ endif() | |||
86 | 108 | ||
87 | export_symbol(ssl ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym) | 109 | export_symbol(ssl ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym) |
88 | target_link_libraries(ssl crypto ${PLATFORM_LIBS}) | 110 | target_link_libraries(ssl crypto ${PLATFORM_LIBS}) |
89 | if (WIN32) | ||
90 | set(SSL_POSTFIX -${SSL_MAJOR_VERSION} PARENT_SCOPE) | ||
91 | endif() | ||
92 | set_target_properties(ssl PROPERTIES | 111 | set_target_properties(ssl PROPERTIES |
93 | OUTPUT_NAME ssl${SSL_POSTFIX} | 112 | OUTPUT_NAME ssl |
94 | ARCHIVE_OUTPUT_NAME ssl${SSL_POSTFIX} | 113 | ARCHIVE_OUTPUT_NAME ssl |
95 | EXPORT_NAME SSL | 114 | EXPORT_NAME SSL |
96 | VERSION ${SSL_VERSION} | 115 | VERSION ${SSL_VERSION} |
97 | SOVERSION ${SSL_MAJOR_VERSION} | 116 | SOVERSION ${SSL_MAJOR_VERSION} |
98 | ) | 117 | ) |
118 | if(NOT CMAKE_VERSION VERSION_LESS 3.27.0) | ||
119 | set_target_properties(ssl PROPERTIES DLL_NAME_WITH_SOVERSION TRUE) | ||
120 | endif() | ||
99 | 121 | ||
100 | target_include_directories( | 122 | target_include_directories( |
101 | ssl | 123 | ssl |
@@ -104,6 +126,30 @@ target_include_directories( | |||
104 | $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | 126 | $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> |
105 | ) | 127 | ) |
106 | 128 | ||
129 | if(HOST_AARCH64) | ||
130 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/aarch64/) | ||
131 | elseif(HOST_ARM) | ||
132 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/arm/) | ||
133 | elseif(HOST_I386) | ||
134 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/i386/) | ||
135 | elseif(HOST_LOONGARCH64) | ||
136 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/loongarch64) | ||
137 | elseif(HOST_MIPS64) | ||
138 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips64) | ||
139 | elseif(HOST_MIPS) | ||
140 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips) | ||
141 | elseif(HOST_POWERPC) | ||
142 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/powerpc) | ||
143 | elseif(HOST_POWERPC64) | ||
144 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/powerpc64) | ||
145 | elseif(HOST_RISCV64) | ||
146 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/riscv64) | ||
147 | elseif(HOST_SPARC64) | ||
148 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/sparc64) | ||
149 | elseif(HOST_X86_64) | ||
150 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/amd64) | ||
151 | endif() | ||
152 | |||
107 | install( | 153 | install( |
108 | TARGETS ssl | 154 | TARGETS ssl |
109 | EXPORT SSL-target | 155 | EXPORT SSL-target |
@@ -135,4 +181,3 @@ if(BUILD_SHARED_LIBS) | |||
135 | add_library(ssl-static STATIC $<TARGET_OBJECTS:ssl_obj>) | 181 | add_library(ssl-static STATIC $<TARGET_OBJECTS:ssl_obj>) |
136 | target_link_libraries(ssl-static crypto-static ${PLATFORM_LIBS}) | 182 | target_link_libraries(ssl-static crypto-static ${PLATFORM_LIBS}) |
137 | endif() | 183 | endif() |
138 | |||
diff --git a/ssl/Makefile.am b/ssl/Makefile.am index a7a7d72..3096749 100644 --- a/ssl/Makefile.am +++ b/ssl/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | 18 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk |
@@ -26,7 +41,7 @@ EXTRA_libssl_la_DEPENDENCIES = libssl_la_objects.mk | |||
26 | 41 | ||
27 | libssl_la_objects.mk: Makefile | 42 | libssl_la_objects.mk: Makefile |
28 | @echo "libssl_la_objects= $(libssl_la_OBJECTS)" \ | 43 | @echo "libssl_la_objects= $(libssl_la_OBJECTS)" \ |
29 | | sed 's/ */ $$\(abs_top_builddir\)\/ssl\//g' \ | 44 | | sed 's/ */ $$\(top_builddir\)\/ssl\//g' \ |
30 | > libssl_la_objects.mk | 45 | > libssl_la_objects.mk |
31 | 46 | ||
32 | .PHONY: remove_bs_objects | 47 | .PHONY: remove_bs_objects |
@@ -114,3 +129,59 @@ noinst_HEADERS += tls12_internal.h | |||
114 | noinst_HEADERS += tls13_internal.h | 129 | noinst_HEADERS += tls13_internal.h |
115 | noinst_HEADERS += tls13_handshake.h | 130 | noinst_HEADERS += tls13_handshake.h |
116 | noinst_HEADERS += tls13_record.h | 131 | noinst_HEADERS += tls13_record.h |
132 | |||
133 | # arch | ||
134 | if HOST_AARCH64 | ||
135 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/aarch64/ | ||
136 | endif | ||
137 | noinst_HEADERS += $(top_srcdir)/crypto/arch/aarch64/crypto_arch.h | ||
138 | |||
139 | if HOST_ARM | ||
140 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/arm/ | ||
141 | endif | ||
142 | noinst_HEADERS += $(top_srcdir)/crypto/arch/arm/crypto_arch.h | ||
143 | |||
144 | if HOST_I386 | ||
145 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/i386/ | ||
146 | endif | ||
147 | noinst_HEADERS += $(top_srcdir)/crypto/arch/i386/crypto_arch.h | ||
148 | |||
149 | if HOST_LOONGARCH64 | ||
150 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/ | ||
151 | endif | ||
152 | noinst_HEADERS += $(top_srcdir)/crypto/arch/loongarch64/crypto_arch.h | ||
153 | |||
154 | if HOST_MIPS | ||
155 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/ | ||
156 | endif | ||
157 | noinst_HEADERS += $(top_srcdir)/crypto/arch/mips/crypto_arch.h | ||
158 | |||
159 | if HOST_MIPS64 | ||
160 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/ | ||
161 | endif | ||
162 | noinst_HEADERS += $(top_srcdir)/crypto/arch/mips64/crypto_arch.h | ||
163 | |||
164 | if HOST_POWERPC | ||
165 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc/ | ||
166 | endif | ||
167 | noinst_HEADERS += $(top_srcdir)/crypto/arch/powerpc/crypto_arch.h | ||
168 | |||
169 | if HOST_POWERPC64 | ||
170 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc64/ | ||
171 | endif | ||
172 | noinst_HEADERS += $(top_srcdir)/crypto/arch/powerpc64/crypto_arch.h | ||
173 | |||
174 | if HOST_RISCV64 | ||
175 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/riscv64/ | ||
176 | endif | ||
177 | noinst_HEADERS += $(top_srcdir)/crypto/arch/riscv64/crypto_arch.h | ||
178 | |||
179 | if HOST_SPARC64 | ||
180 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/sparc64/ | ||
181 | endif | ||
182 | noinst_HEADERS += $(top_srcdir)/crypto/arch/sparc64/crypto_arch.h | ||
183 | |||
184 | if HOST_X86_64 | ||
185 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/amd64/ | ||
186 | endif | ||
187 | noinst_HEADERS += $(top_srcdir)/crypto/arch/amd64/crypto_arch.h | ||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 480d893..55529cd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2015 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | add_definitions(-DLIBRESSL_CRYPTO_INTERNAL) | 16 | add_definitions(-DLIBRESSL_CRYPTO_INTERNAL) |
2 | 17 | ||
3 | include_directories( | 18 | include_directories( |
@@ -6,9 +21,13 @@ include_directories( | |||
6 | ../crypto/asn1 | 21 | ../crypto/asn1 |
7 | ../crypto/bio | 22 | ../crypto/bio |
8 | ../crypto/bn | 23 | ../crypto/bn |
24 | ../crypto/bytestring | ||
9 | ../crypto/curve25519 | 25 | ../crypto/curve25519 |
26 | ../crypto/ec | ||
10 | ../crypto/evp | 27 | ../crypto/evp |
28 | ../crypto/mlkem | ||
11 | ../crypto/modes | 29 | ../crypto/modes |
30 | ../crypto/sha | ||
12 | ../crypto/x509 | 31 | ../crypto/x509 |
13 | ../ssl | 32 | ../ssl |
14 | ../apps/openssl | 33 | ../apps/openssl |
@@ -18,6 +37,30 @@ include_directories( | |||
18 | ../include/compat | 37 | ../include/compat |
19 | ) | 38 | ) |
20 | 39 | ||
40 | if(HOST_AARCH64) | ||
41 | include_directories(../crypto/arch/aarch64/) | ||
42 | elseif(HOST_ARM) | ||
43 | include_directories(../crypto/arch/arm/) | ||
44 | elseif(HOST_I386) | ||
45 | include_directories(../crypto/arch/i386/) | ||
46 | elseif(HOST_LOONGARCH64) | ||
47 | include_directories(../crypto/arch/loongarch64) | ||
48 | elseif(HOST_MIPS64) | ||
49 | include_directories(../crypto/arch/mips64) | ||
50 | elseif(HOST_MIPS) | ||
51 | include_directories(../crypto/arch/mips) | ||
52 | elseif(HOST_POWERPC) | ||
53 | include_directories(../crypto/arch/powerpc) | ||
54 | elseif(HOST_POWERPC64) | ||
55 | include_directories(../crypto/arch/powerpc64) | ||
56 | elseif(HOST_RISCV64) | ||
57 | include_directories(../crypto/arch/riscv64) | ||
58 | elseif(HOST_SPARC64) | ||
59 | include_directories(../crypto/arch/sparc64) | ||
60 | elseif(HOST_X86_64) | ||
61 | include_directories(../crypto/arch/amd64) | ||
62 | endif() | ||
63 | |||
21 | add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") | 64 | add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../cert.pem\") |
22 | 65 | ||
23 | file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) | 66 | file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) |
@@ -37,6 +80,9 @@ function(add_platform_test TEST_NAME) | |||
37 | endif() | 80 | endif() |
38 | endfunction() | 81 | endfunction() |
39 | 82 | ||
83 | # XXX - should probably be in their own static lib | ||
84 | set(TEST_HELPER_SRC test.c test_util.c) | ||
85 | |||
40 | # aeadtest | 86 | # aeadtest |
41 | add_executable(aeadtest aeadtest.c) | 87 | add_executable(aeadtest aeadtest.c) |
42 | target_link_libraries(aeadtest ${OPENSSL_TEST_LIBS}) | 88 | target_link_libraries(aeadtest ${OPENSSL_TEST_LIBS}) |
@@ -303,9 +349,9 @@ target_link_libraries(cipherstest ${OPENSSL_TEST_LIBS}) | |||
303 | add_platform_test(cipherstest cipherstest) | 349 | add_platform_test(cipherstest cipherstest) |
304 | 350 | ||
305 | ## clienttest | 351 | ## clienttest |
306 | #add_executable(clienttest clienttest.c) | 352 | add_executable(clienttest clienttest.c) |
307 | #target_link_libraries(clienttest ${OPENSSL_TEST_LIBS}) | 353 | target_link_libraries(clienttest ${OPENSSL_TEST_LIBS}) |
308 | #add_platform_test(clienttest clienttest) | 354 | add_platform_test(clienttest clienttest) |
309 | 355 | ||
310 | # cmstest | 356 | # cmstest |
311 | add_executable(cmstest cmstest.c) | 357 | add_executable(cmstest cmstest.c) |
@@ -368,6 +414,7 @@ add_platform_test(ecc_cdh ecc_cdh) | |||
368 | # ec_asn1_test | 414 | # ec_asn1_test |
369 | add_executable(ec_asn1_test ec_asn1_test.c) | 415 | add_executable(ec_asn1_test ec_asn1_test.c) |
370 | target_link_libraries(ec_asn1_test ${OPENSSL_TEST_LIBS}) | 416 | target_link_libraries(ec_asn1_test ${OPENSSL_TEST_LIBS}) |
417 | prepare_emscripten_test_target(ec_asn1_test) | ||
371 | add_platform_test(ec_asn1_test ec_asn1_test) | 418 | add_platform_test(ec_asn1_test ec_asn1_test) |
372 | 419 | ||
373 | # ec_point_conversion | 420 | # ec_point_conversion |
@@ -396,16 +443,16 @@ add_executable(ed25519test ed25519test.c) | |||
396 | target_link_libraries(ed25519test ${OPENSSL_TEST_LIBS}) | 443 | target_link_libraries(ed25519test ${OPENSSL_TEST_LIBS}) |
397 | add_platform_test(ed25519test ed25519test) | 444 | add_platform_test(ed25519test ed25519test) |
398 | 445 | ||
446 | # err_test | ||
447 | add_executable(err_test err_test.c) | ||
448 | target_link_libraries(err_test ${OPENSSL_TEST_LIBS}) | ||
449 | add_platform_test(err_test err_test) | ||
450 | |||
399 | # evp_ecx_test | 451 | # evp_ecx_test |
400 | add_executable(evp_ecx_test evp_ecx_test.c) | 452 | add_executable(evp_ecx_test evp_ecx_test.c) |
401 | target_link_libraries(evp_ecx_test ${OPENSSL_TEST_LIBS}) | 453 | target_link_libraries(evp_ecx_test ${OPENSSL_TEST_LIBS}) |
402 | add_platform_test(evp_ecx_test evp_ecx_test) | 454 | add_platform_test(evp_ecx_test evp_ecx_test) |
403 | 455 | ||
404 | # evp_pkey_check | ||
405 | add_executable(evp_pkey_check evp_pkey_check.c) | ||
406 | target_link_libraries(evp_pkey_check ${OPENSSL_TEST_LIBS}) | ||
407 | add_platform_test(evp_pkey_check evp_pkey_check) | ||
408 | |||
409 | # evp_pkey_cleanup | 456 | # evp_pkey_cleanup |
410 | add_executable(evp_pkey_cleanup evp_pkey_cleanup.c) | 457 | add_executable(evp_pkey_cleanup evp_pkey_cleanup.c) |
411 | target_link_libraries(evp_pkey_cleanup ${OPENSSL_TEST_LIBS}) | 458 | target_link_libraries(evp_pkey_cleanup ${OPENSSL_TEST_LIBS}) |
@@ -420,6 +467,7 @@ add_platform_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt) | |||
420 | # evp_test | 467 | # evp_test |
421 | add_executable(evp_test evp_test.c) | 468 | add_executable(evp_test evp_test.c) |
422 | target_link_libraries(evp_test ${OPENSSL_TEST_LIBS}) | 469 | target_link_libraries(evp_test ${OPENSSL_TEST_LIBS}) |
470 | prepare_emscripten_test_target(evp_test) | ||
423 | add_platform_test(evp_test evp_test) | 471 | add_platform_test(evp_test evp_test) |
424 | 472 | ||
425 | # exdata_test | 473 | # exdata_test |
@@ -507,9 +555,36 @@ prepare_emscripten_test_target(lhash_test) | |||
507 | add_platform_test(lhash_test lhash_test) | 555 | add_platform_test(lhash_test lhash_test) |
508 | 556 | ||
509 | # md_test | 557 | # md_test |
510 | add_executable(md_test md_test.c) | 558 | # XXX - ftruncate and mkstemp missing from Windows |
511 | target_link_libraries(md_test ${OPENSSL_TEST_LIBS}) | 559 | if(NOT WIN32) |
512 | add_platform_test(md_test md_test) | 560 | add_executable(md_test md_test.c ${TEST_HELPER_SRC}) |
561 | target_link_libraries(md_test ${OPENSSL_TEST_LIBS}) | ||
562 | add_platform_test(md_test md_test) | ||
563 | endif() | ||
564 | |||
565 | # mlkem_tests | ||
566 | add_executable(mlkem_tests mlkem_tests.c parse_test_file.c) | ||
567 | target_link_libraries(mlkem_tests ${OPENSSL_TEST_LIBS}) | ||
568 | prepare_emscripten_test_target(mlkem_tests) | ||
569 | if(NOT MSVC) | ||
570 | add_test(NAME mlkem_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mlkem_tests.sh) | ||
571 | set_tests_properties(mlkem_tests PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
572 | else() | ||
573 | add_test(NAME mlkem_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mlkem_tests.bat $<TARGET_FILE:mlkem_tests>) | ||
574 | endif() | ||
575 | set_tests_properties(mlkem_tests PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
576 | |||
577 | # mlkem_iteration_tests | ||
578 | add_executable(mlkem_iteration_tests mlkem_iteration_tests.c mlkem_tests_util.c) | ||
579 | target_link_libraries(mlkem_iteration_tests ${OPENSSL_TEST_LIBS}) | ||
580 | prepare_emscripten_test_target(mlkem_iteration_tests) | ||
581 | add_platform_test(mlkem_iteration_tests mlkem_iteration_tests) | ||
582 | |||
583 | # mlkem_unittest | ||
584 | add_executable(mlkem_unittest mlkem_unittest.c mlkem_tests_util.c) | ||
585 | target_link_libraries(mlkem_unittest ${OPENSSL_TEST_LIBS}) | ||
586 | prepare_emscripten_test_target(mlkem_unittest) | ||
587 | add_platform_test(mlkem_unittest mlkem_unittest) | ||
513 | 588 | ||
514 | # objectstest | 589 | # objectstest |
515 | add_executable(objectstest objectstest.c) | 590 | add_executable(objectstest objectstest.c) |
@@ -520,7 +595,7 @@ add_platform_test(objectstest objectstest) | |||
520 | if(ENABLE_EXTRATESTS) | 595 | if(ENABLE_EXTRATESTS) |
521 | add_executable(ocsp_test ocsp_test.c) | 596 | add_executable(ocsp_test ocsp_test.c) |
522 | target_link_libraries(ocsp_test ${OPENSSL_TEST_LIBS}) | 597 | target_link_libraries(ocsp_test ${OPENSSL_TEST_LIBS}) |
523 | if(NOT MSVC) | 598 | if(NOT WIN32) |
524 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh) | 599 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh) |
525 | else() | 600 | else() |
526 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.bat $<TARGET_FILE:ocsp_test>) | 601 | add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.bat $<TARGET_FILE:ocsp_test>) |
@@ -569,20 +644,14 @@ add_platform_test(policy policy) | |||
569 | # pq_test | 644 | # pq_test |
570 | add_executable(pq_test pq_test.c) | 645 | add_executable(pq_test pq_test.c) |
571 | target_link_libraries(pq_test ${OPENSSL_TEST_LIBS}) | 646 | target_link_libraries(pq_test ${OPENSSL_TEST_LIBS}) |
572 | if(NOT MSVC) | 647 | add_platform_test(pq_test pq_test) |
573 | add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh) | ||
574 | else() | ||
575 | add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.bat | ||
576 | $<TARGET_FILE:pq_test>) | ||
577 | endif() | ||
578 | set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
579 | 648 | ||
580 | # quictest | 649 | # quictest |
581 | set(QUICTEST_SRC quictest.c) | 650 | set(QUICTEST_SRC quictest.c) |
582 | add_executable(quictest ${QUICTEST_SRC}) | 651 | add_executable(quictest ${QUICTEST_SRC}) |
583 | target_link_libraries(quictest ${OPENSSL_TEST_LIBS}) | 652 | target_link_libraries(quictest ${OPENSSL_TEST_LIBS}) |
584 | prepare_emscripten_test_target(quictest) | 653 | prepare_emscripten_test_target(quictest) |
585 | if(NOT MSVC) | 654 | if(NOT WIN32) |
586 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.sh) | 655 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.sh) |
587 | else() | 656 | else() |
588 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.bat $<TARGET_FILE:quictest>) | 657 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.bat $<TARGET_FILE:quictest>) |
@@ -614,6 +683,18 @@ add_executable(record_layer_test record_layer_test.c) | |||
614 | target_link_libraries(record_layer_test ${OPENSSL_TEST_LIBS}) | 683 | target_link_libraries(record_layer_test ${OPENSSL_TEST_LIBS}) |
615 | add_platform_test(record_layer_test record_layer_test) | 684 | add_platform_test(record_layer_test record_layer_test) |
616 | 685 | ||
686 | # renegotiation_test | ||
687 | set(RENEGOTIATION_TEST_SRC renegotiation_test.c) | ||
688 | add_executable(renegotiation_test ${RENEGOTIATION_TEST_SRC}) | ||
689 | target_link_libraries(renegotiation_test ${OPENSSL_TEST_LIBS}) | ||
690 | prepare_emscripten_test_target(renegotiation_test) | ||
691 | if(NOT MSVC) | ||
692 | add_test(NAME renegotiation_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/renegotiation_test.sh) | ||
693 | else() | ||
694 | add_test(NAME renegotiation_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/renegotiation_test.bat $<TARGET_FILE:renegotiation_test>) | ||
695 | endif() | ||
696 | set_tests_properties(renegotiation_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
697 | |||
617 | # rfc3779 | 698 | # rfc3779 |
618 | add_executable(rfc3779 rfc3779.c) | 699 | add_executable(rfc3779 rfc3779.c) |
619 | target_link_libraries(rfc3779 ${OPENSSL_TEST_LIBS}) | 700 | target_link_libraries(rfc3779 ${OPENSSL_TEST_LIBS}) |
@@ -632,6 +713,11 @@ add_executable(rmd_test rmd_test.c) | |||
632 | target_link_libraries(rmd_test ${OPENSSL_TEST_LIBS}) | 713 | target_link_libraries(rmd_test ${OPENSSL_TEST_LIBS}) |
633 | add_platform_test(rmd_test rmd_test) | 714 | add_platform_test(rmd_test rmd_test) |
634 | 715 | ||
716 | # rsa_method_test | ||
717 | add_executable(rsa_method_test rsa_method_test.c) | ||
718 | target_link_libraries(rsa_method_test ${OPENSSL_TEST_LIBS}) | ||
719 | add_platform_test(rsa_method_test rsa_method_test) | ||
720 | |||
635 | # rsa_padding_test | 721 | # rsa_padding_test |
636 | add_executable(rsa_padding_test rsa_padding_test.c) | 722 | add_executable(rsa_padding_test rsa_padding_test.c) |
637 | target_link_libraries(rsa_padding_test ${OPENSSL_TEST_LIBS}) | 723 | target_link_libraries(rsa_padding_test ${OPENSSL_TEST_LIBS}) |
@@ -648,7 +734,7 @@ add_platform_test(rsa_test rsa_test) | |||
648 | add_executable(servertest servertest.c) | 734 | add_executable(servertest servertest.c) |
649 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) | 735 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) |
650 | prepare_emscripten_test_target(servertest) | 736 | prepare_emscripten_test_target(servertest) |
651 | if(NOT MSVC) | 737 | if(NOT WIN32) |
652 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh) | 738 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh) |
653 | else() | 739 | else() |
654 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.bat $<TARGET_FILE:servertest>) | 740 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.bat $<TARGET_FILE:servertest>) |
@@ -656,16 +742,19 @@ endif() | |||
656 | set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | 742 | set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") |
657 | 743 | ||
658 | # sha_test | 744 | # sha_test |
659 | add_executable(sha_test sha_test.c) | 745 | # XXX - ftruncate and mkstemp missing from Windows |
660 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) | 746 | if(NOT WIN32) |
661 | add_platform_test(sha_test sha_test) | 747 | add_executable(sha_test sha_test.c ${TEST_HELPER_SRC}) |
748 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) | ||
749 | add_platform_test(sha_test sha_test) | ||
750 | endif() | ||
662 | 751 | ||
663 | # shutdowntest | 752 | # shutdowntest |
664 | set(SHUTDOWNTEST_SRC shutdowntest.c) | 753 | set(SHUTDOWNTEST_SRC shutdowntest.c) |
665 | add_executable(shutdowntest ${SHUTDOWNTEST_SRC}) | 754 | add_executable(shutdowntest ${SHUTDOWNTEST_SRC}) |
666 | target_link_libraries(shutdowntest ${OPENSSL_TEST_LIBS}) | 755 | target_link_libraries(shutdowntest ${OPENSSL_TEST_LIBS}) |
667 | prepare_emscripten_test_target(shutdowntest) | 756 | prepare_emscripten_test_target(shutdowntest) |
668 | if(NOT MSVC) | 757 | if(NOT WIN32) |
669 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.sh) | 758 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.sh) |
670 | else() | 759 | else() |
671 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.bat $<TARGET_FILE:shutdowntest>) | 760 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.bat $<TARGET_FILE:shutdowntest>) |
@@ -676,7 +765,7 @@ set_tests_properties(shutdowntest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_D | |||
676 | # Emscripten does not support socketpair syscall. | 765 | # Emscripten does not support socketpair syscall. |
677 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) | 766 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) |
678 | set(SIGNERTEST_SRC signertest.c) | 767 | set(SIGNERTEST_SRC signertest.c) |
679 | check_function_exists(pipe2 HAVE_PIPE2) | 768 | check_symbol_exists(pipe2 "fcntl.h;unistd.h" HAVE_PIPE2) |
680 | if(HAVE_PIPE2) | 769 | if(HAVE_PIPE2) |
681 | add_definitions(-DHAVE_PIPE2) | 770 | add_definitions(-DHAVE_PIPE2) |
682 | else() | 771 | else() |
@@ -737,7 +826,7 @@ add_platform_test(ssl_versions ssl_versions) | |||
737 | add_executable(ssltest ssltest.c) | 826 | add_executable(ssltest ssltest.c) |
738 | target_link_libraries(ssltest ${OPENSSL_TEST_LIBS}) | 827 | target_link_libraries(ssltest ${OPENSSL_TEST_LIBS}) |
739 | prepare_emscripten_test_target(ssltest) | 828 | prepare_emscripten_test_target(ssltest) |
740 | if(NOT MSVC) | 829 | if(NOT WIN32) |
741 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh) | 830 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh) |
742 | else() | 831 | else() |
743 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.bat $<TARGET_FILE:ssltest> $<TARGET_FILE:openssl>) | 832 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.bat $<TARGET_FILE:ssltest> $<TARGET_FILE:openssl>) |
@@ -748,7 +837,7 @@ set_tests_properties(ssltest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | |||
748 | # access various files for IO. Adding such files to --preload-file is infeasible. | 837 | # access various files for IO. Adding such files to --preload-file is infeasible. |
749 | if(NOT EMSCRIPTEN) | 838 | if(NOT EMSCRIPTEN) |
750 | # testdsa | 839 | # testdsa |
751 | if(NOT MSVC) | 840 | if(NOT WIN32) |
752 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.sh) | 841 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.sh) |
753 | else() | 842 | else() |
754 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.bat $<TARGET_FILE:openssl>) | 843 | add_test(NAME testdsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.bat $<TARGET_FILE:openssl>) |
@@ -756,7 +845,7 @@ if(NOT EMSCRIPTEN) | |||
756 | set_tests_properties(testdsa PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | 845 | set_tests_properties(testdsa PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") |
757 | 846 | ||
758 | # testenc | 847 | # testenc |
759 | if(NOT MSVC) | 848 | if(NOT WIN32) |
760 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.sh) | 849 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.sh) |
761 | else() | 850 | else() |
762 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.bat $<TARGET_FILE:openssl>) | 851 | add_test(NAME testenc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testenc.bat $<TARGET_FILE:openssl>) |
@@ -764,7 +853,7 @@ if(NOT EMSCRIPTEN) | |||
764 | set_tests_properties(testenc PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | 853 | set_tests_properties(testenc PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") |
765 | 854 | ||
766 | # testrsa | 855 | # testrsa |
767 | if(NOT MSVC) | 856 | if(NOT WIN32) |
768 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.sh) | 857 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.sh) |
769 | else() | 858 | else() |
770 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.bat $<TARGET_FILE:openssl>) | 859 | add_test(NAME testrsa COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.bat $<TARGET_FILE:openssl>) |
@@ -792,7 +881,7 @@ add_platform_test(tlslegacytest tlslegacytest) | |||
792 | # Emscripten does not support socketpair syscall. | 881 | # Emscripten does not support socketpair syscall. |
793 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) | 882 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) |
794 | set(TLSTEST_SRC tlstest.c) | 883 | set(TLSTEST_SRC tlstest.c) |
795 | check_function_exists(pipe2 HAVE_PIPE2) | 884 | check_symbol_exists(pipe2 "fcntl.h;unistd.h" HAVE_PIPE2) |
796 | if(HAVE_PIPE2) | 885 | if(HAVE_PIPE2) |
797 | add_definitions(-DHAVE_PIPE2) | 886 | add_definitions(-DHAVE_PIPE2) |
798 | else() | 887 | else() |
@@ -801,7 +890,7 @@ if(NOT (CMAKE_SYSTEM_NAME MATCHES "WindowsStore" OR EMSCRIPTEN)) | |||
801 | 890 | ||
802 | add_executable(tlstest ${TLSTEST_SRC}) | 891 | add_executable(tlstest ${TLSTEST_SRC}) |
803 | target_link_libraries(tlstest ${LIBTLS_TEST_LIBS}) | 892 | target_link_libraries(tlstest ${LIBTLS_TEST_LIBS}) |
804 | if(NOT MSVC) | 893 | if(NOT WIN32) |
805 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh) | 894 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh) |
806 | else() | 895 | else() |
807 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>) | 896 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>) |
@@ -834,11 +923,6 @@ add_executable(verifytest verifytest.c) | |||
834 | target_link_libraries(verifytest ${LIBTLS_TEST_LIBS}) | 923 | target_link_libraries(verifytest ${LIBTLS_TEST_LIBS}) |
835 | add_platform_test(verifytest verifytest) | 924 | add_platform_test(verifytest verifytest) |
836 | 925 | ||
837 | # whirlpool_test | ||
838 | add_executable(whirlpool_test whirlpool_test.c) | ||
839 | target_link_libraries(whirlpool_test ${OPENSSL_TEST_LIBS}) | ||
840 | add_platform_test(whirlpool_test whirlpool_test) | ||
841 | |||
842 | # x25519test | 926 | # x25519test |
843 | add_executable(x25519test x25519test.c) | 927 | add_executable(x25519test x25519test.c) |
844 | target_link_libraries(x25519test ${OPENSSL_TEST_LIBS}) | 928 | target_link_libraries(x25519test ${OPENSSL_TEST_LIBS}) |
@@ -870,10 +954,10 @@ add_executable(x509_info x509_info.c) | |||
870 | target_link_libraries(x509_info ${OPENSSL_TEST_LIBS}) | 954 | target_link_libraries(x509_info ${OPENSSL_TEST_LIBS}) |
871 | add_platform_test(x509_info x509_info) | 955 | add_platform_test(x509_info x509_info) |
872 | 956 | ||
873 | # x509name | 957 | # x509_name_test |
874 | add_executable(x509name x509name.c) | 958 | add_executable(x509_name_test x509_name_test.c) |
875 | target_link_libraries(x509name ${OPENSSL_TEST_LIBS}) | 959 | target_link_libraries(x509_name_test ${OPENSSL_TEST_LIBS}) |
876 | add_platform_test(x509name x509name) | 960 | add_platform_test(x509_name_test x509_name_test) |
877 | 961 | ||
878 | # x509req_ext | 962 | # x509req_ext |
879 | add_executable(x509req_ext x509req_ext.c) | 963 | add_executable(x509req_ext x509req_ext.c) |
diff --git a/tests/Makefile.am b/tests/Makefile.am index 76ed83a..066e020 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2015 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | 18 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk |
@@ -10,15 +25,65 @@ AM_CPPFLAGS += -I $(top_srcdir)/crypto/ | |||
10 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/asn1 | 25 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/asn1 |
11 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bio | 26 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bio |
12 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bn | 27 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bn |
28 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/bytestring | ||
13 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/curve25519 | 29 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/curve25519 |
30 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/ec | ||
14 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/evp | 31 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/evp |
32 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/mlkem | ||
15 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/modes | 33 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/modes |
34 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/sha | ||
16 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/x509 | 35 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/x509 |
17 | AM_CPPFLAGS += -I $(top_srcdir)/ssl | 36 | AM_CPPFLAGS += -I $(top_srcdir)/ssl |
37 | AM_CPPFLAGS += -I $(top_srcdir)/tests | ||
18 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl | 38 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl |
19 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl/compat | 39 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl/compat |
20 | AM_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"$(top_srcdir)/cert.pem\" | 40 | AM_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"$(top_srcdir)/cert.pem\" |
21 | 41 | ||
42 | # arch | ||
43 | if HOST_AARCH64 | ||
44 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/aarch64/ | ||
45 | endif | ||
46 | |||
47 | if HOST_ARM | ||
48 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/arm/ | ||
49 | endif | ||
50 | |||
51 | if HOST_I386 | ||
52 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/i386/ | ||
53 | endif | ||
54 | |||
55 | if HOST_LOONGARCH64 | ||
56 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/ | ||
57 | endif | ||
58 | |||
59 | if HOST_MIPS | ||
60 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/ | ||
61 | endif | ||
62 | |||
63 | if HOST_MIPS64 | ||
64 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/ | ||
65 | endif | ||
66 | |||
67 | if HOST_POWERPC | ||
68 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc/ | ||
69 | endif | ||
70 | |||
71 | if HOST_POWERPC64 | ||
72 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/powerpc64/ | ||
73 | endif | ||
74 | |||
75 | if HOST_RISCV64 | ||
76 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/riscv64/ | ||
77 | endif | ||
78 | |||
79 | if HOST_SPARC64 | ||
80 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/sparc64/ | ||
81 | endif | ||
82 | |||
83 | if HOST_X86_64 | ||
84 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/amd64/ | ||
85 | endif | ||
86 | |||
22 | noinst_LTLIBRARIES = libtest.la | 87 | noinst_LTLIBRARIES = libtest.la |
23 | libtest_la_LIBADD = $(libcrypto_la_objects) | 88 | libtest_la_LIBADD = $(libcrypto_la_objects) |
24 | libtest_la_LIBADD += $(libcompat_la_objects) | 89 | libtest_la_LIBADD += $(libcompat_la_objects) |
@@ -37,6 +102,11 @@ check_PROGRAMS = | |||
37 | EXTRA_DIST = CMakeLists.txt | 102 | EXTRA_DIST = CMakeLists.txt |
38 | DISTCLEANFILES = pidwraptest.txt | 103 | DISTCLEANFILES = pidwraptest.txt |
39 | 104 | ||
105 | # XXX - should probably be in their own static lib | ||
106 | TEST_HELPER_SRC = test.c test_util.c | ||
107 | noinst_HEADERS = test.h | ||
108 | EXTRA_DIST += $(TEST_HELPER_SRC) | ||
109 | |||
40 | # aeadtest | 110 | # aeadtest |
41 | TESTS += aeadtest.sh | 111 | TESTS += aeadtest.sh |
42 | check_PROGRAMS += aeadtest | 112 | check_PROGRAMS += aeadtest |
@@ -289,7 +359,7 @@ chachatest_SOURCES = chachatest.c | |||
289 | TESTS += cipher_list | 359 | TESTS += cipher_list |
290 | check_PROGRAMS += cipher_list | 360 | check_PROGRAMS += cipher_list |
291 | cipher_list_SOURCES = cipher_list.c | 361 | cipher_list_SOURCES = cipher_list.c |
292 | noinst_HEADERS = tests.h | 362 | noinst_HEADERS += tests.h |
293 | 363 | ||
294 | # cipherstest | 364 | # cipherstest |
295 | TESTS += cipherstest | 365 | TESTS += cipherstest |
@@ -297,9 +367,9 @@ check_PROGRAMS += cipherstest | |||
297 | cipherstest_SOURCES = cipherstest.c | 367 | cipherstest_SOURCES = cipherstest.c |
298 | 368 | ||
299 | ## clienttest | 369 | ## clienttest |
300 | #TESTS += clienttest | 370 | TESTS += clienttest |
301 | #check_PROGRAMS += clienttest | 371 | check_PROGRAMS += clienttest |
302 | #clienttest_SOURCES = clienttest.c | 372 | clienttest_SOURCES = clienttest.c |
303 | 373 | ||
304 | # cmstest | 374 | # cmstest |
305 | TESTS += cmstest | 375 | TESTS += cmstest |
@@ -389,16 +459,16 @@ TESTS += ed25519test | |||
389 | check_PROGRAMS += ed25519test | 459 | check_PROGRAMS += ed25519test |
390 | ed25519test_SOURCES = ed25519test.c | 460 | ed25519test_SOURCES = ed25519test.c |
391 | 461 | ||
462 | # err_test | ||
463 | TESTS += err_test | ||
464 | check_PROGRAMS += err_test | ||
465 | err_test_SOURCES = err_test.c | ||
466 | |||
392 | # evp_ecx_test | 467 | # evp_ecx_test |
393 | TESTS += evp_ecx_test | 468 | TESTS += evp_ecx_test |
394 | check_PROGRAMS += evp_ecx_test | 469 | check_PROGRAMS += evp_ecx_test |
395 | evp_ecx_test_SOURCES = evp_ecx_test.c | 470 | evp_ecx_test_SOURCES = evp_ecx_test.c |
396 | 471 | ||
397 | # evp_pkey_check | ||
398 | TESTS += evp_pkey_check | ||
399 | check_PROGRAMS += evp_pkey_check | ||
400 | evp_pkey_check_SOURCES = evp_pkey_check.c | ||
401 | |||
402 | # evp_pkey_cleanup | 472 | # evp_pkey_cleanup |
403 | TESTS += evp_pkey_cleanup | 473 | TESTS += evp_pkey_cleanup |
404 | check_PROGRAMS += evp_pkey_cleanup | 474 | check_PROGRAMS += evp_pkey_cleanup |
@@ -499,7 +569,36 @@ lhash_test_SOURCES = lhash_test.c | |||
499 | # md_test | 569 | # md_test |
500 | TESTS += md_test | 570 | TESTS += md_test |
501 | check_PROGRAMS += md_test | 571 | check_PROGRAMS += md_test |
502 | md_test_SOURCES = md_test.c | 572 | md_test_SOURCES = md_test.c $(TEST_HELPER_SRC) |
573 | |||
574 | noinst_HEADERS += mlkem_tests_util.h | ||
575 | noinst_HEADERS += parse_test_file.h | ||
576 | |||
577 | # mlkem_tests | ||
578 | TESTS += mlkem_tests.sh | ||
579 | check_PROGRAMS += mlkem_tests | ||
580 | mlkem_tests_SOURCES = mlkem_tests.c parse_test_file.c | ||
581 | EXTRA_DIST += mlkem_tests.sh mlkem_tests.bat | ||
582 | EXTRA_DIST += mlkem768_decap_tests.txt | ||
583 | EXTRA_DIST += mlkem768_encap_tests.txt | ||
584 | EXTRA_DIST += mlkem768_keygen_tests.txt | ||
585 | EXTRA_DIST += mlkem768_nist_decap_tests.txt | ||
586 | EXTRA_DIST += mlkem768_nist_keygen_tests.txt | ||
587 | EXTRA_DIST += mlkem1024_decap_tests.txt | ||
588 | EXTRA_DIST += mlkem1024_encap_tests.txt | ||
589 | EXTRA_DIST += mlkem1024_keygen_tests.txt | ||
590 | EXTRA_DIST += mlkem1024_nist_decap_tests.txt | ||
591 | EXTRA_DIST += mlkem1024_nist_keygen_tests.txt | ||
592 | |||
593 | # mlkem_iteration_tests | ||
594 | TESTS += mlkem_iteration_tests | ||
595 | check_PROGRAMS += mlkem_iteration_tests | ||
596 | mlkem_iteration_tests_SOURCES = mlkem_iteration_tests.c mlkem_tests_util.c | ||
597 | |||
598 | # mlkem_unittest | ||
599 | TESTS += mlkem_unittest | ||
600 | check_PROGRAMS += mlkem_unittest | ||
601 | mlkem_unittest_SOURCES = mlkem_unittest.c mlkem_tests_util.c | ||
503 | 602 | ||
504 | # objectstest | 603 | # objectstest |
505 | TESTS += objectstest | 604 | TESTS += objectstest |
@@ -578,11 +677,9 @@ EXTRA_DIST += policy_root2.pem | |||
578 | EXTRA_DIST += policy_root_cross_inhibit_mapping.pem | 677 | EXTRA_DIST += policy_root_cross_inhibit_mapping.pem |
579 | 678 | ||
580 | # pq_test | 679 | # pq_test |
581 | TESTS += pq_test.sh | 680 | TESTS += pq_test |
582 | check_PROGRAMS += pq_test | 681 | check_PROGRAMS += pq_test |
583 | pq_test_SOURCES = pq_test.c | 682 | pq_test_SOURCES = pq_test.c |
584 | EXTRA_DIST += pq_test.sh pq_test.bat | ||
585 | EXTRA_DIST += pq_expected.txt | ||
586 | 683 | ||
587 | # quictest | 684 | # quictest |
588 | TESTS += quictest.sh | 685 | TESTS += quictest.sh |
@@ -615,6 +712,12 @@ TESTS += record_layer_test | |||
615 | check_PROGRAMS += record_layer_test | 712 | check_PROGRAMS += record_layer_test |
616 | record_layer_test_SOURCES = record_layer_test.c | 713 | record_layer_test_SOURCES = record_layer_test.c |
617 | 714 | ||
715 | # renegotiation_test | ||
716 | TESTS += renegotiation_test.sh | ||
717 | check_PROGRAMS += renegotiation_test | ||
718 | renegotiation_test_SOURCES = renegotiation_test.c | ||
719 | EXTRA_DIST += renegotiation_test.sh renegotiation_test.bat | ||
720 | |||
618 | # rfc3779 | 721 | # rfc3779 |
619 | TESTS += rfc3779 | 722 | TESTS += rfc3779 |
620 | rfc3779_CPPFLAGS = $(AM_CPPFLAGS) | 723 | rfc3779_CPPFLAGS = $(AM_CPPFLAGS) |
@@ -637,6 +740,11 @@ TESTS += rmd_test | |||
637 | check_PROGRAMS += rmd_test | 740 | check_PROGRAMS += rmd_test |
638 | rmd_test_SOURCES = rmd_test.c | 741 | rmd_test_SOURCES = rmd_test.c |
639 | 742 | ||
743 | # rsa_method_test | ||
744 | TESTS += rsa_method_test | ||
745 | check_PROGRAMS += rsa_method_test | ||
746 | rsa_method_test_SOURCES = rsa_method_test.c | ||
747 | |||
640 | # rsa_padding_test | 748 | # rsa_padding_test |
641 | TESTS += rsa_padding_test | 749 | TESTS += rsa_padding_test |
642 | check_PROGRAMS += rsa_padding_test | 750 | check_PROGRAMS += rsa_padding_test |
@@ -658,7 +766,7 @@ EXTRA_DIST += servertest.sh servertest.bat | |||
658 | # sha_test | 766 | # sha_test |
659 | TESTS += sha_test | 767 | TESTS += sha_test |
660 | check_PROGRAMS += sha_test | 768 | check_PROGRAMS += sha_test |
661 | sha_test_SOURCES = sha_test.c | 769 | sha_test_SOURCES = sha_test.c $(TEST_HELPER_SRC) |
662 | 770 | ||
663 | # shutdowntest | 771 | # shutdowntest |
664 | TESTS += shutdowntest.sh | 772 | TESTS += shutdowntest.sh |
@@ -795,11 +903,6 @@ TESTS += verifytest | |||
795 | check_PROGRAMS += verifytest | 903 | check_PROGRAMS += verifytest |
796 | verifytest_SOURCES = verifytest.c | 904 | verifytest_SOURCES = verifytest.c |
797 | 905 | ||
798 | # whirlpool | ||
799 | TESTS += whirlpool_test | ||
800 | check_PROGRAMS += whirlpool_test | ||
801 | whirlpool_test_SOURCES = whirlpool_test.c | ||
802 | |||
803 | # x25519test | 906 | # x25519test |
804 | TESTS += x25519test | 907 | TESTS += x25519test |
805 | check_PROGRAMS += x25519test | 908 | check_PROGRAMS += x25519test |
@@ -830,10 +933,10 @@ TESTS += x509_info | |||
830 | check_PROGRAMS += x509_info | 933 | check_PROGRAMS += x509_info |
831 | x509_info_SOURCES = x509_info.c | 934 | x509_info_SOURCES = x509_info.c |
832 | 935 | ||
833 | # x509name | 936 | # x509_name_test |
834 | TESTS += x509name | 937 | TESTS += x509_name_test |
835 | check_PROGRAMS += x509name | 938 | check_PROGRAMS += x509_name_test |
836 | x509name_SOURCES = x509name.c | 939 | x509_name_test_SOURCES = x509_name_test.c |
837 | 940 | ||
838 | # x509req_ext | 941 | # x509req_ext |
839 | TESTS += x509req_ext | 942 | TESTS += x509req_ext |
diff --git a/tests/aeadtest.sh b/tests/aeadtest.sh index 212e354..bb09df2 100755 --- a/tests/aeadtest.sh +++ b/tests/aeadtest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | TEST=./aeadtest | 18 | TEST=./aeadtest |
4 | if [ -e ./aeadtest.exe ]; then | 19 | if [ -e ./aeadtest.exe ]; then |
diff --git a/tests/arc4randomforktest.sh b/tests/arc4randomforktest.sh index fe03068..bbe7641 100755 --- a/tests/arc4randomforktest.sh +++ b/tests/arc4randomforktest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | ./arc4randomforktest | 18 | ./arc4randomforktest |
4 | ./arc4randomforktest -b | 19 | ./arc4randomforktest -b |
diff --git a/tests/cmake/CMakeLists.txt b/tests/cmake/CMakeLists.txt index 956fbfd..c3b7c4f 100644 --- a/tests/cmake/CMakeLists.txt +++ b/tests/cmake/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2023 Pierre Wendling | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | cmake_minimum_required(VERSION 3.5) | 16 | cmake_minimum_required(VERSION 3.5) |
2 | 17 | ||
3 | project(LibreSSL_Consumer LANGUAGES C) | 18 | project(LibreSSL_Consumer LANGUAGES C) |
diff --git a/tests/dtlstest.sh b/tests/dtlstest.sh index 8f9b229..f0b7161 100755 --- a/tests/dtlstest.sh +++ b/tests/dtlstest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2021 Kinichiro Inoguchi | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | dtlstest_bin=./dtlstest | 19 | dtlstest_bin=./dtlstest |
diff --git a/tests/evptest.sh b/tests/evptest.sh index ba44d75..ddd7445 100755 --- a/tests/evptest.sh +++ b/tests/evptest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | TEST=./evptest | 18 | TEST=./evptest |
4 | if [ -e ./evptest.exe ]; then | 19 | if [ -e ./evptest.exe ]; then |
diff --git a/tests/keypairtest.sh b/tests/keypairtest.sh index 8bb7d9f..f2c20c4 100755 --- a/tests/keypairtest.sh +++ b/tests/keypairtest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2018 Kinichiro Inoguchi | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | TEST=./keypairtest | 18 | TEST=./keypairtest |
4 | if [ -e ./keypairtest.exe ]; then | 19 | if [ -e ./keypairtest.exe ]; then |
diff --git a/tests/mlkem_tests.bat b/tests/mlkem_tests.bat new file mode 100644 index 0000000..618c9e0 --- /dev/null +++ b/tests/mlkem_tests.bat | |||
@@ -0,0 +1,63 @@ | |||
1 | @echo off | ||
2 | setlocal enabledelayedexpansion | ||
3 | |||
4 | :: Copyright (c) 2025 Theo Beuhler | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | |||
18 | set mlkem_tests_bin=%1 | ||
19 | set mlkem_tests_bin=%mlkem_tests_bin:/=\% | ||
20 | if not exist %mlkem_tests_bin% exit /b 1 | ||
21 | |||
22 | %mlkem_tests_bin% mlkem768_decap_tests %srcdir%\mlkem768_decap_tests.txt | ||
23 | if !errorlevel! neq 0 ( | ||
24 | exit /b 1 | ||
25 | ) | ||
26 | %mlkem_tests_bin% mlkem768_encap_tests %srcdir%\mlkem768_encap_tests.txt | ||
27 | if !errorlevel! neq 0 ( | ||
28 | exit /b 1 | ||
29 | ) | ||
30 | %mlkem_tests_bin% mlkem768_keygen_tests %srcdir%\mlkem768_keygen_tests.txt | ||
31 | if !errorlevel! neq 0 ( | ||
32 | exit /b 1 | ||
33 | ) | ||
34 | %mlkem_tests_bin% mlkem768_nist_decap_tests %srcdir%\mlkem768_nist_decap_tests.txt | ||
35 | if !errorlevel! neq 0 ( | ||
36 | exit /b 1 | ||
37 | ) | ||
38 | %mlkem_tests_bin% mlkem768_nist_keygen_tests %srcdir%\mlkem768_nist_keygen_tests.txt | ||
39 | if !errorlevel! neq 0 ( | ||
40 | exit /b 1 | ||
41 | ) | ||
42 | %mlkem_tests_bin% mlkem1024_decap_tests %srcdir%\mlkem1024_decap_tests.txt | ||
43 | if !errorlevel! neq 0 ( | ||
44 | exit /b 1 | ||
45 | ) | ||
46 | %mlkem_tests_bin% mlkem1024_encap_tests %srcdir%\mlkem1024_encap_tests.txt | ||
47 | if !errorlevel! neq 0 ( | ||
48 | exit /b 1 | ||
49 | ) | ||
50 | %mlkem_tests_bin% mlkem1024_keygen_tests %srcdir%\mlkem1024_keygen_tests.txt | ||
51 | if !errorlevel! neq 0 ( | ||
52 | exit /b 1 | ||
53 | ) | ||
54 | %mlkem_tests_bin% mlkem1024_nist_decap_tests %srcdir%\mlkem1024_nist_decap_tests.txt | ||
55 | if !errorlevel! neq 0 ( | ||
56 | exit /b 1 | ||
57 | ) | ||
58 | %mlkem_tests_bin% mlkem1024_nist_keygen_tests %srcdir%\mlkem1024_nist_keygen_tests.txt | ||
59 | if !errorlevel! neq 0 ( | ||
60 | exit /b 1 | ||
61 | ) | ||
62 | |||
63 | endlocal | ||
diff --git a/tests/mlkem_tests.sh b/tests/mlkem_tests.sh new file mode 100755 index 0000000..cbc0f0b --- /dev/null +++ b/tests/mlkem_tests.sh | |||
@@ -0,0 +1,39 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Copyright (c) 2024 Theo Buehler | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
17 | set -e | ||
18 | |||
19 | TEST=./mlkem_tests | ||
20 | if [ -e ./mlkem_tests.exe ]; then | ||
21 | TEST=./mlkem_tests.exe | ||
22 | elif [ -e ./mlkem_tests.js ]; then | ||
23 | TEST="node ./mlkem_tests.js" | ||
24 | fi | ||
25 | |||
26 | if [ -z $srcdir ]; then | ||
27 | srcdir=. | ||
28 | fi | ||
29 | |||
30 | $TEST mlkem768_decap_tests $srcdir/mlkem768_decap_tests.txt | ||
31 | $TEST mlkem768_encap_tests $srcdir/mlkem768_encap_tests.txt | ||
32 | $TEST mlkem768_keygen_tests $srcdir/mlkem768_keygen_tests.txt | ||
33 | $TEST mlkem768_nist_decap_tests $srcdir/mlkem768_nist_decap_tests.txt | ||
34 | $TEST mlkem768_nist_keygen_tests $srcdir/mlkem768_nist_keygen_tests.txt | ||
35 | $TEST mlkem1024_decap_tests $srcdir/mlkem1024_decap_tests.txt | ||
36 | $TEST mlkem1024_encap_tests $srcdir/mlkem1024_encap_tests.txt | ||
37 | $TEST mlkem1024_keygen_tests $srcdir/mlkem1024_keygen_tests.txt | ||
38 | $TEST mlkem1024_nist_decap_tests $srcdir/mlkem1024_nist_decap_tests.txt | ||
39 | $TEST mlkem1024_nist_keygen_tests $srcdir/mlkem1024_nist_keygen_tests.txt | ||
diff --git a/tests/ocsptest.bat b/tests/ocsptest.bat index 2b6b66b..8d44ee0 100644 --- a/tests/ocsptest.bat +++ b/tests/ocsptest.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM ocspocsp_test_bin.bat | 3 | |
4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set ocsp_test_bin=%1 | 18 | set ocsp_test_bin=%1 |
6 | set ocsp_test_bin=%ocsp_test_bin:/=\% | 19 | set ocsp_test_bin=%ocsp_test_bin:/=\% |
diff --git a/tests/ocsptest.sh b/tests/ocsptest.sh index a1c266d..71c975e 100755 --- a/tests/ocsptest.sh +++ b/tests/ocsptest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2016 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | TEST=./ocsp_test | 18 | TEST=./ocsp_test |
4 | if [ -e ./ocsp_test.exe ]; then | 19 | if [ -e ./ocsp_test.exe ]; then |
diff --git a/tests/pidwraptest.sh b/tests/pidwraptest.sh index 04fb5c4..d5a2f71 100755 --- a/tests/pidwraptest.sh +++ b/tests/pidwraptest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | ./pidwraptest > pidwraptest.txt | 17 | ./pidwraptest > pidwraptest.txt |
3 | while read a b; | 18 | while read a b; |
4 | do | 19 | do |
diff --git a/tests/pq_test.bat b/tests/pq_test.bat deleted file mode 100644 index 084f06d..0000000 --- a/tests/pq_test.bat +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | @echo off | ||
2 | setlocal enabledelayedexpansion | ||
3 | REM pq_test.bat | ||
4 | |||
5 | set pq_test_bin=%1 | ||
6 | set pq_test_bin=%pq_test_bin:/=\% | ||
7 | if not exist %pq_test_bin% exit /b 1 | ||
8 | |||
9 | set pq_output=pq_output.txt | ||
10 | if exist %pq_output% del %pq_output% | ||
11 | |||
12 | %pq_test_bin% > %pq_output% | ||
13 | fc /b %pq_output% %srcdir%\pq_expected.txt | ||
14 | |||
15 | endlocal | ||
diff --git a/tests/pq_test.sh b/tests/pq_test.sh deleted file mode 100755 index eab6f3c..0000000 --- a/tests/pq_test.sh +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | set -e | ||
3 | TEST=./pq_test | ||
4 | if [ -e ./pq_test.exe ]; then | ||
5 | TEST=./pq_test.exe | ||
6 | elif [ -e ./pq_test.js ]; then | ||
7 | TEST="node ./pq_test.js" | ||
8 | fi | ||
9 | $TEST | diff -b $srcdir/pq_expected.txt - | ||
diff --git a/tests/quictest.bat b/tests/quictest.bat index 645fc2f..be731c8 100644 --- a/tests/quictest.bat +++ b/tests/quictest.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM quictest.bat | 3 | |
4 | :: Copyright (c) 2022 Brent Cook | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set quictest_bin=%1 | 18 | set quictest_bin=%1 |
6 | set quictest_bin=%quictest_bin:/=\% | 19 | set quictest_bin=%quictest_bin:/=\% |
diff --git a/tests/quictest.sh b/tests/quictest.sh index 23561ad..407a66b 100755 --- a/tests/quictest.sh +++ b/tests/quictest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2022 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | quictest_bin=./quictest | 19 | quictest_bin=./quictest |
diff --git a/tests/renegotiation_test.bat b/tests/renegotiation_test.bat new file mode 100644 index 0000000..6691a39 --- /dev/null +++ b/tests/renegotiation_test.bat | |||
@@ -0,0 +1,27 @@ | |||
1 | @echo off | ||
2 | setlocal enabledelayedexpansion | ||
3 | |||
4 | :: Copyright (c) 2025 Theo Beuhler | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | |||
18 | set renegotiation_test_bin=%1 | ||
19 | set renegotiation_test_bin=%renegotiation_test_bin:/=\% | ||
20 | if not exist %renegotiation_test_bin% exit /b 1 | ||
21 | |||
22 | %renegotiation_test_bin% %srcdir%\server1-rsa.pem %srcdir%\server1-rsa-chain.pem %srcdir%\ca-root-rsa.pem | ||
23 | if !errorlevel! neq 0 ( | ||
24 | exit /b 1 | ||
25 | ) | ||
26 | |||
27 | endlocal | ||
diff --git a/tests/renegotiation_test.sh b/tests/renegotiation_test.sh new file mode 100755 index 0000000..8d963a2 --- /dev/null +++ b/tests/renegotiation_test.sh | |||
@@ -0,0 +1,30 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Copyright (c) 2025 Theo Buehler | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
17 | set -e | ||
18 | |||
19 | renegotiation_test_bin=./renegotiation_test | ||
20 | if [ -e ./renegotiation_test.exe ]; then | ||
21 | renegotiation_test_bin=./renegotiation_test.exe | ||
22 | elif [ -e ./renegotiation_test.js ]; then | ||
23 | renegotiation_test_bin="node ./renegotiation_test.js" | ||
24 | fi | ||
25 | |||
26 | if [ -z $srcdir ]; then | ||
27 | srcdir=. | ||
28 | fi | ||
29 | |||
30 | $renegotiation_test_bin $srcdir/server1-rsa.pem $srcdir/server1-rsa-chain.pem $srcdir/ca-root-rsa.pem | ||
diff --git a/tests/servertest.bat b/tests/servertest.bat index c0bfaa4..d72d8de 100644 --- a/tests/servertest.bat +++ b/tests/servertest.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM servertest.bat | 3 | |
4 | :: Copyright (c) 2017 Kinichiro Inoguchi | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set servertest_bin=%1 | 18 | set servertest_bin=%1 |
6 | set servertest_bin=%servertest_bin:/=\% | 19 | set servertest_bin=%servertest_bin:/=\% |
diff --git a/tests/servertest.sh b/tests/servertest.sh index 1662332..4770e4b 100755 --- a/tests/servertest.sh +++ b/tests/servertest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2017 Kinichiro Inoguchi | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | servertest_bin=./servertest | 19 | servertest_bin=./servertest |
diff --git a/tests/shutdowntest.bat b/tests/shutdowntest.bat index f087dbb..d722fa0 100644 --- a/tests/shutdowntest.bat +++ b/tests/shutdowntest.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM shutdowntest.bat | 3 | |
4 | :: Copyright (c) 2024 Theo Beuhler | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set shutdowntest_bin=%1 | 18 | set shutdowntest_bin=%1 |
6 | set shutdowntest_bin=%shutdowntest_bin:/=\% | 19 | set shutdowntest_bin=%shutdowntest_bin:/=\% |
diff --git a/tests/shutdowntest.sh b/tests/shutdowntest.sh index d3ae472..b3c98da 100755 --- a/tests/shutdowntest.sh +++ b/tests/shutdowntest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2024 Theo Buehler | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | shutdowntest_bin=./shutdowntest | 19 | shutdowntest_bin=./shutdowntest |
diff --git a/tests/ssltest.bat b/tests/ssltest.bat index 5dda6bc..17f912f 100644 --- a/tests/ssltest.bat +++ b/tests/ssltest.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM ssltest.bat | 3 | |
4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set ssltest_bin=%1 | 18 | set ssltest_bin=%1 |
6 | set ssltest_bin=%ssltest_bin:/=\% | 19 | set ssltest_bin=%ssltest_bin:/=\% |
diff --git a/tests/ssltest.sh b/tests/ssltest.sh index 29ea0b0..4ec4884 100755 --- a/tests/ssltest.sh +++ b/tests/ssltest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | ssltest_bin=./ssltest | 19 | ssltest_bin=./ssltest |
diff --git a/tests/testdsa.bat b/tests/testdsa.bat index 898ded8..df53305 100644 --- a/tests/testdsa.bat +++ b/tests/testdsa.bat | |||
@@ -1,9 +1,21 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM testdsa.bat | ||
4 | 3 | ||
5 | 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | |
6 | REM # Test DSA certificate generation of openssl | 5 | :: |
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | |||
18 | :: Test DSA certificate generation of openssl | ||
7 | 19 | ||
8 | set openssl_bin=%1 | 20 | set openssl_bin=%1 |
9 | set openssl_bin=%openssl_bin:/=\% | 21 | set openssl_bin=%openssl_bin:/=\% |
diff --git a/tests/testdsa.sh b/tests/testdsa.sh index 7ecb8ef..230a1f8 100755 --- a/tests/testdsa.sh +++ b/tests/testdsa.sh | |||
@@ -1,6 +1,18 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: testdsa.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # |
3 | 3 | # Copyright (c) 2015 Brent Cook | |
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 16 | ||
5 | #Test DSA certificate generation of openssl | 17 | #Test DSA certificate generation of openssl |
6 | 18 | ||
diff --git a/tests/testenc.bat b/tests/testenc.bat index 84f48f2..fa14620 100644 --- a/tests/testenc.bat +++ b/tests/testenc.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM testenc.bat | 3 | |
4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set test=P | 18 | set test=P |
6 | 19 | ||
diff --git a/tests/testenc.sh b/tests/testenc.sh index 63bce34..418e48d 100755 --- a/tests/testenc.sh +++ b/tests/testenc.sh | |||
@@ -1,5 +1,18 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: testenc.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # |
3 | # Copyright (c) 2015 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
3 | 16 | ||
4 | test=p | 17 | test=p |
5 | if [ -d ../apps/openssl ]; then | 18 | if [ -d ../apps/openssl ]; then |
diff --git a/tests/testrsa.bat b/tests/testrsa.bat index 59c3b5d..af59aad 100644 --- a/tests/testrsa.bat +++ b/tests/testrsa.bat | |||
@@ -1,9 +1,21 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM testrsa.bat | ||
4 | 3 | ||
5 | 4 | :: Copyright (c) 2016 Kinichiro Inoguchi | |
6 | REM # Test RSA certificate generation of openssl | 5 | :: |
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | |||
18 | :: Test RSA certificate generation of openssl | ||
7 | 19 | ||
8 | set openssl_bin=%1 | 20 | set openssl_bin=%1 |
9 | set openssl_bin=%openssl_bin:/=\% | 21 | set openssl_bin=%openssl_bin:/=\% |
diff --git a/tests/testrsa.sh b/tests/testrsa.sh index e644999..afbc610 100755 --- a/tests/testrsa.sh +++ b/tests/testrsa.sh | |||
@@ -1,6 +1,18 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # $OpenBSD: testrsa.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $ | 2 | # |
3 | 3 | # Copyright (c) 2015 Brent Cook | |
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 16 | ||
5 | #Test RSA certificate generation of openssl | 17 | #Test RSA certificate generation of openssl |
6 | 18 | ||
diff --git a/tests/testssl.bat b/tests/testssl.bat index c4e6286..35a789a 100644 --- a/tests/testssl.bat +++ b/tests/testssl.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo on | 1 | @echo on |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM testssl.bat | 3 | |
4 | :: Copyright (c) 2016 Kinichiro Inoguchi | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set key=%1 | 18 | set key=%1 |
6 | set cert=%2 | 19 | set cert=%2 |
diff --git a/tests/tlstest.bat b/tests/tlstest.bat index 5f5f6a6..204201b 100644 --- a/tests/tlstest.bat +++ b/tests/tlstest.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM tlstest.bat | 3 | |
4 | :: Copyright (c) 2017 Brent Cook | ||
5 | :: | ||
6 | :: Permission to use, copy, modify, and distribute this software for any | ||
7 | :: purpose with or without fee is hereby granted, provided that the above | ||
8 | :: copyright notice and this permission notice appear in all copies. | ||
9 | :: | ||
10 | :: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | :: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | :: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | :: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | :: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | :: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | :: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
4 | 17 | ||
5 | set tlstest_bin=%1 | 18 | set tlstest_bin=%1 |
6 | set tlstest_bin=%tlstest_bin:/=\% | 19 | set tlstest_bin=%tlstest_bin:/=\% |
diff --git a/tests/tlstest.sh b/tests/tlstest.sh index 4024007..4a5aff6 100755 --- a/tests/tlstest.sh +++ b/tests/tlstest.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2015 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | tlstest_bin=./tlstest | 19 | tlstest_bin=./tlstest |
diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index 919b1fa..6475245 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | set( | 16 | set( |
2 | TLS_SRC | 17 | TLS_SRC |
3 | tls.c | 18 | tls.c |
@@ -58,16 +73,16 @@ endif() | |||
58 | 73 | ||
59 | export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym) | 74 | export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym) |
60 | target_link_libraries(tls ${OPENSSL_LIBS}) | 75 | target_link_libraries(tls ${OPENSSL_LIBS}) |
61 | if (WIN32) | ||
62 | set(TLS_POSTFIX -${TLS_MAJOR_VERSION} PARENT_SCOPE) | ||
63 | endif() | ||
64 | set_target_properties(tls PROPERTIES | 76 | set_target_properties(tls PROPERTIES |
65 | OUTPUT_NAME tls${TLS_POSTFIX} | 77 | OUTPUT_NAME tls |
66 | ARCHIVE_OUTPUT_NAME tls${TLS_POSTFIX} | 78 | ARCHIVE_OUTPUT_NAME tls |
67 | EXPORT_NAME TLS | 79 | EXPORT_NAME TLS |
68 | VERSION ${TLS_VERSION} | 80 | VERSION ${TLS_VERSION} |
69 | SOVERSION ${TLS_MAJOR_VERSION} | 81 | SOVERSION ${TLS_MAJOR_VERSION} |
70 | ) | 82 | ) |
83 | if(NOT CMAKE_VERSION VERSION_LESS 3.27.0) | ||
84 | set_target_properties(tls PROPERTIES DLL_NAME_WITH_SOVERSION TRUE) | ||
85 | endif() | ||
71 | 86 | ||
72 | target_include_directories( | 87 | target_include_directories( |
73 | tls | 88 | tls |
diff --git a/tls/Makefile.am b/tls/Makefile.am index 22f3222..2a7b089 100644 --- a/tls/Makefile.am +++ b/tls/Makefile.am | |||
@@ -1,3 +1,18 @@ | |||
1 | # | ||
2 | # Copyright (c) 2014 Brent Cook | ||
3 | # | ||
4 | # Permission to use, copy, modify, and distribute this software for any | ||
5 | # purpose with or without fee is hereby granted, provided that the above | ||
6 | # copyright notice and this permission notice appear in all copies. | ||
7 | # | ||
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | |||
1 | include $(top_srcdir)/Makefile.am.common | 16 | include $(top_srcdir)/Makefile.am.common |
2 | 17 | ||
3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | 18 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk |
@@ -16,7 +31,7 @@ EXTRA_libtls_la_DEPENDENCIES = libtls_la_objects.mk | |||
16 | 31 | ||
17 | libtls_la_objects.mk: Makefile | 32 | libtls_la_objects.mk: Makefile |
18 | @echo "libtls_la_objects= $(libtls_la_OBJECTS)" \ | 33 | @echo "libtls_la_objects= $(libtls_la_OBJECTS)" \ |
19 | | sed -e 's/ *$$//' -e 's/ */ $$\(abs_top_builddir\)\/tls\//g' \ | 34 | | sed -e 's/ *$$//' -e 's/ */ $$\(top_builddir\)\/tls\//g' \ |
20 | > libtls_la_objects.mk | 35 | > libtls_la_objects.mk |
21 | 36 | ||
22 | libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym | 37 | libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym |
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | # Copyright (c) 2014 Brent Cook | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | openbsd_branch=`cat OPENBSD_BRANCH` | 19 | openbsd_branch=`cat OPENBSD_BRANCH` |
@@ -83,8 +98,7 @@ if [ -x /opt/csw/bin/ggrep ]; then | |||
83 | GREP='/opt/csw/bin/ggrep' | 98 | GREP='/opt/csw/bin/ggrep' |
84 | fi | 99 | fi |
85 | 100 | ||
86 | $CP $libssl_src/LICENSE COPYING | 101 | $CP $libcrypto_src/opensslconf.h include/openssl |
87 | |||
88 | $CP $libcrypto_src/opensslfeatures.h include/openssl | 102 | $CP $libcrypto_src/opensslfeatures.h include/openssl |
89 | $CP $libssl_src/pqueue.h include | 103 | $CP $libssl_src/pqueue.h include |
90 | 104 | ||
@@ -129,13 +143,13 @@ copy_hdrs $libcrypto_src "stack/stack.h lhash/lhash.h stack/safestack.h | |||
129 | ossl_typ.h err/err.h crypto.h comp/comp.h x509/x509.h buffer/buffer.h | 143 | ossl_typ.h err/err.h crypto.h comp/comp.h x509/x509.h buffer/buffer.h |
130 | objects/objects.h asn1/asn1.h asn1/posix_time.h bn/bn.h ec/ec.h ecdsa/ecdsa.h | 144 | objects/objects.h asn1/asn1.h asn1/posix_time.h bn/bn.h ec/ec.h ecdsa/ecdsa.h |
131 | ecdh/ecdh.h rsa/rsa.h sha/sha.h x509/x509_vfy.h pkcs7/pkcs7.h pem/pem.h | 145 | ecdh/ecdh.h rsa/rsa.h sha/sha.h x509/x509_vfy.h pkcs7/pkcs7.h pem/pem.h |
132 | hkdf/hkdf.h hmac/hmac.h rand/rand.h md5/md5.h | 146 | hkdf/hkdf.h hmac/hmac.h rand/rand.h md5/md5.h mlkem/mlkem.h |
133 | x509/x509v3.h conf/conf.h ocsp/ocsp.h | 147 | x509/x509v3.h conf/conf.h ocsp/ocsp.h |
134 | aes/aes.h modes/modes.h asn1/asn1t.h bf/blowfish.h | 148 | aes/aes.h modes/modes.h asn1/asn1t.h bf/blowfish.h |
135 | bio/bio.h cast/cast.h cmac/cmac.h cms/cms.h conf/conf_api.h des/des.h dh/dh.h | 149 | bio/bio.h cast/cast.h cmac/cmac.h cms/cms.h des/des.h dh/dh.h |
136 | dsa/dsa.h engine/engine.h ui/ui.h pkcs12/pkcs12.h ts/ts.h | 150 | dsa/dsa.h engine/engine.h ui/ui.h pkcs12/pkcs12.h ts/ts.h |
137 | md4/md4.h ripemd/ripemd.h whrlpool/whrlpool.h idea/idea.h | 151 | md4/md4.h ripemd/ripemd.h idea/idea.h |
138 | rc2/rc2.h rc4/rc4.h ui/ui_compat.h txt_db/txt_db.h | 152 | rc2/rc2.h rc4/rc4.h txt_db/txt_db.h |
139 | sm3/sm3.h sm4/sm4.h chacha/chacha.h evp/evp.h poly1305/poly1305.h | 153 | sm3/sm3.h sm4/sm4.h chacha/chacha.h evp/evp.h poly1305/poly1305.h |
140 | camellia/camellia.h curve25519/curve25519.h | 154 | camellia/camellia.h curve25519/curve25519.h |
141 | ct/ct.h kdf/kdf.h" | 155 | ct/ct.h kdf/kdf.h" |
@@ -166,10 +180,19 @@ for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do | |||
166 | fi | 180 | fi |
167 | done | 181 | done |
168 | 182 | ||
183 | for arch in amd64 i386; do | ||
184 | $CP $libcrypto_src/aes/aes_${arch}.c crypto/aes/ | ||
185 | $CP $libcrypto_src/modes/gcm128_${arch}.c crypto/modes/ | ||
186 | done | ||
187 | |||
169 | for i in $libcrypto_src/arch/*; do | 188 | for i in $libcrypto_src/arch/*; do |
170 | arch=`basename $i` | 189 | arch=`basename $i` |
171 | mkdir -p include/arch/$arch | 190 | mkdir -p crypto/arch/$arch |
172 | $CP $libcrypto_src/arch/$arch/opensslconf.h include/arch/$arch/ | 191 | $CP $libcrypto_src/arch/$arch/crypto_arch.h crypto/arch/$arch/ |
192 | crypto_cpu_caps=$libcrypto_src/arch/$arch/crypto_cpu_caps.c | ||
193 | if [ -f "$crypto_cpu_caps" ]; then | ||
194 | $CP "$crypto_cpu_caps" crypto/arch/$arch/ | ||
195 | fi | ||
173 | done | 196 | done |
174 | 197 | ||
175 | for i in $libcrypto_src/bn/arch/*; do | 198 | for i in $libcrypto_src/bn/arch/*; do |
@@ -204,6 +227,7 @@ gen_asm_stdout() { | |||
204 | EOF | 227 | EOF |
205 | if [ $1 = "masm" ]; then | 228 | if [ $1 = "masm" ]; then |
206 | fixup_masm crypto/$3.tmp crypto/$3 | 229 | fixup_masm crypto/$3.tmp crypto/$3 |
230 | rm crypto/$3.tmp | ||
207 | else | 231 | else |
208 | $MV crypto/$3.tmp crypto/$3 | 232 | $MV crypto/$3.tmp crypto/$3 |
209 | fi | 233 | fi |
@@ -232,6 +256,7 @@ gen_asm() { | |||
232 | EOF | 256 | EOF |
233 | if [ $1 = "masm" ]; then | 257 | if [ $1 = "masm" ]; then |
234 | fixup_masm crypto/$3.tmp crypto/$3 | 258 | fixup_masm crypto/$3.tmp crypto/$3 |
259 | rm crypto/$3.tmp | ||
235 | else | 260 | else |
236 | $MV crypto/$3.tmp crypto/$3 | 261 | $MV crypto/$3.tmp crypto/$3 |
237 | fi | 262 | fi |
@@ -253,34 +278,16 @@ gen_asm_mips 64 sha sha1-mips sha1-mips64 | |||
253 | gen_asm_mips 64 sha sha512-mips sha256-mips64 | 278 | gen_asm_mips 64 sha sha512-mips sha256-mips64 |
254 | gen_asm_mips 64 sha sha512-mips sha512-mips64 | 279 | gen_asm_mips 64 sha sha512-mips sha512-mips64 |
255 | 280 | ||
256 | echo generating arm ASM source for elf | ||
257 | gen_asm_stdout elf aes/asm/aes-armv4.pl aes/aes-elf-armv4.S | ||
258 | gen_asm_stdout elf bn/asm/armv4-mont.pl bn/mont-elf-armv4.S | ||
259 | gen_asm_stdout elf sha/asm/sha1-armv4-large.pl sha/sha1-elf-armv4.S | ||
260 | gen_asm_stdout elf sha/asm/sha256-armv4.pl sha/sha256-elf-armv4.S | ||
261 | gen_asm_stdout elf sha/asm/sha512-armv4.pl sha/sha512-elf-armv4.S | ||
262 | gen_asm_stdout elf modes/asm/ghash-armv4.pl modes/ghash-elf-armv4.S | ||
263 | $CP $libcrypto_src/arch/arm/armv4cpuid.S crypto | ||
264 | $CP $libcrypto_src/arch/arm/armcap.c crypto | ||
265 | $CP $libcrypto_src/arch/arm/arm_arch.h crypto | ||
266 | |||
267 | for abi in elf macosx masm mingw64; do | 281 | for abi in elf macosx masm mingw64; do |
268 | echo generating x86_64 ASM source for $abi | 282 | echo generating x86_64 ASM source for $abi |
269 | 283 | ||
270 | gen_asm_stdout $abi aes/asm/aes-x86_64.pl aes/aes-$abi-x86_64.S | 284 | gen_asm_stdout $abi aes/asm/aes-x86_64.pl aes/aes-$abi-x86_64.S |
271 | gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl aes/vpaes-$abi-x86_64.S | ||
272 | gen_asm_stdout $abi aes/asm/bsaes-x86_64.pl aes/bsaes-$abi-x86_64.S | ||
273 | gen_asm_stdout $abi aes/asm/aesni-x86_64.pl aes/aesni-$abi-x86_64.S | 285 | gen_asm_stdout $abi aes/asm/aesni-x86_64.pl aes/aesni-$abi-x86_64.S |
274 | gen_asm_stdout $abi bn/asm/modexp512-x86_64.pl bn/modexp512-$abi-x86_64.S | 286 | gen_asm_stdout $abi bn/asm/modexp512-x86_64.pl bn/modexp512-$abi-x86_64.S |
275 | gen_asm_stdout $abi bn/asm/x86_64-mont.pl bn/mont-$abi-x86_64.S | 287 | gen_asm_stdout $abi bn/asm/x86_64-mont.pl bn/mont-$abi-x86_64.S |
276 | gen_asm_stdout $abi bn/asm/x86_64-mont5.pl bn/mont5-$abi-x86_64.S | 288 | gen_asm_stdout $abi bn/asm/x86_64-mont5.pl bn/mont5-$abi-x86_64.S |
277 | gen_asm_stdout $abi md5/asm/md5-x86_64.pl md5/md5-$abi-x86_64.S | ||
278 | gen_asm_stdout $abi modes/asm/ghash-x86_64.pl modes/ghash-$abi-x86_64.S | 289 | gen_asm_stdout $abi modes/asm/ghash-x86_64.pl modes/ghash-$abi-x86_64.S |
279 | gen_asm_stdout $abi rc4/asm/rc4-x86_64.pl rc4/rc4-$abi-x86_64.S | 290 | gen_asm_stdout $abi rc4/asm/rc4-x86_64.pl rc4/rc4-$abi-x86_64.S |
280 | gen_asm_stdout $abi sha/asm/sha1-x86_64.pl sha/sha1-$abi-x86_64.S | ||
281 | gen_asm $abi sha/asm/sha512-x86_64.pl sha/sha256-$abi-x86_64.S | ||
282 | gen_asm $abi sha/asm/sha512-x86_64.pl sha/sha512-$abi-x86_64.S | ||
283 | gen_asm $abi x86_64cpuid.pl cpuid-$abi-x86_64.S | ||
284 | done | 291 | done |
285 | 292 | ||
286 | # copy libtls source | 293 | # copy libtls source |
@@ -333,7 +340,7 @@ done | |||
333 | echo "copying libssl source" | 340 | echo "copying libssl source" |
334 | rm -f ssl/*.c ssl/*.h | 341 | rm -f ssl/*.c ssl/*.h |
335 | touch ssl/empty.c | 342 | touch ssl/empty.c |
336 | for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do | 343 | for i in `awk '/SOURCES|HEADERS/ { if ($3 !~ /.*crypto_arch.*/) print $3 }' ssl/Makefile.am` ; do |
337 | dir=`dirname $i` | 344 | dir=`dirname $i` |
338 | mkdir -p ssl/$dir | 345 | mkdir -p ssl/$dir |
339 | $CP $libssl_src/$i ssl/$i | 346 | $CP $libssl_src/$i ssl/$i |
@@ -344,7 +351,7 @@ $GREP '^[A-Za-z0-9_]' < $libssl_src/Symbols.list > ssl/ssl.sym | |||
344 | # copy libcrypto tests | 351 | # copy libcrypto tests |
345 | echo "copying tests" | 352 | echo "copying tests" |
346 | touch tests/empty.c | 353 | touch tests/empty.c |
347 | for i in `find $libcrypto_regress -name '*.c'`; do | 354 | for i in `find $libcrypto_regress -name '*.[ch]'`; do |
348 | $CP "$i" tests | 355 | $CP "$i" tests |
349 | done | 356 | done |
350 | $CP $libcrypto_regress/evp/evptests.txt tests | 357 | $CP $libcrypto_regress/evp/evptests.txt tests |
@@ -352,6 +359,7 @@ $CP $libcrypto_regress/aead/*.txt tests | |||
352 | $CP $libcrypto_regress/ct/ctlog.conf tests | 359 | $CP $libcrypto_regress/ct/ctlog.conf tests |
353 | $CP $libcrypto_regress/ct/*.crt tests | 360 | $CP $libcrypto_regress/ct/*.crt tests |
354 | $CP $libcrypto_regress/x509/policy/*.pem tests | 361 | $CP $libcrypto_regress/x509/policy/*.pem tests |
362 | $CP $libcrypto_regress/mlkem/*.txt tests | ||
355 | 363 | ||
356 | # generate libcrypto freenull.c | 364 | # generate libcrypto freenull.c |
357 | awk -f $libcrypto_regress/free/freenull.awk \ | 365 | awk -f $libcrypto_regress/free/freenull.awk \ |
@@ -374,7 +382,6 @@ done | |||
374 | $CP $libssl_regress/unit/tests.h tests | 382 | $CP $libssl_regress/unit/tests.h tests |
375 | $CP $libssl_regress/certs/*.pem tests | 383 | $CP $libssl_regress/certs/*.pem tests |
376 | $CP $libssl_regress/certs/*.crl tests | 384 | $CP $libssl_regress/certs/*.crl tests |
377 | $CP $libssl_regress/pqueue/expected.txt tests/pq_expected.txt | ||
378 | 385 | ||
379 | # copy libtls tests | 386 | # copy libtls tests |
380 | for i in `find $libtls_regress -name '*.c'`; do | 387 | for i in `find $libtls_regress -name '*.c'`; do |