[crypto-utils/f20] genkey: only fail if --nss is specified and mod_nss is absent (#845942)
jorton
jorton at fedoraproject.org
Thu Feb 13 23:01:30 UTC 2014
commit d4556f50021d098daa3a059565cf57e1b30da747
Author: Joe Orton <jorton at redhat.com>
Date: Thu Feb 13 23:02:09 2014 +0000
genkey: only fail if --nss is specified and mod_nss is absent (#845942)
Resolves: rhbz#845942
crypto-utils.spec | 5 ++++-
genkey.pl | 20 ++++++++++----------
2 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/crypto-utils.spec b/crypto-utils.spec
index a79f0db..3f78b24 100644
--- a/crypto-utils.spec
+++ b/crypto-utils.spec
@@ -4,7 +4,7 @@
Summary: SSL certificate and key management utilities
Name: crypto-utils
Version: 2.4.1
-Release: 51%{?dist}
+Release: 52%{?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 at redhat.com> - 2.4.1-52
+- genkey: only fail if --nss is specified and mod_nss is absent (#845942)
+
* Thu Feb 13 2014 Joe Orton <jorton at redhat.com> - 2.4.1-51
- certwatch: fix handling of files containing private keys
diff --git a/genkey.pl b/genkey.pl
index 646cad0..2f3b582 100644
--- a/genkey.pl
+++ b/genkey.pl
@@ -342,18 +342,18 @@ sub NextBackCancelButton {
# Require that this Apache module (mod_nss or mod_ssl) be installed
sub requireModule {
-
- my $module = $nss ? "mod_nss" : "mod_ssl";
- my $not_installed_msg = `rpm -q $module | grep "not installed"`;
+ if ($nss) {
+ my $not_installed_msg = `rpm -q mod_nss | grep "not installed"`;
if ($not_installed_msg) {
- Newt::newtWinMessage("Error", "Close",
- "$not_installed_msg".
- "\nIt is required to generate this type of CSRs or certs".
- "for this host:\n\nPress return to exit");
- Newt::Finished();
- exit 1;
- }
+ Newt::newtWinMessage("Error", "Close",
+ "$not_installed_msg".
+ "\nIt is required to generate this type of CSRs or certs ".
+ "for this host.\n\nPress return to exit");
+ Newt::Finished();
+ exit 1;
+ }
+ }
}
# Check that nss.conf exists
More information about the scm-commits
mailing list