uringmachine 0.15 → 0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +3 -0
- data/.gitmodules +4 -0
- data/CHANGELOG.md +12 -0
- data/TODO.md +12 -3
- data/examples/bm_send.rb +86 -0
- data/ext/um/um.c +28 -1
- data/ext/um/um.h +3 -0
- data/ext/um/um_class.c +17 -0
- data/ext/um/um_stream_class.c +0 -1
- data/ext/um/um_utils.c +38 -15
- data/lib/uringmachine/version.rb +1 -1
- data/lib/uringmachine.rb +4 -3
- data/test/test_um.rb +76 -0
- data/vendor/libressl/.github/scripts/changelog.sh +74 -0
- data/vendor/libressl/.github/workflows/android.yml +35 -0
- data/vendor/libressl/.github/workflows/cifuzz.yml +33 -0
- data/vendor/libressl/.github/workflows/cmake-config.yml +98 -0
- data/vendor/libressl/.github/workflows/coverity.yml +69 -0
- data/vendor/libressl/.github/workflows/emscripten.yml +71 -0
- data/vendor/libressl/.github/workflows/fedora-rawhide.yml +39 -0
- data/vendor/libressl/.github/workflows/freebsd.yml +71 -0
- data/vendor/libressl/.github/workflows/linux.yml +71 -0
- data/vendor/libressl/.github/workflows/macos.yml +37 -0
- data/vendor/libressl/.github/workflows/release.yml +81 -0
- data/vendor/libressl/.github/workflows/rust-openssl.yml +47 -0
- data/vendor/libressl/.github/workflows/solaris.yml +37 -0
- data/vendor/libressl/.github/workflows/windows.yml +70 -0
- data/vendor/libressl/.gitignore +333 -0
- data/vendor/libressl/CMakeLists.txt +581 -0
- data/vendor/libressl/COPYING +133 -0
- data/vendor/libressl/ChangeLog +3280 -0
- data/vendor/libressl/FindLibreSSL.cmake +232 -0
- data/vendor/libressl/LibreSSLConfig.cmake.in +36 -0
- data/vendor/libressl/Makefile.am +60 -0
- data/vendor/libressl/Makefile.am.common +20 -0
- data/vendor/libressl/OPENBSD_BRANCH +1 -0
- data/vendor/libressl/README.md +238 -0
- data/vendor/libressl/README.mingw.md +43 -0
- data/vendor/libressl/apps/CMakeLists.txt +18 -0
- data/vendor/libressl/apps/Makefile.am +5 -0
- data/vendor/libressl/apps/nc/CMakeLists.txt +67 -0
- data/vendor/libressl/apps/nc/Makefile.am +64 -0
- data/vendor/libressl/apps/nc/compat/accept4.c +17 -0
- data/vendor/libressl/apps/nc/compat/readpassphrase.c +205 -0
- data/vendor/libressl/apps/nc/compat/socket.c +29 -0
- data/vendor/libressl/apps/nc/compat/sys/socket.h +30 -0
- data/vendor/libressl/apps/ocspcheck/CMakeLists.txt +44 -0
- data/vendor/libressl/apps/ocspcheck/Makefile.am +45 -0
- data/vendor/libressl/apps/ocspcheck/compat/.gitignore +0 -0
- data/vendor/libressl/apps/openssl/CMakeLists.txt +97 -0
- data/vendor/libressl/apps/openssl/Makefile.am +108 -0
- data/vendor/libressl/apps/openssl/apps_win.c +138 -0
- data/vendor/libressl/apps/openssl/certhash_win.c +13 -0
- data/vendor/libressl/apps/openssl/compat/clock_gettime_osx.c +26 -0
- data/vendor/libressl/apps/openssl/compat/poll_win.c +329 -0
- data/vendor/libressl/appveyor.yml +53 -0
- data/vendor/libressl/autogen.sh +15 -0
- data/vendor/libressl/check-release.sh +86 -0
- data/vendor/libressl/cmake_export_symbol.cmake +71 -0
- data/vendor/libressl/cmake_uninstall.cmake.in +36 -0
- data/vendor/libressl/config +17 -0
- data/vendor/libressl/configure.ac +165 -0
- data/vendor/libressl/crypto/CMakeLists.txt +863 -0
- data/vendor/libressl/crypto/Makefile.am +962 -0
- data/vendor/libressl/crypto/Makefile.am.arc4random +46 -0
- data/vendor/libressl/crypto/Makefile.am.elf-mips +14 -0
- data/vendor/libressl/crypto/Makefile.am.elf-mips64 +14 -0
- data/vendor/libressl/crypto/Makefile.am.elf-x86_64 +35 -0
- data/vendor/libressl/crypto/Makefile.am.macosx-x86_64 +35 -0
- data/vendor/libressl/crypto/Makefile.am.masm-x86_64 +22 -0
- data/vendor/libressl/crypto/Makefile.am.mingw64-x86_64 +23 -0
- data/vendor/libressl/crypto/arch/aarch64/crypto_cpu_caps_darwin.c +60 -0
- data/vendor/libressl/crypto/arch/aarch64/crypto_cpu_caps_linux.c +62 -0
- data/vendor/libressl/crypto/arch/aarch64/crypto_cpu_caps_none.c +26 -0
- data/vendor/libressl/crypto/arch/aarch64/crypto_cpu_caps_windows.c +36 -0
- data/vendor/libressl/crypto/arch/loongarch64/crypto_arch.h +21 -0
- data/vendor/libressl/crypto/arch/mips/crypto_arch.h +21 -0
- data/vendor/libressl/crypto/bn/arch/loongarch64/bn_arch.h +23 -0
- data/vendor/libressl/crypto/bn/arch/mips/bn_arch.h +24 -0
- data/vendor/libressl/crypto/compat/.gitignore +31 -0
- data/vendor/libressl/crypto/compat/arc4random.h +41 -0
- data/vendor/libressl/crypto/compat/b_win.c +55 -0
- data/vendor/libressl/crypto/compat/bsd-asprintf.c +96 -0
- data/vendor/libressl/crypto/compat/crypto_lock_win.c +56 -0
- data/vendor/libressl/crypto/compat/explicit_bzero_win.c +13 -0
- data/vendor/libressl/crypto/compat/freezero.c +32 -0
- data/vendor/libressl/crypto/compat/getdelim.c +78 -0
- data/vendor/libressl/crypto/compat/getline.c +40 -0
- data/vendor/libressl/crypto/compat/getopt_long.c +528 -0
- data/vendor/libressl/crypto/compat/getpagesize.c +18 -0
- data/vendor/libressl/crypto/compat/getprogname_linux.c +23 -0
- data/vendor/libressl/crypto/compat/getprogname_unimpl.c +7 -0
- data/vendor/libressl/crypto/compat/getprogname_windows.c +13 -0
- data/vendor/libressl/crypto/compat/posix_win.c +296 -0
- data/vendor/libressl/crypto/compat/syslog_r.c +19 -0
- data/vendor/libressl/crypto/compat/ui_openssl_win.c +334 -0
- data/vendor/libressl/dist.sh +22 -0
- data/vendor/libressl/gen-coverage-report.sh +58 -0
- data/vendor/libressl/gen-openbsd-tags.sh +20 -0
- data/vendor/libressl/include/CMakeLists.txt +61 -0
- data/vendor/libressl/include/Makefile.am +79 -0
- data/vendor/libressl/include/arch/loongarch64/opensslconf.h +150 -0
- data/vendor/libressl/include/arch/mips/opensslconf.h +150 -0
- data/vendor/libressl/include/compat/arpa/inet.h +15 -0
- data/vendor/libressl/include/compat/arpa/nameser.h +25 -0
- data/vendor/libressl/include/compat/cet.h +19 -0
- data/vendor/libressl/include/compat/dirent.h +17 -0
- data/vendor/libressl/include/compat/dirent_msvc.h +611 -0
- data/vendor/libressl/include/compat/endian.h +161 -0
- data/vendor/libressl/include/compat/err.h +95 -0
- data/vendor/libressl/include/compat/fcntl.h +32 -0
- data/vendor/libressl/include/compat/getopt.h +50 -0
- data/vendor/libressl/include/compat/limits.h +25 -0
- data/vendor/libressl/include/compat/netdb.h +10 -0
- data/vendor/libressl/include/compat/netinet/in.h +19 -0
- data/vendor/libressl/include/compat/netinet/ip.h +49 -0
- data/vendor/libressl/include/compat/netinet/tcp.h +10 -0
- data/vendor/libressl/include/compat/poll.h +63 -0
- data/vendor/libressl/include/compat/pthread.h +122 -0
- data/vendor/libressl/include/compat/readpassphrase.h +44 -0
- data/vendor/libressl/include/compat/resolv.h +24 -0
- data/vendor/libressl/include/compat/stdint.h +31 -0
- data/vendor/libressl/include/compat/stdio.h +65 -0
- data/vendor/libressl/include/compat/stdlib.h +57 -0
- data/vendor/libressl/include/compat/string.h +98 -0
- data/vendor/libressl/include/compat/sys/_null.h +18 -0
- data/vendor/libressl/include/compat/sys/ioctl.h +11 -0
- data/vendor/libressl/include/compat/sys/mman.h +19 -0
- data/vendor/libressl/include/compat/sys/param.h +15 -0
- data/vendor/libressl/include/compat/sys/queue.h +536 -0
- data/vendor/libressl/include/compat/sys/select.h +10 -0
- data/vendor/libressl/include/compat/sys/socket.h +18 -0
- data/vendor/libressl/include/compat/sys/stat.h +129 -0
- data/vendor/libressl/include/compat/sys/time.h +37 -0
- data/vendor/libressl/include/compat/sys/tree.h +1006 -0
- data/vendor/libressl/include/compat/sys/types.h +69 -0
- data/vendor/libressl/include/compat/sys/uio.h +17 -0
- data/vendor/libressl/include/compat/syslog.h +38 -0
- data/vendor/libressl/include/compat/time.h +59 -0
- data/vendor/libressl/include/compat/unistd.h +83 -0
- data/vendor/libressl/include/compat/win32netcompat.h +57 -0
- data/vendor/libressl/include/openssl/Makefile.am.tpl +45 -0
- data/vendor/libressl/libcrypto.pc.in +28 -0
- data/vendor/libressl/libressl.pub +2 -0
- data/vendor/libressl/libssl.pc.in +28 -0
- data/vendor/libressl/libtls.pc.in +28 -0
- data/vendor/libressl/m4/ax_add_fortify_source.m4 +80 -0
- data/vendor/libressl/m4/ax_check_compile_flag.m4 +53 -0
- data/vendor/libressl/m4/check-hardening-options.m4 +110 -0
- data/vendor/libressl/m4/check-libc.m4 +189 -0
- data/vendor/libressl/m4/check-os-options.m4 +181 -0
- data/vendor/libressl/m4/disable-compiler-warnings.m4 +44 -0
- data/vendor/libressl/man/CMakeLists.txt +26 -0
- data/vendor/libressl/man/links +2780 -0
- data/vendor/libressl/man/update_links.sh +25 -0
- data/vendor/libressl/openssl.pc.in +11 -0
- data/vendor/libressl/patches/bn_shift.patch +34 -0
- data/vendor/libressl/patches/crypto_arch.h.patch +34 -0
- data/vendor/libressl/patches/crypto_namespace.h.patch +22 -0
- data/vendor/libressl/patches/netcat.c.patch +178 -0
- data/vendor/libressl/patches/openssl.c.patch +12 -0
- data/vendor/libressl/patches/opensslfeatures.h.patch +49 -0
- data/vendor/libressl/patches/patch-amd64-crypto-cpu-caps.c.patch +20 -0
- data/vendor/libressl/patches/patch-i386-crypto-cpu-caps.c.patch +20 -0
- data/vendor/libressl/patches/speed.c.patch +114 -0
- data/vendor/libressl/patches/ssl_namespace.h.patch +21 -0
- data/vendor/libressl/patches/tls.h.patch +16 -0
- data/vendor/libressl/patches/tls_config.c.patch +15 -0
- data/vendor/libressl/patches/win32_amd64_bn_arch.h.patch +28 -0
- data/vendor/libressl/patches/windows_headers.patch +80 -0
- data/vendor/libressl/scripts/config.guess +1774 -0
- data/vendor/libressl/scripts/config.sub +1907 -0
- data/vendor/libressl/scripts/i686-w64-mingw32.cmake +9 -0
- data/vendor/libressl/scripts/test +210 -0
- data/vendor/libressl/scripts/wrap-compiler-for-flag-check +31 -0
- data/vendor/libressl/scripts/x86_64-w64-mingw32.cmake +9 -0
- data/vendor/libressl/ssl/CMakeLists.txt +183 -0
- data/vendor/libressl/ssl/Makefile.am +187 -0
- data/vendor/libressl/tests/CMakeLists.txt +970 -0
- data/vendor/libressl/tests/Makefile.am +944 -0
- data/vendor/libressl/tests/aeadtest.sh +30 -0
- data/vendor/libressl/tests/arc4randomforktest.sh +21 -0
- data/vendor/libressl/tests/asn1time_small.test +10 -0
- data/vendor/libressl/tests/cmake/CMakeLists.txt +52 -0
- data/vendor/libressl/tests/cmake/crypto.c +7 -0
- data/vendor/libressl/tests/cmake/ssl.c +6 -0
- data/vendor/libressl/tests/cmake/tls.c +6 -0
- data/vendor/libressl/tests/compat/pipe2.c +186 -0
- data/vendor/libressl/tests/dtlstest.sh +28 -0
- data/vendor/libressl/tests/evptest.sh +22 -0
- data/vendor/libressl/tests/keypairtest.sh +27 -0
- data/vendor/libressl/tests/mlkem_tests.sh +39 -0
- data/vendor/libressl/tests/ocsptest.bat +25 -0
- data/vendor/libressl/tests/ocsptest.sh +23 -0
- data/vendor/libressl/tests/openssl.cnf +29 -0
- data/vendor/libressl/tests/optionstest.c +381 -0
- data/vendor/libressl/tests/pidwraptest.c +85 -0
- data/vendor/libressl/tests/pidwraptest.sh +26 -0
- data/vendor/libressl/tests/quictest.bat +27 -0
- data/vendor/libressl/tests/quictest.sh +30 -0
- data/vendor/libressl/tests/renegotiation_test.bat +27 -0
- data/vendor/libressl/tests/renegotiation_test.sh +30 -0
- data/vendor/libressl/tests/rfc5280time_small.test +10 -0
- data/vendor/libressl/tests/servertest.bat +27 -0
- data/vendor/libressl/tests/servertest.sh +30 -0
- data/vendor/libressl/tests/shutdowntest.bat +27 -0
- data/vendor/libressl/tests/shutdowntest.sh +30 -0
- data/vendor/libressl/tests/ssltest.bat +32 -0
- data/vendor/libressl/tests/ssltest.sh +48 -0
- data/vendor/libressl/tests/testdsa.bat +47 -0
- data/vendor/libressl/tests/testdsa.sh +57 -0
- data/vendor/libressl/tests/testenc.bat +85 -0
- data/vendor/libressl/tests/testenc.sh +93 -0
- data/vendor/libressl/tests/testrsa.bat +47 -0
- data/vendor/libressl/tests/testrsa.sh +57 -0
- data/vendor/libressl/tests/testssl.bat +171 -0
- data/vendor/libressl/tests/tlstest.bat +27 -0
- data/vendor/libressl/tests/tlstest.sh +28 -0
- data/vendor/libressl/tls/CMakeLists.txt +125 -0
- data/vendor/libressl/tls/Makefile.am +76 -0
- data/vendor/libressl/tls/compat/ftruncate.c +17 -0
- data/vendor/libressl/tls/compat/pread.c +29 -0
- data/vendor/libressl/tls/compat/pwrite.c +29 -0
- data/vendor/libressl/update.sh +460 -0
- data/vendor/liburing/.github/workflows/ci.yml +8 -0
- data/vendor/liburing/configure +23 -2
- data/vendor/liburing/examples/helpers.c +1 -1
- data/vendor/liburing/examples/helpers.h +1 -1
- data/vendor/liburing/examples/reg-wait.c +3 -3
- data/vendor/liburing/examples/zcrx.c +5 -5
- data/vendor/liburing/liburing.spec +1 -1
- data/vendor/liburing/src/include/liburing/io_uring.h +16 -0
- data/vendor/liburing/src/include/liburing.h +20 -4
- data/vendor/liburing/src/lib.h +2 -4
- data/vendor/liburing/src/liburing-ffi.map +7 -0
- data/vendor/liburing/src/liburing.map +7 -0
- data/vendor/liburing/src/register.c +5 -0
- data/vendor/liburing/src/sanitize.c +5 -4
- data/vendor/liburing/src/setup.c +43 -28
- data/vendor/liburing/test/Makefile +7 -0
- data/vendor/liburing/test/cmd-discard.c +2 -2
- data/vendor/liburing/test/evfd-short-read.c +84 -0
- data/vendor/liburing/test/fdinfo-sqpoll.c +117 -0
- data/vendor/liburing/test/fdinfo.c +1 -1
- data/vendor/liburing/test/fixed-buf-merge.c +2 -2
- data/vendor/liburing/test/futex-kill.c +135 -0
- data/vendor/liburing/test/helpers.c +1 -1
- data/vendor/liburing/test/helpers.h +1 -1
- data/vendor/liburing/test/init-mem.c +50 -12
- data/vendor/liburing/test/io_uring_passthrough.c +25 -6
- data/vendor/liburing/test/msg-ring.c +123 -9
- data/vendor/liburing/test/recv-bundle-short-ooo.c +16 -1
- data/vendor/liburing/test/recv-inc-ooo.c +411 -0
- data/vendor/liburing/test/recv-mshot-fair.c +513 -0
- data/vendor/liburing/test/reg-wait.c +14 -14
- data/vendor/liburing/test/send-zerocopy.c +4 -4
- data/vendor/liburing/test/timerfd-short-read.c +81 -0
- data/vendor/liburing/test/timestamp.c +382 -0
- data/vendor/liburing/test/zcrx.c +22 -22
- metadata +222 -2
@@ -0,0 +1,171 @@
|
|
1
|
+
@echo on
|
2
|
+
setlocal enabledelayedexpansion
|
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.
|
17
|
+
|
18
|
+
set key=%1
|
19
|
+
set cert=%2
|
20
|
+
set CA=-CAfile %3
|
21
|
+
set ssltest=%4 -key %key% -cert %cert% -c_key %key% -c_cert %cert%
|
22
|
+
set openssl=%5
|
23
|
+
set extra=%6
|
24
|
+
|
25
|
+
%openssl% version & if !errorlevel! neq 0 exit /b 1
|
26
|
+
|
27
|
+
set lines=0
|
28
|
+
for /f "usebackq" %%s in (`%openssl% x509 -in %cert% -text -noout ^| find "DSA Public Key"`) do (
|
29
|
+
set /a lines=%lines%+1
|
30
|
+
)
|
31
|
+
if %lines% gtr 0 (
|
32
|
+
set dsa_cert=YES
|
33
|
+
) else (
|
34
|
+
set dsa_cert=NO
|
35
|
+
)
|
36
|
+
|
37
|
+
REM #########################################################################
|
38
|
+
|
39
|
+
echo test sslv2/sslv3
|
40
|
+
%ssltest% %extra% & if !errorlevel! neq 0 exit /b 1
|
41
|
+
|
42
|
+
echo test sslv2/sslv3 with server authentication
|
43
|
+
%ssltest% -server_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
44
|
+
|
45
|
+
echo test sslv2/sslv3 with client authentication
|
46
|
+
%ssltest% -client_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
47
|
+
|
48
|
+
echo test sslv2/sslv3 with both client and server authentication
|
49
|
+
%ssltest% -server_auth -client_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
50
|
+
|
51
|
+
echo test sslv2/sslv3 via BIO pair
|
52
|
+
%ssltest% %extra% & if !errorlevel! neq 0 exit /b 1
|
53
|
+
|
54
|
+
if %dsa_cert%==NO (
|
55
|
+
echo "test sslv2/sslv3 w/o (EC)DHE via BIO pair"
|
56
|
+
%ssltest% -bio_pair -no_dhe -no_ecdhe %extra% & if !errorlevel! neq 0 exit /b 1
|
57
|
+
)
|
58
|
+
|
59
|
+
echo test sslv2/sslv3 with 1024bit DHE via BIO pair
|
60
|
+
%ssltest% -bio_pair -dhe1024dsa -v %extra% & if !errorlevel! neq 0 exit /b 1
|
61
|
+
|
62
|
+
echo test sslv2/sslv3 with server authentication
|
63
|
+
%ssltest% -bio_pair -server_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
64
|
+
|
65
|
+
echo test sslv2/sslv3 with client authentication via BIO pair
|
66
|
+
%ssltest% -bio_pair -client_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
67
|
+
|
68
|
+
echo test sslv2/sslv3 with both client and server authentication via BIO pair
|
69
|
+
%ssltest% -bio_pair -server_auth -client_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
70
|
+
|
71
|
+
echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify
|
72
|
+
%ssltest% -bio_pair -server_auth -client_auth -app_verify %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
73
|
+
|
74
|
+
echo "Testing ciphersuites"
|
75
|
+
for %%p in ( SSLv3,TLSv1.2 ) do (
|
76
|
+
echo "Testing ciphersuites for %%p"
|
77
|
+
for /f "usebackq" %%c in (`%openssl% ciphers -v "%%p+aRSA" ^| find "%%p"`) do (
|
78
|
+
echo "Testing %%c"
|
79
|
+
%ssltest% -cipher %%c -tls1_2
|
80
|
+
if !errorlevel! neq 0 (
|
81
|
+
echo "Failed %%c"
|
82
|
+
exit /b 1
|
83
|
+
)
|
84
|
+
)
|
85
|
+
)
|
86
|
+
for %%p in ( TLSv1.3 ) do (
|
87
|
+
echo "Testing ciphersuites for %%p"
|
88
|
+
for /f "usebackq" %%c in (`%openssl% ciphers -v "%%p" ^| find "%%p"`) do (
|
89
|
+
echo "Testing %%c"
|
90
|
+
%ssltest% -cipher %%c
|
91
|
+
if !errorlevel! neq 0 (
|
92
|
+
echo "Failed %%c"
|
93
|
+
exit /b 1
|
94
|
+
)
|
95
|
+
)
|
96
|
+
)
|
97
|
+
|
98
|
+
REM ##########################################################################
|
99
|
+
|
100
|
+
for /f "usebackq" %%s in (`%openssl% no-dh`) do set nodh=%%s
|
101
|
+
if %nodh%==no-dh (
|
102
|
+
echo skipping anonymous DH tests
|
103
|
+
) else (
|
104
|
+
echo skipping tls1 tests.
|
105
|
+
)
|
106
|
+
|
107
|
+
REM #for /f "usebackq" %%s in (`%openssl% no-rsa`) do set norsa=%%s
|
108
|
+
REM #if %norsa%==no-rsa (
|
109
|
+
REM # echo skipping RSA tests
|
110
|
+
REM #) else (
|
111
|
+
REM # echo "test tls1 with 1024bit RSA, no (EC)DHE, multiple handshakes"
|
112
|
+
REM # %ssltest% -v -bio_pair -tls1 -cert ..\apps\server2.pem -no_dhe -no_ecdhe -num 10 -f -time %extra% & if !errorlevel! neq 0 exit /b 1
|
113
|
+
REM #
|
114
|
+
REM # for /f "usebackq" %%s in (`%openssl% no-dh`) do set nodh=%%s
|
115
|
+
REM # if %nodh%==no-dh (
|
116
|
+
REM # echo skipping RSA+DHE tests
|
117
|
+
REM # ) else (
|
118
|
+
REM # echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes
|
119
|
+
REM # %ssltest% -v -bio_pair -tls1 -cert ..\apps\server2.pem -dhe1024dsa -num 10 -f -time %extra% & if !errorlevel! neq 0 exit /b 1
|
120
|
+
REM # )
|
121
|
+
REM #)
|
122
|
+
|
123
|
+
REM #
|
124
|
+
REM # DTLS tests
|
125
|
+
REM #
|
126
|
+
|
127
|
+
echo test dtlsv1_2
|
128
|
+
%ssltest% -dtls1_2 %extra% & if !errorlevel! neq 0 exit /b 1
|
129
|
+
|
130
|
+
echo test dtlsv1_2 with server authentication
|
131
|
+
%ssltest% -dtls1_2 -server_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
132
|
+
|
133
|
+
echo test dtlsv1_2 with client authentication
|
134
|
+
%ssltest% -dtls1_2 -client_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
135
|
+
|
136
|
+
echo test dtlsv1_2 with both client and server authentication
|
137
|
+
%ssltest% -dtls1_2 -server_auth -client_auth %CA% %extra% & if !errorlevel! neq 0 exit /b 1
|
138
|
+
|
139
|
+
echo "Testing DTLS ciphersuites"
|
140
|
+
for %%p in ( SSLv3 ) do (
|
141
|
+
echo "Testing ciphersuites for %%p"
|
142
|
+
for /f "usebackq" %%c in (`%openssl% ciphers -v "RSA+%%p:-RC4" ^| find "%%p"`) do (
|
143
|
+
echo "Testing %%c"
|
144
|
+
%ssltest% -cipher %%c -dtls1_2
|
145
|
+
if !errorlevel! neq 0 (
|
146
|
+
echo "Failed %%c"
|
147
|
+
exit /b 1
|
148
|
+
)
|
149
|
+
)
|
150
|
+
)
|
151
|
+
|
152
|
+
REM #
|
153
|
+
REM # ALPN tests
|
154
|
+
REM #
|
155
|
+
echo "Testing ALPN..."
|
156
|
+
%ssltest% -bio_pair -alpn_client foo -alpn_server bar & if !errorlevel! neq 0 exit /b 1
|
157
|
+
%ssltest% -bio_pair -alpn_client foo -alpn_server foo ^
|
158
|
+
-alpn_expected foo & if !errorlevel! neq 0 exit /b 1
|
159
|
+
%ssltest% -bio_pair -alpn_client foo,bar -alpn_server foo ^
|
160
|
+
-alpn_expected foo & if !errorlevel! neq 0 exit /b 1
|
161
|
+
%ssltest% -bio_pair -alpn_client bar,foo -alpn_server foo ^
|
162
|
+
-alpn_expected foo & if !errorlevel! neq 0 exit /b 1
|
163
|
+
%ssltest% -bio_pair -alpn_client bar,foo -alpn_server foo,bar ^
|
164
|
+
-alpn_expected foo & if !errorlevel! neq 0 exit /b 1
|
165
|
+
%ssltest% -bio_pair -alpn_client bar,foo -alpn_server bar,foo ^
|
166
|
+
-alpn_expected bar & if !errorlevel! neq 0 exit /b 1
|
167
|
+
%ssltest% -bio_pair -alpn_client foo,bar -alpn_server bar,foo ^
|
168
|
+
-alpn_expected bar & if !errorlevel! neq 0 exit /b 1
|
169
|
+
%ssltest% -bio_pair -alpn_client baz -alpn_server bar,foo & if !errorlevel! neq 0 exit /b 1
|
170
|
+
|
171
|
+
endlocal
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@echo off
|
2
|
+
setlocal enabledelayedexpansion
|
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.
|
17
|
+
|
18
|
+
set tlstest_bin=%1
|
19
|
+
set tlstest_bin=%tlstest_bin:/=\%
|
20
|
+
if not exist %tlstest_bin% exit /b 1
|
21
|
+
|
22
|
+
%tlstest_bin% %srcdir%\ca-root-rsa.pem %srcdir%\server1-rsa-chain.pem %srcdir%\server1-rsa.pem
|
23
|
+
if !errorlevel! neq 0 (
|
24
|
+
exit /b 1
|
25
|
+
)
|
26
|
+
|
27
|
+
endlocal
|
@@ -0,0 +1,28 @@
|
|
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
|
+
|
17
|
+
set -e
|
18
|
+
|
19
|
+
tlstest_bin=./tlstest
|
20
|
+
if [ -e ./tlstest.exe ]; then
|
21
|
+
tlstest_bin=./tlstest.exe
|
22
|
+
fi
|
23
|
+
|
24
|
+
if [ -z $srcdir ]; then
|
25
|
+
srcdir=.
|
26
|
+
fi
|
27
|
+
|
28
|
+
$tlstest_bin $srcdir/ca-root-rsa.pem $srcdir/server1-rsa-chain.pem $srcdir/server1-rsa.pem
|
@@ -0,0 +1,125 @@
|
|
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
|
+
|
16
|
+
set(
|
17
|
+
TLS_SRC
|
18
|
+
tls.c
|
19
|
+
tls_bio_cb.c
|
20
|
+
tls_client.c
|
21
|
+
tls_config.c
|
22
|
+
tls_conninfo.c
|
23
|
+
tls_keypair.c
|
24
|
+
tls_server.c
|
25
|
+
tls_signer.c
|
26
|
+
tls_ocsp.c
|
27
|
+
tls_peer.c
|
28
|
+
tls_util.c
|
29
|
+
tls_verify.c
|
30
|
+
)
|
31
|
+
|
32
|
+
set(TLS_COMPAT_SRC empty.c)
|
33
|
+
|
34
|
+
if(WIN32)
|
35
|
+
set(
|
36
|
+
TLS_SRC
|
37
|
+
${TLS_SRC}
|
38
|
+
)
|
39
|
+
|
40
|
+
set(TLS_COMPAT_SRC ${TLS_COMPAT_SRC} compat/ftruncate.c)
|
41
|
+
set(TLS_COMPAT_SRC ${TLS_COMPAT_SRC} compat/pread.c)
|
42
|
+
set(TLS_COMPAT_SRC ${TLS_COMPAT_SRC} compat/pwrite.c)
|
43
|
+
endif()
|
44
|
+
|
45
|
+
add_definitions(-DTLS_DEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
|
46
|
+
|
47
|
+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym DESTINATION
|
48
|
+
${CMAKE_CURRENT_BINARY_DIR})
|
49
|
+
|
50
|
+
add_library(tls_compat_obj OBJECT ${TLS_COMPAT_SRC})
|
51
|
+
target_include_directories(tls_compat_obj
|
52
|
+
PRIVATE
|
53
|
+
.
|
54
|
+
../include/compat
|
55
|
+
PUBLIC
|
56
|
+
../include
|
57
|
+
${CMAKE_BINARY_DIR}/include)
|
58
|
+
|
59
|
+
add_library(tls_obj OBJECT ${TLS_SRC})
|
60
|
+
target_include_directories(tls_obj
|
61
|
+
PRIVATE
|
62
|
+
.
|
63
|
+
../include/compat
|
64
|
+
PUBLIC
|
65
|
+
../include
|
66
|
+
${CMAKE_BINARY_DIR}/include)
|
67
|
+
|
68
|
+
if(BUILD_SHARED_LIBS)
|
69
|
+
add_library(tls $<TARGET_OBJECTS:tls_obj> $<TARGET_OBJECTS:tls_compat_obj> $<TARGET_OBJECTS:compat_obj> empty.c)
|
70
|
+
else()
|
71
|
+
add_library(tls $<TARGET_OBJECTS:tls_obj> $<TARGET_OBJECTS:tls_compat_obj> empty.c)
|
72
|
+
endif()
|
73
|
+
|
74
|
+
export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym)
|
75
|
+
target_link_libraries(tls ${OPENSSL_LIBS})
|
76
|
+
set_target_properties(tls PROPERTIES
|
77
|
+
OUTPUT_NAME tls
|
78
|
+
ARCHIVE_OUTPUT_NAME tls
|
79
|
+
EXPORT_NAME TLS
|
80
|
+
VERSION ${TLS_VERSION}
|
81
|
+
SOVERSION ${TLS_MAJOR_VERSION}
|
82
|
+
)
|
83
|
+
if(NOT CMAKE_VERSION VERSION_LESS 3.27.0)
|
84
|
+
set_target_properties(tls PROPERTIES DLL_NAME_WITH_SOVERSION TRUE)
|
85
|
+
endif()
|
86
|
+
|
87
|
+
target_include_directories(
|
88
|
+
tls
|
89
|
+
PUBLIC
|
90
|
+
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
|
91
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
92
|
+
)
|
93
|
+
|
94
|
+
install(
|
95
|
+
TARGETS tls
|
96
|
+
EXPORT TLS-target
|
97
|
+
)
|
98
|
+
|
99
|
+
export(
|
100
|
+
EXPORT TLS-target
|
101
|
+
FILE "${LibreSSL_BINARY_DIR}/LibreSSL-TLS.cmake"
|
102
|
+
NAMESPACE LibreSSL::
|
103
|
+
)
|
104
|
+
|
105
|
+
if(ENABLE_LIBRESSL_INSTALL)
|
106
|
+
install(
|
107
|
+
TARGETS tls
|
108
|
+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
109
|
+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
110
|
+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
111
|
+
)
|
112
|
+
install(
|
113
|
+
EXPORT TLS-target
|
114
|
+
FILE "LibreSSL-TLS.cmake"
|
115
|
+
NAMESPACE LibreSSL::
|
116
|
+
DESTINATION "${LIBRESSL_INSTALL_CMAKEDIR}"
|
117
|
+
)
|
118
|
+
endif(ENABLE_LIBRESSL_INSTALL)
|
119
|
+
|
120
|
+
# build static library for regression test
|
121
|
+
if(BUILD_SHARED_LIBS)
|
122
|
+
add_library(tls-static STATIC $<TARGET_OBJECTS:tls_obj>)
|
123
|
+
target_link_libraries(tls-static ${OPENSSL_TEST_LIBS})
|
124
|
+
endif()
|
125
|
+
|
@@ -0,0 +1,76 @@
|
|
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
|
+
|
16
|
+
include $(top_srcdir)/Makefile.am.common
|
17
|
+
|
18
|
+
-include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk
|
19
|
+
-include $(abs_top_builddir)/ssl/libssl_la_objects.mk
|
20
|
+
|
21
|
+
lib_LTLIBRARIES = libtls.la
|
22
|
+
|
23
|
+
EXTRA_DIST = VERSION
|
24
|
+
EXTRA_DIST += CMakeLists.txt
|
25
|
+
EXTRA_DIST += tls.sym
|
26
|
+
EXTRA_DIST += empty.c
|
27
|
+
|
28
|
+
CLEANFILES = libtls_la_objects.mk
|
29
|
+
|
30
|
+
EXTRA_libtls_la_DEPENDENCIES = libtls_la_objects.mk
|
31
|
+
|
32
|
+
libtls_la_objects.mk: Makefile
|
33
|
+
@echo "libtls_la_objects= $(libtls_la_OBJECTS)" \
|
34
|
+
| sed -e 's/ *$$//' -e 's/ */ $$\(top_builddir\)\/tls\//g' \
|
35
|
+
> libtls_la_objects.mk
|
36
|
+
|
37
|
+
libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym
|
38
|
+
|
39
|
+
if ENABLE_LIBTLS_ONLY
|
40
|
+
libtls_la_LIBADD = $(libcrypto_la_objects)
|
41
|
+
libtls_la_LIBADD += $(libssl_la_objects)
|
42
|
+
else
|
43
|
+
libtls_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la
|
44
|
+
libtls_la_LIBADD += $(abs_top_builddir)/ssl/libssl.la
|
45
|
+
endif
|
46
|
+
|
47
|
+
libtls_la_LIBADD += $(libcompat_la_objects)
|
48
|
+
libtls_la_LIBADD += $(libcompatnoopt_la_objects)
|
49
|
+
libtls_la_LIBADD += $(PLATFORM_LDADD)
|
50
|
+
|
51
|
+
libtls_la_CPPFLAGS = $(AM_CPPFLAGS)
|
52
|
+
if OPENSSLDIR_DEFINED
|
53
|
+
libtls_la_CPPFLAGS += -DTLS_DEFAULT_CA_FILE=\"@OPENSSLDIR@/cert.pem\"
|
54
|
+
else
|
55
|
+
libtls_la_CPPFLAGS += -DTLS_DEFAULT_CA_FILE=\"$(sysconfdir)/ssl/cert.pem\"
|
56
|
+
endif
|
57
|
+
|
58
|
+
libtls_la_SOURCES = tls.c
|
59
|
+
libtls_la_SOURCES += tls_client.c
|
60
|
+
libtls_la_SOURCES += tls_bio_cb.c
|
61
|
+
libtls_la_SOURCES += tls_config.c
|
62
|
+
libtls_la_SOURCES += tls_conninfo.c
|
63
|
+
libtls_la_SOURCES += tls_keypair.c
|
64
|
+
libtls_la_SOURCES += tls_server.c
|
65
|
+
libtls_la_SOURCES += tls_signer.c
|
66
|
+
libtls_la_SOURCES += tls_ocsp.c
|
67
|
+
libtls_la_SOURCES += tls_peer.c
|
68
|
+
libtls_la_SOURCES += tls_util.c
|
69
|
+
libtls_la_SOURCES += tls_verify.c
|
70
|
+
noinst_HEADERS = tls_internal.h
|
71
|
+
|
72
|
+
if HOST_WIN
|
73
|
+
libtls_la_SOURCES += compat/ftruncate.c
|
74
|
+
libtls_la_SOURCES += compat/pread.c
|
75
|
+
libtls_la_SOURCES += compat/pwrite.c
|
76
|
+
endif
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*
|
2
|
+
* Public domain
|
3
|
+
*
|
4
|
+
* Kinichiro Inoguchi <inoguchi@openbsd.org>
|
5
|
+
*/
|
6
|
+
|
7
|
+
#ifdef _WIN32
|
8
|
+
|
9
|
+
#define NO_REDEF_POSIX_FUNCTIONS
|
10
|
+
|
11
|
+
#include <unistd.h>
|
12
|
+
|
13
|
+
ssize_t
|
14
|
+
pread(int d, void *buf, size_t nbytes, off_t offset)
|
15
|
+
{
|
16
|
+
off_t cpos, opos, rpos;
|
17
|
+
ssize_t bytes;
|
18
|
+
if((cpos = lseek(d, 0, SEEK_CUR)) == -1)
|
19
|
+
return -1;
|
20
|
+
if((opos = lseek(d, offset, SEEK_SET)) == -1)
|
21
|
+
return -1;
|
22
|
+
if((bytes = read(d, buf, nbytes)) == -1)
|
23
|
+
return -1;
|
24
|
+
if((rpos = lseek(d, cpos, SEEK_SET)) == -1)
|
25
|
+
return -1;
|
26
|
+
return bytes;
|
27
|
+
}
|
28
|
+
|
29
|
+
#endif
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*
|
2
|
+
* Public domain
|
3
|
+
*
|
4
|
+
* Kinichiro Inoguchi <inoguchi@openbsd.org>
|
5
|
+
*/
|
6
|
+
|
7
|
+
#ifdef _WIN32
|
8
|
+
|
9
|
+
#define NO_REDEF_POSIX_FUNCTIONS
|
10
|
+
|
11
|
+
#include <unistd.h>
|
12
|
+
|
13
|
+
ssize_t
|
14
|
+
pwrite(int d, const void *buf, size_t nbytes, off_t offset)
|
15
|
+
{
|
16
|
+
off_t cpos, opos, rpos;
|
17
|
+
ssize_t bytes;
|
18
|
+
if((cpos = lseek(d, 0, SEEK_CUR)) == -1)
|
19
|
+
return -1;
|
20
|
+
if((opos = lseek(d, offset, SEEK_SET)) == -1)
|
21
|
+
return -1;
|
22
|
+
if((bytes = write(d, buf, nbytes)) == -1)
|
23
|
+
return -1;
|
24
|
+
if((rpos = lseek(d, cpos, SEEK_SET)) == -1)
|
25
|
+
return -1;
|
26
|
+
return bytes;
|
27
|
+
}
|
28
|
+
|
29
|
+
#endif
|