Blame SOURCES/mod_nss-man.patch

90ca4f
diff -rupN mod_nss-1.0.8.orig/Makefile.am mod_nss-1.0.8/Makefile.am
90ca4f
--- mod_nss-1.0.8.orig/Makefile.am	2008-05-16 08:18:07.000000000 -0700
90ca4f
+++ mod_nss-1.0.8/Makefile.am	2013-06-27 19:13:30.000000000 -0700
90ca4f
@@ -5,6 +5,14 @@ bin_PROGRAMS = nss_pcache
90ca4f
 
90ca4f
 nss_pcache_SOURCES = nss_pcache.c
90ca4f
 
90ca4f
+man8_MANS =				\
90ca4f
+	gencert.8			\
90ca4f
+	nss_pcache.8		\
90ca4f
+	$(NULL)
90ca4f
+
90ca4f
+install-data-hook:
90ca4f
+	@for i in $(man8_MANS) ; do gzip -f $(DESTDIR)$(man8dir)/$$i ; done
90ca4f
+
90ca4f
 ## Define the source file for the module
90ca4f
 libmodnss_la_SOURCES = mod_nss.c nss_engine_config.c nss_engine_init.c nss_engine_io.c nss_engine_kernel.c nss_engine_log.c nss_engine_pphrase.c nss_engine_vars.c nss_expr.c nss_expr_eval.c nss_expr_parse.y nss_expr_scan.l nss_util.c nss_engine_rand.c
90ca4f
 libmodnss_la_LDFLAGS = -module -avoid-version
90ca4f
diff -rupN mod_nss-1.0.8.orig/gencert.8 mod_nss-1.0.8/gencert.8
90ca4f
--- mod_nss-1.0.8.orig/gencert.8	1969-12-31 16:00:00.000000000 -0800
90ca4f
+++ mod_nss-1.0.8/gencert.8	2013-07-01 09:56:37.000000000 -0700
90ca4f
@@ -0,0 +1,59 @@
90ca4f
+.\" A man page for gencert
90ca4f
+.\"
90ca4f
+.\" Licensed under the Apache License, Version 2.0 (the "License");
90ca4f
+.\" you may not use this file except in compliance with the License.
90ca4f
+.\" You may obtain a copy of the License at
90ca4f
+.\"
90ca4f
+.\"      http://www.apache.org/licenses/LICENSE-2.0
90ca4f
+.\"
90ca4f
+.\" Unless required by applicable law or agreed to in writing, software
90ca4f
+.\" distributed under the License is distributed on an "AS IS" BASIS,
90ca4f
+.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90ca4f
+.\" See the License for the specific language governing permissions and
90ca4f
+.\" limitations under the License.
90ca4f
+.\"
90ca4f
+.\" Author: Rob Crittenden <rcritten@redhat.com>
90ca4f
+.\"
90ca4f
+.TH "gencert" "8" "Jul 1 2013" "Rob Crittenden" ""
90ca4f
+.SH "NAME"
90ca4f
+gencert \- Generate a test NSS database for mod_nss
90ca4f
+
90ca4f
+.SH "SYNOPSIS"
90ca4f
+gencert <destdir>
90ca4f
+
90ca4f
+.SH "DESCRIPTION"
90ca4f
+A tool used to generate a self\-signed CA as well as server and user certificates for mod_nss testing.
90ca4f
+.PP
90ca4f
+This is used to generate a default NSS database for the mod_nss Apache module. It does not test to see if an existing database already exists, so use with care.
90ca4f
+.PP
90ca4f
+\fBgencert\fP will generate a new NSS database and set an empty database password.
90ca4f
+.PP
90ca4f
+It generates a self\-signed CA with the subject "CN=Certificate Shack, O=example.com, C=US"
90ca4f
+.PP
90ca4f
+It also generates a certificate suitable for servers with the subject "CN=<FQDN>, O=example.com, C=US", and a user certificate with the subject "E=alpha@<FQDN>, CN=Frank Alpha, UID=alpha, OU=People, O=example.com, C=US".
90ca4f
+.PP
90ca4f
+The nicknames it uses are:
90ca4f
+.IP
90ca4f
+.TS
90ca4f
+tab(;);
90ca4f
+ll,ll.
90ca4f
+CA:;cacert
90ca4f
+Server certificate:;Server\-Cert
90ca4f
+User cert:;alpha
90ca4f
+.TE
90ca4f
+
90ca4f
+.SH OPTIONS
90ca4f
+.TP
90ca4f
+.B <destdir>
90ca4f
+Specifies the destination directory where the NSS databases will be created.
90ca4f
+
90ca4f
+.SH BUGS
90ca4f
+Report bugs to http://bugzilla.redhat.com.
90ca4f
+
90ca4f
+.SH AUTHORS
90ca4f
+Rob Crittenden <rcritten@redhat.com>.
90ca4f
+
90ca4f
+.SH COPYRIGHT
90ca4f
+Copyright (c) 2011 Red Hat, Inc. This is licensed under the Apache License, Version 2.0 (the "License"); no one may use this file except in compliance with the License. A copy of this license is available at http://www.apache.org/licenses/LICENSE-2.0.
90ca4f
+.PP
90ca4f
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License.
90ca4f
diff -rupN mod_nss-1.0.8.orig/migrate.pl mod_nss-1.0.8/migrate.pl
90ca4f
--- mod_nss-1.0.8.orig/migrate.pl	2005-05-31 07:32:42.000000000 -0700
90ca4f
+++ mod_nss-1.0.8/migrate.pl	2013-07-03 14:23:12.000000000 -0700
90ca4f
@@ -115,7 +115,8 @@ while (<SSL>) {
90ca4f
 }
