Commit cd061519 authored by gregor herrmann's avatar gregor herrmann

New upstream version 7.160

parent a440f47e
Revision history for Perl extension AnyEvent.
TODO: document TCP_*** constants
TODO: add debug/trace logging to some modules
TODO: use the eval-with-cb-call trick also to speed up JSON?
TODO: FAQ: common pitfalls? invoke-before-return
TODO: FAQ: scope-ids? hosts file order?
TODO: AnyEvent::Handle with AnyEvent::IO?
TODO: invalid. and localhost. specialcasing inside AEDNS and not AESocket (rfc6761)
TODO: maybe implement env variable to give hosts precedence
TODO: more formats for parse_ipv6 (single ipv6 address without port, ...p80, ...#80)
TODO: inet_aton maybe pack C4? no, add a comment why not
TODO: socket prepare callbacks, can they easily signal failure as well?
7.16 Fri Jul 19 18:00:21 CEST 2019
- add ffdhe group dh parameters from RFC 7919, and use ffdhe3072
as new default, instead of schmorp1539.
- AnyEvent::Log did not reassess logging status of
AnyEvent::Log::logger's when contexts were changed with
->attach/detach/slaves, causing them to not log even though a
recent attach should have caused them to log.
- added some more logging configuration examples.
- mention RFC 8482 in AnyEvent::DNS.
7.15 Tue Feb 26 03:07:42 CET 2019
- INCOMPATIBLE CHANGE: AnyEvent::Handle's tls_detect documentation gave
......
......@@ -10,7 +10,7 @@
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
"version" : 2
},
"name" : "AnyEvent",
"no_index" : {
......@@ -44,6 +44,6 @@
}
},
"release_status" : "stable",
"version" : 7.15,
"x_serialization_backend" : "JSON::PP version 2.27300"
"version" : 7.16,
"x_serialization_backend" : "JSON::PP version 2.97001"
}
......@@ -26,5 +26,5 @@ recommends:
JSON::XS: '2.2'
Net::SSLeay: '1.33'
Task::Weaken: '0'
version: 7.15
x_serialization_backend: 'CPAN::Meta::YAML version 0.012'
version: 7.16
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
......@@ -1268,7 +1268,7 @@ BEGIN {
use Carp ();
our $VERSION = 7.15;
our $VERSION = 7.16;
our $MODEL;
our @ISA;
our @REGISTRY;
......
......@@ -116,7 +116,7 @@ strings, you need to call the resolver manually:
Tries to resolve the given service, protocol and domain name into a list
of service records.
Each C<$srv_rr> is an array reference with the following contents:
Each C<$srv_rr> is an array reference with the following contents:
C<[$priority, $weight, $transport, $target]>.
They will be sorted with lowest priority first, then randomly
......@@ -129,8 +129,9 @@ Example:
=item AnyEvent::DNS::any $domain, $cb->(@rrs)
Tries to resolve the given domain and passes all resource records found to
the callback.
Tries to resolve the given domain and passes all resource records found
to the callback. Note that this uses a DNS C<ANY> query, which, as of RFC
8482, are officially deprecated.
=item AnyEvent::DNS::ptr $domain, $cb->(@hostnames)
......
......@@ -42,11 +42,20 @@ Log level overview:
Configuration (also look at the EXAMPLES section):
# set default logging level to suppress anything below "notice"
# i.e. enable logging at "notice" or above - the default is to
# to not log anything at all.
$AnyEvent::Log::FILTER->level ("notice");
# set logging for the current package to errors and higher only
AnyEvent::Log::ctx->level ("error");
# set logging level to suppress anything below "notice"
$AnyEvent::Log::FILTER->level ("notice");
# enable logging for the current package, regardless of global logging level
AnyEvent::Log::ctx->attach ($AnyEvent::Log::LOG);
# enable debug logging for module some::mod and enable logging by default
(AnyEvent::Log::ctx "some::mod")->level ("debug");
(AnyEvent::Log::ctx "some::mod")->attach ($AnyEvent::Log::LOG);
# send all critical and higher priority messages to syslog,
# regardless of (most) other settings
......@@ -480,7 +489,7 @@ In your main program (as opposed to in your module) you can override the
default message format by loading this module and then redefining this
function.
=item AnyEvent::Log::fatal_exit
=item AnyEvent::Log::fatal_exit()
This is the function that is called after logging a C<fatal> log
message. It must not return.
......@@ -587,7 +596,7 @@ something that logs to a file, or to attach additional logging targets
This function creates or returns a logging context (which is an object).
If a package name is given, then the context for that packlage is
If a package name is given, then the context for that package is
returned. If it is called without any arguments, then the context for the
callers package is returned (i.e. the same context as a C<AE::log> call
would use).
......@@ -877,6 +886,7 @@ sub attach {
$ctx->[2]{$_+0} = $_
for map { AnyEvent::Log::ctx $_ } @_;
AnyEvent::Log::_reassess;
}
sub detach {
......@@ -884,11 +894,13 @@ sub detach {
delete $ctx->[2]{$_+0}
for map { AnyEvent::Log::ctx $_ } @_;
AnyEvent::Log::_reassess;
}
sub slaves {
undef $_[0][2];
&attach;
AnyEvent::Log::_reassess;
}
=back
......
......@@ -119,6 +119,14 @@ our %DH_PARAMS = (
schmorp2048 => "MIIBCAKCAQEAhR5Fn9h3Tgnc+q4o3CMkZtre3lLUyDT+1bf3aiVOt22JdDQndZLc|FeKz8AqliB3UIgNExc6oDtuG4znKPgklfOnHv/a9tl1AYQbV+QFM/E0jYl6oG8tF|Epgxezt1GCivvtu64ql0s213wr64QffNMt3hva8lNqK1PXfqp13PzzLzAVsfghrv|fMAX7/bYm1T5fAJdcah6FeZkKof+mqbs8HtRjfvrUF2npEM2WdupFu190vcwABnN|TTJheXCWv2BF2f9EEr61q3OUhSNWIThtZP+NKe2bACm1PebT0drAcaxKoMz9LjKr|y5onGs0TOuQ7JmhtZL45Zr4LwBcyTucLUwIBAg==",
schmorp4096 => "MIICCAKCAgEA5WwA5lQg09YRYqc/JILCd2AfBmYBkF19wmCEJB8G3JhTxv8EGvYk|xyP2ecKVUvHTG8Xw/qpW8nRqzPIyV8QRf6YFYSf33Qnx2xYhcnqOumU3nfC0SNOL|/w2q1BA9BbHtW4574P+6hOQx9ftRtbtZ2HPKBMRcAKGjpYZiKopv0+UAM4NpEC2p|bfajp7pyVLeb/Aqm/oWP3L63wPlY1SDp+XRzrOAKB+/uLGqEwV0bBaxxGL29BpOp|O2z1ALGXiDCcLs9WTn9WqUhWDzUN6fahm53rd7zxwpFCb6K2YhaK0peG95jzSUJ8|aoL0KgWuC6v5+gPJHRu0HrQIdfAdN4VchqYOKE46uNNkQl8VJGu4RjYB7lFBpRwO|g2HCsGMo2X7BRmA1st66fh+JOd1smXMZG/2ozTOooL+ixcx4spNneg4aQerWl5cb|nWXKtPCp8yPzt/zoNzL3Fon2Ses3sNgMos0M/ZbnigScDxz84Ms6V/X8Z0L4m/qX|mL42dP40tgvmgq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ouE2tHQlwfDgv/DiIXp173|hAmUCV0+bPRW8IIJvBODdAWtJe9hNwxj1FFYmPA7l4wa3gXV4I6tb+iO1MbwVjZ/|116tD5MdCo3JuSisgPYCHfkQccwEO0FHEuBbmfN+fQimQ8H0dePP8XctwbkplsB+|aLT5hYKmva/j9smEswgyHglPwc3WvZ+2DgKk7A7DHi7a2gDwCRQlHaXtNWx3992R|dfNgkSeB1CvGSQoo95WpC9ZoqGmcSlVqdetDU8iglPmfYTKO8aIPA6TuTQ/lQ0IW|90LQmqP23FwnNFiyqX8+rztLq4KVkTyeHIQwig6vFxgD8N+SbZCW2PPiB72TVF2U|WePU8MRTv1OIGBUBajF49k28HnZPSGlILHtFEkYkbPvomcE5ENnoejwzjktOTS5d|/R3SIOvCauOzadtzwTYOXT78ORaR1KI1cm8DzkkwJTd/Rrk07Q5vnvnSJQMwFUeH|PwJIgWBQf/GZ/OsDHmkbYR2ZWDClbKw2mwIBAg==",
# firefox dh parameters, from RFC 7919
ffdhe2048 => "MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg==",
ffdhe3072 => "MIIBiAKCAYEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7YdEIqUu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UsUappHg5CPPyZ6eMWUMEhe2JIFs2tmpX51bgBlIjZwKCh/jB1pXfiMYP4HUo/L6RXHvyM4LqKT+i2hV3+crCmbt7S+6v75Yow+vq+HF1xqH4vdB74wf6G/qa7/eUwZ38Nl9EdSfeoRD0IIuUGqfRhTgEeKpSDj/iM1oyLt8XGQkz//////////wIBAg==",
);
=item $tls = new AnyEvent::TLS key => value...
......@@ -472,22 +480,23 @@ of course.
=item dh => $string
Specify the Diffie-Hellman parameters in PEM format directly as a string
(see C<dh_file>), the default is C<schmorp1539> unless C<dh_file> was
(see C<dh_file>), the default is C<ffdhe3072> unless C<dh_file> was
specified.
AnyEvent::TLS supports supports a number of precomputed DH parameters,
since computing them is expensive. They are:
# from RFC 7919 - recommended
ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192
# from "Assigned Number for SKIP Protocols"
skip512, skip1024, skip2048, skip4096
# from schmorp
schmorp1024, schmorp1539, schmorp2048, schmorp4096, schmorp8192
The default was chosen as a trade-off between security and speed, and
should be secure for a few years. It is said that 2048 bit DH parameters
are safe till 2030, and DH parameters shorter than 900 bits are totally
insecure.
It is said that 2048 bit DH parameters are safe till 2030, and DH
parameters shorter than 900 bits are totally insecure.
To disable DH protocols completely, specify C<undef> as C<dh> parameter.
......@@ -641,7 +650,7 @@ sub new {
$dh_bio = Net::SSLeay::BIO_new_file ($dh_file, "r")
or croak "$dh_file: failed to open DH parameter file: $!";
} else {
$arg{dh} = "schmorp1539" unless exists $arg{dh};
$arg{dh} = "ffdhe3072" unless exists $arg{dh};
if (defined $arg{dh}) {
$dh_file = "dh string";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment