remove sslget and revoker -V option

This commit is contained in:
wang_yue111 2021-10-11 16:57:54 +08:00
parent 05f29dd556
commit b7e771850e
3 changed files with 147 additions and 1 deletions

View File

@ -4,13 +4,16 @@
Name: pki-core
Version: 10.7.3
Release: 3
Release: 4
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 <wangyue92@huawei.com> - 10.7.3-4
- remove sslget and revoker -V option
* Fri Sep 24 2021 wutao <wutao61@huawei.com> - 10.7.3-3
- disable pki-console

View File

@ -0,0 +1,78 @@
From d39e6a872df75ca34d6960f0f1294f84e1290ea4 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 11 Oct 2021 15:42:09 +0800
Subject: [PATCH] 2
---
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

View File

@ -0,0 +1,62 @@
From bf0fc39a800136fc25c4dca488c6058178bd74ab Mon Sep 17 00:00:00 2001
From: Alexander Scheel <ascheel@redhat.com>
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 <ascheel@redhat.com>
---
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;