genkey: fix noise file handling
This commit is contained in:
parent
7e9f7dac60
commit
7731df4cd6
@ -4,7 +4,7 @@
|
||||
Summary: SSL certificate and key management utilities
|
||||
Name: crypto-utils
|
||||
Version: 2.4.1
|
||||
Release: 48%{?dist}
|
||||
Release: 49%{?dist}
|
||||
Group: Applications/System
|
||||
# certwatch.c is GPLv2
|
||||
# pemutil.c etc are (MPLv1.1+ or GPLv2+ or LPGLv2+)
|
||||
@ -135,6 +135,9 @@ chmod -R u+w $RPM_BUILD_ROOT
|
||||
%{perl_vendorarch}/auto/Crypt
|
||||
|
||||
%changelog
|
||||
* Thu Feb 13 2014 Joe Orton <jorton@redhat.com> - 2.4.1-49
|
||||
- genkey: fix noise file handling
|
||||
|
||||
* Mon Jan 27 2014 Joe Orton <jorton@redhat.com> - 2.4.1-48
|
||||
- update certwatch man page (#618421)
|
||||
|
||||
|
15
genkey.pl
15
genkey.pl
@ -979,7 +979,10 @@ sub makeCertNSS
|
||||
|
||||
nssUtilCmd("$bindir/certutil", $args);
|
||||
|
||||
if ($noisefile) {
|
||||
unlink($noisefile);
|
||||
$noisefile = '';
|
||||
}
|
||||
|
||||
if ($certfile && !-f $certfile) {
|
||||
Newt::newtWinMessage("Error", "Close",
|
||||
@ -1015,7 +1018,10 @@ sub genRequestNSS
|
||||
|
||||
nssUtilCmd("$bindir/certutil", $args);
|
||||
|
||||
if ($noisefile) {
|
||||
unlink($noisefile);
|
||||
$noisefile = '';
|
||||
}
|
||||
|
||||
if (!-f $csrfile) {
|
||||
Newt::newtWinMessage("Error", "Close",
|
||||
@ -1055,7 +1061,7 @@ sub makeCertOpenSSL
|
||||
Newt::newtWinMessage("Error", "Close",
|
||||
"Was not able to create a certificate for this ".
|
||||
"host:\n\nPress return to exit");
|
||||
unlink($noisefile);
|
||||
unlink($noisefile) if $noisefile;
|
||||
Newt::Finished();
|
||||
exit 1;
|
||||
}
|
||||
@ -1065,7 +1071,7 @@ sub makeCertOpenSSL
|
||||
"Could not set permissions of private key file.\n".
|
||||
"$keyfile");
|
||||
Newt::Finished();
|
||||
unlink($noisefile);
|
||||
unlink($noisefile) if $noisefile;
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
@ -1098,7 +1104,10 @@ sub genRequestOpenSSL
|
||||
|
||||
nssUtilCmd("$bindir/keyutil", $args);
|
||||
|
||||
if ($noisefile) {
|
||||
unlink($noisefile);
|
||||
$noisefile = '';
|
||||
}
|
||||
Newt::Resume();
|
||||
|
||||
if (!-f $csrfile) {
|
||||
@ -1175,10 +1184,10 @@ sub renewCertOpenSSL
|
||||
$args .= "--filepwdnss $pwdfile " if $pwdfile;
|
||||
$args .= "--validity $months ";
|
||||
$args .= "--out $csrfile ";
|
||||
### pass $noisefile?
|
||||
|
||||
nssUtilCmd("$bindir/keyutil", $args);
|
||||
|
||||
unlink($noisefile);
|
||||
Newt::Resume();
|
||||
|
||||
if (!-f $csrfile) {
|
||||
|
Loading…
Reference in New Issue
Block a user