90ca4f
 
90ca4f
 if ($passphrase == 0) {
90ca4f
-    print NSS "NSSPassPhraseHelper /usr/sbin/nss_pcache\n";
90ca4f
+    # NOTE:  Located at '/usr/sbin/nss_pcache' prior to 'mod_nss-1.0.8-22'.
90ca4f
+    print NSS "NSSPassPhraseHelper /usr/libexec/nss_pcache\n";
90ca4f
 }
90ca4f
 
90ca4f
 close(NSS);
90ca4f
diff -rupN mod_nss-1.0.8.orig/nss.conf.in mod_nss-1.0.8/nss.conf.in
90ca4f
--- mod_nss-1.0.8.orig/nss.conf.in	2013-06-25 17:14:22.000000000 -0700
90ca4f
+++ mod_nss-1.0.8/nss.conf.in	2013-07-03 14:23:48.000000000 -0700
90ca4f
@@ -42,7 +42,10 @@ NSSPassPhraseDialog  builtin
90ca4f
 #   Pass Phrase Helper:
90ca4f
 #   This helper program stores the token password pins between
90ca4f
 #   restarts of Apache.
90ca4f
-NSSPassPhraseHelper /usr/sbin/nss_pcache
90ca4f
+#
90ca4f
+#   NOTE:  Located at '/usr/sbin/nss_pcache' prior to 'mod_nss-1.0.8-22'.
90ca4f
+#
90ca4f
+NSSPassPhraseHelper /usr/libexec/nss_pcache
90ca4f
 
90ca4f
 #   Configure the SSL Session Cache. 
90ca4f
 #   NSSSessionCacheSize is the number of entries in the cache.
