Package: tinyca
Version: 0.7.3-2
Severity: normal
Tags: patch

Hello

When creating a new certificate request:

$opts->{'OU'} is at least not always an array as can be seen in this
Dumper() output:
    opts=$VAR1 = {
          'CN' => 'a',
          'ST' => 'a',
          'O' => 'a',
          'EMAIL' => 'a',
          'passwd' => 'a',
          'OU' => 'a',
          'algo' => 'rsa',
          'C' => 'A',
          'passwd2' => 'a',
          'bits' => 4096,
          'digest' => 'sha1',
          'L' => 'a'
        };

So perl gives:

***   Can't use string ("a") as an ARRAY ref while "strict refs" in use at 
/usr/lib/tinyca/GUI.pm line 1304.
***  ignoring at /usr/bin/tinyca2 line 106.

And sometimes do not create a certification request then without giving
a proper warnign.

Patch:

--- GUI.pm      2006-05-23 21:47:28.000000000 +0200
+++ GUI.pm.ch   2006-07-26 21:17:32.000000000 +0200
@@ -1250,7 +1252,7 @@
    # table for request data
    my $cc=0;
    my $ous = 1;
-   if(defined($opts->{'OU'})) {
+   if(defined($opts->{'OU'}) and defined @{$opts->{'OU'}}) {
       $ous = @{$opts->{'OU'}} - 1;
    }
    $reqtable = Gtk2::Table->new(1, 13 + $ous, 0);
@@ -1298,7 +1300,7 @@
          gettext("Organization Name (eg. company):"),
          \$opts->{'O'}, $reqtable, 10, 1);
 
-   if(defined($opts->{'OU'})) {
+   if(defined($opts->{'OU'}) and defined @{$opts->{'OU'}}) {
       foreach my $ou (@{$opts->{'OU'}}) {
          $entry = GUI::HELPERS::entry_to_table(
                gettext("Organizational Unit Name (eg. section):"),



(the last if has a corresponding else which seems to be supposed for scalars)

bye,

-christian-



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-amd64-k8
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) (ignored: 
LC_ALL set to [EMAIL PROTECTED])

Versions of packages tinyca depends on:
ii  libgtk2-perl                  1:1.121-1  Perl interface to the 2.x series o
ii  liblocale-gettext-perl        1.05-1     Using libc functions for internati
ii  openssl                       0.9.8b-2   Secure Socket Layer (SSL) binary a

Versions of packages tinyca recommends:
ii  zip                           2.32-1     Archiver for .zip files

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to