SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,14 @@
Non blocking SSL does not use read or write properly. With TLS 1.2
it works by accident. Do not use TLS 1.3.
Index: lib/Net/Server/Proto/SSLEAY.pm
--- lib/Net/Server/Proto/SSLEAY.pm.orig
+++ lib/Net/Server/Proto/SSLEAY.pm
@@ -153,6 +153,7 @@ sub bind_SSL {
my $ctx = Net::SSLeay::CTX_new(); $sock->SSLeay_check_fatal("SSLeay bind_SSL CTX_new");
Net::SSLeay::CTX_set_options($ctx, Net::SSLeay::OP_ALL()); $sock->SSLeay_check_fatal("SSLeay bind_SSL CTX_set_options");
+ Net::SSLeay::CTX_set_max_proto_version($ctx, Net::SSLeay::TLS1_2_VERSION());
# 0x1: SSL_MODE_ENABLE_PARTIAL_WRITE
# 0x10: SSL_MODE_RELEASE_BUFFERS (ignored before OpenSSL v1.0.0)

View file

@ -0,0 +1,17 @@
We don't have the sysctl any more, resulting in this binding to v6 only.
Index: lib/Net/Server/Proto.pm
--- lib/Net/Server/Proto.pm.orig
+++ lib/Net/Server/Proto.pm
@@ -163,10 +163,7 @@ sub get_addr_info {
}
sub _bindv6only {
- my $class = shift;
- my $val = $class->_sysctl('net.ipv6.bindv6only'); # linux
- $val = $class->_sysctl('net.inet6.ip6.v6only') if ! length($val); # bsd
- return $val;
+ return '1'; # OpenBSD requires separate binds for v4 and v6.
}
sub _sysctl {