From 6489d9649d2562a26ff3c96ded2130636573aaa7 Mon Sep 17 00:00:00 2001 From: wang_yue111 <648774160@qq.com> Date: Mon, 11 Oct 2021 16:20:30 +0800 Subject: [PATCH] remove sslget and revoker -V option (cherry picked from commit 769b2e91f97ef5e8f9a6cf8d887deaed1b31c8d4) --- pki-core.spec | 8 +++- remove-revoker-V-option.patch | 78 +++++++++++++++++++++++++++++++++++ remove-sslget-V-option.patch | 62 ++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 remove-revoker-V-option.patch create mode 100644 remove-sslget-V-option.patch diff --git a/pki-core.spec b/pki-core.spec index 1b0f13f..b53f728 100644 --- a/pki-core.spec +++ b/pki-core.spec @@ -4,13 +4,16 @@ Name: pki-core Version: 10.7.3 -Release: 2 +Release: 3 Summary: The PKI Core Package License: GPLv2 and LGPLv2 URL: http://www.dogtagpki.org/ Source0: https://github.com/dogtagpki/pki/archive/v%{version}/pki-%{version}.tar.gz Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz Patch1: 0001-Fix-URL-redirection-for-KRA-and-OCSP-web-UI-241.patch +Patch2: remove-sslget-V-option.patch +Patch3: remove-revoker-V-option.patch + BuildRequires: git make cmake >= 2.8.9-1 gcc-c++ zip java-1.8.0-openjdk-devel BuildRequires: ldapjdk >= 4.21.0 apache-commons-cli apache-commons-codec apache-commons-io BuildRequires: apache-commons-lang jakarta-commons-httpclient glassfish-jaxb-api slf4j @@ -435,6 +438,9 @@ fi %endif %changelog +* Mon Oct 11 2021 wangyue - 10.7.3-3 +- remove sslget and revoker -V option + * Fri Sep 24 2021 wutao - 10.7.3-2 - disable pki-console diff --git a/remove-revoker-V-option.patch b/remove-revoker-V-option.patch new file mode 100644 index 0000000..93e5a76 --- /dev/null +++ b/remove-revoker-V-option.patch @@ -0,0 +1,78 @@ +From d39e6a872df75ca34d6960f0f1294f84e1290ea4 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 11 Oct 2021 15:42:09 +0800 +Subject: [PATCH] remove revoker V option + +--- + base/native-tools/src/revoker/revoker.c | 39 ++++++++++--------------- + 1 file changed, 15 insertions(+), 24 deletions(-) + +diff --git a/base/native-tools/src/revoker/revoker.c b/base/native-tools/src/revoker/revoker.c +index b7ff4ea..89ad2ad 100644 +--- a/base/native-tools/src/revoker/revoker.c ++++ b/base/native-tools/src/revoker/revoker.c +@@ -94,8 +94,6 @@ int getopt(int ac, char * const av[], const char * opts); + #endif /* XP_PC */ + /*end secopt.h*/ + +-#define VERSIONSTRING "$Revision$ ($Date$)" +- + #ifndef PORT_Sprintf + #define PORT_Sprintf sprintf + #endif +@@ -137,21 +135,20 @@ static void + Usage(const char *progName) + { + fprintf(stderr, +- "Usage: %s -s serialNum -n rsa_nickname [-p password | -w pwfile ] [-d dbdir] \n" +- " [-v] [-V] [-u] [-r reasoncode] [-i numberOfHours] hostname[:port]\n" +- " serialNum: List of serial numbers to revoke, in hex, e.g. '0x31' or '0x44,0x643,0x22'\n" +- " reasoncode: integer from 0 to 6, as follows\n" +- " 0 = Unspecified (default)\n" +- " 1 = Key compromised\n" +- " 2 = CA key compromised\n" +- " 3 = Affiliation changed\n" +- " 4 = Certificate superseded\n" +- " 5 = Cessation of operation\n" +- " 6 = Certificate is on hold\n" +- " -u : unrevoke (take off hold)\n" +- " -v : verbose\n" +- " -V : report version information\n", +- progName); ++ "Usage: %s -s serialNum -n rsa_nickname [-p password | -w pwfile ] [-d dbdir] \n" ++ " [-v] [-u] [-r reasoncode] [-i numberOfHours] hostname[:port]\n" ++ " serialNum: List of serial numbers to revoke, in hex, e.g. '0x31' or '0x44,0x643,0x22'\n" ++ " reasoncode: integer from 0 to 6, as follows\n" ++ " 0 = Unspecified (default)\n" ++ " 1 = Key compromised\n" ++ " 2 = CA key compromised\n" ++ " 3 = Affiliation changed\n" ++ " 4 = Certificate superseded\n" ++ " 5 = Cessation of operation\n" ++ " 6 = Certificate is on hold\n" ++ " -u : unrevoke (take off hold)\n" ++ " -v : verbose\n", ++ progName); + exit(1); + } + +@@ -745,15 +742,9 @@ main(int argc, char **argv) + progName = progName ? progName + 1 : tmp; + + +- while ((optchar = getopt(argc, argv, "Vd:n:p:s:r:i:w:uv")) != -1) { ++ while ((optchar = getopt(argc, argv, "d:n:p:s:r:i:w:uv")) != -1) { + switch(optchar) { + +-/* Version */ +- case 'V': +- printf("%s\n",VERSIONSTRING); +- PR_Cleanup(); +- return 0; +- + /* Directory which holds NSS database */ + case 'd': + dir = optarg; +-- +2.23.0 + diff --git a/remove-sslget-V-option.patch b/remove-sslget-V-option.patch new file mode 100644 index 0000000..6416db1 --- /dev/null +++ b/remove-sslget-V-option.patch @@ -0,0 +1,62 @@ +From bf0fc39a800136fc25c4dca488c6058178bd74ab Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Tue, 18 Feb 2020 15:59:12 -0500 +Subject: [PATCH] Remove sslget -V option + +Since we haven't used SVN in a while, $Revision$ and $Date$ +no longer update. Remove the -V option instead of passing in +a valid version number. + +Signed-off-by: Alexander Scheel +--- + base/native-tools/src/sslget/sslget.c | 21 ++++++--------------- + 1 file changed, 6 insertions(+), 15 deletions(-) + +diff --git a/base/native-tools/src/sslget/sslget.c b/base/native-tools/src/sslget/sslget.c +index 4f3ebc4500..f115b21347 100644 +--- a/base/native-tools/src/sslget/sslget.c ++++ b/base/native-tools/src/sslget/sslget.c +@@ -96,8 +96,6 @@ int getopt(int ac, char * const av[], const char * opts); + #endif /* XP_PC */ + /*end secopt.h*/ + +-#define VERSIONSTRING "$Revision$ ($Date$)" +- + #ifndef PORT_Sprintf + #define PORT_Sprintf sprintf + #endif +@@ -140,12 +138,11 @@ static void + Usage(const char *progName) + { + fprintf(stderr, +- "Usage: %s [-n nickname] [-p password | -w pwfile ] [-d dbdir] \n" +- " [-e post] [-v] [-V] -r url hostname[:port]\n" +- " -n : nickname or hsm:nickname\n" +- " -v : verbose\n" +- " -V : report version information\n", +- progName); ++ "Usage: %s [-n nickname] [-p password | -w pwfile ] [-d dbdir] \n" ++ " [-e post] [-v] -r url hostname[:port]\n" ++ " -n : nickname or hsm:nickname\n" ++ " -v : verbose\n", ++ progName); + exit(1); + } + +@@ -823,15 +820,9 @@ main(int argc, char **argv) + progName = progName ? progName + 1 : tmp; + + +- while ((optchar = getopt(argc, argv, "Vd:e:n:p:r:w:v")) != -1) { ++ while ((optchar = getopt(argc, argv, "d:e:n:p:r:w:v")) != -1) { + switch(optchar) { + +-/* Version */ +- case 'V': +- printf("%s\n",VERSIONSTRING); +- PR_Cleanup(); +- return 0; +- + /* Directory which holds NSS database */ + case 'd': + dir = optarg; -- Gitee