diff options
104 files changed, 1899 insertions, 629 deletions
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 8d0ad11..ae43398 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml | |||
@@ -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/linux.yml b/.github/workflows/linux.yml index d57e3bc..8334ae6 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml | |||
@@ -23,7 +23,7 @@ jobs: | |||
23 | fail-fast: false | 23 | fail-fast: false |
24 | matrix: | 24 | matrix: |
25 | os: ["ubuntu-22.04", "ubuntu-24.04"] | 25 | os: ["ubuntu-22.04", "ubuntu-24.04"] |
26 | arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips64"] | 26 | arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips32", "mips64"] |
27 | compiler: ["gcc"] | 27 | compiler: ["gcc"] |
28 | include: | 28 | include: |
29 | - os: "ubuntu-22.04" | 29 | - os: "ubuntu-22.04" |
@@ -32,12 +32,15 @@ jobs: | |||
32 | - os: "ubuntu-24.04" | 32 | - os: "ubuntu-24.04" |
33 | arch: "native" | 33 | arch: "native" |
34 | compiler: "clang" | 34 | compiler: "clang" |
35 | - os: "ubuntu-24.04" # loong64 | ||
36 | arch: "loong64" | ||
37 | compiler: "gcc" | ||
35 | steps: | 38 | steps: |
36 | - name: "Checkout repository" | 39 | - name: "Checkout repository" |
37 | uses: actions/checkout@v4 | 40 | uses: actions/checkout@v4 |
38 | 41 | ||
39 | - name: "Run tests" | 42 | - name: "Run tests" |
40 | run: ./scripts/test | 43 | run: ./scripts/test || (status=$?; cat tests/test-suite.log; exit $status) |
41 | env: | 44 | env: |
42 | ARCH: "${{ matrix.arch }}" | 45 | ARCH: "${{ matrix.arch }}" |
43 | CC: "${{ matrix.compiler }}" | 46 | CC: "${{ matrix.compiler }}" |
diff --git a/.github/workflows/rust-openssl.yml b/.github/workflows/rust-openssl.yml index 4ff41c0..d3b2bee 100644 --- a/.github/workflows/rust-openssl.yml +++ b/.github/workflows/rust-openssl.yml | |||
@@ -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/windows.yml b/.github/workflows/windows.yml index c4c7d72..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 |
@@ -38,7 +38,7 @@ Makefile | |||
38 | Makefile.in | 38 | Makefile.in |
39 | 39 | ||
40 | # CMake stuff | 40 | # CMake stuff |
41 | build | 41 | build* |
42 | cmake-build-debug/ | 42 | cmake-build-debug/ |
43 | 43 | ||
44 | # Libtool stuff | 44 | # Libtool stuff |
@@ -133,6 +133,7 @@ tests/tls_ext_alpn* | |||
133 | tests/tls_prf* | 133 | tests/tls_prf* |
134 | tests/*test | 134 | tests/*test |
135 | tests/tests.h | 135 | tests/tests.h |
136 | tests/test.h | ||
136 | tests/*test.c | 137 | tests/*test.c |
137 | tests/pbkdf2* | 138 | tests/pbkdf2* |
138 | tests/*.pem | 139 | tests/*.pem |
@@ -153,7 +154,7 @@ tests/x509req_ext* | |||
153 | tests/client.c | 154 | tests/client.c |
154 | tests/init_pledge.c | 155 | tests/init_pledge.c |
155 | tests/server.c | 156 | tests/server.c |
156 | tests/util.c | 157 | tests/*util.c |
157 | tests/valid_handshakes_terminate* | 158 | tests/valid_handshakes_terminate* |
158 | tests/handshake_table* | 159 | tests/handshake_table* |
159 | 160 | ||
@@ -173,7 +174,6 @@ autom4te.cache | |||
173 | 174 | ||
174 | # Libtool adds these, at least sometimes | 175 | # Libtool adds these, at least sometimes |
175 | INSTALL | 176 | INSTALL |
176 | /COPYING | ||
177 | !m4/check*.m4 | 177 | !m4/check*.m4 |
178 | m4/l* | 178 | m4/l* |
179 | 179 | ||
@@ -204,6 +204,7 @@ ssl/VERSION | |||
204 | tls/VERSION | 204 | tls/VERSION |
205 | libtls-standalone/VERSION | 205 | libtls-standalone/VERSION |
206 | 206 | ||
207 | crypto/*.mk | ||
207 | ssl/hidden | 208 | ssl/hidden |
208 | ssl/*.c | 209 | ssl/*.c |
209 | ssl/*.h | 210 | ssl/*.h |
@@ -237,33 +238,89 @@ include/openssl/*.h | |||
237 | !/apps/openssl/apps_win.c | 238 | !/apps/openssl/apps_win.c |
238 | !/apps/openssl/certhash_win.c | 239 | !/apps/openssl/certhash_win.c |
239 | 240 | ||
240 | /crypto/* | 241 | /crypto/*.c |
241 | !/crypto/Makefile.am.* | 242 | /crypto/*.h |
242 | !/crypto/compat/ | 243 | /crypto/aes/ |
243 | /crypto/compat/* | 244 | /crypto/arch/aarch64/crypto_arch.h |
244 | !/crypto/compat/arc4random.h | 245 | /crypto/arch/aarch64/crypto_cpu_caps.c |
245 | !/crypto/compat/b_win.c | 246 | /crypto/arch/alpha/ |
246 | !/crypto/compat/explicit_bzero_win.c | 247 | /crypto/arch/amd64/ |
247 | !/crypto/compat/freezero.c | 248 | /crypto/arch/arm/ |
248 | !/crypto/compat/getdelim.c | 249 | /crypto/arch/hppa/ |
249 | !/crypto/compat/getline.c | 250 | /crypto/arch/i386/ |
250 | !/crypto/compat/getpagesize.c | 251 | /crypto/arch/m88k/ |
251 | !/crypto/compat/posix_win.c | 252 | /crypto/arch/mips64/ |
252 | !/crypto/compat/bsd_asprintf.c | 253 | /crypto/arch/powerpc/ |
253 | !/crypto/compat/ui_openssl_win.c | 254 | /crypto/arch/powerpc64/ |
254 | !/crypto/compat/crypto_lock_win.c | 255 | /crypto/arch/riscv64/ |
255 | !/crypto/CMakeLists.txt | 256 | /crypto/arch/sh/ |
256 | 257 | /crypto/arch/sparc64/ | |
257 | !/libtls-standalone/compat/Makefile.am | 258 | /crypto/asn1/ |
258 | /libtls-standalone/include/*.h | 259 | /crypto/bf/ |
259 | /libtls-standalone/src/*.c | 260 | /crypto/bio/ |
260 | /libtls-standalone/src/*.h | 261 | /crypto/bn/*.c |
261 | /libtls-standalone/src | 262 | /crypto/bn/*.h |
262 | /libtls-standalone/tests/test | 263 | /crypto/bn/arch/aarch64/ |
263 | /libtls-standalone/compat | 264 | /crypto/bn/arch/alpha/ |
264 | /libtls-standalone/VERSION | 265 | /crypto/bn/arch/amd64/ |
265 | /libtls-standalone/m4 | 266 | /crypto/bn/arch/arm/ |
266 | /libtls-standalone/man | 267 | /crypto/bn/arch/hppa/ |
268 | /crypto/bn/arch/i386/ | ||
269 | /crypto/bn/arch/m88k/ | ||
270 | /crypto/bn/arch/mips64/ | ||
271 | /crypto/bn/arch/powerpc/ | ||
272 | /crypto/bn/arch/powerpc64/ | ||
273 | /crypto/bn/arch/riscv64/ | ||
274 | /crypto/bn/arch/sh/ | ||
275 | /crypto/bn/arch/sparc64/ | ||
276 | /crypto/buffer/ | ||
277 | /crypto/bytestring/ | ||
278 | /crypto/camellia/ | ||
279 | /crypto/cast/ | ||
280 | /crypto/chacha/ | ||
281 | /crypto/cmac/ | ||
282 | /crypto/cms/ | ||
283 | /crypto/conf/ | ||
284 | /crypto/ct/ | ||
285 | /crypto/curve25519/ | ||
286 | /crypto/des/ | ||
287 | /crypto/dh/ | ||
288 | /crypto/dsa/ | ||
289 | /crypto/ec/ | ||
290 | /crypto/ecdh/ | ||
291 | /crypto/ecdsa/ | ||
292 | /crypto/engine/ | ||
293 | /crypto/err/ | ||
294 | /crypto/evp/ | ||
295 | /crypto/hidden/ | ||
296 | /crypto/hkdf/ | ||
297 | /crypto/hmac/ | ||
298 | /crypto/idea/ | ||
299 | /crypto/kdf/ | ||
300 | /crypto/lhash/ | ||
301 | /crypto/md4/ | ||
302 | /crypto/md5/ | ||
303 | /crypto/mlkem/ | ||
304 | /crypto/modes/ | ||
305 | /crypto/objects/ | ||
306 | /crypto/ocsp/ | ||
307 | /crypto/pem/ | ||
308 | /crypto/pkcs12/ | ||
309 | /crypto/pkcs7/ | ||
310 | /crypto/poly1305/ | ||
311 | /crypto/rand/ | ||
312 | /crypto/rc2/ | ||
313 | /crypto/rc4/ | ||
314 | /crypto/ripemd/ | ||
315 | /crypto/rsa/ | ||
316 | /crypto/sha/ | ||
317 | /crypto/sm3/ | ||
318 | /crypto/sm4/ | ||
319 | /crypto/stack/ | ||
320 | /crypto/ts/ | ||
321 | /crypto/txt_db/ | ||
322 | /crypto/ui/ | ||
323 | /crypto/x509/ | ||
267 | 324 | ||
268 | openbsd/ | 325 | openbsd/ |
269 | 326 | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt index 437570b..17e5a0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -1,4 +1,20 @@ | |||
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() |
@@ -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__) |
@@ -131,7 +143,7 @@ add_definitions(-D__END_HIDDEN_DECLS=) | |||
131 | set(CMAKE_POSITION_INDEPENDENT_CODE true) | 143 | set(CMAKE_POSITION_INDEPENDENT_CODE true) |
132 | 144 | ||
133 | 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") |
134 | add_definitions(-Wno-pointer-sign) | 146 | add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wno-pointer-sign>) |
135 | endif() | 147 | endif() |
136 | 148 | ||
137 | if(WIN32) | 149 | if(WIN32) |
@@ -366,6 +378,16 @@ if(HAVE_NETINET_IP_H) | |||
366 | add_definitions(-DHAVE_NETINET_IP_H) | 378 | add_definitions(-DHAVE_NETINET_IP_H) |
367 | endif() | 379 | endif() |
368 | 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 | |||
369 | # 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 |
370 | # 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 |
371 | # single architecture work on macOS at least. | 393 | # single architecture work on macOS at least. |
@@ -375,20 +397,27 @@ if(APPLE AND (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "")) | |||
375 | set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}") | 397 | set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}") |
376 | endif() | 398 | endif() |
377 | 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 | |||
378 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64|ARM64)") | 408 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64|ARM64)") |
379 | set(HOST_AARCH64 true) | 409 | set(HOST_AARCH64 true) |
380 | if(WIN32) | ||
381 | set(ENABLE_ASM false) | ||
382 | endif() | ||
383 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") | 410 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") |
384 | set(HOST_ARM true) | 411 | set(HOST_ARM true) |
385 | 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") |
386 | set(HOST_X86_64 true) | 413 | set(HOST_X86_64 true) |
387 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64|AMD64)") | 414 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|x64|amd64|AMD64)") |
388 | set(HOST_X86_64 true) | 415 | set(HOST_X86_64 true) |
389 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|[xX]86)") | 416 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|[xX]86|Win32)") |
390 | set(ENABLE_ASM false) | 417 | set(ENABLE_ASM false) |
391 | set(HOST_I386 true) | 418 | set(HOST_I386 true) |
419 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64") | ||
420 | set(HOST_LOONGARCH64 true) | ||
392 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips64") | 421 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips64") |
393 | set(HOST_MIPS64 true) | 422 | set(HOST_MIPS64 true) |
394 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips") | 423 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips") |
@@ -409,8 +438,6 @@ if(ENABLE_ASM) | |||
409 | if(CMAKE_C_COMPILER_ABI STREQUAL "ELF") | 438 | if(CMAKE_C_COMPILER_ABI STREQUAL "ELF") |
410 | if(HOST_X86_64) | 439 | if(HOST_X86_64) |
411 | set(HOST_ASM_ELF_X86_64 true) | 440 | set(HOST_ASM_ELF_X86_64 true) |
412 | elseif(HOST_ARM) | ||
413 | set(HOST_ASM_ELF_ARMV4 true) | ||
414 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND HOST_I386) | 441 | elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND HOST_I386) |
415 | set(HOST_ASM_ELF_X86_64 true) | 442 | set(HOST_ASM_ELF_X86_64 true) |
416 | endif() | 443 | 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 | |||
@@ -28,9 +28,54 @@ history is also available from Git. | |||
28 | 28 | ||
29 | LibreSSL Portable Release Notes: | 29 | LibreSSL Portable Release Notes: |
30 | 30 | ||
31 | 4.1.0 - In development | 31 | 4.2.0 - In development |
32 | 32 | ||
33 | * Portable changes | 33 | * Portable changes |
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. | ||
34 | - Fixed CMake builds on FreeBSD. | 79 | - Fixed CMake builds on FreeBSD. |
35 | - Fixed the --prefix option for cmake --install. | 80 | - Fixed the --prefix option for cmake --install. |
36 | - Fixed tests for MinGW due to missing sh(1). | 81 | - Fixed tests for MinGW due to missing sh(1). |
@@ -61,8 +106,11 @@ LibreSSL Portable Release Notes: | |||
61 | - Replaced combinations of BN_MONT_CTX_new/set with an internal | 106 | - Replaced combinations of BN_MONT_CTX_new/set with an internal |
62 | BN_MONT_CTX_create(). | 107 | BN_MONT_CTX_create(). |
63 | - Replaced BN_bn2hex() reimplementation in openssl(1) ca with | 108 | - Replaced BN_bn2hex() reimplementation in openssl(1) ca with |
64 | a poper API call. | 109 | a proper API call. |
65 | - Fixed integer overflows due to signed shift in obj_dat.c. | 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). | ||
66 | * Compatibility changes | 114 | * Compatibility changes |
67 | - Added an OPENSSL_INIT_NO_ATEXIT flag for OPENSSL_init_crypto(). | 115 | - Added an OPENSSL_INIT_NO_ATEXIT flag for OPENSSL_init_crypto(). |
68 | It has no effect since LibreSSL doesn't call atexit(). | 116 | It has no effect since LibreSSL doesn't call atexit(). |
@@ -71,6 +119,9 @@ LibreSSL Portable Release Notes: | |||
71 | - EC_METHOD is no longer public and the API exposing it has been | 119 | - EC_METHOD is no longer public and the API exposing it has been |
72 | removed. This includes EC_GROUP_new(), EC_GFp_mont_method(), | 120 | removed. This includes EC_GROUP_new(), EC_GFp_mont_method(), |
73 | EC_GROUP_method_of() and EC_METHOD_get_field_type(). | 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}(). | ||
74 | - All elliptic curves over fields with less than 224 bits and a | 125 | - All elliptic curves over fields with less than 224 bits and a |
75 | few more were removed from the built-in curves. This includes | 126 | few more were removed from the built-in curves. This includes |
76 | all WTLS curves and P-192. | 127 | all WTLS curves and P-192. |
@@ -79,26 +130,25 @@ LibreSSL Portable Release Notes: | |||
79 | - Removed the -C option to generate "C code" from the openssl(1) | 130 | - Removed the -C option to generate "C code" from the openssl(1) |
80 | dh, dhparam, dsaparam, ecparam, and x509 subcommands. | 131 | dh, dhparam, dsaparam, ecparam, and x509 subcommands. |
81 | - Removed #error in headers when OPENSSL_NO_* is defined. | 132 | - Removed #error in headers when OPENSSL_NO_* is defined. |
82 | - EC_METHOD is no longer public and all public API directly using | ||
83 | it was removed. This includes EC_GROUP_new(), EC_GFp_mont_method() | ||
84 | EC_{GROUP,POINT}_method_of() and EC_METHOD_get_field_type(). | ||
85 | - The precomputation stubs for EC_GROUP were removed. | ||
86 | - The API setting Jacobian projective coordinates for a point was | ||
87 | removed as were EC_POINTs_{mul,make_affine}(). | ||
88 | - CRYPTO_set_mem_functions() now matches OpenSSL 1.1 and | 133 | - CRYPTO_set_mem_functions() now matches OpenSSL 1.1 and |
89 | CRYPTO_set_mem_ex_functions() was removed. | 134 | CRYPTO_set_mem_ex_functions() was removed. |
90 | - X509_NAME_print() and X509_OBJECT_up_ref_count() are no longer public. | 135 | - The tls_session_secret_cb_fn type now matches OpenSSL 1.1. |
136 | - Unexport X509_NAME_print() and X509_OBJECT_up_ref_count(). | ||
91 | - const corrected UI_OpenSSL() and BN_MONT_CTX_copy(). | 137 | - const corrected UI_OpenSSL() and BN_MONT_CTX_copy(). |
92 | - Support OPENSSL_NO_FILENAMES. | 138 | - Support OPENSSL_NO_FILENAMES. |
93 | - Support SSL_OP_NO_RENEGOTIATION and SSL_OP_ALLOW_CLIENT_RENEGOTIATION. | 139 | - Support SSL_OP_NO_RENEGOTIATION and SSL_OP_ALLOW_CLIENT_RENEGOTIATION. |
140 | - Export PKCS12_key_gen_uni() again. | ||
94 | * New features | 141 | * New features |
95 | - libtls has a new tls_peer_cert_common_name() API call to retrieve | 142 | - libtls has a new tls_peer_cert_common_name() API call to retrieve |
96 | the peer's common name without having to inspect the PEM. | 143 | the peer's common name without having to inspect the PEM. |
97 | - Imported ML-KEM 768 and 1024 from BoringSSL (not yet public API). | ||
98 | * Bug fixes | 144 | * Bug fixes |
99 | - Plugged a leak in eckey_compute_pubkey(). | 145 | - Plugged a leak in eckey_compute_pubkey(). |
100 | - Again allow the magic values -1, -2 and -3 for the salt length | 146 | - Again allow the magic values -1, -2 and -3 for the salt length |
101 | of an RSA-PSS key in the EVP_PKEY_CTX_ctrl_str() interface. | 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. | ||
102 | * Testing and proactive security | 152 | * Testing and proactive security |
103 | - Improved regress coverage of the EC code. | 153 | - Improved regress coverage of the EC code. |
104 | 154 | ||
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 d5f7813..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( |
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 ee1b65b..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 |
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 864a4ad..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 |
@@ -86,16 +87,17 @@ AS_CASE([$host_cpu], | |||
86 | ) | 87 | ) |
87 | AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"]) | 88 | AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"]) |
88 | 89 | ||
89 | AM_CONDITIONAL([HOST_AARCH64], [test "$host_cpu" = "aarch64"]) | 90 | AM_CONDITIONAL([HOST_AARCH64], [test "$host_cpu" = "aarch64"]) |
90 | AM_CONDITIONAL([HOST_ARM], [test "$host_cpu" = "arm"]) | 91 | AM_CONDITIONAL([HOST_ARM], [test "$host_cpu" = "arm"]) |
91 | AM_CONDITIONAL([HOST_I386], [test "$host_cpu" = "i386"]) | 92 | AM_CONDITIONAL([HOST_I386], [test "$host_cpu" = "i386"]) |
92 | AM_CONDITIONAL([HOST_MIPS], [test "$host_cpu" = "mips"]) | 93 | AM_CONDITIONAL([HOST_LOONGARCH64], [test "$host_cpu" = "loongarch64"]) |
93 | AM_CONDITIONAL([HOST_MIPS64], [test "$host_cpu" = "mips64"]) | 94 | AM_CONDITIONAL([HOST_MIPS], [test "$host_cpu" = "mips"]) |
94 | AM_CONDITIONAL([HOST_POWERPC], [test "$host_cpu" = "powerpc"]) | 95 | AM_CONDITIONAL([HOST_MIPS64], [test "$host_cpu" = "mips64"]) |
95 | AM_CONDITIONAL([HOST_POWERPC64], [test "$host_cpu" = "ppc64"]) | 96 | AM_CONDITIONAL([HOST_POWERPC], [test "$host_cpu" = "powerpc"]) |
96 | AM_CONDITIONAL([HOST_RISCV64], [test "$host_cpu" = "riscv64"]) | 97 | AM_CONDITIONAL([HOST_POWERPC64], [test "$host_cpu" = "ppc64"]) |
97 | AM_CONDITIONAL([HOST_SPARC64], [test "$host_cpu" = "sparc64"]) | 98 | AM_CONDITIONAL([HOST_RISCV64], [test "$host_cpu" = "riscv64"]) |
98 | 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"]) | ||
99 | 101 | ||
100 | AC_MSG_CHECKING([if .gnu.warning accepts long strings]) | 102 | AC_MSG_CHECKING([if .gnu.warning accepts long strings]) |
101 | AC_LINK_IFELSE([AC_LANG_SOURCE([[ | 103 | AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
@@ -113,8 +115,6 @@ AC_ARG_ENABLE([asm], AS_HELP_STRING([--disable-asm], [Disable assembly])) | |||
113 | AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) | 115 | AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) |
114 | 116 | ||
115 | # Conditionally enable assembly by default | 117 | # Conditionally enable assembly by default |
116 | AM_CONDITIONAL([HOST_ASM_ELF_ARM], | ||
117 | [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "arm" -a "x$enable_asm" != "xno"]) | ||
118 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS], | 118 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS], |
119 | [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"]) |
120 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS64], | 120 | AM_CONDITIONAL([HOST_ASM_ELF_MIPS64], |
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index e642b01..047c228 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt | |||
@@ -1,30 +1,28 @@ | |||
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(-DOPENSSL_CPUID_OBJ) | ||
19 | set(CRYPTO_SRC ${CRYPTO_SRC} ${ASM_ARMV4_ELF_SRC}) | ||
20 | endif() | ||
21 | 17 | ||
22 | 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 | |||
23 | set( | 23 | set( |
24 | ASM_X86_64_ELF_SRC | 24 | ASM_X86_64_ELF_SRC |
25 | aes/aes-elf-x86_64.S | 25 | aes/aes-elf-x86_64.S |
26 | aes/bsaes-elf-x86_64.S | ||
27 | aes/vpaes-elf-x86_64.S | ||
28 | aes/aesni-elf-x86_64.S | 26 | aes/aesni-elf-x86_64.S |
29 | bn/modexp512-elf-x86_64.S | 27 | bn/modexp512-elf-x86_64.S |
30 | bn/mont-elf-x86_64.S | 28 | bn/mont-elf-x86_64.S |
@@ -43,7 +41,6 @@ if(HOST_ASM_ELF_X86_64) | |||
43 | bn/arch/amd64/bignum_sqr_8_16_alt.S | 41 | bn/arch/amd64/bignum_sqr_8_16_alt.S |
44 | bn/arch/amd64/bignum_sub.S | 42 | bn/arch/amd64/bignum_sub.S |
45 | bn/arch/amd64/word_clz.S | 43 | bn/arch/amd64/word_clz.S |
46 | bn/arch/amd64/bn_arch.c | ||
47 | ) | 44 | ) |
48 | add_definitions(-DAES_ASM) | 45 | add_definitions(-DAES_ASM) |
49 | add_definitions(-DBSAES_ASM) | 46 | add_definitions(-DBSAES_ASM) |
@@ -57,11 +54,13 @@ if(HOST_ASM_ELF_X86_64) | |||
57 | endif() | 54 | endif() |
58 | 55 | ||
59 | if(HOST_ASM_MACOSX_X86_64) | 56 | if(HOST_ASM_MACOSX_X86_64) |
57 | set(CRYPTO_SRC ${CRYPTO_SRC} aes/aes_amd64.c) | ||
58 | set(CRYPTO_SRC ${CRYPTO_SRC} bn/arch/amd64/bn_arch.c) | ||
59 | set(CRYPTO_SRC ${CRYPTO_SRC} modes/gcm128_amd64.c) | ||
60 | |||
60 | set( | 61 | set( |
61 | ASM_X86_64_MACOSX_SRC | 62 | ASM_X86_64_MACOSX_SRC |
62 | aes/aes-macosx-x86_64.S | 63 | aes/aes-macosx-x86_64.S |
63 | aes/bsaes-macosx-x86_64.S | ||
64 | aes/vpaes-macosx-x86_64.S | ||
65 | aes/aesni-macosx-x86_64.S | 64 | aes/aesni-macosx-x86_64.S |
66 | bn/modexp512-macosx-x86_64.S | 65 | bn/modexp512-macosx-x86_64.S |
67 | bn/mont-macosx-x86_64.S | 66 | bn/mont-macosx-x86_64.S |
@@ -80,7 +79,6 @@ if(HOST_ASM_MACOSX_X86_64) | |||
80 | bn/arch/amd64/bignum_sqr_8_16_alt.S | 79 | bn/arch/amd64/bignum_sqr_8_16_alt.S |
81 | bn/arch/amd64/bignum_sub.S | 80 | bn/arch/amd64/bignum_sub.S |
82 | bn/arch/amd64/word_clz.S | 81 | bn/arch/amd64/word_clz.S |
83 | bn/arch/amd64/bn_arch.c | ||
84 | ) | 82 | ) |
85 | add_definitions(-DAES_ASM) | 83 | add_definitions(-DAES_ASM) |
86 | add_definitions(-DBSAES_ASM) | 84 | add_definitions(-DBSAES_ASM) |
@@ -95,11 +93,12 @@ if(HOST_ASM_MACOSX_X86_64) | |||
95 | endif() | 93 | endif() |
96 | 94 | ||
97 | if(HOST_ASM_MASM_X86_64) | 95 | if(HOST_ASM_MASM_X86_64) |
96 | set(CRYPTO_SRC ${CRYPTO_SRC} aes/aes_amd64.c) | ||
97 | set(CRYPTO_SRC ${CRYPTO_SRC} modes/gcm128_amd64.c) | ||
98 | |||
98 | set( | 99 | set( |
99 | ASM_X86_64_MASM_SRC | 100 | ASM_X86_64_MASM_SRC |
100 | aes/aes-masm-x86_64.S | 101 | aes/aes-masm-x86_64.S |
101 | aes/bsaes-masm-x86_64.S | ||
102 | aes/vpaes-masm-x86_64.S | ||
103 | aes/aesni-masm-x86_64.S | 102 | aes/aesni-masm-x86_64.S |
104 | #bn/modexp512-masm-x86_64.S | 103 | #bn/modexp512-masm-x86_64.S |
105 | #bn/mont-masm-x86_64.S | 104 | #bn/mont-masm-x86_64.S |
@@ -121,11 +120,12 @@ if(HOST_ASM_MASM_X86_64) | |||
121 | endif() | 120 | endif() |
122 | 121 | ||
123 | if(HOST_ASM_MINGW64_X86_64) | 122 | if(HOST_ASM_MINGW64_X86_64) |
123 | set(CRYPTO_SRC ${CRYPTO_SRC} aes/aes_amd64.c) | ||
124 | set(CRYPTO_SRC ${CRYPTO_SRC} modes/gcm128_amd64.c) | ||
125 | |||
124 | set( | 126 | set( |
125 | ASM_X86_64_MINGW64_SRC | 127 | ASM_X86_64_MINGW64_SRC |
126 | aes/aes-mingw64-x86_64.S | 128 | aes/aes-mingw64-x86_64.S |
127 | aes/bsaes-mingw64-x86_64.S | ||
128 | aes/vpaes-mingw64-x86_64.S | ||
129 | aes/aesni-mingw64-x86_64.S | 129 | aes/aesni-mingw64-x86_64.S |
130 | #bn/modexp512-mingw64-x86_64.S | 130 | #bn/modexp512-mingw64-x86_64.S |
131 | #bn/mont-mingw64-x86_64.S | 131 | #bn/mont-mingw64-x86_64.S |
@@ -146,7 +146,17 @@ if(HOST_ASM_MINGW64_X86_64) | |||
146 | endif() | 146 | endif() |
147 | 147 | ||
148 | if(HOST_AARCH64) | 148 | if(HOST_AARCH64) |
149 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps.c) | 149 | if(APPLE) |
150 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_darwin.c) | ||
151 | elseif(LINUX) | ||
152 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_linux.c) | ||
153 | elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") | ||
154 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps.c) | ||
155 | elseif(WIN32) | ||
156 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_windows.c) | ||
157 | else() | ||
158 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/aarch64/crypto_cpu_caps_none.c) | ||
159 | endif() | ||
150 | elseif(HOST_X86_64) | 160 | elseif(HOST_X86_64) |
151 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/amd64/crypto_cpu_caps.c) | 161 | set(CRYPTO_SRC ${CRYPTO_SRC} arch/amd64/crypto_cpu_caps.c) |
152 | elseif(HOST_I386) | 162 | elseif(HOST_I386) |
@@ -163,7 +173,6 @@ set( | |||
163 | crypto_memory.c | 173 | crypto_memory.c |
164 | aes/aes.c | 174 | aes/aes.c |
165 | aes/aes_core.c | 175 | aes/aes_core.c |
166 | aes/aes_ige.c | ||
167 | asn1/a_bitstr.c | 176 | asn1/a_bitstr.c |
168 | asn1/a_enum.c | 177 | asn1/a_enum.c |
169 | asn1/a_int.c | 178 | asn1/a_int.c |
@@ -213,10 +222,8 @@ set( | |||
213 | asn1/x_bignum.c | 222 | asn1/x_bignum.c |
214 | asn1/x_crl.c | 223 | asn1/x_crl.c |
215 | asn1/x_exten.c | 224 | asn1/x_exten.c |
216 | asn1/x_info.c | ||
217 | asn1/x_long.c | 225 | asn1/x_long.c |
218 | asn1/x_name.c | 226 | asn1/x_name.c |
219 | asn1/x_pkey.c | ||
220 | asn1/x_pubkey.c | 227 | asn1/x_pubkey.c |
221 | asn1/x_req.c | 228 | asn1/x_req.c |
222 | asn1/x_sig.c | 229 | asn1/x_sig.c |
@@ -245,6 +252,7 @@ set( | |||
245 | bio/bss_null.c | 252 | bio/bss_null.c |
246 | bio/bss_sock.c | 253 | bio/bss_sock.c |
247 | bn/bn_add.c | 254 | bn/bn_add.c |
255 | bn/bn_add_sub.c | ||
248 | bn/bn_bpsw.c | 256 | bn/bn_bpsw.c |
249 | bn/bn_const.c | 257 | bn/bn_const.c |
250 | bn/bn_convert.c | 258 | bn/bn_convert.c |
@@ -258,6 +266,7 @@ set( | |||
258 | bn/bn_lib.c | 266 | bn/bn_lib.c |
259 | bn/bn_mod.c | 267 | bn/bn_mod.c |
260 | bn/bn_mod_sqrt.c | 268 | bn/bn_mod_sqrt.c |
269 | bn/bn_mod_words.c | ||
261 | bn/bn_mont.c | 270 | bn/bn_mont.c |
262 | bn/bn_mul.c | 271 | bn/bn_mul.c |
263 | bn/bn_prime.c | 272 | bn/bn_prime.c |
@@ -339,11 +348,13 @@ set( | |||
339 | ec/ec_convert.c | 348 | ec/ec_convert.c |
340 | ec/ec_curve.c | 349 | ec/ec_curve.c |
341 | ec/ec_err.c | 350 | ec/ec_err.c |
351 | ec/ec_field.c | ||
342 | ec/ec_key.c | 352 | ec/ec_key.c |
343 | ec/ec_lib.c | 353 | ec/ec_lib.c |
344 | ec/ec_mult.c | 354 | ec/ec_mult.c |
345 | ec/ec_pmeth.c | 355 | ec/ec_pmeth.c |
346 | ec/eck_prn.c | 356 | ec/eck_prn.c |
357 | ec/ecp_hp_methods.c | ||
347 | ec/ecp_methods.c | 358 | ec/ecp_methods.c |
348 | ec/ecx_methods.c | 359 | ec/ecx_methods.c |
349 | ecdh/ecdh.c | 360 | ecdh/ecdh.c |
@@ -464,11 +475,7 @@ set( | |||
464 | rand/rand_err.c | 475 | rand/rand_err.c |
465 | rand/rand_lib.c | 476 | rand/rand_lib.c |
466 | rand/randfile.c | 477 | rand/randfile.c |
467 | rc2/rc2_cbc.c | 478 | rc2/rc2.c |
468 | rc2/rc2_ecb.c | ||
469 | rc2/rc2_skey.c | ||
470 | rc2/rc2cfb64.c | ||
471 | rc2/rc2ofb64.c | ||
472 | rc4/rc4.c | 479 | rc4/rc4.c |
473 | ripemd/ripemd.c | 480 | ripemd/ripemd.c |
474 | rsa/rsa_ameth.c | 481 | rsa/rsa_ameth.c |
@@ -570,17 +577,17 @@ set( | |||
570 | 577 | ||
571 | set(COMPAT_SRC empty.c) | 578 | set(COMPAT_SRC empty.c) |
572 | 579 | ||
580 | set(CRYPTO_UNEXPORT ${CRYPTO_UNEXPORT} BIO_s_log) | ||
581 | |||
573 | if(UNIX) | 582 | if(UNIX) |
574 | set(CRYPTO_SRC ${CRYPTO_SRC} crypto_lock.c) | 583 | set(CRYPTO_SRC ${CRYPTO_SRC} crypto_lock.c) |
575 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_posix.c) | 584 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_posix.c) |
576 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/bss_log.c) | ||
577 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl.c) | 585 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl.c) |
578 | endif() | 586 | endif() |
579 | 587 | ||
580 | if(WIN32) | 588 | if(WIN32) |
581 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/crypto_lock_win.c) | 589 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/crypto_lock_win.c) |
582 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_win.c) | 590 | set(CRYPTO_SRC ${CRYPTO_SRC} bio/b_win.c) |
583 | set(CRYPTO_UNEXPORT ${CRYPTO_UNEXPORT} BIO_s_log) | ||
584 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl_win.c) | 591 | set(CRYPTO_SRC ${CRYPTO_SRC} ui/ui_openssl_win.c) |
585 | endif() | 592 | endif() |
586 | 593 | ||
@@ -736,6 +743,7 @@ add_library(crypto_obj OBJECT ${CRYPTO_SRC}) | |||
736 | target_include_directories(crypto_obj | 743 | target_include_directories(crypto_obj |
737 | PRIVATE | 744 | PRIVATE |
738 | . | 745 | . |
746 | aes | ||
739 | asn1 | 747 | asn1 |
740 | bio | 748 | bio |
741 | bn | 749 | bn |
@@ -774,11 +782,14 @@ elseif(HOST_ARM) | |||
774 | elseif(HOST_I386) | 782 | elseif(HOST_I386) |
775 | target_include_directories(crypto_obj PRIVATE arch/i386/) | 783 | target_include_directories(crypto_obj PRIVATE arch/i386/) |
776 | target_include_directories(crypto_obj PRIVATE bn/arch/i386/) | 784 | target_include_directories(crypto_obj PRIVATE bn/arch/i386/) |
785 | elseif(HOST_LOONGARCH64) | ||
786 | target_include_directories(crypto_obj PRIVATE arch/loongarch64) | ||
787 | target_include_directories(crypto_obj PRIVATE bn/arch/loongarch64) | ||
777 | elseif(HOST_MIPS64) | 788 | elseif(HOST_MIPS64) |
778 | target_include_directories(crypto_obj PRIVATE arch/mips64) | 789 | target_include_directories(crypto_obj PRIVATE arch/mips64) |
779 | target_include_directories(crypto_obj PRIVATE bn/arch/mips64) | 790 | target_include_directories(crypto_obj PRIVATE bn/arch/mips64) |
780 | elseif(HOST_MIPS) | 791 | elseif(HOST_MIPS) |
781 | # XXX - can this go away? the directory doesn't exist... | 792 | target_include_directories(crypto_obj PRIVATE arch/mips) |
782 | target_include_directories(crypto_obj PRIVATE bn/arch/mips) | 793 | target_include_directories(crypto_obj PRIVATE bn/arch/mips) |
783 | elseif(HOST_POWERPC) | 794 | elseif(HOST_POWERPC) |
784 | target_include_directories(crypto_obj PRIVATE arch/powerpc) | 795 | target_include_directories(crypto_obj PRIVATE arch/powerpc) |
diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 438da8b..ad241ab 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am | |||
@@ -1,6 +1,22 @@ | |||
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 |
@@ -51,20 +67,18 @@ crypto_portable.sym: crypto.sym Makefile | |||
51 | -echo "generating crypto_portable.sym ..." | 67 | -echo "generating crypto_portable.sym ..." |
52 | -cp $(top_srcdir)/crypto/crypto.sym crypto_portable.sym | 68 | -cp $(top_srcdir)/crypto/crypto.sym crypto_portable.sym |
53 | -chmod u+w crypto_portable.sym | 69 | -chmod u+w crypto_portable.sym |
54 | if HOST_WIN | ||
55 | -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 |
56 | -mv crypto_portable.sym.tmp crypto_portable.sym | 71 | -mv crypto_portable.sym.tmp crypto_portable.sym |
57 | endif | ||
58 | 72 | ||
59 | libcrypto_la_objects.mk: Makefile | 73 | libcrypto_la_objects.mk: Makefile |
60 | @echo "libcrypto_la_objects= $(libcrypto_la_OBJECTS)" \ | 74 | @echo "libcrypto_la_objects= $(libcrypto_la_OBJECTS)" \ |
61 | | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \ | 75 | | sed 's/ */ $$\(top_builddir\)\/crypto\//g' \ |
62 | > libcrypto_la_objects.mk | 76 | > libcrypto_la_objects.mk |
63 | @echo "libcompat_la_objects= $(libcompat_la_OBJECTS)" \ | 77 | @echo "libcompat_la_objects= $(libcompat_la_OBJECTS)" \ |
64 | | sed 's/compat\// $$\(abs_top_builddir\)\/crypto\/&/g' \ | 78 | | sed 's/compat\// $$\(top_builddir\)\/crypto\/&/g' \ |
65 | >> libcrypto_la_objects.mk | 79 | >> libcrypto_la_objects.mk |
66 | @echo "libcompatnoopt_la_objects= $(libcompatnoopt_la_OBJECTS)" \ | 80 | @echo "libcompatnoopt_la_objects= $(libcompatnoopt_la_OBJECTS)" \ |
67 | | sed 's/compat\// $$\(abs_top_builddir\)\/crypto\/&/g' \ | 81 | | sed 's/compat\// $$\(top_builddir\)\/crypto\/&/g' \ |
68 | >> libcrypto_la_objects.mk | 82 | >> libcrypto_la_objects.mk |
69 | 83 | ||
70 | 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 |
@@ -187,7 +201,6 @@ include Makefile.am.arc4random | |||
187 | libcrypto_la_SOURCES = | 201 | libcrypto_la_SOURCES = |
188 | EXTRA_libcrypto_la_SOURCES = | 202 | EXTRA_libcrypto_la_SOURCES = |
189 | 203 | ||
190 | include Makefile.am.elf-arm | ||
191 | include Makefile.am.elf-mips | 204 | include Makefile.am.elf-mips |
192 | include Makefile.am.elf-mips64 | 205 | include Makefile.am.elf-mips64 |
193 | include Makefile.am.elf-x86_64 | 206 | include Makefile.am.elf-x86_64 |
@@ -195,7 +208,6 @@ include Makefile.am.macosx-x86_64 | |||
195 | include Makefile.am.masm-x86_64 | 208 | include Makefile.am.masm-x86_64 |
196 | include Makefile.am.mingw64-x86_64 | 209 | include Makefile.am.mingw64-x86_64 |
197 | 210 | ||
198 | if !HOST_ASM_ELF_ARM | ||
199 | if !HOST_ASM_ELF_MIPS | 211 | if !HOST_ASM_ELF_MIPS |
200 | if !HOST_ASM_ELF_MIPS64 | 212 | if !HOST_ASM_ELF_MIPS64 |
201 | if !HOST_ASM_ELF_X86_64 | 213 | if !HOST_ASM_ELF_X86_64 |
@@ -209,11 +221,23 @@ endif | |||
209 | endif | 221 | endif |
210 | endif | 222 | endif |
211 | endif | 223 | endif |
212 | endif | ||
213 | 224 | ||
214 | if HOST_AARCH64 | 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 | ||
215 | libcrypto_la_SOURCES += arch/aarch64/crypto_cpu_caps.c | 233 | libcrypto_la_SOURCES += arch/aarch64/crypto_cpu_caps.c |
234 | else | ||
235 | libcrypto_la_SOURCES += arch/aarch64/crypto_cpu_caps_none.c | ||
216 | endif | 236 | endif |
237 | endif | ||
238 | endif | ||
239 | endif | ||
240 | |||
217 | if HOST_X86_64 | 241 | if HOST_X86_64 |
218 | libcrypto_la_SOURCES += arch/amd64/crypto_cpu_caps.c | 242 | libcrypto_la_SOURCES += arch/amd64/crypto_cpu_caps.c |
219 | endif | 243 | endif |
@@ -231,7 +255,6 @@ else | |||
231 | libcrypto_la_SOURCES += compat/crypto_lock_win.c | 255 | libcrypto_la_SOURCES += compat/crypto_lock_win.c |
232 | endif | 256 | endif |
233 | libcrypto_la_SOURCES += crypto_memory.c | 257 | libcrypto_la_SOURCES += crypto_memory.c |
234 | noinst_HEADERS += arm_arch.h | ||
235 | noinst_HEADERS += constant_time.h | 258 | noinst_HEADERS += constant_time.h |
236 | noinst_HEADERS += crypto_internal.h | 259 | noinst_HEADERS += crypto_internal.h |
237 | noinst_HEADERS += crypto_local.h | 260 | noinst_HEADERS += crypto_local.h |
@@ -240,7 +263,6 @@ noinst_HEADERS += x86_arch.h | |||
240 | # aes | 263 | # aes |
241 | libcrypto_la_SOURCES += aes/aes.c | 264 | libcrypto_la_SOURCES += aes/aes.c |
242 | libcrypto_la_SOURCES += aes/aes_core.c | 265 | libcrypto_la_SOURCES += aes/aes_core.c |
243 | libcrypto_la_SOURCES += aes/aes_ige.c | ||
244 | noinst_HEADERS += aes/aes_local.h | 266 | noinst_HEADERS += aes/aes_local.h |
245 | 267 | ||
246 | # asn1 | 268 | # asn1 |
@@ -293,10 +315,8 @@ libcrypto_la_SOURCES += asn1/x_attrib.c | |||
293 | libcrypto_la_SOURCES += asn1/x_bignum.c | 315 | libcrypto_la_SOURCES += asn1/x_bignum.c |
294 | libcrypto_la_SOURCES += asn1/x_crl.c | 316 | libcrypto_la_SOURCES += asn1/x_crl.c |
295 | libcrypto_la_SOURCES += asn1/x_exten.c | 317 | libcrypto_la_SOURCES += asn1/x_exten.c |
296 | libcrypto_la_SOURCES += asn1/x_info.c | ||
297 | libcrypto_la_SOURCES += asn1/x_long.c | 318 | libcrypto_la_SOURCES += asn1/x_long.c |
298 | libcrypto_la_SOURCES += asn1/x_name.c | 319 | libcrypto_la_SOURCES += asn1/x_name.c |
299 | libcrypto_la_SOURCES += asn1/x_pkey.c | ||
300 | libcrypto_la_SOURCES += asn1/x_pubkey.c | 320 | libcrypto_la_SOURCES += asn1/x_pubkey.c |
301 | libcrypto_la_SOURCES += asn1/x_req.c | 321 | libcrypto_la_SOURCES += asn1/x_req.c |
302 | libcrypto_la_SOURCES += asn1/x_sig.c | 322 | libcrypto_la_SOURCES += asn1/x_sig.c |
@@ -334,9 +354,6 @@ libcrypto_la_SOURCES += bio/bss_conn.c | |||
334 | libcrypto_la_SOURCES += bio/bss_dgram.c | 354 | libcrypto_la_SOURCES += bio/bss_dgram.c |
335 | libcrypto_la_SOURCES += bio/bss_fd.c | 355 | libcrypto_la_SOURCES += bio/bss_fd.c |
336 | libcrypto_la_SOURCES += bio/bss_file.c | 356 | libcrypto_la_SOURCES += bio/bss_file.c |
337 | if !HOST_WIN | ||
338 | libcrypto_la_SOURCES += bio/bss_log.c | ||
339 | endif | ||
340 | libcrypto_la_SOURCES += bio/bss_mem.c | 357 | libcrypto_la_SOURCES += bio/bss_mem.c |
341 | libcrypto_la_SOURCES += bio/bss_null.c | 358 | libcrypto_la_SOURCES += bio/bss_null.c |
342 | libcrypto_la_SOURCES += bio/bss_sock.c | 359 | libcrypto_la_SOURCES += bio/bss_sock.c |
@@ -344,6 +361,7 @@ noinst_HEADERS += bio/bio_local.h | |||
344 | 361 | ||
345 | # bn | 362 | # bn |
346 | libcrypto_la_SOURCES += bn/bn_add.c | 363 | libcrypto_la_SOURCES += bn/bn_add.c |
364 | libcrypto_la_SOURCES += bn/bn_add_sub.c | ||
347 | libcrypto_la_SOURCES += bn/bn_bpsw.c | 365 | libcrypto_la_SOURCES += bn/bn_bpsw.c |
348 | libcrypto_la_SOURCES += bn/bn_const.c | 366 | libcrypto_la_SOURCES += bn/bn_const.c |
349 | libcrypto_la_SOURCES += bn/bn_convert.c | 367 | libcrypto_la_SOURCES += bn/bn_convert.c |
@@ -357,6 +375,7 @@ libcrypto_la_SOURCES += bn/bn_kron.c | |||
357 | libcrypto_la_SOURCES += bn/bn_lib.c | 375 | libcrypto_la_SOURCES += bn/bn_lib.c |
358 | libcrypto_la_SOURCES += bn/bn_mod.c | 376 | libcrypto_la_SOURCES += bn/bn_mod.c |
359 | 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 | ||
360 | libcrypto_la_SOURCES += bn/bn_mont.c | 379 | libcrypto_la_SOURCES += bn/bn_mont.c |
361 | libcrypto_la_SOURCES += bn/bn_mul.c | 380 | libcrypto_la_SOURCES += bn/bn_mul.c |
362 | libcrypto_la_SOURCES += bn/bn_prime.c | 381 | libcrypto_la_SOURCES += bn/bn_prime.c |
@@ -396,10 +415,18 @@ endif | |||
396 | noinst_HEADERS += arch/i386/crypto_arch.h | 415 | noinst_HEADERS += arch/i386/crypto_arch.h |
397 | noinst_HEADERS += bn/arch/i386/bn_arch.h | 416 | noinst_HEADERS += bn/arch/i386/bn_arch.h |
398 | 417 | ||
399 | # XXX - do we still need this? | 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 | |||
400 | if HOST_MIPS | 425 | if HOST_MIPS |
426 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/ | ||
401 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/ | 427 | libcrypto_la_CPPFLAGS += -I$(top_srcdir)/crypto/bn/arch/mips/ |
402 | endif | 428 | endif |
429 | noinst_HEADERS += arch/mips/crypto_arch.h | ||
403 | noinst_HEADERS += bn/arch/mips/bn_arch.h | 430 | noinst_HEADERS += bn/arch/mips/bn_arch.h |
404 | 431 | ||
405 | if HOST_MIPS64 | 432 | if HOST_MIPS64 |
@@ -554,13 +581,16 @@ libcrypto_la_SOURCES += ec/ec_asn1.c | |||
554 | libcrypto_la_SOURCES += ec/ec_convert.c | 581 | libcrypto_la_SOURCES += ec/ec_convert.c |
555 | libcrypto_la_SOURCES += ec/ec_curve.c | 582 | libcrypto_la_SOURCES += ec/ec_curve.c |
556 | libcrypto_la_SOURCES += ec/ec_err.c | 583 | libcrypto_la_SOURCES += ec/ec_err.c |
584 | libcrypto_la_SOURCES += ec/ec_field.c | ||
557 | libcrypto_la_SOURCES += ec/ec_key.c | 585 | libcrypto_la_SOURCES += ec/ec_key.c |
558 | libcrypto_la_SOURCES += ec/ec_lib.c | 586 | libcrypto_la_SOURCES += ec/ec_lib.c |
559 | libcrypto_la_SOURCES += ec/ec_mult.c | 587 | libcrypto_la_SOURCES += ec/ec_mult.c |
560 | libcrypto_la_SOURCES += ec/ec_pmeth.c | 588 | libcrypto_la_SOURCES += ec/ec_pmeth.c |
561 | libcrypto_la_SOURCES += ec/eck_prn.c | 589 | libcrypto_la_SOURCES += ec/eck_prn.c |
590 | libcrypto_la_SOURCES += ec/ecp_hp_methods.c | ||
562 | libcrypto_la_SOURCES += ec/ecp_methods.c | 591 | libcrypto_la_SOURCES += ec/ecp_methods.c |
563 | libcrypto_la_SOURCES += ec/ecx_methods.c | 592 | libcrypto_la_SOURCES += ec/ecx_methods.c |
593 | noinst_HEADERS += ec/ec_internal.h | ||
564 | noinst_HEADERS += ec/ec_local.h | 594 | noinst_HEADERS += ec/ec_local.h |
565 | 595 | ||
566 | # ecdh | 596 | # ecdh |
@@ -792,11 +822,7 @@ libcrypto_la_SOURCES += rand/rand_lib.c | |||
792 | libcrypto_la_SOURCES += rand/randfile.c | 822 | libcrypto_la_SOURCES += rand/randfile.c |
793 | 823 | ||
794 | # rc2 | 824 | # rc2 |
795 | libcrypto_la_SOURCES += rc2/rc2_cbc.c | 825 | libcrypto_la_SOURCES += rc2/rc2.c |
796 | libcrypto_la_SOURCES += rc2/rc2_ecb.c | ||
797 | libcrypto_la_SOURCES += rc2/rc2_skey.c | ||
798 | libcrypto_la_SOURCES += rc2/rc2cfb64.c | ||
799 | libcrypto_la_SOURCES += rc2/rc2ofb64.c | ||
800 | noinst_HEADERS += rc2/rc2_local.h | 826 | noinst_HEADERS += rc2/rc2_local.h |
801 | 827 | ||
802 | # rc4 | 828 | # rc4 |
diff --git a/crypto/Makefile.am.elf-arm b/crypto/Makefile.am.elf-arm deleted file mode 100644 index 6a9fa50..0000000 --- a/crypto/Makefile.am.elf-arm +++ /dev/null | |||
@@ -1,18 +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 += -DOPENSSL_CPUID_OBJ | ||
17 | libcrypto_la_SOURCES += $(ASM_ARM_ELF) | ||
18 | endif | ||
diff --git a/crypto/Makefile.am.elf-x86_64 b/crypto/Makefile.am.elf-x86_64 index c62662c..ad49787 100644 --- a/crypto/Makefile.am.elf-x86_64 +++ b/crypto/Makefile.am.elf-x86_64 | |||
@@ -1,7 +1,5 @@ | |||
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 |
@@ -20,11 +18,14 @@ ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_4_8_alt.S | |||
20 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16_alt.S | 18 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16_alt.S |
21 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sub.S | 19 | ASM_X86_64_ELF += bn/arch/amd64/bignum_sub.S |
22 | ASM_X86_64_ELF += bn/arch/amd64/word_clz.S | 20 | ASM_X86_64_ELF += bn/arch/amd64/word_clz.S |
23 | ASM_X86_64_ELF += bn/arch/amd64/bn_arch.c | ||
24 | 21 | ||
25 | EXTRA_DIST += $(ASM_X86_64_ELF) | 22 | EXTRA_DIST += $(ASM_X86_64_ELF) |
26 | 23 | ||
27 | if HOST_ASM_ELF_X86_64 | 24 | if HOST_ASM_ELF_X86_64 |
25 | libcrypto_la_SOURCES += aes/aes_amd64.c | ||
26 | libcrypto_la_SOURCES += bn/arch/amd64/bn_arch.c | ||
27 | libcrypto_la_SOURCES += modes/gcm128_amd64.c | ||
28 | |||
28 | libcrypto_la_CPPFLAGS += -DAES_ASM | 29 | libcrypto_la_CPPFLAGS += -DAES_ASM |
29 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 30 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
30 | libcrypto_la_CPPFLAGS += -DVPAES_ASM | 31 | libcrypto_la_CPPFLAGS += -DVPAES_ASM |
diff --git a/crypto/Makefile.am.macosx-x86_64 b/crypto/Makefile.am.macosx-x86_64 index 010e3be..bbccfd6 100644 --- a/crypto/Makefile.am.macosx-x86_64 +++ b/crypto/Makefile.am.macosx-x86_64 | |||
@@ -1,7 +1,5 @@ | |||
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 |
@@ -20,11 +18,14 @@ ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8_alt.S | |||
20 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S | 18 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S |
21 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S | 19 | ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S |
22 | ASM_X86_64_MACOSX += bn/arch/amd64/word_clz.S | 20 | ASM_X86_64_MACOSX += bn/arch/amd64/word_clz.S |
23 | ASM_X86_64_MACOSX += bn/arch/amd64/bn_arch.c | ||
24 | 21 | ||
25 | EXTRA_DIST += $(ASM_X86_64_MACOSX) | 22 | EXTRA_DIST += $(ASM_X86_64_MACOSX) |
26 | 23 | ||
27 | if HOST_ASM_MACOSX_X86_64 | 24 | if HOST_ASM_MACOSX_X86_64 |
25 | libcrypto_la_SOURCES += aes/aes_amd64.c | ||
26 | libcrypto_la_SOURCES += bn/arch/amd64/bn_arch.c | ||
27 | libcrypto_la_SOURCES += modes/gcm128_amd64.c | ||
28 | |||
28 | libcrypto_la_CPPFLAGS += -DAES_ASM | 29 | libcrypto_la_CPPFLAGS += -DAES_ASM |
29 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 30 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
30 | libcrypto_la_CPPFLAGS += -DVPAES_ASM | 31 | libcrypto_la_CPPFLAGS += -DVPAES_ASM |
diff --git a/crypto/Makefile.am.masm-x86_64 b/crypto/Makefile.am.masm-x86_64 index 2ef7e1b..bb94e3a 100644 --- a/crypto/Makefile.am.masm-x86_64 +++ b/crypto/Makefile.am.masm-x86_64 | |||
@@ -1,7 +1,5 @@ | |||
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 |
@@ -12,6 +10,9 @@ ASM_X86_64_MASM += rc4/rc4-masm-x86_64.S | |||
12 | EXTRA_DIST += $(ASM_X86_64_MASM) | 10 | EXTRA_DIST += $(ASM_X86_64_MASM) |
13 | 11 | ||
14 | 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 | |||
15 | libcrypto_la_CPPFLAGS += -DAES_ASM | 16 | libcrypto_la_CPPFLAGS += -DAES_ASM |
16 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 17 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
17 | libcrypto_la_CPPFLAGS += -DVPAES_ASM | 18 | libcrypto_la_CPPFLAGS += -DVPAES_ASM |
diff --git a/crypto/Makefile.am.mingw64-x86_64 b/crypto/Makefile.am.mingw64-x86_64 index 8e39e9f..efe2643 100644 --- a/crypto/Makefile.am.mingw64-x86_64 +++ b/crypto/Makefile.am.mingw64-x86_64 | |||
@@ -1,7 +1,5 @@ | |||
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 |
@@ -12,6 +10,9 @@ ASM_X86_64_MINGW64 += rc4/rc4-mingw64-x86_64.S | |||
12 | EXTRA_DIST += $(ASM_X86_64_MINGW64) | 10 | EXTRA_DIST += $(ASM_X86_64_MINGW64) |
13 | 11 | ||
14 | 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 | |||
15 | libcrypto_la_CPPFLAGS += -Dendbr32=endbr64 | 16 | libcrypto_la_CPPFLAGS += -Dendbr32=endbr64 |
16 | libcrypto_la_CPPFLAGS += -DAES_ASM | 17 | libcrypto_la_CPPFLAGS += -DAES_ASM |
17 | libcrypto_la_CPPFLAGS += -DBSAES_ASM | 18 | libcrypto_la_CPPFLAGS += -DBSAES_ASM |
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/posix_win.c b/crypto/compat/posix_win.c index 1fbfce1..572e527 100644 --- a/crypto/compat/posix_win.c +++ b/crypto/compat/posix_win.c | |||
@@ -22,6 +22,25 @@ | |||
22 | #include <string.h> | 22 | #include <string.h> |
23 | #include <unistd.h> | 23 | #include <unistd.h> |
24 | 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 | |||
25 | void | 44 | void |
26 | posix_perror(const char *s) | 45 | posix_perror(const char *s) |
27 | { | 46 | { |
@@ -44,6 +63,12 @@ posix_fopen(const char *path, const char *mode) | |||
44 | } | 63 | } |
45 | 64 | ||
46 | int | 65 | int |
66 | libressl_fstat(int fd, struct stat *statbuf) | ||
67 | { | ||
68 | return fstat(get_real_fd(fd), statbuf); | ||
69 | } | ||
70 | |||
71 | int | ||
47 | posix_open(const char *path, ...) | 72 | posix_open(const char *path, ...) |
48 | { | 73 | { |
49 | va_list ap; | 74 | va_list ap; |
@@ -62,7 +87,11 @@ posix_open(const char *path, ...) | |||
62 | flags |= O_NOINHERIT; | 87 | flags |= O_NOINHERIT; |
63 | } | 88 | } |
64 | flags &= ~O_NONBLOCK; | 89 | flags &= ~O_NONBLOCK; |
65 | 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; | ||
66 | } | 95 | } |
67 | 96 | ||
68 | char * | 97 | char * |
@@ -150,52 +179,6 @@ wsa_errno(int err) | |||
150 | return -1; | 179 | return -1; |
151 | } | 180 | } |
152 | 181 | ||
153 | /* | ||
154 | * Employ a similar trick to cpython (pycore_fileutils.h) where the CRT report | ||
155 | * handler is disabled while checking if a descriptor is a socket or a file | ||
156 | */ | ||
157 | #if defined _MSC_VER && _MSC_VER >= 1900 | ||
158 | |||
159 | #include <crtdbg.h> | ||
160 | #include <stdlib.h> | ||
161 | |||
162 | static void noop_handler(const wchar_t *expression, const wchar_t *function, | ||
163 | const wchar_t *file, unsigned int line, uintptr_t pReserved) | ||
164 | { | ||
165 | return; | ||
166 | } | ||
167 | |||
168 | #define BEGIN_SUPPRESS_IPH \ | ||
169 | const int old_report_mode = _CrtSetReportMode(_CRT_ASSERT, 0); \ | ||
170 | const _invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler) | ||
171 | #define END_SUPPRESS_IPH \ | ||
172 | (void)old_report_mode; /* Silence warning in release mode when _CrtSetReportMode compiles to void. */ \ | ||
173 | _CrtSetReportMode(_CRT_ASSERT, old_report_mode); \ | ||
174 | _set_thread_local_invalid_parameter_handler(old_handler) | ||
175 | |||
176 | #else | ||
177 | |||
178 | #define BEGIN_SUPPRESS_IPH | ||
179 | #define END_SUPPRESS_IPH | ||
180 | |||
181 | #endif | ||
182 | |||
183 | static int | ||
184 | is_socket(int fd) | ||
185 | { | ||
186 | intptr_t hd; | ||
187 | |||
188 | BEGIN_SUPPRESS_IPH; | ||
189 | hd = _get_osfhandle(fd); | ||
190 | END_SUPPRESS_IPH; | ||
191 | |||
192 | if (hd == (intptr_t)INVALID_HANDLE_VALUE) { | ||
193 | return 1; /* fd is not file descriptor */ | ||
194 | } | ||
195 | |||
196 | return 0; | ||
197 | } | ||
198 | |||
199 | int | 182 | int |
200 | posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) | 183 | posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
201 | { | 184 | { |
@@ -209,14 +192,13 @@ int | |||
209 | posix_close(int fd) | 192 | posix_close(int fd) |
210 | { | 193 | { |
211 | int rc; | 194 | int rc; |
212 | |||
213 | if (is_socket(fd)) { | 195 | if (is_socket(fd)) { |
214 | if ((rc = closesocket(fd)) == SOCKET_ERROR) { | 196 | if ((rc = closesocket(fd)) == SOCKET_ERROR) { |
215 | int err = WSAGetLastError(); | 197 | int err = WSAGetLastError(); |
216 | rc = wsa_errno(err); | 198 | rc = wsa_errno(err); |
217 | } | 199 | } |
218 | } else { | 200 | } else { |
219 | rc = close(fd); | 201 | rc = close(get_real_fd(fd)); |
220 | } | 202 | } |
221 | return rc; | 203 | return rc; |
222 | } | 204 | } |
@@ -225,14 +207,13 @@ ssize_t | |||
225 | posix_read(int fd, void *buf, size_t count) | 207 | posix_read(int fd, void *buf, size_t count) |
226 | { | 208 | { |
227 | ssize_t rc; | 209 | ssize_t rc; |
228 | |||
229 | if (is_socket(fd)) { | 210 | if (is_socket(fd)) { |
230 | if ((rc = recv(fd, buf, count, 0)) == SOCKET_ERROR) { | 211 | if ((rc = recv(fd, buf, count, 0)) == SOCKET_ERROR) { |
231 | int err = WSAGetLastError(); | 212 | int err = WSAGetLastError(); |
232 | rc = wsa_errno(err); | 213 | rc = wsa_errno(err); |
233 | } | 214 | } |
234 | } else { | 215 | } else { |
235 | rc = read(fd, buf, count); | 216 | rc = read(get_real_fd(fd), buf, count); |
236 | } | 217 | } |
237 | return rc; | 218 | return rc; |
238 | } | 219 | } |
@@ -246,7 +227,7 @@ posix_write(int fd, const void *buf, size_t count) | |||
246 | rc = wsa_errno(WSAGetLastError()); | 227 | rc = wsa_errno(WSAGetLastError()); |
247 | } | 228 | } |
248 | } else { | 229 | } else { |
249 | rc = write(fd, buf, count); | 230 | rc = write(get_real_fd(fd), buf, count); |
250 | } | 231 | } |
251 | return rc; | 232 | return rc; |
252 | } | 233 | } |
@@ -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 59f5b62..04160af 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt | |||
@@ -1,3 +1,18 @@ | |||
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} |
@@ -24,6 +39,8 @@ elseif(HOST_ARM) | |||
24 | file(READ arch/arm/opensslconf.h OPENSSLCONF) | 39 | file(READ arch/arm/opensslconf.h OPENSSLCONF) |
25 | elseif(HOST_I386) | 40 | elseif(HOST_I386) |
26 | file(READ arch/i386/opensslconf.h OPENSSLCONF) | 41 | file(READ arch/i386/opensslconf.h OPENSSLCONF) |
42 | elseif(HOST_LOONGARCH64) | ||
43 | file(READ arch/loongarch64/opensslconf.h OPENSSLCONF) | ||
27 | elseif(HOST_MIPS) | 44 | elseif(HOST_MIPS) |
28 | file(READ arch/mips/opensslconf.h OPENSSLCONF) | 45 | file(READ arch/mips/opensslconf.h OPENSSLCONF) |
29 | elseif(HOST_MIPS64) | 46 | elseif(HOST_MIPS64) |
diff --git a/include/Makefile.am b/include/Makefile.am index feaaa60..a3e1c19 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 |
@@ -52,6 +67,7 @@ noinst_HEADERS += arch/amd64/opensslconf.h | |||
52 | noinst_HEADERS += arch/arm/opensslconf.h | 67 | noinst_HEADERS += arch/arm/opensslconf.h |
53 | noinst_HEADERS += arch/hppa/opensslconf.h | 68 | noinst_HEADERS += arch/hppa/opensslconf.h |
54 | noinst_HEADERS += arch/i386/opensslconf.h | 69 | noinst_HEADERS += arch/i386/opensslconf.h |
70 | noinst_HEADERS += arch/loongarch64/opensslconf.h | ||
55 | noinst_HEADERS += arch/m88k/opensslconf.h | 71 | noinst_HEADERS += arch/m88k/opensslconf.h |
56 | noinst_HEADERS += arch/mips/opensslconf.h | 72 | noinst_HEADERS += arch/mips/opensslconf.h |
57 | noinst_HEADERS += arch/mips64/opensslconf.h | 73 | noinst_HEADERS += arch/mips64/opensslconf.h |
diff --git a/include/arch/loongarch64/opensslconf.h b/include/arch/loongarch64/opensslconf.h new file mode 100644 index 0000000..868066c --- /dev/null +++ b/include/arch/loongarch64/opensslconf.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #include <openssl/opensslfeatures.h> | ||
2 | |||
3 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION | ||
4 | |||
5 | #ifndef OPENSSL_FILE | ||
6 | #ifdef OPENSSL_NO_FILENAMES | ||
7 | #define OPENSSL_FILE "" | ||
8 | #define OPENSSL_LINE 0 | ||
9 | #else | ||
10 | #define OPENSSL_FILE __FILE__ | ||
11 | #define OPENSSL_LINE __LINE__ | ||
12 | #endif | ||
13 | #endif | ||
14 | |||
15 | #if defined(HEADER_RC4_H) | ||
16 | #if !defined(RC4_CHUNK) | ||
17 | /* | ||
18 | * This enables code handling data aligned at natural CPU word | ||
19 | * boundary. See crypto/rc4/rc4_enc.c for further details. | ||
20 | */ | ||
21 | #define RC4_CHUNK unsigned long | ||
22 | #endif | ||
23 | #endif | ||
diff --git a/include/arch/mips/opensslconf.h b/include/arch/mips/opensslconf.h index f17d3d2..dcbe113 100644 --- a/include/arch/mips/opensslconf.h +++ b/include/arch/mips/opensslconf.h | |||
@@ -1,39 +1,18 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 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 | 2 | ||
11 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION | 3 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION |
12 | 4 | ||
13 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) | 5 | #ifndef OPENSSL_FILE |
14 | #define IDEA_INT unsigned int | 6 | #ifdef OPENSSL_NO_FILENAMES |
15 | #endif | 7 | #define OPENSSL_FILE "" |
16 | 8 | #define OPENSSL_LINE 0 | |
17 | #if defined(HEADER_MD2_H) && !defined(MD2_INT) | 9 | #else |
18 | #define MD2_INT unsigned int | 10 | #define OPENSSL_FILE __FILE__ |
11 | #define OPENSSL_LINE __LINE__ | ||
19 | #endif | 12 | #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 | 13 | #endif |
25 | 14 | ||
26 | #if defined(HEADER_RC4_H) | 15 | #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) | 16 | #if !defined(RC4_CHUNK) |
38 | /* | 17 | /* |
39 | * This enables code handling data aligned at natural CPU word | 18 | * This enables code handling data aligned at natural CPU word |
@@ -42,113 +21,3 @@ | |||
42 | #undef RC4_CHUNK | 21 | #undef RC4_CHUNK |
43 | #endif | 22 | #endif |
44 | #endif | 23 | #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/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/openssl/Makefile.am.tpl b/include/openssl/Makefile.am.tpl index 303d0b9..4bbbd60 100644 --- a/include/openssl/Makefile.am.tpl +++ b/include/openssl/Makefile.am.tpl | |||
@@ -17,6 +17,9 @@ endif | |||
17 | if HOST_I386 | 17 | if HOST_I386 |
18 | -cp $(top_srcdir)/include/arch/i386/opensslconf.h opensslconf.h | 18 | -cp $(top_srcdir)/include/arch/i386/opensslconf.h opensslconf.h |
19 | endif | 19 | endif |
20 | if HOST_LOONGARCH64 | ||
21 | -cp $(top_srcdir)/include/arch/loongarch64/opensslconf.h opensslconf.h | ||
22 | endif | ||
20 | if HOST_MIPS | 23 | if HOST_MIPS |
21 | -cp $(top_srcdir)/include/arch/mips/opensslconf.h opensslconf.h | 24 | -cp $(top_srcdir)/include/arch/mips/opensslconf.h opensslconf.h |
22 | endif | 25 | endif |
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 8cb849b..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]) |
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index 2ef4293..fd63d77 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" |
@@ -74,14 +89,14 @@ char buf[1]; getentropy(buf, 1); | |||
74 | ;; | 89 | ;; |
75 | *hpux*) | 90 | *hpux*) |
76 | HOST_OS=hpux; | 91 | HOST_OS=hpux; |
77 | if test "`echo $host_os | cut -c 1-4`" = "ia64" ; then | 92 | if test "echo $host_os | cut -c 1-4" = "ia64" ; then |
78 | if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then | 93 | if test "echo $CC | cut -d ' ' -f 1" = "gcc" ; then |
79 | CFLAGS="$CFLAGS -mlp64" | 94 | CFLAGS="$CFLAGS -mlp64" |
80 | else | 95 | else |
81 | CFLAGS="+DD64" | 96 | CFLAGS="+DD64" |
82 | fi | 97 | fi |
83 | fi | 98 | fi |
84 | if ! test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then | 99 | if ! test "echo $CC | cut -d ' ' -f 1" = "gcc" ; then |
85 | CFLAGS="-g -O2 +Otype_safety=off $CFLAGS $USER_CFLAGS" | 100 | CFLAGS="-g -O2 +Otype_safety=off $CFLAGS $USER_CFLAGS" |
86 | fi | 101 | fi |
87 | CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT" | 102 | CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT" |
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 |
@@ -644,37 +642,33 @@ ECDSA_SIG_new.3,ECDSA_size.3 | |||
644 | ECDSA_SIG_new.3,ECDSA_verify.3 | 642 | ECDSA_SIG_new.3,ECDSA_verify.3 |
645 | ECDSA_SIG_new.3,d2i_ECDSA_SIG.3 | 643 | ECDSA_SIG_new.3,d2i_ECDSA_SIG.3 |
646 | ECDSA_SIG_new.3,i2d_ECDSA_SIG.3 | 644 | ECDSA_SIG_new.3,i2d_ECDSA_SIG.3 |
647 | EC_GROUP_copy.3,EC_GROUP_check.3 | 645 | EC_GROUP_check.3,EC_GROUP_check_discriminant.3 |
648 | EC_GROUP_copy.3,EC_GROUP_check_discriminant.3 | 646 | EC_GROUP_get_curve_name.3,EC_GROUP_get0_seed.3 |
649 | EC_GROUP_copy.3,EC_GROUP_cmp.3 | 647 | EC_GROUP_get_curve_name.3,EC_GROUP_get_asn1_flag.3 |
650 | EC_GROUP_copy.3,EC_GROUP_dup.3 | 648 | EC_GROUP_get_curve_name.3,EC_GROUP_get_basis_type.3 |
651 | EC_GROUP_copy.3,EC_GROUP_get0_generator.3 | 649 | EC_GROUP_get_curve_name.3,EC_GROUP_get_point_conversion_form.3 |
652 | EC_GROUP_copy.3,EC_GROUP_get0_seed.3 | 650 | EC_GROUP_get_curve_name.3,EC_GROUP_get_seed_len.3 |
653 | EC_GROUP_copy.3,EC_GROUP_get_asn1_flag.3 | 651 | EC_GROUP_get_curve_name.3,EC_GROUP_set_asn1_flag.3 |
654 | EC_GROUP_copy.3,EC_GROUP_get_basis_type.3 | 652 | EC_GROUP_get_curve_name.3,EC_GROUP_set_curve_name.3 |
655 | EC_GROUP_copy.3,EC_GROUP_get_cofactor.3 | 653 | EC_GROUP_get_curve_name.3,EC_GROUP_set_point_conversion_form.3 |
656 | EC_GROUP_copy.3,EC_GROUP_get_curve_name.3 | 654 | EC_GROUP_get_curve_name.3,EC_GROUP_set_seed.3 |
657 | EC_GROUP_copy.3,EC_GROUP_get_degree.3 | 655 | EC_GROUP_new_by_curve_name.3,EC_GROUP_cmp.3 |
658 | EC_GROUP_copy.3,EC_GROUP_get_order.3 | 656 | EC_GROUP_new_by_curve_name.3,EC_GROUP_dup.3 |
659 | EC_GROUP_copy.3,EC_GROUP_get_point_conversion_form.3 | 657 | EC_GROUP_new_by_curve_name.3,EC_GROUP_free.3 |
660 | EC_GROUP_copy.3,EC_GROUP_get_seed_len.3 | 658 | EC_GROUP_new_by_curve_name.3,EC_curve_nid2nist.3 |
661 | EC_GROUP_copy.3,EC_GROUP_order_bits.3 | 659 | EC_GROUP_new_by_curve_name.3,EC_curve_nist2nid.3 |
662 | EC_GROUP_copy.3,EC_GROUP_set_asn1_flag.3 | 660 | EC_GROUP_new_by_curve_name.3,EC_get_builtin_curves.3 |
663 | EC_GROUP_copy.3,EC_GROUP_set_curve_name.3 | 661 | EC_GROUP_new_curve_GFp.3,EC_GROUP_clear_free.3 |
664 | EC_GROUP_copy.3,EC_GROUP_set_generator.3 | 662 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get0_generator.3 |
665 | EC_GROUP_copy.3,EC_GROUP_set_point_conversion_form.3 | 663 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_cofactor.3 |
666 | EC_GROUP_copy.3,EC_GROUP_set_seed.3 | 664 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_curve.3 |
667 | EC_GROUP_new.3,EC_GROUP_clear_free.3 | 665 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_curve_GFp.3 |
668 | EC_GROUP_new.3,EC_GROUP_free.3 | 666 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_degree.3 |
669 | EC_GROUP_new.3,EC_GROUP_get_curve.3 | 667 | EC_GROUP_new_curve_GFp.3,EC_GROUP_get_order.3 |
670 | EC_GROUP_new.3,EC_GROUP_get_curve_GFp.3 | 668 | EC_GROUP_new_curve_GFp.3,EC_GROUP_order_bits.3 |
671 | EC_GROUP_new.3,EC_GROUP_new_by_curve_name.3 | 669 | EC_GROUP_new_curve_GFp.3,EC_GROUP_set_curve.3 |
672 | EC_GROUP_new.3,EC_GROUP_new_curve_GFp.3 | 670 | EC_GROUP_new_curve_GFp.3,EC_GROUP_set_curve_GFp.3 |
673 | EC_GROUP_new.3,EC_GROUP_set_curve.3 | 671 | EC_GROUP_new_curve_GFp.3,EC_GROUP_set_generator.3 |
674 | EC_GROUP_new.3,EC_GROUP_set_curve_GFp.3 | ||
675 | EC_GROUP_new.3,EC_curve_nid2nist.3 | ||
676 | EC_GROUP_new.3,EC_curve_nist2nid.3 | ||
677 | EC_GROUP_new.3,EC_get_builtin_curves.3 | ||
678 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_free.3 | 672 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_free.3 |
679 | 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 |
680 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_get_init.3 | 674 | EC_KEY_METHOD_new.3,EC_KEY_METHOD_get_init.3 |
@@ -724,23 +718,21 @@ EC_POINT_add.3,EC_POINT_is_at_infinity.3 | |||
724 | EC_POINT_add.3,EC_POINT_is_on_curve.3 | 718 | EC_POINT_add.3,EC_POINT_is_on_curve.3 |
725 | EC_POINT_add.3,EC_POINT_make_affine.3 | 719 | EC_POINT_add.3,EC_POINT_make_affine.3 |
726 | EC_POINT_add.3,EC_POINT_mul.3 | 720 | EC_POINT_add.3,EC_POINT_mul.3 |
727 | EC_POINT_new.3,EC_POINT_bn2point.3 | 721 | EC_POINT_get_affine_coordinates.3,EC_POINT_get_affine_coordinates_GFp.3 |
722 | EC_POINT_get_affine_coordinates.3,EC_POINT_set_affine_coordinates.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 | ||
728 | EC_POINT_new.3,EC_POINT_clear_free.3 | 727 | EC_POINT_new.3,EC_POINT_clear_free.3 |
729 | EC_POINT_new.3,EC_POINT_copy.3 | 728 | EC_POINT_new.3,EC_POINT_copy.3 |
730 | EC_POINT_new.3,EC_POINT_dup.3 | 729 | EC_POINT_new.3,EC_POINT_dup.3 |
731 | EC_POINT_new.3,EC_POINT_free.3 | 730 | EC_POINT_new.3,EC_POINT_free.3 |
732 | EC_POINT_new.3,EC_POINT_get_affine_coordinates.3 | 731 | EC_POINT_point2oct.3,EC_POINT_bn2point.3 |
733 | EC_POINT_new.3,EC_POINT_get_affine_coordinates_GFp.3 | 732 | EC_POINT_point2oct.3,EC_POINT_hex2point.3 |
734 | EC_POINT_new.3,EC_POINT_hex2point.3 | 733 | EC_POINT_point2oct.3,EC_POINT_oct2point.3 |
735 | EC_POINT_new.3,EC_POINT_oct2point.3 | 734 | EC_POINT_point2oct.3,EC_POINT_point2bn.3 |
736 | EC_POINT_new.3,EC_POINT_point2bn.3 | 735 | EC_POINT_point2oct.3,EC_POINT_point2hex.3 |
737 | EC_POINT_new.3,EC_POINT_point2hex.3 | ||
738 | EC_POINT_new.3,EC_POINT_point2oct.3 | ||
739 | EC_POINT_new.3,EC_POINT_set_affine_coordinates.3 | ||
740 | EC_POINT_new.3,EC_POINT_set_affine_coordinates_GFp.3 | ||
741 | EC_POINT_new.3,EC_POINT_set_compressed_coordinates.3 | ||
742 | EC_POINT_new.3,EC_POINT_set_compressed_coordinates_GFp.3 | ||
743 | EC_POINT_new.3,EC_POINT_set_to_infinity.3 | ||
744 | ENGINE_new.3,ENGINE_by_id.3 | 736 | ENGINE_new.3,ENGINE_by_id.3 |
745 | ENGINE_new.3,ENGINE_cleanup.3 | 737 | ENGINE_new.3,ENGINE_cleanup.3 |
746 | ENGINE_new.3,ENGINE_ctrl_cmd.3 | 738 | ENGINE_new.3,ENGINE_ctrl_cmd.3 |
@@ -1182,11 +1174,6 @@ MD5.3,MD5_Update.3 | |||
1182 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_free.3 | 1174 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_free.3 |
1183 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_new.3 | 1175 | NAME_CONSTRAINTS_new.3,GENERAL_SUBTREE_new.3 |
1184 | NAME_CONSTRAINTS_new.3,NAME_CONSTRAINTS_free.3 | 1176 | NAME_CONSTRAINTS_new.3,NAME_CONSTRAINTS_free.3 |
1185 | OBJ_NAME_add.3,OBJ_NAME_cleanup.3 | ||
1186 | OBJ_NAME_add.3,OBJ_NAME_get.3 | ||
1187 | OBJ_NAME_add.3,OBJ_NAME_init.3 | ||
1188 | OBJ_NAME_add.3,OBJ_NAME_new_index.3 | ||
1189 | OBJ_NAME_add.3,OBJ_NAME_remove.3 | ||
1190 | OBJ_create.3,OBJ_add_object.3 | 1177 | OBJ_create.3,OBJ_add_object.3 |
1191 | OBJ_create.3,OBJ_cleanup.3 | 1178 | OBJ_create.3,OBJ_cleanup.3 |
1192 | OBJ_create.3,OBJ_create_objects.3 | 1179 | OBJ_create.3,OBJ_create_objects.3 |
@@ -1271,7 +1258,6 @@ OPENSSL_VERSION_NUMBER.3,SSLeay.3 | |||
1271 | OPENSSL_VERSION_NUMBER.3,SSLeay_version.3 | 1258 | OPENSSL_VERSION_NUMBER.3,SSLeay_version.3 |
1272 | OPENSSL_config.3,OPENSSL_no_config.3 | 1259 | OPENSSL_config.3,OPENSSL_no_config.3 |
1273 | OPENSSL_init_crypto.3,OPENSSL_init.3 | 1260 | OPENSSL_init_crypto.3,OPENSSL_init.3 |
1274 | OPENSSL_load_builtin_modules.3,ASN1_add_oid_module.3 | ||
1275 | OPENSSL_malloc.3,CRYPTO_free.3 | 1261 | OPENSSL_malloc.3,CRYPTO_free.3 |
1276 | OPENSSL_malloc.3,CRYPTO_malloc.3 | 1262 | OPENSSL_malloc.3,CRYPTO_malloc.3 |
1277 | OPENSSL_malloc.3,CRYPTO_strdup.3 | 1263 | OPENSSL_malloc.3,CRYPTO_strdup.3 |
@@ -1303,7 +1289,6 @@ OpenSSL_add_all_algorithms.3,OpenSSL_add_all_digests.3 | |||
1303 | OpenSSL_add_all_algorithms.3,SSLeay_add_all_algorithms.3 | 1289 | OpenSSL_add_all_algorithms.3,SSLeay_add_all_algorithms.3 |
1304 | PEM_ASN1_read.3,PEM_ASN1_read_bio.3 | 1290 | PEM_ASN1_read.3,PEM_ASN1_read_bio.3 |
1305 | PEM_ASN1_read.3,d2i_of_void.3 | 1291 | PEM_ASN1_read.3,d2i_of_void.3 |
1306 | PEM_X509_INFO_read.3,PEM_X509_INFO_read_bio.3 | ||
1307 | PEM_read.3,PEM_def_callback.3 | 1292 | PEM_read.3,PEM_def_callback.3 |
1308 | PEM_read.3,PEM_do_header.3 | 1293 | PEM_read.3,PEM_do_header.3 |
1309 | PEM_read.3,PEM_get_EVP_CIPHER_INFO.3 | 1294 | PEM_read.3,PEM_get_EVP_CIPHER_INFO.3 |
@@ -2048,7 +2033,6 @@ X509_OBJECT_get0_X509.3,X509_OBJECT_idx_by_subject.3 | |||
2048 | X509_OBJECT_get0_X509.3,X509_OBJECT_new.3 | 2033 | X509_OBJECT_get0_X509.3,X509_OBJECT_new.3 |
2049 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_by_subject.3 | 2034 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_by_subject.3 |
2050 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_match.3 | 2035 | X509_OBJECT_get0_X509.3,X509_OBJECT_retrieve_match.3 |
2051 | X509_PKEY_new.3,X509_PKEY_free.3 | ||
2052 | X509_PUBKEY_new.3,X509_PUBKEY_free.3 | 2036 | X509_PUBKEY_new.3,X509_PUBKEY_free.3 |
2053 | X509_PUBKEY_new.3,X509_PUBKEY_get.3 | 2037 | X509_PUBKEY_new.3,X509_PUBKEY_get.3 |
2054 | X509_PUBKEY_new.3,X509_PUBKEY_get0.3 | 2038 | X509_PUBKEY_new.3,X509_PUBKEY_get0.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..b094100 --- /dev/null +++ b/patches/amd64_crypto_arch.h.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | --- crypto/arch/amd64/crypto_arch.h.orig Wed Jul 23 08:15:02 2025 | ||
2 | +++ crypto/arch/amd64/crypto_arch.h Wed Jul 23 08:15:20 2025 | ||
3 | @@ -47,6 +47,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 | @@ -55,6 +56,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_arch.h.patch b/patches/crypto_arch.h.patch deleted file mode 100644 index 6c889e5..0000000 --- a/patches/crypto_arch.h.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | --- crypto/arch/amd64/crypto_arch.h.orig Fri Feb 14 06:00:43 2025 | ||
2 | +++ crypto/arch/amd64/crypto_arch.h Fri Feb 14 06:01:13 2025 | ||
3 | @@ -40,6 +40,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 | @@ -48,6 +49,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 | |||
19 | --- crypto/arch/aarch64/crypto_arch.h.orig Thu Mar 13 05:42:37 2025 | ||
20 | +++ crypto/arch/aarch64/crypto_arch.h Thu Mar 13 05:47:39 2025 | ||
21 | @@ -33,11 +33,13 @@ | ||
22 | #define CRYPTO_CPU_CAPS_AARCH64_SHA512 (1ULL << 4) | ||
23 | #define CRYPTO_CPU_CAPS_AARCH64_SHA3 (1ULL << 5) | ||
24 | |||
25 | +#if 0 | ||
26 | #ifndef OPENSSL_NO_ASM | ||
27 | |||
28 | #define HAVE_SHA256_BLOCK_DATA_ORDER | ||
29 | #define HAVE_SHA512_BLOCK_DATA_ORDER | ||
30 | |||
31 | +#endif | ||
32 | #endif | ||
33 | |||
34 | #endif | ||
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 319aca6..345a170 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | --- apps/nc/netcat.c.orig Sat Aug 17 03:21:05 2024 | 1 | --- apps/nc/netcat.c.orig Fri Jun 27 12:39:21 2025 |
2 | +++ apps/nc/netcat.c Sat Aug 17 03:28:50 2024 | 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 | @@ -923,7 +933,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 | @@ -938,8 +951,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 | @@ -1031,7 +1046,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 | @@ -1052,9 +1070,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 | @@ -1559,11 +1579,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 | @@ -1574,9 +1596,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 | @@ -1600,13 +1629,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 | @@ -1831,15 +1864,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 5ba5ac6..60ea9a7 100644 --- a/patches/openssl.c.patch +++ b/patches/openssl.c.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | --- apps/openssl/openssl.c.orig Thu Jan 2 08:27:54 2025 | 1 | --- apps/openssl/openssl.c.orig Sat May 31 03:18:05 2025 |
2 | +++ apps/openssl/openssl.c Thu Jan 2 08:28:04 2025 | 2 | +++ apps/openssl/openssl.c Sat May 31 03:18:17 2025 |
3 | @@ -344,7 +344,9 @@ BIO *bio_err = NULL; | 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 77df5dc..d370b32 100644 --- a/patches/opensslfeatures.h.patch +++ b/patches/opensslfeatures.h.patch | |||
@@ -36,3 +36,14 @@ | |||
36 | #include "bytestring.h" | 36 | #include "bytestring.h" |
37 | 37 | ||
38 | #if defined(__cplusplus) | 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-aarch64-crypto-cpu-caps.c.patch b/patches/patch-aarch64-crypto-cpu-caps.c.patch deleted file mode 100644 index dcfbdc0..0000000 --- a/patches/patch-aarch64-crypto-cpu-caps.c.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | Disable feature detection until we find a more portable way. | ||
2 | |||
3 | --- crypto/arch/aarch64/crypto_cpu_caps.c.orig Sat Dec 14 13:45:16 2024 | ||
4 | +++ crypto/arch/aarch64/crypto_cpu_caps.c Sat Dec 14 13:54:06 2024 | ||
5 | @@ -16,9 +16,12 @@ | ||
6 | */ | ||
7 | |||
8 | #include <sys/types.h> | ||
9 | + | ||
10 | +#if defined(__OpenBSD__) | ||
11 | #include <sys/sysctl.h> | ||
12 | |||
13 | #include <machine/cpu.h> | ||
14 | +#endif | ||
15 | |||
16 | #include <stddef.h> | ||
17 | #include <stdio.h> | ||
18 | @@ -67,6 +70,7 @@ parse_isar0(uint64_t isar0) | ||
19 | return caps; | ||
20 | } | ||
21 | |||
22 | +#if defined(__OpenBSD__) | ||
23 | static int | ||
24 | read_isar0(uint64_t *isar0) | ||
25 | { | ||
26 | @@ -84,6 +88,13 @@ read_isar0(uint64_t *isar0) | ||
27 | |||
28 | return 1; | ||
29 | } | ||
30 | +#else | ||
31 | +static int | ||
32 | +read_isar0(uint64_t *isar0) | ||
33 | +{ | ||
34 | + return 0; | ||
35 | +} | ||
36 | +#endif | ||
37 | |||
38 | void | ||
39 | crypto_cpu_caps_init(void) | ||
diff --git a/patches/patch-i386-crypto-cpu-caps.c.patch b/patches/patch-i386-crypto-cpu-caps.c.patch index c85e33c..0642582 100644 --- a/patches/patch-i386-crypto-cpu-caps.c.patch +++ b/patches/patch-i386-crypto-cpu-caps.c.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | --- crypto/arch/i386/crypto_cpu_caps.c.orig Fri Oct 18 17:35:20 2024 | 1 | --- crypto/arch/i386/crypto_cpu_caps.c.orig Mon Jun 16 10:38:27 2025 |
2 | +++ crypto/arch/i386/crypto_cpu_caps.c Fri Oct 18 17:39:13 2024 | 2 | +++ crypto/arch/i386/crypto_cpu_caps.c Mon Jun 16 10:38:39 2025 |
3 | @@ -33,7 +33,7 @@ cpuid(uint32_t eax, uint32_t *out_eax, uint32_t *out_e | 3 | @@ -37,7 +37,7 @@ cpuid(uint32_t eax, uint32_t *out_eax, uint32_t *out_e |
4 | { | 4 | { |
5 | uint32_t ebx = 0, ecx = 0, edx = 0; | 5 | uint32_t ebx = 0, ecx = 0, edx = 0; |
6 | 6 | ||
@@ -9,7 +9,7 @@ | |||
9 | __asm__ ("cpuid": "+a"(eax), "+b"(ebx), "+c"(ecx), "+d"(edx)); | 9 | __asm__ ("cpuid": "+a"(eax), "+b"(ebx), "+c"(ecx), "+d"(edx)); |
10 | #else | 10 | #else |
11 | eax = 0; | 11 | eax = 0; |
12 | @@ -54,7 +54,7 @@ xgetbv(uint32_t ecx, uint32_t *out_eax, uint32_t *out_ | 12 | @@ -58,7 +58,7 @@ xgetbv(uint32_t ecx, uint32_t *out_eax, uint32_t *out_ |
13 | { | 13 | { |
14 | uint32_t eax = 0, edx = 0; | 14 | uint32_t eax = 0, edx = 0; |
15 | 15 | ||
diff --git a/patches/speed.c.patch b/patches/speed.c.patch index e1f1698..32e42b4 100644 --- a/patches/speed.c.patch +++ b/patches/speed.c.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | --- apps/openssl/speed.c.orig Thu Jan 2 08:04:28 2025 | 1 | --- apps/openssl/speed.c.orig Sat May 31 03:18:05 2025 |
2 | +++ apps/openssl/speed.c Thu Jan 2 08:04:38 2025 | 2 | +++ apps/openssl/speed.c Sat May 31 03:18:17 2025 |
3 | @@ -158,7 +158,16 @@ static void | 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 | @@ -1129,8 +1138,10 @@ speed_main(int argc, char **argv) | 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 | @@ -1205,6 +1216,7 @@ speed_main(int argc, char **argv) | 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 | @@ -1219,6 +1231,7 @@ speed_main(int argc, char **argv) | 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 | @@ -1542,7 +1555,9 @@ speed_main(int argc, char **argv) | 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 | @@ -1551,8 +1566,10 @@ speed_main(int argc, char **argv) | 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 | @@ -1624,11 +1641,13 @@ speed_main(int argc, char **argv) | 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 | @@ -2434,7 +2453,9 @@ speed_main(int argc, char **argv) | 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 | @@ -2590,11 +2611,15 @@ pkey_print_message(const char *str, const char *str2, | 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,7 +105,7 @@ | |||
105 | static char * | 105 | static char * |
106 | sstrsep(char **string, const char *delim) | 106 | sstrsep(char **string, const char *delim) |
107 | { | 107 | { |
108 | @@ -2795,5 +2820,6 @@ do_multi(int multi) | 108 | @@ -2731,5 +2756,6 @@ do_multi(int multi) |
109 | free(fds); | 109 | free(fds); |
110 | return 1; | 110 | return 1; |
111 | } | 111 | } |
diff --git a/scripts/test b/scripts/test index 1fb02eb..a93fe90 100755 --- a/scripts/test +++ b/scripts/test | |||
@@ -132,6 +132,21 @@ elif [ "$ARCH" = "arm32" -o "$ARCH" = "arm64" ]; then | |||
132 | 132 | ||
133 | file apps/openssl/.libs/openssl | 133 | file apps/openssl/.libs/openssl |
134 | 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 | |||
135 | elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then | 150 | elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then |
136 | sudo apt-get install -y qemu-user-static binfmt-support | 151 | sudo apt-get install -y qemu-user-static binfmt-support |
137 | 152 | ||
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index bdcfbb2..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 |
@@ -117,10 +132,12 @@ elseif(HOST_ARM) | |||
117 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/arm/) | 132 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/arm/) |
118 | elseif(HOST_I386) | 133 | elseif(HOST_I386) |
119 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/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) | ||
120 | elseif(HOST_MIPS64) | 137 | elseif(HOST_MIPS64) |
121 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips64) | 138 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips64) |
122 | elseif(HOST_MIPS) | 139 | elseif(HOST_MIPS) |
123 | # XXX - can this go away? the directory doesn't exist... | 140 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/mips) |
124 | elseif(HOST_POWERPC) | 141 | elseif(HOST_POWERPC) |
125 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/powerpc) | 142 | target_include_directories(ssl_obj PRIVATE ../crypto/arch/powerpc) |
126 | elseif(HOST_POWERPC64) | 143 | elseif(HOST_POWERPC64) |
diff --git a/ssl/Makefile.am b/ssl/Makefile.am index f9a66a3..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 |
@@ -131,9 +146,15 @@ libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/i386/ | |||
131 | endif | 146 | endif |
132 | noinst_HEADERS += $(top_srcdir)/crypto/arch/i386/crypto_arch.h | 147 | noinst_HEADERS += $(top_srcdir)/crypto/arch/i386/crypto_arch.h |
133 | 148 | ||
134 | # XXX - do we still need this? | 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 | |||
135 | if HOST_MIPS | 154 | if HOST_MIPS |
155 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/ | ||
136 | endif | 156 | endif |
157 | noinst_HEADERS += $(top_srcdir)/crypto/arch/mips/crypto_arch.h | ||
137 | 158 | ||
138 | if HOST_MIPS64 | 159 | if HOST_MIPS64 |
139 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/ | 160 | libssl_la_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips64/ |
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8d6fa9d..c497b77 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( |
@@ -28,10 +43,12 @@ elseif(HOST_ARM) | |||
28 | include_directories(../crypto/arch/arm/) | 43 | include_directories(../crypto/arch/arm/) |
29 | elseif(HOST_I386) | 44 | elseif(HOST_I386) |
30 | include_directories(../crypto/arch/i386/) | 45 | include_directories(../crypto/arch/i386/) |
46 | elseif(HOST_LOONGARCH64) | ||
47 | include_directories(../crypto/arch/loongarch64) | ||
31 | elseif(HOST_MIPS64) | 48 | elseif(HOST_MIPS64) |
32 | include_directories(../crypto/arch/mips64) | 49 | include_directories(../crypto/arch/mips64) |
33 | elseif(HOST_MIPS) | 50 | elseif(HOST_MIPS) |
34 | # XXX - can this go away? the directory doesn't exist... | 51 | include_directories(../crypto/arch/mips) |
35 | elseif(HOST_POWERPC) | 52 | elseif(HOST_POWERPC) |
36 | include_directories(../crypto/arch/powerpc) | 53 | include_directories(../crypto/arch/powerpc) |
37 | elseif(HOST_POWERPC64) | 54 | elseif(HOST_POWERPC64) |
@@ -63,6 +80,9 @@ function(add_platform_test TEST_NAME) | |||
63 | endif() | 80 | endif() |
64 | endfunction() | 81 | endfunction() |
65 | 82 | ||
83 | # XXX - should probably be in their own static lib | ||
84 | set(TEST_HELPER_SRC test.c test_util.c) | ||
85 | |||
66 | # aeadtest | 86 | # aeadtest |
67 | add_executable(aeadtest aeadtest.c) | 87 | add_executable(aeadtest aeadtest.c) |
68 | target_link_libraries(aeadtest ${OPENSSL_TEST_LIBS}) | 88 | target_link_libraries(aeadtest ${OPENSSL_TEST_LIBS}) |
@@ -447,6 +467,7 @@ add_platform_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt) | |||
447 | # evp_test | 467 | # evp_test |
448 | add_executable(evp_test evp_test.c) | 468 | add_executable(evp_test evp_test.c) |
449 | target_link_libraries(evp_test ${OPENSSL_TEST_LIBS}) | 469 | target_link_libraries(evp_test ${OPENSSL_TEST_LIBS}) |
470 | prepare_emscripten_test_target(evp_test) | ||
450 | add_platform_test(evp_test evp_test) | 471 | add_platform_test(evp_test evp_test) |
451 | 472 | ||
452 | # exdata_test | 473 | # exdata_test |
@@ -534,9 +555,12 @@ prepare_emscripten_test_target(lhash_test) | |||
534 | add_platform_test(lhash_test lhash_test) | 555 | add_platform_test(lhash_test lhash_test) |
535 | 556 | ||
536 | # md_test | 557 | # md_test |
537 | add_executable(md_test md_test.c) | 558 | # XXX - ftruncate and mkstemp missing from Windows |
538 | target_link_libraries(md_test ${OPENSSL_TEST_LIBS}) | 559 | if(NOT WIN32) |
539 | 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() | ||
540 | 564 | ||
541 | # mlkem_tests | 565 | # mlkem_tests |
542 | add_executable(mlkem_tests mlkem_tests.c mlkem_tests_util.c parse_test_file.c) | 566 | add_executable(mlkem_tests mlkem_tests.c mlkem_tests_util.c parse_test_file.c) |
@@ -618,13 +642,7 @@ add_platform_test(policy policy) | |||
618 | # pq_test | 642 | # pq_test |
619 | add_executable(pq_test pq_test.c) | 643 | add_executable(pq_test pq_test.c) |
620 | target_link_libraries(pq_test ${OPENSSL_TEST_LIBS}) | 644 | target_link_libraries(pq_test ${OPENSSL_TEST_LIBS}) |
621 | if(NOT WIN32) | 645 | add_platform_test(pq_test pq_test) |
622 | add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh) | ||
623 | else() | ||
624 | add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.bat | ||
625 | $<TARGET_FILE:pq_test>) | ||
626 | endif() | ||
627 | set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
628 | 646 | ||
629 | # quictest | 647 | # quictest |
630 | set(QUICTEST_SRC quictest.c) | 648 | set(QUICTEST_SRC quictest.c) |
@@ -722,9 +740,12 @@ endif() | |||
722 | set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | 740 | set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") |
723 | 741 | ||
724 | # sha_test | 742 | # sha_test |
725 | add_executable(sha_test sha_test.c) | 743 | # XXX - ftruncate and mkstemp missing from Windows |
726 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) | 744 | if(NOT WIN32) |
727 | add_platform_test(sha_test sha_test) | 745 | add_executable(sha_test sha_test.c ${TEST_HELPER_SRC}) |
746 | target_link_libraries(sha_test ${OPENSSL_TEST_LIBS}) | ||
747 | add_platform_test(sha_test sha_test) | ||
748 | endif() | ||
728 | 749 | ||
729 | # shutdowntest | 750 | # shutdowntest |
730 | set(SHUTDOWNTEST_SRC shutdowntest.c) | 751 | set(SHUTDOWNTEST_SRC shutdowntest.c) |
@@ -936,11 +957,6 @@ add_executable(x509_name_test x509_name_test.c) | |||
936 | target_link_libraries(x509_name_test ${OPENSSL_TEST_LIBS}) | 957 | target_link_libraries(x509_name_test ${OPENSSL_TEST_LIBS}) |
937 | add_platform_test(x509_name_test x509_name_test) | 958 | add_platform_test(x509_name_test x509_name_test) |
938 | 959 | ||
939 | # x509name | ||
940 | add_executable(x509name x509name.c) | ||
941 | target_link_libraries(x509name ${OPENSSL_TEST_LIBS}) | ||
942 | add_platform_test(x509name x509name) | ||
943 | |||
944 | # x509req_ext | 960 | # x509req_ext |
945 | add_executable(x509req_ext x509req_ext.c) | 961 | add_executable(x509req_ext x509req_ext.c) |
946 | target_link_libraries(x509req_ext ${OPENSSL_TEST_LIBS}) | 962 | target_link_libraries(x509req_ext ${OPENSSL_TEST_LIBS}) |
diff --git a/tests/Makefile.am b/tests/Makefile.am index 8153fc9..914b1e5 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 |
@@ -19,6 +34,7 @@ AM_CPPFLAGS += -I $(top_srcdir)/crypto/modes | |||
19 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/sha | 34 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/sha |
20 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/x509 | 35 | AM_CPPFLAGS += -I $(top_srcdir)/crypto/x509 |
21 | AM_CPPFLAGS += -I $(top_srcdir)/ssl | 36 | AM_CPPFLAGS += -I $(top_srcdir)/ssl |
37 | AM_CPPFLAGS += -I $(top_srcdir)/tests | ||
22 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl | 38 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl |
23 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl/compat | 39 | AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl/compat |
24 | AM_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"$(top_srcdir)/cert.pem\" | 40 | AM_CPPFLAGS += -D_PATH_SSL_CA_FILE=\"$(top_srcdir)/cert.pem\" |
@@ -36,8 +52,12 @@ if HOST_I386 | |||
36 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/i386/ | 52 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/i386/ |
37 | endif | 53 | endif |
38 | 54 | ||
39 | # XXX - do we still need this? | 55 | if HOST_LOONGARCH64 |
56 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/loongarch64/ | ||
57 | endif | ||
58 | |||
40 | if HOST_MIPS | 59 | if HOST_MIPS |
60 | AM_CPPFLAGS += -I$(top_srcdir)/crypto/arch/mips/ | ||
41 | endif | 61 | endif |
42 | 62 | ||
43 | if HOST_MIPS64 | 63 | if HOST_MIPS64 |
@@ -82,6 +102,11 @@ check_PROGRAMS = | |||
82 | EXTRA_DIST = CMakeLists.txt | 102 | EXTRA_DIST = CMakeLists.txt |
83 | DISTCLEANFILES = pidwraptest.txt | 103 | DISTCLEANFILES = pidwraptest.txt |
84 | 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 | |||
85 | # aeadtest | 110 | # aeadtest |
86 | TESTS += aeadtest.sh | 111 | TESTS += aeadtest.sh |
87 | check_PROGRAMS += aeadtest | 112 | check_PROGRAMS += aeadtest |
@@ -334,7 +359,7 @@ chachatest_SOURCES = chachatest.c | |||
334 | TESTS += cipher_list | 359 | TESTS += cipher_list |
335 | check_PROGRAMS += cipher_list | 360 | check_PROGRAMS += cipher_list |
336 | cipher_list_SOURCES = cipher_list.c | 361 | cipher_list_SOURCES = cipher_list.c |
337 | noinst_HEADERS = tests.h | 362 | noinst_HEADERS += tests.h |
338 | 363 | ||
339 | # cipherstest | 364 | # cipherstest |
340 | TESTS += cipherstest | 365 | TESTS += cipherstest |
@@ -544,7 +569,7 @@ lhash_test_SOURCES = lhash_test.c | |||
544 | # md_test | 569 | # md_test |
545 | TESTS += md_test | 570 | TESTS += md_test |
546 | check_PROGRAMS += md_test | 571 | check_PROGRAMS += md_test |
547 | md_test_SOURCES = md_test.c | 572 | md_test_SOURCES = md_test.c $(TEST_HELPER_SRC) |
548 | 573 | ||
549 | noinst_HEADERS += mlkem_tests_util.h | 574 | noinst_HEADERS += mlkem_tests_util.h |
550 | noinst_HEADERS += parse_test_file.h | 575 | noinst_HEADERS += parse_test_file.h |
@@ -652,11 +677,9 @@ EXTRA_DIST += policy_root2.pem | |||
652 | EXTRA_DIST += policy_root_cross_inhibit_mapping.pem | 677 | EXTRA_DIST += policy_root_cross_inhibit_mapping.pem |
653 | 678 | ||
654 | # pq_test | 679 | # pq_test |
655 | TESTS += pq_test.sh | 680 | TESTS += pq_test |
656 | check_PROGRAMS += pq_test | 681 | check_PROGRAMS += pq_test |
657 | pq_test_SOURCES = pq_test.c | 682 | pq_test_SOURCES = pq_test.c |
658 | EXTRA_DIST += pq_test.sh pq_test.bat | ||
659 | EXTRA_DIST += pq_expected.txt | ||
660 | 683 | ||
661 | # quictest | 684 | # quictest |
662 | TESTS += quictest.sh | 685 | TESTS += quictest.sh |
@@ -743,7 +766,7 @@ EXTRA_DIST += servertest.sh servertest.bat | |||
743 | # sha_test | 766 | # sha_test |
744 | TESTS += sha_test | 767 | TESTS += sha_test |
745 | check_PROGRAMS += sha_test | 768 | check_PROGRAMS += sha_test |
746 | sha_test_SOURCES = sha_test.c | 769 | sha_test_SOURCES = sha_test.c $(TEST_HELPER_SRC) |
747 | 770 | ||
748 | # shutdowntest | 771 | # shutdowntest |
749 | TESTS += shutdowntest.sh | 772 | TESTS += shutdowntest.sh |
@@ -915,11 +938,6 @@ TESTS += x509_name_test | |||
915 | check_PROGRAMS += x509_name_test | 938 | check_PROGRAMS += x509_name_test |
916 | x509_name_test_SOURCES = x509_name_test.c | 939 | x509_name_test_SOURCES = x509_name_test.c |
917 | 940 | ||
918 | # x509name | ||
919 | TESTS += x509name | ||
920 | check_PROGRAMS += x509name | ||
921 | x509name_SOURCES = x509name.c | ||
922 | |||
923 | # x509req_ext | 941 | # x509req_ext |
924 | TESTS += x509req_ext | 942 | TESTS += x509req_ext |
925 | check_PROGRAMS += x509req_ext | 943 | check_PROGRAMS += 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/compat/pipe2.c b/tests/compat/pipe2.c index 7600783..c27a858 100644 --- a/tests/compat/pipe2.c +++ b/tests/compat/pipe2.c | |||
@@ -35,6 +35,22 @@ static int setfl(int fd, int flag) | |||
35 | return rc; | 35 | return rc; |
36 | } | 36 | } |
37 | 37 | ||
38 | /* | ||
39 | * Have open() temporarily use up file descriptors until reaching beyond the | ||
40 | * allocated sockets, then leak the ones conflicting with any of the latter. | ||
41 | */ | ||
42 | static void create_issue_1069_sentinels(int socket_vector[2]) | ||
43 | { | ||
44 | int fd = open("CONIN$", O_RDONLY); | ||
45 | if (fd == -1 || fd > socket_vector[0] && fd > socket_vector[1]) { | ||
46 | return; | ||
47 | } | ||
48 | create_issue_1069_sentinels(socket_vector); | ||
49 | if (fd != socket_vector[0] && fd != socket_vector[1]) { | ||
50 | close(fd); | ||
51 | } | ||
52 | } | ||
53 | |||
38 | int socketpair(int domain, int type, int protocol, int socket_vector[2]) | 54 | int socketpair(int domain, int type, int protocol, int socket_vector[2]) |
39 | { | 55 | { |
40 | if (domain != AF_UNIX || !(type & SOCK_STREAM) || protocol != PF_UNSPEC) | 56 | if (domain != AF_UNIX || !(type & SOCK_STREAM) || protocol != PF_UNSPEC) |
@@ -85,6 +101,9 @@ int socketpair(int domain, int type, int protocol, int socket_vector[2]) | |||
85 | goto err; | 101 | goto err; |
86 | 102 | ||
87 | closesocket(listener); | 103 | closesocket(listener); |
104 | |||
105 | create_issue_1069_sentinels(socket_vector); | ||
106 | |||
88 | return 0; | 107 | return 0; |
89 | 108 | ||
90 | err: | 109 | err: |
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.sh b/tests/mlkem_tests.sh index 2a9856e..cbc0f0b 100755 --- a/tests/mlkem_tests.sh +++ b/tests/mlkem_tests.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 | TEST=./mlkem_tests | 19 | TEST=./mlkem_tests |
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 index 0086046..6691a39 100644 --- a/tests/renegotiation_test.bat +++ b/tests/renegotiation_test.bat | |||
@@ -1,6 +1,19 @@ | |||
1 | @echo off | 1 | @echo off |
2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
3 | REM renegotiation_test.bat | 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. | ||
4 | 17 | ||
5 | set renegotiation_test_bin=%1 | 18 | set renegotiation_test_bin=%1 |
6 | set renegotiation_test_bin=%renegotiation_test_bin:/=\% | 19 | set renegotiation_test_bin=%renegotiation_test_bin:/=\% |
diff --git a/tests/renegotiation_test.sh b/tests/renegotiation_test.sh index bbf27c8..8d963a2 100755 --- a/tests/renegotiation_test.sh +++ b/tests/renegotiation_test.sh | |||
@@ -1,4 +1,19 @@ | |||
1 | #!/bin/sh | 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 | |||
2 | set -e | 17 | set -e |
3 | 18 | ||
4 | renegotiation_test_bin=./renegotiation_test | 19 | renegotiation_test_bin=./renegotiation_test |
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 c81bbb0..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 |
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,6 @@ 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 | ||
87 | |||
88 | $CP $libcrypto_src/opensslfeatures.h include/openssl | 101 | $CP $libcrypto_src/opensslfeatures.h include/openssl |
89 | $CP $libssl_src/pqueue.h include | 102 | $CP $libssl_src/pqueue.h include |
90 | 103 | ||
@@ -166,6 +179,11 @@ for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do | |||
166 | fi | 179 | fi |
167 | done | 180 | done |
168 | 181 | ||
182 | for arch in amd64 i386; do | ||
183 | $CP $libcrypto_src/aes/aes_${arch}.c crypto/aes/ | ||
184 | $CP $libcrypto_src/modes/gcm128_${arch}.c crypto/modes/ | ||
185 | done | ||
186 | |||
169 | for i in $libcrypto_src/arch/*; do | 187 | for i in $libcrypto_src/arch/*; do |
170 | arch=`basename $i` | 188 | arch=`basename $i` |
171 | mkdir -p include/arch/$arch | 189 | mkdir -p include/arch/$arch |
@@ -210,6 +228,7 @@ gen_asm_stdout() { | |||
210 | EOF | 228 | EOF |
211 | if [ $1 = "masm" ]; then | 229 | if [ $1 = "masm" ]; then |
212 | fixup_masm crypto/$3.tmp crypto/$3 | 230 | fixup_masm crypto/$3.tmp crypto/$3 |
231 | rm crypto/$3.tmp | ||
213 | else | 232 | else |
214 | $MV crypto/$3.tmp crypto/$3 | 233 | $MV crypto/$3.tmp crypto/$3 |
215 | fi | 234 | fi |
@@ -238,6 +257,7 @@ gen_asm() { | |||
238 | EOF | 257 | EOF |
239 | if [ $1 = "masm" ]; then | 258 | if [ $1 = "masm" ]; then |
240 | fixup_masm crypto/$3.tmp crypto/$3 | 259 | fixup_masm crypto/$3.tmp crypto/$3 |
260 | rm crypto/$3.tmp | ||
241 | else | 261 | else |
242 | $MV crypto/$3.tmp crypto/$3 | 262 | $MV crypto/$3.tmp crypto/$3 |
243 | fi | 263 | fi |
@@ -259,23 +279,10 @@ gen_asm_mips 64 sha sha1-mips sha1-mips64 | |||
259 | gen_asm_mips 64 sha sha512-mips sha256-mips64 | 279 | gen_asm_mips 64 sha sha512-mips sha256-mips64 |
260 | gen_asm_mips 64 sha sha512-mips sha512-mips64 | 280 | gen_asm_mips 64 sha sha512-mips sha512-mips64 |
261 | 281 | ||
262 | echo generating arm ASM source for elf | ||
263 | gen_asm_stdout elf aes/asm/aes-armv4.pl aes/aes-elf-armv4.S | ||
264 | gen_asm_stdout elf bn/asm/armv4-mont.pl bn/mont-elf-armv4.S | ||
265 | gen_asm_stdout elf sha/asm/sha1-armv4-large.pl sha/sha1-elf-armv4.S | ||
266 | gen_asm_stdout elf sha/asm/sha256-armv4.pl sha/sha256-elf-armv4.S | ||
267 | gen_asm_stdout elf sha/asm/sha512-armv4.pl sha/sha512-elf-armv4.S | ||
268 | gen_asm_stdout elf modes/asm/ghash-armv4.pl modes/ghash-elf-armv4.S | ||
269 | $CP $libcrypto_src/arch/arm/armv4cpuid.S crypto | ||
270 | $CP $libcrypto_src/arch/arm/armcap.c crypto | ||
271 | $CP $libcrypto_src/arch/arm/arm_arch.h crypto | ||
272 | |||
273 | for abi in elf macosx masm mingw64; do | 282 | for abi in elf macosx masm mingw64; do |
274 | echo generating x86_64 ASM source for $abi | 283 | echo generating x86_64 ASM source for $abi |
275 | 284 | ||
276 | gen_asm_stdout $abi aes/asm/aes-x86_64.pl aes/aes-$abi-x86_64.S | 285 | gen_asm_stdout $abi aes/asm/aes-x86_64.pl aes/aes-$abi-x86_64.S |
277 | gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl aes/vpaes-$abi-x86_64.S | ||
278 | gen_asm_stdout $abi aes/asm/bsaes-x86_64.pl aes/bsaes-$abi-x86_64.S | ||
279 | gen_asm_stdout $abi aes/asm/aesni-x86_64.pl aes/aesni-$abi-x86_64.S | 286 | gen_asm_stdout $abi aes/asm/aesni-x86_64.pl aes/aesni-$abi-x86_64.S |
280 | gen_asm_stdout $abi bn/asm/modexp512-x86_64.pl bn/modexp512-$abi-x86_64.S | 287 | gen_asm_stdout $abi bn/asm/modexp512-x86_64.pl bn/modexp512-$abi-x86_64.S |
281 | gen_asm_stdout $abi bn/asm/x86_64-mont.pl bn/mont-$abi-x86_64.S | 288 | gen_asm_stdout $abi bn/asm/x86_64-mont.pl bn/mont-$abi-x86_64.S |
@@ -376,7 +383,6 @@ done | |||
376 | $CP $libssl_regress/unit/tests.h tests | 383 | $CP $libssl_regress/unit/tests.h tests |
377 | $CP $libssl_regress/certs/*.pem tests | 384 | $CP $libssl_regress/certs/*.pem tests |
378 | $CP $libssl_regress/certs/*.crl tests | 385 | $CP $libssl_regress/certs/*.crl tests |
379 | $CP $libssl_regress/pqueue/expected.txt tests/pq_expected.txt | ||
380 | 386 | ||
381 | # copy libtls tests | 387 | # copy libtls tests |
382 | for i in `find $libtls_regress -name '*.c'`; do | 388 | for i in `find $libtls_regress -name '*.c'`; do |