--- /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/OpenCA/OpenSSL.pm	2004-08-10 14:28:11.000000000 +0200
+++ OpenSSL.pm	2004-08-18 14:54:15.000000000 +0200
@@ -243,16 +243,21 @@
 		open STDERR, $params->{$key} if ( $key =~ /STDERR/ );
 	}
 
-	if ($self->{openssl})
+	$self->{shell} = $self->{openssl};
+
+	# add wrapper to commands that make use of private keys
+	if ((exists $self->{wrapper}) and $self->{wrapper})
 	{
-		if ($self->{wrapper})
+	    foreach (qw(shell sign decrypt))
+	    {
+		if (exists $self->{$_})
 		{
-			$self->{shell} = $self->{wrapper}." ".$self->{openssl};
-		} else {
-			$self->{shell} = $self->{openssl};
+		    $self->{$_} = $self->{wrapper} . " " . $self->{$_};
 		}
+	    }
 	}
 
+
 	return 1;
 }
 
