Won't generate new certificates due to "can't use string as ARRAY ref" error

Bug #374241 reported by Alexey Presnyakov
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tinyca (Debian)
Fix Released
Unknown
tinyca (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: tinyca

tinyca2 does not generate new certificates if CA cert has no Organization Unit (OU field) defined. In this case, it just reports a weird error to the console:

*** unhandled exception in callback:
*** Can't use string ("dd") as an ARRAY ref while "strict refs" in use at /usr/share/tinyca/GUI.pm line 1253.
*** ignoring at /usr/bin/tinyca2 line 112.

and does not show anything in GUI. I have found a fix in the net and it worked fine:
  http://<email address hidden>/msg217724.html

Fixed GUI.pm file attached.
===========================
Description: Ubuntu 9.04
Release: 9.04
tinyca:
  Installed: 0.7.5-2
  Candidate: 0.7.5-2
  Version table:
 *** 0.7.5-2 0
        500 http://ru.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

Related branches

Revision history for this message
Alexey Presnyakov (alex-cgi-central) wrote :
Revision history for this message
Andrew Schulman (andrex) wrote :

In fact, I get the "can't use string as ARRAY ref" error every time I try to generate a certificate request:

*** unhandled exception in callback:
*** Can't use string ("OECA") as an ARRAY ref while "strict refs" in use at /usr/share/tinyca/GUI.pm line 1253.
*** ignoring at /usr/bin/tinyca2 line 112.

So for me, TinyCA is unable to generate cert requests at all.

The proposed patch does NOT fix the problem, because it also refers to the undefined array. I'm attaching a revised patch that does fix the problem.

summary: - Not generating new certificates if CA has no OrganizationUnit (OU) set
+ Won't generate new certificates due to "can't use string as ARRAY ref"
+ error
tags: added: patch
Revision history for this message
Andrew Schulman (andrex) wrote :

This bug is still present in version 0.7.5-3. However, it appears that someone attempted to patch the error, but failed. Here's a revised patch that does fix it. It adds the same condition as before, but overwriting the failed change.

Changed in tinyca (Debian):
status: Unknown → Confirmed
Revision history for this message
Andrew Schulman (andrex) wrote :

Is it possible to get this fixed by applying the patch I submitted? This bug substantially breaks TinyCA, and the patch to fix it is trivial. Thanks, Andrew.

Changed in tinyca (Debian):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tinyca - 0.7.5-5

---------------
tinyca (0.7.5-5) unstable; urgency=medium

  * Bug fix: "options set with radio buttons when creating a new
    certificate are mixed up", thanks to Mateusz Kijowski.
    Closes: #724586
  * Bug fix: "perl syntax warnings (OU != array)". Thanks to
    Andrew Schulman for the patch. Closes: #380003, LP: #374241
  * Packaging cleanup:
    - Fixed lintian warnings:
      - debian-rules-missing-recommended-target build-arch
      - debian-rules-missing-recommended-target build-indep
    - Bumped Standards-Version to 3.9.5.

 -- Christoph Ulrich Scholler <email address hidden> Mon, 24 Feb 2014 23:17:24 +0100

Changed in tinyca (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.