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,69 @@
|
|
1
|
+
/*
|
2
|
+
* Public domain
|
3
|
+
* sys/types.h compatibility shim
|
4
|
+
*/
|
5
|
+
|
6
|
+
#ifdef _MSC_VER
|
7
|
+
#if _MSC_VER >= 1900
|
8
|
+
#include <../ucrt/sys/types.h>
|
9
|
+
#else
|
10
|
+
#include <../include/sys/types.h>
|
11
|
+
#endif
|
12
|
+
#else
|
13
|
+
#include_next <sys/types.h>
|
14
|
+
#endif
|
15
|
+
|
16
|
+
#ifndef LIBCRYPTOCOMPAT_SYS_TYPES_H
|
17
|
+
#define LIBCRYPTOCOMPAT_SYS_TYPES_H
|
18
|
+
|
19
|
+
#include <stdint.h>
|
20
|
+
|
21
|
+
#ifdef __MINGW32__
|
22
|
+
#include <_bsd_types.h>
|
23
|
+
typedef uint32_t in_addr_t;
|
24
|
+
typedef uint32_t uid_t;
|
25
|
+
#endif
|
26
|
+
|
27
|
+
#ifdef _MSC_VER
|
28
|
+
typedef unsigned char u_char;
|
29
|
+
typedef unsigned short u_short;
|
30
|
+
typedef unsigned int u_int;
|
31
|
+
typedef uint32_t in_addr_t;
|
32
|
+
typedef uint32_t mode_t;
|
33
|
+
typedef uint32_t uid_t;
|
34
|
+
|
35
|
+
#include <basetsd.h>
|
36
|
+
typedef SSIZE_T ssize_t;
|
37
|
+
|
38
|
+
#ifndef SSIZE_MAX
|
39
|
+
#ifdef _WIN64
|
40
|
+
#define SSIZE_MAX _I64_MAX
|
41
|
+
#else
|
42
|
+
#define SSIZE_MAX INT_MAX
|
43
|
+
#endif
|
44
|
+
#endif
|
45
|
+
|
46
|
+
#endif
|
47
|
+
|
48
|
+
#ifdef _WIN32
|
49
|
+
#define __warn_references(sym,msg)
|
50
|
+
#else
|
51
|
+
|
52
|
+
#ifndef __warn_references
|
53
|
+
|
54
|
+
#ifndef __STRING
|
55
|
+
#define __STRING(x) #x
|
56
|
+
#endif
|
57
|
+
|
58
|
+
#if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG)
|
59
|
+
#define __warn_references(sym,msg) \
|
60
|
+
__asm__(".section .gnu.warning." __STRING(sym) \
|
61
|
+
"\n\t.ascii \"" msg "\"\n\t.text");
|
62
|
+
#else
|
63
|
+
#define __warn_references(sym,msg)
|
64
|
+
#endif
|
65
|
+
|
66
|
+
#endif /* __warn_references */
|
67
|
+
#endif /* _WIN32 */
|
68
|
+
|
69
|
+
#endif
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*
|
2
|
+
* Public domain
|
3
|
+
* syslog.h compatibility shim
|
4
|
+
*/
|
5
|
+
|
6
|
+
#ifndef _WIN32
|
7
|
+
#include_next <syslog.h>
|
8
|
+
#endif
|
9
|
+
|
10
|
+
#ifndef LIBCRYPTOCOMPAT_SYSLOG_H
|
11
|
+
#define LIBCRYPTOCOMPAT_SYSLOG_H
|
12
|
+
|
13
|
+
#ifndef HAVE_SYSLOG_R
|
14
|
+
|
15
|
+
#include <stdarg.h>
|
16
|
+
|
17
|
+
#ifdef _WIN32
|
18
|
+
#define LOG_CONS LOG_INFO
|
19
|
+
#define LOG_INFO 6 /* informational */
|
20
|
+
#define LOG_USER (1<<3) /* random user-level messages */
|
21
|
+
#define LOG_LOCAL2 (18<<3) /* reserved for local use */
|
22
|
+
#endif
|
23
|
+
|
24
|
+
struct syslog_data {
|
25
|
+
int log_stat;
|
26
|
+
const char *log_tag;
|
27
|
+
int log_fac;
|
28
|
+
int log_mask;
|
29
|
+
};
|
30
|
+
|
31
|
+
#define SYSLOG_DATA_INIT {0, (const char *)0, LOG_USER, 0xff}
|
32
|
+
|
33
|
+
void syslog_r(int, struct syslog_data *, const char *, ...);
|
34
|
+
void vsyslog_r(int, struct syslog_data *, const char *, va_list);
|
35
|
+
|
36
|
+
#endif
|
37
|
+
|
38
|
+
#endif
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/*
|
2
|
+
* Public domain
|
3
|
+
* sys/time.h compatibility shim
|
4
|
+
*/
|
5
|
+
|
6
|
+
#ifndef SIZEOF_TIME_T
|
7
|
+
#ifdef SMALL_TIME_T
|
8
|
+
#define SIZEOF_TIME_T 4
|
9
|
+
#else
|
10
|
+
#define SIZEOF_TIME_T 8
|
11
|
+
#endif
|
12
|
+
#endif
|
13
|
+
|
14
|
+
#ifdef _MSC_VER
|
15
|
+
#if _MSC_VER >= 1900
|
16
|
+
#include <../ucrt/time.h>
|
17
|
+
#else
|
18
|
+
#include <../include/time.h>
|
19
|
+
#endif
|
20
|
+
#else
|
21
|
+
#include_next <time.h>
|
22
|
+
#endif
|
23
|
+
|
24
|
+
#ifndef LIBCRYPTOCOMPAT_TIME_H
|
25
|
+
#define LIBCRYPTOCOMPAT_TIME_H
|
26
|
+
|
27
|
+
#ifndef CLOCK_MONOTONIC
|
28
|
+
#define CLOCK_MONOTONIC CLOCK_REALTIME
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#ifndef CLOCK_REALTIME
|
32
|
+
#define CLOCK_REALTIME 0
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#ifndef _WIN32
|
36
|
+
#ifndef HAVE_CLOCK_GETTIME
|
37
|
+
typedef int clockid_t;
|
38
|
+
int clock_gettime(clockid_t clock_id, struct timespec *tp);
|
39
|
+
#endif
|
40
|
+
|
41
|
+
#ifdef timespecsub
|
42
|
+
#define HAVE_TIMESPECSUB
|
43
|
+
#endif
|
44
|
+
|
45
|
+
#ifndef HAVE_TIMESPECSUB
|
46
|
+
#define timespecsub(tsp, usp, vsp) \
|
47
|
+
do { \
|
48
|
+
(vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
|
49
|
+
(vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \
|
50
|
+
if ((vsp)->tv_nsec < 0) { \
|
51
|
+
(vsp)->tv_sec--; \
|
52
|
+
(vsp)->tv_nsec += 1000000000L; \
|
53
|
+
} \
|
54
|
+
} while (0)
|
55
|
+
#endif
|
56
|
+
|
57
|
+
#endif
|
58
|
+
|
59
|
+
#endif
|
@@ -0,0 +1,83 @@
|
|
1
|
+
/*
|
2
|
+
* Public domain
|
3
|
+
* unistd.h compatibility shim
|
4
|
+
*/
|
5
|
+
|
6
|
+
#ifndef LIBCRYPTOCOMPAT_UNISTD_H
|
7
|
+
#define LIBCRYPTOCOMPAT_UNISTD_H
|
8
|
+
|
9
|
+
#ifndef _MSC_VER
|
10
|
+
|
11
|
+
#include_next <unistd.h>
|
12
|
+
|
13
|
+
#ifdef __MINGW32__
|
14
|
+
int ftruncate(int fd, off_t length);
|
15
|
+
uid_t getuid(void);
|
16
|
+
ssize_t pread(int d, void *buf, size_t nbytes, off_t offset);
|
17
|
+
ssize_t pwrite(int d, const void *buf, size_t nbytes, off_t offset);
|
18
|
+
#endif
|
19
|
+
|
20
|
+
#else
|
21
|
+
|
22
|
+
#include <stdlib.h>
|
23
|
+
#include <io.h>
|
24
|
+
#include <process.h>
|
25
|
+
|
26
|
+
#define STDIN_FILENO 0
|
27
|
+
#define STDOUT_FILENO 1
|
28
|
+
#define STDERR_FILENO 2
|
29
|
+
|
30
|
+
#define R_OK 4
|
31
|
+
#define W_OK 2
|
32
|
+
#define X_OK 0
|
33
|
+
#define F_OK 0
|
34
|
+
|
35
|
+
#define SEEK_SET 0
|
36
|
+
#define SEEK_CUR 1
|
37
|
+
#define SEEK_END 2
|
38
|
+
|
39
|
+
#define access _access
|
40
|
+
|
41
|
+
#ifdef _MSC_VER
|
42
|
+
#include <windows.h>
|
43
|
+
static inline unsigned int sleep(unsigned int seconds)
|
44
|
+
{
|
45
|
+
Sleep(seconds * 1000);
|
46
|
+
return seconds;
|
47
|
+
}
|
48
|
+
#endif
|
49
|
+
|
50
|
+
int ftruncate(int fd, off_t length);
|
51
|
+
uid_t getuid(void);
|
52
|
+
ssize_t pread(int d, void *buf, size_t nbytes, off_t offset);
|
53
|
+
ssize_t pwrite(int d, const void *buf, size_t nbytes, off_t offset);
|
54
|
+
|
55
|
+
#endif
|
56
|
+
|
57
|
+
#ifndef HAVE_GETENTROPY
|
58
|
+
int getentropy(void *buf, size_t buflen);
|
59
|
+
#else
|
60
|
+
/*
|
61
|
+
* Solaris 11.3 adds getentropy(2), but defines the function in sys/random.h
|
62
|
+
*/
|
63
|
+
#if defined(__sun)
|
64
|
+
#include <sys/random.h>
|
65
|
+
#endif
|
66
|
+
#endif
|
67
|
+
|
68
|
+
#ifndef HAVE_GETOPT
|
69
|
+
#include "getopt.h"
|
70
|
+
#endif
|
71
|
+
|
72
|
+
#ifndef HAVE_GETPAGESIZE
|
73
|
+
int getpagesize(void);
|
74
|
+
#endif
|
75
|
+
|
76
|
+
#define pledge(request, paths) 0
|
77
|
+
#define unveil(path, permissions) 0
|
78
|
+
|
79
|
+
#ifndef HAVE_PIPE2
|
80
|
+
int pipe2(int fildes[2], int flags);
|
81
|
+
#endif
|
82
|
+
|
83
|
+
#endif
|
@@ -0,0 +1,57 @@
|
|
1
|
+
/*
|
2
|
+
* Public domain
|
3
|
+
*
|
4
|
+
* BSD socket emulation code for Winsock2
|
5
|
+
* Brent Cook <bcook@openbsd.org>
|
6
|
+
*/
|
7
|
+
|
8
|
+
#ifndef LIBCRYPTOCOMPAT_WIN32NETCOMPAT_H
|
9
|
+
#define LIBCRYPTOCOMPAT_WIN32NETCOMPAT_H
|
10
|
+
|
11
|
+
#ifdef _WIN32
|
12
|
+
|
13
|
+
#include <ws2tcpip.h>
|
14
|
+
#include <errno.h>
|
15
|
+
#include <unistd.h>
|
16
|
+
|
17
|
+
#ifndef SHUT_RDWR
|
18
|
+
#define SHUT_RDWR SD_BOTH
|
19
|
+
#endif
|
20
|
+
#ifndef SHUT_RD
|
21
|
+
#define SHUT_RD SD_RECEIVE
|
22
|
+
#endif
|
23
|
+
#ifndef SHUT_WR
|
24
|
+
#define SHUT_WR SD_SEND
|
25
|
+
#endif
|
26
|
+
|
27
|
+
int posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
|
28
|
+
|
29
|
+
int posix_open(const char *path, ...);
|
30
|
+
|
31
|
+
int posix_close(int fd);
|
32
|
+
|
33
|
+
ssize_t posix_read(int fd, void *buf, size_t count);
|
34
|
+
|
35
|
+
ssize_t posix_write(int fd, const void *buf, size_t count);
|
36
|
+
|
37
|
+
int posix_getsockopt(int sockfd, int level, int optname,
|
38
|
+
void *optval, socklen_t *optlen);
|
39
|
+
|
40
|
+
int posix_setsockopt(int sockfd, int level, int optname,
|
41
|
+
const void *optval, socklen_t optlen);
|
42
|
+
|
43
|
+
#ifndef NO_REDEF_POSIX_FUNCTIONS
|
44
|
+
#define connect(sockfd, addr, addrlen) posix_connect(sockfd, addr, addrlen)
|
45
|
+
#define open(path, ...) posix_open(path, __VA_ARGS__)
|
46
|
+
#define close(fd) posix_close(fd)
|
47
|
+
#define read(fd, buf, count) posix_read(fd, buf, count)
|
48
|
+
#define write(fd, buf, count) posix_write(fd, buf, count)
|
49
|
+
#define getsockopt(sockfd, level, optname, optval, optlen) \
|
50
|
+
posix_getsockopt(sockfd, level, optname, optval, optlen)
|
51
|
+
#define setsockopt(sockfd, level, optname, optval, optlen) \
|
52
|
+
posix_setsockopt(sockfd, level, optname, optval, optlen)
|
53
|
+
#endif
|
54
|
+
|
55
|
+
#endif
|
56
|
+
|
57
|
+
#endif
|
@@ -0,0 +1,45 @@
|
|
1
|
+
include $(top_srcdir)/Makefile.am.common
|
2
|
+
|
3
|
+
if !ENABLE_LIBTLS_ONLY
|
4
|
+
opensslincludedir=$(includedir)/openssl
|
5
|
+
|
6
|
+
BUILT_SOURCES = opensslconf.h
|
7
|
+
CLEANFILES = opensslconf.h
|
8
|
+
|
9
|
+
opensslconf.h: Makefile
|
10
|
+
-echo "generating opensslconf.h ..."
|
11
|
+
if HOST_AARCH64
|
12
|
+
-cp $(top_srcdir)/include/arch/aarch64/opensslconf.h opensslconf.h
|
13
|
+
endif
|
14
|
+
if HOST_ARM
|
15
|
+
-cp $(top_srcdir)/include/arch/arm/opensslconf.h opensslconf.h
|
16
|
+
endif
|
17
|
+
if HOST_I386
|
18
|
+
-cp $(top_srcdir)/include/arch/i386/opensslconf.h opensslconf.h
|
19
|
+
endif
|
20
|
+
if HOST_LOONGARCH64
|
21
|
+
-cp $(top_srcdir)/include/arch/loongarch64/opensslconf.h opensslconf.h
|
22
|
+
endif
|
23
|
+
if HOST_MIPS
|
24
|
+
-cp $(top_srcdir)/include/arch/mips/opensslconf.h opensslconf.h
|
25
|
+
endif
|
26
|
+
if HOST_MIPS64
|
27
|
+
-cp $(top_srcdir)/include/arch/mips64/opensslconf.h opensslconf.h
|
28
|
+
endif
|
29
|
+
if HOST_POWERPC
|
30
|
+
-cp $(top_srcdir)/include/arch/powerpc/opensslconf.h opensslconf.h
|
31
|
+
endif
|
32
|
+
if HOST_POWERPC64
|
33
|
+
-cp $(top_srcdir)/include/arch/powerpc64/opensslconf.h opensslconf.h
|
34
|
+
endif
|
35
|
+
if HOST_RISCV64
|
36
|
+
-cp $(top_srcdir)/include/arch/riscv64/opensslconf.h opensslconf.h
|
37
|
+
endif
|
38
|
+
if HOST_SPARC64
|
39
|
+
-cp $(top_srcdir)/include/arch/sparc64/opensslconf.h opensslconf.h
|
40
|
+
endif
|
41
|
+
if HOST_X86_64
|
42
|
+
-cp $(top_srcdir)/include/arch/amd64/opensslconf.h opensslconf.h
|
43
|
+
endif
|
44
|
+
|
45
|
+
opensslinclude_HEADERS = opensslconf.h
|
@@ -0,0 +1,28 @@
|
|
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
|
+
#libcrypto pkg-config source file
|
17
|
+
|
18
|
+
prefix=@prefix@
|
19
|
+
exec_prefix=@exec_prefix@
|
20
|
+
libdir=@libdir@
|
21
|
+
includedir=@includedir@
|
22
|
+
|
23
|
+
Name: LibreSSL-libcrypto
|
24
|
+
Description: LibreSSL cryptography library
|
25
|
+
Version: @VERSION@
|
26
|
+
Libs: -L${libdir} -lcrypto
|
27
|
+
Libs.private: @LIBS@ @PLATFORM_LDADD@
|
28
|
+
Cflags: -I${includedir}
|
@@ -0,0 +1,28 @@
|
|
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
|
+
#libssl pkg-config source file
|
17
|
+
|
18
|
+
prefix=@prefix@
|
19
|
+
exec_prefix=@exec_prefix@
|
20
|
+
libdir=@libdir@
|
21
|
+
includedir=@includedir@
|
22
|
+
|
23
|
+
Name: LibreSSL-libssl
|
24
|
+
Description: Secure Sockets Layer and cryptography libraries
|
25
|
+
Version: @VERSION@
|
26
|
+
Requires.private: libcrypto
|
27
|
+
Libs: -L${libdir} -lssl
|
28
|
+
Cflags: -I${includedir}
|
@@ -0,0 +1,28 @@
|
|
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
|
+
#libtls pkg-config source file
|
17
|
+
|
18
|
+
prefix=@prefix@
|
19
|
+
exec_prefix=@exec_prefix@
|
20
|
+
libdir=@libdir@
|
21
|
+
includedir=@includedir@
|
22
|
+
|
23
|
+
Name: LibreSSL-libtls
|
24
|
+
Description: Secure communications using the TLS socket protocol.
|
25
|
+
Version: @VERSION@
|
26
|
+
Libs: -L${libdir} -ltls
|
27
|
+
Libs.private: @LIBS@ @PLATFORM_LDADD@ -lssl -lcrypto
|
28
|
+
Cflags: -I${includedir}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# ===========================================================================
|
2
|
+
# https://www.gnu.org/software/autoconf-archive/ax_add_fortify_source.html
|
3
|
+
# ===========================================================================
|
4
|
+
#
|
5
|
+
# SYNOPSIS
|
6
|
+
#
|
7
|
+
# AX_ADD_FORTIFY_SOURCE
|
8
|
+
#
|
9
|
+
# DESCRIPTION
|
10
|
+
#
|
11
|
+
# Check whether -D_FORTIFY_SOURCE=2 can be added to CPPFLAGS without macro
|
12
|
+
# redefinition warnings, other cpp warnings or linker. Some distributions
|
13
|
+
# (such as Gentoo Linux) enable _FORTIFY_SOURCE globally in their
|
14
|
+
# compilers, leading to unnecessary warnings in the form of
|
15
|
+
#
|
16
|
+
# <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
|
17
|
+
# <built-in>: note: this is the location of the previous definition
|
18
|
+
#
|
19
|
+
# which is a problem if -Werror is enabled. This macro checks whether
|
20
|
+
# _FORTIFY_SOURCE is already defined, and if not, adds -D_FORTIFY_SOURCE=2
|
21
|
+
# to CPPFLAGS.
|
22
|
+
#
|
23
|
+
# Newer mingw-w64 msys2 package comes with a bug in
|
24
|
+
# headers-git-7.0.0.5546.d200317d-1. It broke -D_FORTIFY_SOURCE support,
|
25
|
+
# and would need -lssp or -fstack-protector. See
|
26
|
+
# https://github.com/msys2/MINGW-packages/issues/5803. Try to actually
|
27
|
+
# link it.
|
28
|
+
#
|
29
|
+
# LICENSE
|
30
|
+
#
|
31
|
+
# Copyright (c) 2017 David Seifert <soap@gentoo.org>
|
32
|
+
# Copyright (c) 2019 Reini Urban <rurban@cpan.org>
|
33
|
+
#
|
34
|
+
# Copying and distribution of this file, with or without modification, are
|
35
|
+
# permitted in any medium without royalty provided the copyright notice
|
36
|
+
# and this notice are preserved. This file is offered as-is, without any
|
37
|
+
# warranty.
|
38
|
+
|
39
|
+
#serial 4
|
40
|
+
|
41
|
+
AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[
|
42
|
+
ac_save_cflags=$CFLAGS
|
43
|
+
ac_cwerror_flag=yes
|
44
|
+
AX_CHECK_COMPILE_FLAG([-Werror],[CFLAGS="$CFLAGS -Werror"])
|
45
|
+
AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS])
|
46
|
+
AC_LINK_IFELSE([
|
47
|
+
AC_LANG_PROGRAM([],
|
48
|
+
[[
|
49
|
+
#ifndef _FORTIFY_SOURCE
|
50
|
+
return 0;
|
51
|
+
#else
|
52
|
+
this_is_an_error;
|
53
|
+
#endif
|
54
|
+
]]
|
55
|
+
)],
|
56
|
+
AC_LINK_IFELSE([
|
57
|
+
AC_LANG_SOURCE([[
|
58
|
+
#define _FORTIFY_SOURCE 2
|
59
|
+
#include <string.h>
|
60
|
+
int main() {
|
61
|
+
char *s = " ";
|
62
|
+
strcpy(s, "x");
|
63
|
+
return strlen(s)-1;
|
64
|
+
}
|
65
|
+
]]
|
66
|
+
)],
|
67
|
+
[
|
68
|
+
AC_MSG_RESULT([yes])
|
69
|
+
CFLAGS=$ac_save_cflags
|
70
|
+
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
|
71
|
+
], [
|
72
|
+
AC_MSG_RESULT([no])
|
73
|
+
CFLAGS=$ac_save_cflags
|
74
|
+
],
|
75
|
+
),
|
76
|
+
[
|
77
|
+
AC_MSG_RESULT([no])
|
78
|
+
CFLAGS=$ac_save_cflags
|
79
|
+
])
|
80
|
+
])
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# ===========================================================================
|
2
|
+
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
3
|
+
# ===========================================================================
|
4
|
+
#
|
5
|
+
# SYNOPSIS
|
6
|
+
#
|
7
|
+
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
8
|
+
#
|
9
|
+
# DESCRIPTION
|
10
|
+
#
|
11
|
+
# Check whether the given FLAG works with the current language's compiler
|
12
|
+
# or gives an error. (Warnings, however, are ignored)
|
13
|
+
#
|
14
|
+
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
15
|
+
# success/failure.
|
16
|
+
#
|
17
|
+
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
18
|
+
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
19
|
+
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
20
|
+
# force the compiler to issue an error when a bad flag is given.
|
21
|
+
#
|
22
|
+
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
23
|
+
#
|
24
|
+
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
25
|
+
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
26
|
+
#
|
27
|
+
# LICENSE
|
28
|
+
#
|
29
|
+
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
30
|
+
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
31
|
+
#
|
32
|
+
# Copying and distribution of this file, with or without modification, are
|
33
|
+
# permitted in any medium without royalty provided the copyright notice
|
34
|
+
# and this notice are preserved. This file is offered as-is, without any
|
35
|
+
# warranty.
|
36
|
+
|
37
|
+
#serial 6
|
38
|
+
|
39
|
+
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
40
|
+
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
41
|
+
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
42
|
+
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
43
|
+
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
44
|
+
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
45
|
+
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
46
|
+
[AS_VAR_SET(CACHEVAR,[yes])],
|
47
|
+
[AS_VAR_SET(CACHEVAR,[no])])
|
48
|
+
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
49
|
+
AS_VAR_IF(CACHEVAR,yes,
|
50
|
+
[m4_default([$2], :)],
|
51
|
+
[m4_default([$3], :)])
|
52
|
+
AS_VAR_POPDEF([CACHEVAR])dnl
|
53
|
+
])dnl AX_CHECK_COMPILE_FLAGS
|