90ca4f
diff -rupN mod_nss-1.0.8.orig/nss_pcache.8 mod_nss-1.0.8/nss_pcache.8
90ca4f
--- mod_nss-1.0.8.orig/nss_pcache.8	1969-12-31 16:00:00.000000000 -0800
90ca4f
+++ mod_nss-1.0.8/nss_pcache.8	2013-07-03 15:35:39.000000000 -0700
90ca4f
@@ -0,0 +1,95 @@
90ca4f
+.\" A man page for nss_pcache
90ca4f
+.\"
90ca4f
+.\" Licensed under the Apache License, Version 2.0 (the "License");
90ca4f
+.\" you may not use this file except in compliance with the License.
90ca4f
+.\" You may obtain a copy of the License at
90ca4f
+.\"
90ca4f
+.\"      http://www.apache.org/licenses/LICENSE-2.0
90ca4f
+.\"
90ca4f
+.\" Unless required by applicable law or agreed to in writing, software
90ca4f
+.\" distributed under the License is distributed on an "AS IS" BASIS,
90ca4f
+.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90ca4f
+.\" See the License for the specific language governing permissions and
90ca4f
+.\" limitations under the License.
90ca4f
+.\"
90ca4f
+.\" Author: Rob Crittenden <rcritten@redhat.com>
90ca4f
+.\"
90ca4f
+.TH "nss_pcache" "8" "Jul 1 2013" "Rob Crittenden" ""
90ca4f
+.SH "NAME"
90ca4f
+nss_pcache \- Helper program used to store token password pins
90ca4f
+
90ca4f
+.SH "SYNOPSIS"
90ca4f
+nss_pcache <semid> <fips on/off> <directory> [prefix]
90ca4f
+
90ca4f
+.SH "DESCRIPTION"
90ca4f
+A helper program used by the Apache \fBhttpd\fP mod_nss plug-in to store the NSS PKCS #11 token password pins between restarts of Apache.
90ca4f
+.PP
90ca4f
+Whenever an Apache \fBhttpd\fP process configured to use the mod_nss plug-in is started, this program will be automatically invoked via reference to the mod_nss configuration file stored under \fB/etc/httpd/conf.d/nss.conf\fP which contains the following default entry:
90ca4f
+.IP
90ca4f
+#   Pass Phrase Helper:
90ca4f
+.br
90ca4f
+#   This helper program stores the token password pins between
90ca4f
+.br
90ca4f
+#   restarts of Apache.
90ca4f
+.br
90ca4f
+#
90ca4f
+.br
90ca4f
+#   NOTE:  Located at '/usr/sbin/nss_pcache' prior
90ca4f
+.br
90ca4f
+#          to 'mod_nss-1.0.8-22'.
90ca4f
+.br
90ca4f
+#
90ca4f
+.br
90ca4f
+NSSPassPhraseHelper /usr/libexec/nss_pcache
90ca4f
+
90ca4f
+.SH OPTIONS
90ca4f
+.TP
90ca4f
+.B <semid>
90ca4f
+The semaphore which corresponds to the mod_nss plug-in registered with the Apache \fBhttpd\fP process during startup.
90ca4f
+.TP
90ca4f
+.B <fips on/off>
90ca4f
+Specifies whether FIPS mode should be enabled, \fBon\fP, or disabled, \fBoff\fP.  By default, FIPS mode is disabled, and no variable is specified in \fB/etc/httpd/conf.d/nss.conf\fP.  To enable FIPS mode, establish password access for the specified NSS security databases, and specify the following variable in  \fB/etc/httpd/conf.d/nss.conf\fP:
90ca4f
+.IP
90ca4f
+.TS
90ca4f
+tab(;);
90ca4f
+ll,ll.
90ca4f
+;NSSFIPS on
90ca4f
+.TE
90ca4f
+.TP
90ca4f
+.B <directory>
90ca4f
+Specifies the destination directory of the NSS databases that will be associated with this executable specified by the following entry in \fB/etc/httpd/conf.d/nss.conf\fP:
90ca4f
+.IP
90ca4f
+.TS
90ca4f
+tab(;);
90ca4f
+ll,ll.
90ca4f
+;#   Server Certificate Database:
90ca4f
+;#   The NSS security database directory that holds the
90ca4f
+;#   certificates and keys. The database consists
90ca4f
+;#   of 3 files: cert8.db, key3.db and secmod.db.
90ca4f
+;#   Provide the directory that these files exist.
90ca4f
+;NSSCertificateDatabase /etc/httpd/alias
90ca4f
+.TE
90ca4f
+.TP
90ca4f
+.B [prefix]
90ca4f
+Optional prefix to attach prior to the names of the NSS certificate and key databases contained in the directory referenced by the previous argument and specified by the following entry in \fB/etc/httpd/conf.d/nss.conf\fP (must be uncommented in order to be utilized):
90ca4f
+.IP
90ca4f
+.TS
90ca4f
+tab(;);
90ca4f
+ll,ll.
90ca4f
+;#   Database Prefix:
90ca4f
+;#   In order to be able to store multiple NSS databases
90ca4f
+;#   in one directory they need unique names. This option
90ca4f
+;#   sets the database prefix used for cert8.db and key3.db.
90ca4f
+;#NSSDBPrefix my-prefix-
90ca4f
+.TE
90ca4f
+
90ca4f
+.SH BUGS
90ca4f
+Report bugs to http://bugzilla.redhat.com.
90ca4f
+
90ca4f
+.SH AUTHORS
90ca4f
+Rob Crittenden <rcritten@redhat.com>.
90ca4f
+
90ca4f
+.SH COPYRIGHT
90ca4f
+Copyright (c) 2013 Red Hat, Inc. This is licensed under the Apache License, Version 2.0 (the "License"); no one may use this file except in compliance with the License. A copy of this license is available at http://www.apache.org/licenses/LICENSE-2.0.
90ca4f
+.PP
90ca4f
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License.
90ca4f
diff -rupN mod_nss-1.0.8.orig/nss_pcache.c mod_nss-1.0.8/nss_pcache.c
90ca4f
--- mod_nss-1.0.8.orig/nss_pcache.c	2013-06-25 17:14:22.000000000 -0700
90ca4f
+++ mod_nss-1.0.8/nss_pcache.c	2013-06-26 18:44:42.000000000 -0700
90ca4f
@@ -318,7 +318,7 @@ int main(int argc, char ** argv)
90ca4f
     union semun semarg;
90ca4f
 
90ca4f
     if (argc < 4 || argc > 5) {
90ca4f
-        fprintf(stderr, "Usage: nss_pcache <semid> <fips on/off> <directory> <prefix>\n");
90ca4f
+        fprintf(stderr, "Usage: nss_pcache <semid> <fips on/off> <directory> [prefix]\n");
90ca4f
         exit(1);
90ca4f
     }
90ca4f
 
90ca4f
@@ -336,7 +336,7 @@ int main(int argc, char ** argv)
90ca4f
     PK11_ConfigurePKCS11(NULL,NULL,NULL, INTERNAL_TOKEN_NAME, NULL, NULL,NULL,NULL,8,1);
90ca4f
  
90ca4f
     /* Initialize NSS and open the certificate database read-only. */
90ca4f
-    rv = NSS_Initialize(argv[3], argc == 4 ? argv[4] : NULL, argc == 5 ? argv[4] : NULL, "secmod.db", NSS_INIT_READONLY);
90ca4f
+    rv = NSS_Initialize(argv[3], argc == 5 ? argv[4] : NULL, argc == 5 ? argv[4] : NULL, "secmod.db", NSS_INIT_READONLY);
90ca4f
 
90ca4f
     if (rv != SECSuccess) {
90ca4f
         fprintf(stderr, "Unable to initialize NSS database: %d\n", rv);