12 Commits

Author SHA1 Message Date
Azat Khuzhin
9e4693ed07 becat: change -R to -b (since it is more of a buffer size) 2023-09-22 10:21:06 +02:00
Azat Khuzhin
617cf5efa8 becat: add ability to set TCP keepalive 2023-09-22 10:21:06 +02:00
Azat Khuzhin
d9780cf96a Fix -Wsingle-bit-bitfield-constant-conversion warning in clang 16
report:

    /src/le/libevent/sample/becat.c:304:29: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
                            case 'k': o.extra.keep   = 1; break;
2023-09-21 22:04:17 +02:00
Azat Khuzhin
2b729238e5 becat: fix handling positional arguments 2023-06-28 21:33:41 +02:00
Azat Khuzhin
687124d018 becat: handle -T correctly 2023-06-28 21:33:41 +02:00
Azat Khuzhin
c22f275744 Use OPENSSL_VERSION_NUMBER over OPENSSL_VERSION_MAJOR (for compatibility)
Since OpenSSL 3.0 there is new OPENSSL_VERSION_MAJOR, but previous
releases does not have it.

So let's use plain old OPENSSL_VERSION_NUMBER to avoid more preprocessor
macros.
2022-07-10 10:07:39 +03:00
William Marlow
29c420c418 Initial OpenSSL 3.0 support
* Don't use deprecated functions when building against OpenSSL 3.0.
* Recognise that OpenSSL 3.0 can signal a dirty shutdown as a protocol.
  error in addition to the expected IO error produced by OpenSSL 1.1.1
* Update regress_mbedtls.c for compatibility with OpenSSL 3
2022-07-09 23:24:53 +03:00
Azat Khuzhin
22872176a4 becat: add timeout (client/server) and verbosity (event_enable_debug_logging()) 2020-10-15 23:23:15 +03:00
Azat Khuzhin
08981f8d75 Fix compilation without OPENSSL_API_COMPAT
Use the following for openssl 1.1+:
- X509_getm_notBefore over X509_get_notBefore
- X509_getm_notAfter  over X509_get_notAfter
- use OPENSSL_VERSION_NUMBER over SSLeay()
- add missing headers

Refs: openssl/openssl@0b7347effe
2020-01-07 22:15:08 +03:00
ygj6
80009c50e5
becat: avoid using anonymous structures
It hasn't been part of the C standard until C11, although it is very
useful GCC extension it is better to avoid using this in cross platform
projects like libevent.
2019-08-14 01:10:50 +03:00
Azat Khuzhin
2d4ac10ea4
becat: remove extra SSL_CTX options usage [ci skip]
Because:
- this do not affects performance
- this breaks builds for with older openssl
2019-06-02 21:55:31 +03:00
Azat Khuzhin
d5b24cc0c8
sample/becat: bufferevent cat, ncat/nc/telnet analog 2019-03-16 17:40:20 +03:00