Skip Menu |

This queue is for tickets about the Net-ManageSieve CPAN distribution.

Report information
The Basics
Id: 48349
Status: resolved
Priority: 0/
Queue: Net-ManageSieve

People
Owner: SKA [...] cpan.org
Requestors: MDOM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.06
  • 0.03
  • 0.04
  • 0.05
  • 0.07
Fixed in: 0.08



Subject: ucfirst tls or accept both forms
Hi Steffen, this is not really critical but although it is documented, i just tried the second time to just ucfirst all paramters to new() and fail naturally with tls. In the moment it's the only lowercased parameter and all other parameters are either ucfirst or accept bot forms. Attached patch solves the problem. Cheers, Mario
Subject: ucfist_tls.diff
--- /home/dom/opt/lib/perl5/share/perl/5.8.8/Net/ManageSieve.pm.orig 2009-07-31 11:39:25.076056211 +0200 +++ /home/dom/opt/lib/perl5/share/perl/5.8.8/Net/ManageSieve.pm 2009-07-31 11:46:35.250528135 +0200 @@ -47,7 +47,7 @@ use Net::ManageSieve; - my $sieve = Net::ManageSieve->new('mailhost', tls => 'require') + my $sieve = Net::ManageSieve->new('mailhost', Tls => 'require') or die "$@\n"; print "Cipher: ", $sieve->get_cipher(), "\n"; $sieve->login('user', 'password') @@ -108,8 +108,8 @@ B<Debug> or B<debug> - enable debugging if true (default OFF) -B<tls> - issue STARTTLS right after connect. If B<tls> is a HASH ref, -the mode is in member C<mode>, otherwise C<tls> itself is the mode and +B<Tls> - issue STARTTLS right after connect. If B<Tls> is a HASH ref, +the mode is in member C<mode>, otherwise C<Tls> itself is the mode and an empty SSL option HASH is passed to L<starttls()>. The C<mode> may be one of C<require> to fail, if TLS negotiation fails, or C<auto>, C<on> or C<yes>, if TLS is to attempt, but a failure is ignored. @@ -127,7 +127,7 @@ $sieve = Net::ManageSieve->new(Host => [ 'mailhost', 'localhost:2008' ], Timeout => 30, - tls => { + Tls => { mode => require, SSL_ca_path => '/usr/ssl/cert', } @@ -184,6 +184,10 @@ $self->{_last_command} = ''; $self->{_debug} = 1 if $arg{Debug} || $arg{debug}; + if ( defined( $arg{Tls} ) ) { + $arg{tls} = delete $arg{Tls}; + } + foreach my $h (@{ref($host) ? $host : [ $host ]}) { $arg{PeerAddr} = $h; if($self->{fh} = IO::Socket::INET->new(%arg)) {
On Fri Jul 31 05:50:53 2009, MDOM wrote: Show quoted text
> the second time to just ucfirst all paramters to new() and fail > naturally with tls. In the moment it's the only lowercased parameter
and Show quoted text
> all other parameters are either ucfirst or accept bot forms.
Attached Show quoted text
> patch solves the problem.
Hmm, I had "tls" lower-case, because it does apply to ManageSieve only and not to IO::Socket. But anyway. Fixed in v0.08. Regards, Steffen