Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / libio-socket-ssl-perl / libio-socket-ssl-perl-1.16 / debian / patches / partial_hostname_fix.patch
1 Index: libio-socket-ssl-perl/SSL.pm
2 ===================================================================
3 --- libio-socket-ssl-perl.orig/SSL.pm   2009-07-06 22:12:02.000000000 +0100
4 +++ libio-socket-ssl-perl/SSL.pm        2009-07-06 22:23:40.000000000 +0100
5 @@ -1036,7 +1036,7 @@
6                         $ip4 = inet_aton( $identity ) or croak "'$identity' is not IPv4, but neither IPv6 nor hostname";
7                 } else {
8                         # assume hostname
9 -                       if ( $identity !~m{^[a-zA-Z0-9-_\.]+$} ) {
10 +                       if ( $identity !~m{^[\w\-\.]+$} ) {
11                                 $identity = idn_to_ascii($identity) or
12                                         croak "Warning: Given name '$identity' could not be converted to IDNA!";
13                         }
14 @@ -1058,7 +1058,7 @@
15                         } elsif ( $wtyp eq 'leftmost' and $name =~m{^\*(\..+)$} ) {
16                                 $pattern = qr{^[\w\-]*\Q$1\E$}i;
17                         } else {
18 -                               $pattern = qr{^\Q$name}i;
19 +                               $pattern = qr{^\Q$name\E$}i;
20                         }
21                         return $identity =~ $pattern;
22                 };
23 Index: libio-socket-ssl-perl/t/verify_hostname.t
24 ===================================================================
25 --- libio-socket-ssl-perl.orig/t/verify_hostname.t      2009-07-06 22:12:02.000000000 +0100
26 +++ libio-socket-ssl-perl/t/verify_hostname.t   2009-07-06 22:24:08.000000000 +0100
27 @@ -88,6 +88,7 @@
28                 'www-13.lala.other.local' => [],
29                 'smtp.mydomain.local' => [qw(smtp ldap www)],
30                 'xn--lwe-sna.idntest.local' => [qw(smtp ldap www)],
31 +               'smtp.mydomain.localizing.useless.local' => [],
32         );
33         if ( $can_idn ) {
34                 # check IDN handling