diff --git a/security/tinyca/Makefile b/security/tinyca/Makefile index a711b0078f8..bddf5051900 100644 --- a/security/tinyca/Makefile +++ b/security/tinyca/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.11 2014/08/27 06:58:00 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.12 2015/02/27 17:24:44 jca Exp $ COMMENT= GUI to manage a certification authority DISTNAME= tinyca2-0.7.5 -REVISION= 3 +REVISION= 4 CATEGORIES= security HOMEPAGE= http://tinyca.sm-zone.net/ diff --git a/security/tinyca/patches/patch-lib_CA_pm b/security/tinyca/patches/patch-lib_CA_pm new file mode 100644 index 00000000000..75daac06e15 --- /dev/null +++ b/security/tinyca/patches/patch-lib_CA_pm @@ -0,0 +1,12 @@ +$OpenBSD: patch-lib_CA_pm,v 1.1 2015/02/27 17:24:44 jca Exp $ +--- lib/CA.pm.orig Sat Feb 21 18:36:47 2015 ++++ lib/CA.pm Sat Feb 21 18:37:21 2015 +@@ -1392,7 +1392,7 @@ sub _rm_dir { + unlink($dir."/".$f); + } + } +- closedir(DIR); ++ closedir($dirh); + + rmdir($dir); + diff --git a/security/tinyca/patches/patch-lib_OpenSSL_pm b/security/tinyca/patches/patch-lib_OpenSSL_pm new file mode 100644 index 00000000000..329b92ee204 --- /dev/null +++ b/security/tinyca/patches/patch-lib_OpenSSL_pm @@ -0,0 +1,42 @@ +$OpenBSD: patch-lib_OpenSSL_pm,v 1.3 2015/02/27 17:24:44 jca Exp $ + +When requesting conversion to text format, the actual data is what has +been printed on stdout (-noout -text), not the content of the empty +file. + +--- lib/OpenSSL.pm.orig Tue Jul 25 22:12:00 2006 ++++ lib/OpenSSL.pm Thu Feb 26 18:30:58 2015 +@@ -817,7 +817,7 @@ sub convdata { + my $self = shift; + my $opts = { @_ }; + +- my ($tmp, $ext, $ret, $file, $pid, $cmd); ++ my ($tmp, $ext, $ret, $file, $pid, $cmd, $output); + $file = HELPERS::mktmp($self->{'tmp'}."/data"); + + $cmd = "$self->{'bin'} $opts->{'cmd'}"; +@@ -834,10 +834,12 @@ sub convdata { + $ext = "$cmd\n\n"; + $pid = open3($wtfh, $rdfh, $rdfh, $cmd); + print $wtfh "$opts->{'data'}\n"; ++ $output = ''; + while(<$rdfh>){ +- $ext .= $_; ++ $output .= $_; + # print STDERR "DEBUG: cmd ret: $_"; + }; ++ $ext .= $output; + waitpid($pid, 0); + $ret = $?>>8; + +@@ -868,6 +870,10 @@ sub convdata { + close(IN); + + unlink($file); ++ ++ if($opts->{'outform'} eq 'TEXT') { ++ $tmp = $output; ++ }; + + return($ret, $tmp, $ext); + }