Commit 2771cb3e authored by Xavier Guimard's avatar Xavier Guimard

New upstream version 7.130

parent 5a1bc046
......@@ -13,6 +13,21 @@ TODO: more formats for parse_ipv6 (single ipv6 address without port, ...p80, ...
TODO: inet_aton maybe pack C4? no, add a comment why not
TODO: hosts read multiple times for initial concurrent tcp_connect's?
7.13 Sat Sep 17 04:31:49 CEST 2016
- Only call tlsext_host_name for non-empty common names (reported
by Maxime Soulé).
- log a (single) notice message if SNI is not supported.
- upgrade to UTS-46:9.0.0 draft and switch to non-transitional
behaviour, beating thunderbird, ie, edge, chrome and safari to it :)
(see also https://bugzilla.mozilla.org/show_bug.cgi?id=1218179)
- turns out the UTS-46 IDNA testcase failures were indeed bugs in the
testcases and the specification and not in the code - the post-9.0.0
unicode files have all known problems fixed, so finally the AnyEvent
IDNA implementation can pass the full IDNA testsuite - without needing
a single fix :)
- guarantee (and document) that condvar callbacks will be removed
on invocation - important to avoid circular references.
7.12 Wed Jan 27 19:12:26 CET 2016
- use common name as hostname for tls connects, if Net::SSLeay
supports SNI.
......
......@@ -4,7 +4,7 @@
"unknown"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001",
"generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150001",
"license" : [
"unknown"
],
......@@ -45,5 +45,5 @@
}
},
"release_status" : "stable",
"version" : 7.12
"version" : 7.13
}
......@@ -8,7 +8,7 @@ configure_requires:
Canary::Stability: '0'
ExtUtils::MakeMaker: '6.52'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001'
generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150001'
license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
......@@ -27,4 +27,4 @@ recommends:
Net::SSLeay: '1.33'
Task::Weaken: '0'
requires: {}
version: 7.12
version: 7.13
......@@ -814,8 +814,8 @@ WATCHERS
"croak" have been called.
$cb = $cv->cb ($cb->($cv))
This is a mutator function that returns the callback set and
optionally replaces it before doing so.
This is a mutator function that returns the callback set (or "undef"
if not) and optionally replaces it before doing so.
The callback will be called when the condition becomes "true", i.e.
when "send" or "croak" are called, with the only argument being the
......@@ -823,6 +823,10 @@ WATCHERS
callback is called immediately when it is set. Calling "recv" inside
the callback or at any later time is guaranteed not to block.
Additionally, when the callback is invoked, it is also removed from
the condvar (reset to "undef"), so the condvar does not keep a
reference to the callback after invocation.
SUPPORTED EVENT LOOPS/BACKENDS
The available backend classes are (every class has its own manpage):
......
......@@ -847,8 +847,8 @@ C<croak> have been called.
=item $cb = $cv->cb ($cb->($cv))
This is a mutator function that returns the callback set and optionally
replaces it before doing so.
This is a mutator function that returns the callback set (or C<undef> if
not) and optionally replaces it before doing so.
The callback will be called when the condition becomes "true", i.e. when
C<send> or C<croak> are called, with the only argument being the
......@@ -856,6 +856,10 @@ condition variable itself. If the condition is already true, the
callback is called immediately when it is set. Calling C<recv> inside
the callback or at any later time is guaranteed not to block.
Additionally, when the callback is invoked, it is also removed from the
condvar (reset to C<undef>), so the condvar does not keep a reference to
the callback after invocation.
=back
=head1 SUPPORTED EVENT LOOPS/BACKENDS
......@@ -1256,7 +1260,7 @@ BEGIN {
use Carp ();
our $VERSION = 7.12;
our $VERSION = 7.13;
our $MODEL;
our @ISA;
our @REGISTRY;
......
......@@ -1230,6 +1230,9 @@ Context names starting with a C<%> are anonymous contexts created when the
name is first mentioned. The difference to package contexts is that by
default they have no attached slaves.
This makes it possible to create new log contexts that can be refered to
multiple times by name within the same log specification.
=item a perl package name
Any other string references the logging context associated with the given
......
......@@ -145,7 +145,7 @@ sub parse_ipv6($) {
=item $token = parse_unix $hostname
This fucntion exists mainly for symmetry to the other C<parse_protocol>
This function exists mainly for symmetry to the other C<parse_protocol>
functions - it takes a hostname and, if it is C<unix/>, it returns a
special address token, otherwise C<undef>.
......
......@@ -586,7 +586,7 @@ our %SSL_METHODS = (
tlsv1 => \&Net::SSLeay::CTX_tlsv1_new,
);
# Add TLSv1_1 and TLSv1_2 if Net::SSLEay and openssl allow them
# Add TLSv1_1 and TLSv1_2 if Net::SSLeay and openssl allow them
if (_check_tls_gt_1) {
$SSL_METHODS{tlsv1_1} = \&Net::SSLeay::CTX_tlsv1_1_new;
$SSL_METHODS{tlsv1_2} = \&Net::SSLeay::CTX_tlsv1_2_new;
......@@ -827,6 +827,7 @@ sub verify {
#=cut
#our %REF_MAP;
our $TLS_SNI_WARNED;
sub _get_session($$;$$) {
my ($self, $mode, $ref, $cn) = @_;
......@@ -843,8 +844,13 @@ sub _get_session($$;$$) {
} elsif ($mode eq "connect") {
$session = Net::SSLeay::new ($self->{ctx});
Net::SSLeay::set_tlsext_host_name ($session, $cn)
if defined &Net::SSLeay::set_tlsext_host_name;
if (defined &Net::SSLeay::set_tlsext_host_name) {
Net::SSLeay::set_tlsext_host_name ($session, $cn)
if length $cn;
} else {
AE::log 6 => "TLS SNI not supported by your Net::SSLeay module, connecting without"
unless $TLS_SNI_WARNED++;
}
Net::SSLeay::set_connect_state ($session);
......
......@@ -365,7 +365,7 @@ BEGIN {
=item $guard = guard { CODE }
This function creates a special object that, when called, will execute
This function creates a special object that, when destroyed, will execute
the code block.
This is often handy in continuation-passing style code to clean up some
......@@ -827,7 +827,7 @@ sub idn_nameprep($;$) {
# not in valid class, search for mapping
utf8::encode $chr; # the imap table is in utf-8
(my $rep = index $uts46_imap, "\x00$chr") >= 0
or Carp::croak "$_[0]: disallowed characters ($chr) during idn_nameprep" . unpack "H*", $chr;
or Carp::croak "$_[0]: disallowed characters (U+" . (unpack "H*", $chr) . ") during idn_nameprep";
(substr $uts46_imap, $rep, 128) =~ /\x00 .[\x80-\xbf]* ([^\x00]*) \x00/x
or die "FATAL: idn_nameprep imap table has unexpected contents";
......
......@@ -8,7 +8,7 @@ no warnings 'utf8';
binmode STDOUT, ":utf8";
open my $fh, "GET http://www.unicode.org/Public/idna/6.2.0/IdnaMappingTable.txt |"
open my $fh, "GET http://www.unicode.org/Public/idna/9.0.0/IdnaMappingTable.txt |"
or die;
my $valid;
......@@ -34,6 +34,8 @@ while (<$fh>) {
$map = join "", map chr hex, split ' ', $map;
$type = "valid" if $type eq "deviation"; # use non-transitional behaviour for deviation characters
given ($type) {
when (/^(?:disallowed|disallowed_STD3_valid|disallowed_STD3_mapped)$/) {
# nop
......
......@@ -9,11 +9,11 @@ no warnings 'utf8';
use Encode;
use AnyEvent::Util;
open my $fh, "GET http://www.unicode.org/Public/idna/6.2.0/IdnaTest.txt |"
open my $fh, "GET http://www.unicode.org/Public/idna/9.0.0/IdnaTest.txt |"
or die;
while (<$fh>) {
next unless /^[TB]/; # no "N", we implement transitional only
next unless /^[NB]/; # no "T", we implement non-transitional only
chomp;
......@@ -29,20 +29,23 @@ while (<$fh>) {
$toa = lc $toa;
$tou = $source unless length $tou;
$toa = $tou unless length $toa;
my $xtou = AnyEvent::Util::idn_to_unicode $source;
my $xtoa = lc AnyEvent::Util::idn_to_ascii $source;
$xtoa = "[error]" unless defined $xtoa;
$xtou = "[error]" unless defined $xtou;
if ($tou ne $xtou && ($tou ne "" || $xtou ne $source)) {
if ($tou ne $xtou) {
warn "$. TOU ERROR $type ($source expect $tou got $xtou) ($@)\n"
unless $tou =~ /^\[/;
}
if ($toa ne $xtoa && ($toa ne "" || $xtoa ne lc $source)) {
if ($toa ne $xtoa) {
# use Data::Dump; ddx [$source, $toa, $xtoa] unless $toa =~ /^\[/;
warn "$. TOA ERROR $type ($source expect $toa got $xtoa) ($@)\n"
warn "$. TOA ERROR $type ($source expect <$toa|$tou> got $xtoa) ($@)\n"
unless $toa =~ /^\[/;
}
}
......
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