From rishirenjith at gmail.com Mon Aug 10 10:52:47 2009 From: rishirenjith at gmail.com (Rishi Renjith) Date: Mon, 10 Aug 2009 16:22:47 +0530 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss Message-ID: Hello, We are trying to make apache work with mod_nss in Solaris10 x86 platform in our project, which currently uses mod_ssl. For that we did the following. 1) Compiled and installed NSS with NSPR. 2) Installed Apache compiled with mod_ssl 3) Compiled and installed mod_nss for this Apache 4) Created the dummy DB using gencert.sh fie in mod_nss 5) Changed permissions for DB so that we can use it. The issue we are getting is that the browser(Firefox) says "SSL_Disabled", when trying to run in FIPS mode. When I checked the server logs, it says "SSL Input filter read failed." "Cannot connect, SSL is disabled". error. Is there any setting that we are missing? I am attaching the nss.conf and httpd.conf files. Versions used: Mod_nss: 1.0.8 NSS and NSPR: nss-3.12.3.1-with-nspr-4.7.5 Apache: 2.2.11 Thanks, Rishi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nss.conf Type: application/octet-stream Size: 9358 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: httpd.conf Type: application/octet-stream Size: 17518 bytes Desc: not available URL: From rcritten at redhat.com Mon Aug 10 14:29:03 2009 From: rcritten at redhat.com (Rob Crittenden) Date: Mon, 10 Aug 2009 10:29:03 -0400 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: References: Message-ID: <4A802EAF.8050402@redhat.com> Rishi Renjith wrote: > Hello, > We are trying to make apache work with mod_nss in Solaris10 x86 platform > in our project, which currently uses mod_ssl. For that we did the following. > 1) Compiled and installed NSS with NSPR. > 2) Installed Apache compiled with mod_ssl > 3) Compiled and installed mod_nss for this Apache > 4) Created the dummy DB using gencert.sh fie in mod_nss > 5) Changed permissions for DB so that we can use it. > The issue we are getting is that the browser(Firefox) says > "SSL_Disabled", when trying to run in FIPS mode. When I checked the > server logs, it says "SSL Input filter read failed." "Cannot connect, > SSL is disabled". error. > > Is there any setting that we are missing? > I am attaching the nss.conf and httpd.conf files. > > Versions used: > Mod_nss: 1.0.8 > NSS and NSPR: nss-3.12.3.1-with-nspr-4.7.5 > Apache: 2.2.11 Ok, let me start with a couple of questions: 1. Does it work when NSSFips is off? 2. Why did you set NSSEnforceValidCerts to off? 3. Can you share /opt/SMC/Apache2/logs/nsserror_log? 4. Can you provide the output of: certutil -L -d /opt/SMC/Apache2/dummycert rob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3245 bytes Desc: S/MIME Cryptographic Signature URL: From rishirenjith at gmail.com Mon Aug 10 15:10:32 2009 From: rishirenjith at gmail.com (Rishi Renjith) Date: Mon, 10 Aug 2009 20:40:32 +0530 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: <4A802EAF.8050402@redhat.com> References: <4A802EAF.8050402@redhat.com> Message-ID: Hello, We first tested with a self signed certificate using a crypto card to store it( used modutil -add), then this error was sporadic. Some 2-3 requests will go through fine and then the error occurs. After that we can get successful requests only if we restart the firefox browser, that too sometimes. ( The browser is running in FIPS mode) Finally we tried to test with the dummy certificates created using the gencert utility in mod_nss, without the crypto card. In that case, we cannot get any successful responses. (The .conf files are with the dummy cert configuration) Also please see inline for your questions. On Mon, Aug 10, 2009 at 7:59 PM, Rob Crittenden wrote: > Rishi Renjith wrote: > >> Hello, We are trying to make apache work with mod_nss in Solaris10 x86 >> platform in our project, which currently uses mod_ssl. For that we did the >> following. >> 1) Compiled and installed NSS with NSPR. >> 2) Installed Apache compiled with mod_ssl >> 3) Compiled and installed mod_nss for this Apache >> 4) Created the dummy DB using gencert.sh fie in mod_nss >> 5) Changed permissions for DB so that we can use it. The issue we are >> getting is that the browser(Firefox) says "SSL_Disabled", when trying to run >> in FIPS mode. When I checked the server logs, it says "SSL Input filter read >> failed." "Cannot connect, SSL is disabled". error. >> Is there any setting that we are missing? >> I am attaching the nss.conf and httpd.conf files. >> >> Versions used: Mod_nss: 1.0.8 >> NSS and NSPR: nss-3.12.3.1-with-nspr-4.7.5 >> Apache: 2.2.11 >> > > Ok, let me start with a couple of questions: > > 1. Does it work when NSSFips is off? *[Rishi] No. Even with NSSFips turned off, we keep getting the error.* > > > 2. Why did you set NSSEnforceValidCerts to off? *[Rishi] We tested first with a self signed certificate, using crypto card. For that we turned the EnforceValidCerts off. * > > > 3. Can you share /opt/SMC/Apache2/logs/nsserror_log? > > 4. Can you provide the output of: certutil -L -d /opt/SMC/Apache2/dummycert > *[Rishi] The output and log file, I will mail as soon as I get to office > tomorrow.* > rob > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rishirenjith at gmail.com Tue Aug 11 14:10:25 2009 From: rishirenjith at gmail.com (Rishi Renjith) Date: Tue, 11 Aug 2009 19:40:25 +0530 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: References: <4A802EAF.8050402@redhat.com> Message-ID: Hello, The issue with the dummy DB was that some permissions to some files in it were not given. I did a chmod 777 to all files and now the dummy DB seems to be working fine. I configured the NSS database with the crypto card(sun sca6000) as follows. mkdir /opt/SMC/Apache2/nsscertdb cd /opt/SMC/Apache2/nsscertdb -certutil -N -d /opt/SMC/Apache2/nsscertdb -modutil -dbdir . -nocertdb -force -add "Sun Crypto Accelerator" -libfile /usr/lib/libpkcs11.so -mechanisms RSA:DSA:RC4:DES modutil -list -dbdir /opt/SMC/Apache2/nssdb Using database directory /opt/SMC/Apache2/nssdb... Listing of PKCS #11 Modules ----------------------------------------------------------- 1. NSS Internal PKCS #11 Module slots: 2 slots attached status: loaded slot: NSS Internal Cryptographic Services token: NSS Generic Crypto Services slot: NSS User Private Key and Certificate Services token: NSS Certificate DB 2. Sun Crypto Accelerator library name: /usr/lib/libpkcs11.so slots: 2 slots attached status: loaded slot: Sun Metaslot token: Sun Metaslot slot: Sun Crypto Softtoken token: Sun Software PKCS#11 softtoken ----------------------------------------------------------- certutil -R -s "C=IN, O=NSN, OU=SPA2, CN=sandeeprc.eu.org" -h "Sun Metaslot" -o ismc.csr -d . -a -n ismc_cert (Got the CSR signed from CA Cert) certutil -A -d . -n "ismc_cert" -a -t "CT,," -i cert2.csr -h "Sun Metaslot" certutil -A -d . -n "CACERT CA" -a -t "CTu,CTu,CTu" -i ca.txt -h "Sun Metaslot" certutil -V -u V -d . -n "ismc_cert" -h "Sun Metaslot" The certificate is verified corrrectly. In nss.conf, i gave the following directives to use this database Now in NSS.conf I added the following lines to use the hardware accelarator NSSNickname "Sun Metaslot:ismc_cert" NSSCertificateDatabase /opt/SMC/Apache2/nssdb Now everything is working fine, the requests are getting processed correctly. But the issue is that the rsaprivate value is not getting incremented in the kstat -n mca0 output. Which means that it is not using the hardware accelerator card. I have also given cryptoadm enable metaslot token= so as to use the hardware accelerator. Any suggestions? (When we try to use mod_ssl using the pkcs patch, it s correctly incrementing the rsaprivate values.) On Mon, Aug 10, 2009 at 8:40 PM, Rishi Renjith wrote: > Hello, We first tested with a self signed certificate using a crypto card > to store it( used modutil -add), then this error was sporadic. Some 2-3 > requests will go through fine and then the error occurs. After that we can > get successful requests only if we restart the firefox browser, that too > sometimes. ( The browser is running in FIPS mode) > > Finally we tried to test with the dummy certificates created using the > gencert utility in mod_nss, without the crypto card. In that case, we cannot > get any successful responses. (The .conf files are with the dummy cert > configuration) > > Also please see inline for your questions. > > On Mon, Aug 10, 2009 at 7:59 PM, Rob Crittenden wrote: > >> Rishi Renjith wrote: >> >>> Hello, We are trying to make apache work with mod_nss in Solaris10 x86 >>> platform in our project, which currently uses mod_ssl. For that we did the >>> following. >>> 1) Compiled and installed NSS with NSPR. >>> 2) Installed Apache compiled with mod_ssl >>> 3) Compiled and installed mod_nss for this Apache >>> 4) Created the dummy DB using gencert.sh fie in mod_nss >>> 5) Changed permissions for DB so that we can use it. The issue we are >>> getting is that the browser(Firefox) says "SSL_Disabled", when trying to run >>> in FIPS mode. When I checked the server logs, it says "SSL Input filter read >>> failed." "Cannot connect, SSL is disabled". error. >>> Is there any setting that we are missing? >>> I am attaching the nss.conf and httpd.conf files. >>> >>> Versions used: Mod_nss: 1.0.8 >>> NSS and NSPR: nss-3.12.3.1-with-nspr-4.7.5 >>> Apache: 2.2.11 >>> >> >> Ok, let me start with a couple of questions: >> >> 1. Does it work when NSSFips is off? > > *[Rishi] No. Even with NSSFips turned off, we keep getting the error.* > >> >> >> 2. Why did you set NSSEnforceValidCerts to off? > > *[Rishi] We tested first with a self signed certificate, using crypto > card. For that we turned the EnforceValidCerts off. * > >> >> >> 3. Can you share /opt/SMC/Apache2/logs/nsserror_log? >> >> 4. Can you provide the output of: certutil -L -d >> /opt/SMC/Apache2/dummycert >> *[Rishi] The output and log file, I will mail as soon as I get to office >> tomorrow.* >> rob >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rcritten at redhat.com Tue Aug 11 20:31:18 2009 From: rcritten at redhat.com (Rob Crittenden) Date: Tue, 11 Aug 2009 16:31:18 -0400 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: References: <4A802EAF.8050402@redhat.com> Message-ID: <4A81D516.7090703@redhat.com> Rishi Renjith wrote: > Hello, > The issue with the dummy DB was that some permissions to some files in > it were not given. I did a chmod 777 to all files and now the dummy DB > seems to be working fine. > > I configured the NSS database with the crypto card(sun sca6000) as follows. > mkdir /opt/SMC/Apache2/nsscertdb > > cd /opt/SMC/Apache2/nsscertdb > > -certutil -N -d /opt/SMC/Apache2/nsscertdb > > -modutil -dbdir . -nocertdb -force -add "Sun Crypto Accelerator" > -libfile /usr/lib/libpkcs11.so -mechanisms RSA:DSA:RC4:DES > modutil -list -dbdir /opt/SMC/Apache2/nssdb > Using database directory /opt/SMC/Apache2/nssdb... > > Listing of PKCS #11 Modules > ----------------------------------------------------------- > 1. NSS Internal PKCS #11 Module > slots: 2 slots attached > status: loaded > > slot: NSS Internal Cryptographic Services > token: NSS Generic Crypto Services > > slot: NSS User Private Key and Certificate Services > token: NSS Certificate DB > > 2. Sun Crypto Accelerator > library name: /usr/lib/libpkcs11.so > slots: 2 slots attached > status: loaded > > slot: Sun Metaslot > token: Sun Metaslot > > slot: Sun Crypto Softtoken > token: Sun Software PKCS#11 softtoken > ----------------------------------------------------------- > > > certutil -R -s "C=IN, O=NSN, OU=SPA2, CN=sandeeprc.eu.org > " -h "Sun Metaslot" -o ismc.csr -d . -a -n > ismc_cert > > (Got the CSR signed from CA Cert) > certutil -A -d . -n "ismc_cert" -a -t "CT,," -i cert2.csr -h "Sun Metaslot" > > certutil -A -d . -n "CACERT CA" -a -t "CTu,CTu,CTu" -i ca.txt -h "Sun > Metaslot" > > certutil -V -u V -d . -n "ismc_cert" -h "Sun Metaslot" > > The certificate is verified corrrectly. In nss.conf, i gave the > following directives to use this database > > Now in NSS.conf I added the following lines to use the hardware accelarator > NSSNickname "Sun Metaslot:ismc_cert" > NSSCertificateDatabase /opt/SMC/Apache2/nssdb > > Now everything is working fine, the requests are getting processed > correctly. But the issue is that the rsaprivate value is not getting > incremented in the kstat -n mca0 output. Which means that it is not > using the hardware accelerator card. > > I have also given cryptoadm enable metaslot token= so as to > use the hardware accelerator. > > Any suggestions? > > (When we try to use mod_ssl using the pkcs patch, it s correctly > incrementing the rsaprivate values.) Make sure that the software token does not have the given cert and private key (actually make sure it doesn't have a cert with the same Subject and a corresponding private key -- NOTE: it should be sufficient to just remove the private key). If you do that there is no way that you can make the connection without using the accelerator for the RSA private op (since NSS does not have access to the private key itself). rob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3245 bytes Desc: S/MIME Cryptographic Signature URL: From rishirenjith at gmail.com Wed Aug 12 10:11:51 2009 From: rishirenjith at gmail.com (Rishi Renjith) Date: Wed, 12 Aug 2009 15:41:51 +0530 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: <4A81D516.7090703@redhat.com> References: <4A802EAF.8050402@redhat.com> <4A81D516.7090703@redhat.com> Message-ID: I checked the software token, it does not have any keys or certificates. I'm stuck and clueless here. Below is the detailed steps I tried today to add a self signed certificate to database. But still the rsaprivate shows nochange. *bash-3.00# cd ../nssdb* *bash-3.00# rm ** *bash-3.00# certutil -N -d .* Enter a password which will be used to encrypt your keys. The password should be at least 8 characters long, and should contain at least one non-alphabetic character. Enter new password: Re-enter password: * * *bash-3.00# ls* cert8.db key3.db secmod.db *bash-3.00# chmod 777 ** *bash-3.00# modutil -dbdir . -nocertdb -force -add "Sun Crypto Accelerator" -libfile /usr/lib/libpkcs11.so -mechanisms RSA:DSA:RC4:DES* Module "Sun Crypto Accelerator" added to database. *bash-3.00# modutil -list -dbdir . * Listing of PKCS #11 Modules ----------------------------------------------------------- 1. NSS Internal PKCS #11 Module slots: 2 slots attached status: loaded slot: NSS Internal Cryptographic Services token: NSS Generic Crypto Services slot: NSS User Private Key and Certificate Services token: NSS Certificate DB 2. Sun Crypto Accelerator library name: /usr/lib/libpkcs11.so slots: 2 slots attached status: loaded slot: Sun Metaslot token: Sun Metaslot slot: Sun Crypto Softtoken token: Sun Software PKCS#11 softtoken ----------------------------------------------------------- *bash-3.00# certutil -S -x -n "cert309" -t "u,u,u" -k rsa -g 1024 -v 120 -s "cn=nobody,ou=Org,o=Sun,L=Santa Clara,ST=California,C=US" -d . -h "Sun Metaslot"* *Enter Password or Pin for "Sun Metaslot":* A random seed must be generated that will be used in the creation of your key. One of the easiest ways to create a random seed is to use the timing of keystrokes on a keyboard. To begin, type keys on the keyboard until this progress meter is full. DO NOT USE THE AUTOREPEAT FUNCTION ON YOUR KEYBOARD! Continue typing until the progress meter is full: |************************************************************| Finished. Press enter to continue: Generating key. This may take a few moments... Enter Password or Pin for "Sun Software PKCS#11 softtoken": *bash-3.00# certutil -K -d .* certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services" Enter Password or Pin for "NSS Certificate DB": certutil: no keys found *bash-3.00# certutil -K -d . -h "Sun Software PKCS#11 softtoken"* certutil: Checking token "Sun Software PKCS#11 softtoken" in slot "Sun Crypto Softtoken" Enter Password or Pin for "Sun Software PKCS#11 softtoken": certutil: no keys found *bash-3.00# certutil -K -d . -h "Sun Metaslot"* certutil: Checking token "Sun Metaslot" in slot "Sun Metaslot" Enter Password or Pin for "Sun Metaslot": < 0> rsa 204a23dbb2e82d7d8c1495e3374dcd4462423e4c Sun Metaslot:cert309 < 1> rsa 54ea6d93df1cfef13064aedc6f6c7f0dce34e7b6 Sun Metaslot:cert147 < 2> rsa 34d4a4974cf325e735dd23bb3a6b4680249f3550 (orphan) < 3> rsa 2018eecb4c05eb25cd30be4de6f13ccaeadcb43d Sun Metaslot:cert1151 < 4> rsa 61932a2d796fd8f6e82949059176e980cde5c55a sanCert < 5> rsa 4e752a9b4a76c1462d9aec76de1617e08d07ff42 Sun Metaslot:ismc_cert *bash-3.00# certutil -L -d .* Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI *bash-3.00# certutil -L -d . -h "Sun Software PKCS#11 softtoken"* Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI Enter Password or Pin for "Sun Software PKCS#11 softtoken": *bash-3.00# certutil -L -d . -h "Sun Metaslot"* Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI Enter Password or Pin for "Sun Metaslot": Sun Metaslot:cert309 u,u,u Sun Metaslot:cert147 u,u,u Sun Metaslot:cert1151 u,u,u Sun Metaslot:sanCert u,u,u Sun Metaslot:CACERT CA ,, Sun Metaslot:ismc_cert u,u,u * modutil -disable "NSS Internal PKCS #11 Module" -dbdir .* WARNING: Performing this operation while the browser is running could cause corruption of your security databases. If the browser is currently running, you should exit browser before continuing this operation. Type 'q ' to abort, or to continue: Slot "NSS Internal Cryptographic Services" disabled. Slot "NSS User Private Key and Certificate Services" disabled. *bash-3.00# modutil -enable "Sun Crypto Accelerator" -dbdir .* WARNING: Performing this operation while the browser is running could cause corruption of your security databases. If the browser is currently running, you should exit browser before continuing this operation. Type 'q ' to abort, or to continue: Slot "Sun Metaslot" enabled. Slot "Sun Crypto Softtoken" enabled. On Wed, Aug 12, 2009 at 2:01 AM, Rob Crittenden wrote: > Rishi Renjith wrote: > >> Hello, The issue with the dummy DB was that some permissions to some files >> in it were not given. I did a chmod 777 to all files and now the dummy DB >> seems to be working fine. >> I configured the NSS database with the crypto card(sun sca6000) as >> follows. mkdir /opt/SMC/Apache2/nsscertdb >> >> cd /opt/SMC/Apache2/nsscertdb >> >> -certutil -N -d /opt/SMC/Apache2/nsscertdb >> >> -modutil -dbdir . -nocertdb -force -add "Sun Crypto Accelerator" -libfile >> /usr/lib/libpkcs11.so -mechanisms RSA:DSA:RC4:DES >> modutil -list -dbdir /opt/SMC/Apache2/nssdb >> Using database directory /opt/SMC/Apache2/nssdb... >> >> Listing of PKCS #11 Modules >> ----------------------------------------------------------- >> 1. NSS Internal PKCS #11 Module >> slots: 2 slots attached >> status: loaded >> >> slot: NSS Internal Cryptographic Services >> token: NSS Generic Crypto Services >> >> slot: NSS User Private Key and Certificate Services >> token: NSS Certificate DB >> >> 2. Sun Crypto Accelerator >> library name: /usr/lib/libpkcs11.so >> slots: 2 slots attached >> status: loaded >> >> slot: Sun Metaslot >> token: Sun Metaslot >> >> slot: Sun Crypto Softtoken >> token: Sun Software PKCS#11 softtoken >> ----------------------------------------------------------- >> >> >> certutil -R -s "C=IN, O=NSN, OU=SPA2, CN=sandeeprc.eu.org < >> http://sandeeprc.eu.org>" -h "Sun Metaslot" -o ismc.csr -d . -a -n >> ismc_cert >> >> (Got the CSR signed from CA Cert) >> certutil -A -d . -n "ismc_cert" -a -t "CT,," -i cert2.csr -h "Sun >> Metaslot" >> >> certutil -A -d . -n "CACERT CA" -a -t "CTu,CTu,CTu" -i ca.txt -h "Sun >> Metaslot" >> >> certutil -V -u V -d . -n "ismc_cert" -h "Sun Metaslot" >> >> The certificate is verified corrrectly. In nss.conf, i gave the following >> directives to use this database >> >> Now in NSS.conf I added the following lines to use the hardware >> accelarator >> NSSNickname "Sun Metaslot:ismc_cert" >> NSSCertificateDatabase /opt/SMC/Apache2/nssdb >> >> Now everything is working fine, the requests are getting processed >> correctly. But the issue is that the rsaprivate value is not getting >> incremented in the kstat -n mca0 output. Which means that it is not using >> the hardware accelerator card. >> I have also given cryptoadm enable metaslot token= so as to use >> the hardware accelerator. >> Any suggestions? >> (When we try to use mod_ssl using the pkcs patch, it s correctly >> incrementing the rsaprivate values.) >> > > Make sure that the software token does not have the given cert and private > key (actually make sure it doesn't have a cert with the same Subject and a > corresponding private key -- NOTE: it should be sufficient to just remove > the private key). If you do that there is no way that you can make the > connection without using the accelerator for the RSA private op (since NSS > does not have access to the private key itself). > > rob > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rishirenjith at gmail.com Wed Aug 12 10:39:17 2009 From: rishirenjith at gmail.com (Rishi Renjith) Date: Wed, 12 Aug 2009 16:09:17 +0530 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: References: <4A802EAF.8050402@redhat.com> <4A81D516.7090703@redhat.com> Message-ID: I also tried this test. *cryptoadm disable provider=mca/0 mechanism=all* In this case, the handshake fails. But..., if i disable only RSA in the card, cryptoadm disable provider=mca/0 mechanism= *it works, which means that the card is currently used for AES jobs and RSA joba are done at the software level. * On Wed, Aug 12, 2009 at 3:41 PM, Rishi Renjith wrote: > I checked the software token, it does not have any keys or certificates. > I'm stuck and clueless here. Below is the detailed steps I tried today to > add a self signed certificate to database. But still the rsaprivate shows > nochange. > > > > *bash-3.00# cd ../nssdb* > *bash-3.00# rm ** > *bash-3.00# certutil -N -d .* > Enter a password which will be used to encrypt your keys. > The password should be at least 8 characters long, > and should contain at least one non-alphabetic character. > > Enter new password: > Re-enter password: > * > * > > *bash-3.00# ls* > cert8.db key3.db secmod.db > *bash-3.00# chmod 777 ** > *bash-3.00# modutil -dbdir . -nocertdb -force -add "Sun Crypto > Accelerator" -libfile /usr/lib/libpkcs11.so -mechanisms RSA:DSA:RC4:DES* > Module "Sun Crypto Accelerator" added to database. > *bash-3.00# modutil -list -dbdir . * > Listing of PKCS #11 Modules > ----------------------------------------------------------- > 1. NSS Internal PKCS #11 Module > slots: 2 slots attached > status: loaded > > slot: NSS Internal Cryptographic Services > token: NSS Generic Crypto Services > > slot: NSS User Private Key and Certificate Services > token: NSS Certificate DB > > 2. Sun Crypto Accelerator > library name: /usr/lib/libpkcs11.so > slots: 2 slots attached > status: loaded > > slot: Sun Metaslot > token: Sun Metaslot > > slot: Sun Crypto Softtoken > token: Sun Software PKCS#11 softtoken > ----------------------------------------------------------- > *bash-3.00# certutil -S -x -n "cert309" -t "u,u,u" -k rsa -g 1024 -v 120 > -s "cn=nobody,ou=Org,o=Sun,L=Santa Clara,ST=California,C=US" -d . -h "Sun > Metaslot"* > *Enter Password or Pin for "Sun Metaslot":* > > A random seed must be generated that will be used in the > creation of your key. One of the easiest ways to create a > random seed is to use the timing of keystrokes on a keyboard. > > To begin, type keys on the keyboard until this progress meter > is full. DO NOT USE THE AUTOREPEAT FUNCTION ON YOUR KEYBOARD! > > > Continue typing until the progress meter is full: > > |************************************************************| > > Finished. Press enter to continue: > > > Generating key. This may take a few moments... > > Enter Password or Pin for "Sun Software PKCS#11 softtoken": > > *bash-3.00# certutil -K -d .* > certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key > and Certificate Services" > Enter Password or Pin for "NSS Certificate DB": > certutil: no keys found > *bash-3.00# certutil -K -d . -h "Sun Software PKCS#11 softtoken"* > certutil: Checking token "Sun Software PKCS#11 softtoken" in slot "Sun > Crypto Softtoken" > Enter Password or Pin for "Sun Software PKCS#11 softtoken": > certutil: no keys found > *bash-3.00# certutil -K -d . -h "Sun Metaslot"* > certutil: Checking token "Sun Metaslot" in slot "Sun Metaslot" > Enter Password or Pin for "Sun Metaslot": > < 0> rsa 204a23dbb2e82d7d8c1495e3374dcd4462423e4c Sun > Metaslot:cert309 > < 1> rsa 54ea6d93df1cfef13064aedc6f6c7f0dce34e7b6 Sun > Metaslot:cert147 > < 2> rsa 34d4a4974cf325e735dd23bb3a6b4680249f3550 (orphan) > < 3> rsa 2018eecb4c05eb25cd30be4de6f13ccaeadcb43d Sun > Metaslot:cert1151 > < 4> rsa 61932a2d796fd8f6e82949059176e980cde5c55a sanCert > < 5> rsa 4e752a9b4a76c1462d9aec76de1617e08d07ff42 Sun > Metaslot:ismc_cert > > > *bash-3.00# certutil -L -d .* > > Certificate Nickname Trust > Attributes > > SSL,S/MIME,JAR/XPI > > *bash-3.00# certutil -L -d . -h "Sun Software PKCS#11 softtoken"* > > Certificate Nickname Trust > Attributes > > SSL,S/MIME,JAR/XPI > > Enter Password or Pin for "Sun Software PKCS#11 softtoken": > *bash-3.00# certutil -L -d . -h "Sun Metaslot"* > > Certificate Nickname Trust > Attributes > > SSL,S/MIME,JAR/XPI > > Enter Password or Pin for "Sun Metaslot": > Sun Metaslot:cert309 u,u,u > Sun Metaslot:cert147 u,u,u > Sun Metaslot:cert1151 u,u,u > Sun Metaslot:sanCert u,u,u > Sun Metaslot:CACERT CA ,, > Sun Metaslot:ismc_cert u,u,u > > * modutil -disable "NSS Internal PKCS #11 Module" -dbdir .* > > WARNING: Performing this operation while the browser is running could cause > corruption of your security databases. If the browser is currently running, > you should exit browser before continuing this operation. Type > 'q ' to abort, or to continue: > > Slot "NSS Internal Cryptographic Services" disabled. > Slot "NSS User Private Key and Certificate Services" disabled. > > *bash-3.00# modutil -enable "Sun Crypto Accelerator" -dbdir .* > > WARNING: Performing this operation while the browser is running could cause > corruption of your security databases. If the browser is currently running, > you should exit browser before continuing this operation. Type > 'q ' to abort, or to continue: > > Slot "Sun Metaslot" enabled. > Slot "Sun Crypto Softtoken" enabled. > > > > > > On Wed, Aug 12, 2009 at 2:01 AM, Rob Crittenden wrote: > >> Rishi Renjith wrote: >> >>> Hello, The issue with the dummy DB was that some permissions to some >>> files in it were not given. I did a chmod 777 to all files and now the dummy >>> DB seems to be working fine. >>> I configured the NSS database with the crypto card(sun sca6000) as >>> follows. mkdir /opt/SMC/Apache2/nsscertdb >>> >>> cd /opt/SMC/Apache2/nsscertdb >>> >>> -certutil -N -d /opt/SMC/Apache2/nsscertdb >>> >>> -modutil -dbdir . -nocertdb -force -add "Sun Crypto Accelerator" -libfile >>> /usr/lib/libpkcs11.so -mechanisms RSA:DSA:RC4:DES >>> modutil -list -dbdir /opt/SMC/Apache2/nssdb >>> Using database directory /opt/SMC/Apache2/nssdb... >>> >>> Listing of PKCS #11 Modules >>> ----------------------------------------------------------- >>> 1. NSS Internal PKCS #11 Module >>> slots: 2 slots attached >>> status: loaded >>> >>> slot: NSS Internal Cryptographic Services >>> token: NSS Generic Crypto Services >>> >>> slot: NSS User Private Key and Certificate Services >>> token: NSS Certificate DB >>> >>> 2. Sun Crypto Accelerator >>> library name: /usr/lib/libpkcs11.so >>> slots: 2 slots attached >>> status: loaded >>> >>> slot: Sun Metaslot >>> token: Sun Metaslot >>> >>> slot: Sun Crypto Softtoken >>> token: Sun Software PKCS#11 softtoken >>> ----------------------------------------------------------- >>> >>> >>> certutil -R -s "C=IN, O=NSN, OU=SPA2, CN=sandeeprc.eu.org < >>> http://sandeeprc.eu.org>" -h "Sun Metaslot" -o ismc.csr -d . -a -n >>> ismc_cert >>> >>> (Got the CSR signed from CA Cert) >>> certutil -A -d . -n "ismc_cert" -a -t "CT,," -i cert2.csr -h "Sun >>> Metaslot" >>> >>> certutil -A -d . -n "CACERT CA" -a -t "CTu,CTu,CTu" -i ca.txt -h "Sun >>> Metaslot" >>> >>> certutil -V -u V -d . -n "ismc_cert" -h "Sun Metaslot" >>> >>> The certificate is verified corrrectly. In nss.conf, i gave the following >>> directives to use this database >>> >>> Now in NSS.conf I added the following lines to use the hardware >>> accelarator >>> NSSNickname "Sun Metaslot:ismc_cert" >>> NSSCertificateDatabase /opt/SMC/Apache2/nssdb >>> >>> Now everything is working fine, the requests are getting processed >>> correctly. But the issue is that the rsaprivate value is not getting >>> incremented in the kstat -n mca0 output. Which means that it is not using >>> the hardware accelerator card. >>> I have also given cryptoadm enable metaslot token= so as to >>> use the hardware accelerator. >>> Any suggestions? >>> (When we try to use mod_ssl using the pkcs patch, it s correctly >>> incrementing the rsaprivate values.) >>> >> >> Make sure that the software token does not have the given cert and private >> key (actually make sure it doesn't have a cert with the same Subject and a >> corresponding private key -- NOTE: it should be sufficient to just remove >> the private key). If you do that there is no way that you can make the >> connection without using the accelerator for the RSA private op (since NSS >> does not have access to the private key itself). >> >> rob >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rcritten at redhat.com Wed Aug 12 16:59:12 2009 From: rcritten at redhat.com (Rob Crittenden) Date: Wed, 12 Aug 2009 12:59:12 -0400 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: References: <4A802EAF.8050402@redhat.com> <4A81D516.7090703@redhat.com> Message-ID: <4A82F4E0.7070105@redhat.com> Rishi Renjith wrote: > I also tried this test. > > *cryptoadm disable provider=mca/0 mechanism=all* > > In this case, the handshake fails. > > But..., if i disable only RSA in the card, > cryptoadm disable provider=mca/0 mechanism= > *it works, which means that the card is currently used for AES jobs and > RSA joba are done at the software level. * Ok, looks like one of the SSL devs in mozilla.dev.tech.crypto (Nelson) thinks this is a question for the Sun Metaslot folks. I'm not sure why this works in mod_ssl with openssl, it may be that they explicitly configure things to work only in hardware. rob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3245 bytes Desc: S/MIME Cryptographic Signature URL: From rishirenjith at gmail.com Wed Aug 12 17:12:56 2009 From: rishirenjith at gmail.com (Rishi Renjith) Date: Wed, 12 Aug 2009 22:42:56 +0530 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: <4A82F4E0.7070105@redhat.com> References: <4A802EAF.8050402@redhat.com> <4A81D516.7090703@redhat.com> <4A82F4E0.7070105@redhat.com> Message-ID: When using mod_ssl, we just specify the crypto provider as *pkcs11 *and it will take care of the rest. The issue with mod_ssl is that the key is not stored in the card, that is why we wanted to go with mod_nss. Here in my case, the key and certificates are stored in the card, but somehow the RSA encryption is not done in the card. What puzzles me is that when I list the tokens using *modutil -list *only "Sun Metaslot" has RSA has the mechanism RSA associated with it, so logically all RSA jobs should go to the card. I also mailed to the dev-tech-crypto list, but got no response. Do you suspect that any of my libraries are not built properly? (NSPR, NSS , mod_nss or Apache). When using JSSE through tomcat or Apache through mod_ssl, the card is being used for RSA jobs. The issue seems to be only with NSS :( I will try to get in touch with the Sun Metaslot support tomorrow. Rishi On Wed, Aug 12, 2009 at 10:29 PM, Rob Crittenden wrote: > Rishi Renjith wrote: > >> I also tried this test. >> *cryptoadm disable provider=mca/0 mechanism=all* >> >> In this case, the handshake fails. >> But..., if i disable only RSA in the card, cryptoadm disable >> provider=mca/0 mechanism= >> *it works, which means that the card is currently used for AES jobs and >> RSA joba are done at the software level. * >> > > Ok, looks like one of the SSL devs in mozilla.dev.tech.crypto (Nelson) > thinks this is a question for the Sun Metaslot folks. I'm not sure why this > works in mod_ssl with openssl, it may be that they explicitly configure > things to work only in hardware. > > rob > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rishirenjith at gmail.com Thu Aug 13 13:51:17 2009 From: rishirenjith at gmail.com (Rishi Renjith) Date: Thu, 13 Aug 2009 19:21:17 +0530 Subject: [Mod_nss-list] "SSL input filter read failed" error for apache with mod_nss In-Reply-To: <4A82F4E0.7070105@redhat.com> References: <4A802EAF.8050402@redhat.com> <4A81D516.7090703@redhat.com> <4A82F4E0.7070105@redhat.com> Message-ID: Hello, The problem with the Sun Metaslot was that you should use an env variable METASLOT_DISABLED=false and it uses the hardware!!. But looks like I am back to square one!!! When I run mod_nss in FIPS mode, I am getting "SSL disabled" error in browser. When I checked the logs in the apache side, it says *SSL input filter read failed.* *[Thu Aug 13 19:22:18 2009] [error] SSL Library Error: -12273 SSL has received a record with an incorrect Message Authentication Code* But if i turn off the FIPS in nss.conf, (comment *NSSFIPS on* ), the same browser connects. I've attached the nss.conf file and the 2 error logs I get when I run in FIPS mode. Please advice. Rishi On Wed, Aug 12, 2009 at 10:29 PM, Rob Crittenden wrote: > Rishi Renjith wrote: > >> I also tried this test. >> *cryptoadm disable provider=mca/0 mechanism=all* >> >> In this case, the handshake fails. >> But..., if i disable only RSA in the card, cryptoadm disable >> provider=mca/0 mechanism= >> *it works, which means that the card is currently used for AES jobs and >> RSA joba are done at the software level. * >> > > Ok, looks like one of the SSL devs in mozilla.dev.tech.crypto (Nelson) > thinks this is a question for the Sun Metaslot folks. I'm not sure why this > works in mod_ssl with openssl, it may be that they explicitly configure > things to work only in hardware. > > rob > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: error_log Type: application/octet-stream Size: 8252 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nsserror_log Type: application/octet-stream Size: 7373 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nss.conf Type: application/octet-stream Size: 10166 bytes Desc: not available URL: From ekim at mitre.org Wed Aug 19 21:01:29 2009 From: ekim at mitre.org (Kim, Ernest) Date: Wed, 19 Aug 2009 17:01:29 -0400 Subject: [Mod_nss-list] OCSP errors Message-ID: <8DA11B342D7A5643A515ACBF8B72D9876671FC20@IMCMBX3.MITRE.ORG> Hi all. I was wondering if someone could help me out. I'm trying to use mod_nss with OCSP enabled. I get the following error messages when I do: [Wed Aug 19 15:09:40 2009] [error] Certificate not verified: 'RapidSSL' [Wed Aug 19 15:09:40 2009] [error] SSL Library Error: -8068 The OCSP server has refused this request as unauthorized [Wed Aug 19 15:09:40 2009] [error] Unable to verify certificate 'RapidSSL'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved. I have a SSL certificate for the server issued from RapidSSL. When I do a certutil -V on the certificate, it says the certificate is valid. From the looks of the error message, the RapidSSL certificate is being sent to the OCSP server. Is this what is happening? If so, is there a way I can have this not happen? Thanks. Here is a copy of my nss.conf file: # # This is the Apache server configuration file providing SSL support using. # the mod_nss plugin. It contains the configuration directives to instruct # the server how to serve pages over an https connection. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # # When we also provide SSL we have to listen to the # standard HTTP port (see above) and to the HTTPS port # # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two # Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:443" # Listen 443 ## ## SSL Global Context ## ## All SSL configuration in this context applies both to ## the main server and all SSL-enabled virtual hosts. ## # # Some MIME-types for downloading Certificates and CRLs # AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl # Pass Phrase Dialog: # Configure the pass phrase gathering process. # The filtering dialog program (`builtin' is a internal # terminal dialog) has to provide the pass phrase on stdout. NSSPassPhraseDialog builtin # Pass Phrase Helper: # This helper program stores the token password pins between # restarts of Apache. NSSPassPhraseHelper /usr/sbin/nss_pcache # Configure the SSL Session Cache. # NSSSessionCacheSize is the number of entries in the cache. # NSSSessionCacheTimeout is the SSL2 session timeout (in seconds). # NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds). NSSSessionCacheSize 10000 NSSSessionCacheTimeout 100 NSSSession3CacheTimeout 86400 # # Pseudo Random Number Generator (PRNG): # Configure one or more sources to seed the PRNG of the SSL library. # The seed data should be of good random quality. # WARNING! On some platforms /dev/random blocks if not enough entropy # is available. Those platforms usually also provide a non-blocking # device, /dev/urandom, which may be used instead. # # This does not support seeding the RNG with each connection. NSSRandomSeed startup builtin #NSSRandomSeed startup file:/dev/random 512 #NSSRandomSeed startup file:/dev/urandom 512 ## ## SSL Virtual Host Context ## # General setup for the virtual host #DocumentRoot "/etc/httpd/htdocs" #ServerName www.example.com:8443 #ServerAdmin you at example.com # Use separate log files for the SSL virtual host; note that LogLevel # is not inherited from httpd.conf. ErrorLog /etc/httpd/logs/nss_error_log TransferLog /etc/httpd/logs/nss_access_log LogLevel debug # SSL Engine Switch: # Enable/Disable SSL for this virtual host. NSSEngine on # SSL Cipher Suite: # List the ciphers that the client is permitted to negotiate. # See the mod_nss documentation for a complete list. # SSL 3 ciphers. SSL 2 is disabled by default. NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha # SSL 3 ciphers + ECC ciphers. SSL 2 is disabled by default. # # Comment out the NSSCipherSuite line above and use the one below if you have # ECC enabled NSS and mod_nss and want to use Elliptical Curve Cryptography #NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha,-ecdh_ecdsa_null_sha,+ecdh_ecdsa_rc4_128_sha,+ecdh_ecdsa_3des_sha,+ecdh_ecdsa_aes_128_sha,+ecdh_ecdsa_aes_256_sha,-ecdhe_ecdsa_null_sha,+ecdhe_ecdsa_rc4_128_sha,+ecdhe_ecdsa_3des_sha,+ecdhe_ecdsa_aes_128_sha,+ecdhe_ecdsa_aes_256_sha,-ecdh_rsa_null_sha,+ecdh_rsa_128_sha,+ecdh_rsa_3des_sha,+ecdh_rsa_aes_128_sha,+ecdh_rsa_aes_256_sha,-echde_rsa_null,+ecdhe_rsa_rc4_128_sha,+ecdhe_rsa_3des_sha,+ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha NSSProtocol SSLv3,TLSv1 # SSL Certificate Nickname: # The nickname of the RSA server certificate you are going to use. NSSNickname RapidSSL NSSEnforceValidCerts off # SSL Certificate Nickname: # The nickname of the ECC server certificate you are going to use, if you # have an ECC-enabled version of NSS and mod_nss #NSSECCNickname Server-Cert-ecc # Server Certificate Database: # The NSS security database directory that holds the certificates and # keys. The database consists of 3 files: cert8.db, key3.db and secmod.db. # Provide the directory that these files exist. NSSCertificateDatabase /etc/httpd/alias # Database Prefix: # In order to be able to store multiple NSS databases in one directory # they need unique names. This option sets the database prefix used for # cert8.db and key3.db. #NSSDBPrefix my-prefix- # Client Authentication (Type): # Client certificate verification type. Types are none, optional and # require. #NSSVerifyClient none # # Online Certificate Status Protocol (OCSP). # Verify that certificates have not been revoked before accepting them. #NSSOCSP off NSSOCSP on NSSOCSPDefaultResponder on NSSOCSPDefaultURL http://ocsp.disa.mil NSSOCSPDefaultName ocsp-disa-mil-responder # Access Control: # With SSLRequire you can do per-directory access control based # on arbitrary complex boolean expressions containing server # variable checks and other lookup directives. The syntax is a # mixture between C and Perl. See the mod_nss documentation # for more details. # #NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ # SSL Engine Options: # Set various options for the SSL engine. # o FakeBasicAuth: # Translate the client X.509 into a Basic Authorisation. This means that # the standard Auth/DBMAuth methods can be used for access control. The # user name is the `one line' version of the client's X.509 certificate. # Note that no password is obtained from the user. Every entry in the user # file needs this password: `xxj31ZMTZzkVA'. # o ExportCertData: # This exports two additional environment variables: SSL_CLIENT_CERT and # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the # server (always existing) and the client (only existing when client # authentication is used). This can be used to import the certificates # into CGI scripts. # o StdEnvVars: # This exports the standard SSL/TLS related `SSL_*' environment variables. # Per default this exportation is switched off for performance reasons, # because the extraction step is an expensive operation and is usually # useless for serving static content. So one usually enables the # exportation for CGI and SSI requests only. # o StrictRequire: # This denies access when "NSSRequireSSL" or "NSSRequire" applied even # under a "Satisfy any" situation, i.e. when it applies access is denied # and no other module can change it. # o OptRenegotiate: # This enables optimized SSL connection renegotiation handling when SSL # directives are used in per-directory context. #NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire NSSOptions +StdEnvVars NSSOptions +StdEnvVars # Per-Server Logging: # The home of a custom SSL log file. Use this when you want a # compact non-error SSL logfile on a virtual host basis. #CustomLog /home/rcrit/redhat/apache/logs/ssl_request_log \ # "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" TraceEnable off # Found answer in: http://kbase.redhat.com/faq/docs/DOC-3108.pdf;jsessionid=B745D217C29223D271721CF355787325.ab46478d NSSOptions +StdEnvVars +ExportCertData +StrictRequire NSSRequire ( %{SSL_CLIENT_S_DN_O} ne "") NSSRequireSSL NSSVerifyClient require #NSSOptions +StdEnvVars +ExportCertData NSSRequireSSL NSSRequire ( %{SSL_CLIENT_S_DN_O} ne "") NSSVerifyClient require # NSSVerifyDepth 10 NSSOptions +StdEnvVars +ExportCertData +StrictRequire +OptRenegotiate NSSRequireSSL NSSRequire ( %{SSL_CLIENT_S_DN_O} ne "") NSSVerifyClient require # NSSVerifyDepth 10 NSSOptions +StdEnvVars +ExportCertData +StrictRequire +OptRenegotiate I appreciate any help you can give me. Thanks! -Ernie Mitre Corporation 202 Burlington Road Room 1K315 Bedford, MA 01730-1420 Office: (781) 271-7189 Cell: (339) 223-7000 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rcritten at redhat.com Wed Aug 19 21:13:10 2009 From: rcritten at redhat.com (Rob Crittenden) Date: Wed, 19 Aug 2009 17:13:10 -0400 Subject: [Mod_nss-list] OCSP errors In-Reply-To: <8DA11B342D7A5643A515ACBF8B72D9876671FC20@IMCMBX3.MITRE.ORG> References: <8DA11B342D7A5643A515ACBF8B72D9876671FC20@IMCMBX3.MITRE.ORG> Message-ID: <4A8C6AE6.5090807@redhat.com> Kim, Ernest wrote: > Hi all. I was wondering if someone could help me out. I?m trying to use > mod_nss with OCSP enabled. I get the following error messages when I do: > > > > [Wed Aug 19 15:09:40 2009] [error] Certificate not verified: 'RapidSSL' > > [Wed Aug 19 15:09:40 2009] [error] SSL Library Error: -8068 The OCSP > server has refused this request as unauthorized > > [Wed Aug 19 15:09:40 2009] [error] Unable to verify certificate > 'RapidSSL'. Add "NSSEnforceValidCerts off" to nss.conf so the server can > start until the problem can be resolved. > > > > I have a SSL certificate for the server issued from RapidSSL. When I do > a certutil ?V on the certificate, it says the certificate is valid. From > the looks of the error message, the RapidSSL certificate is being sent > to the OCSP server. Is this what is happening? If so, is there a way I > can have this not happen? Thanks. Here is a copy of my nss.conf file: The server is validating its own server certificate at startup and that request is failing so the server is refusing to start. You need to trust the certificate that is signing the OCSP response. I didn't see that after a quick look on the RapidSSL site, maybe their support can point you to it. rob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3245 bytes Desc: S/MIME Cryptographic Signature URL: From rcritten at redhat.com Thu Aug 20 14:26:32 2009 From: rcritten at redhat.com (Rob Crittenden) Date: Thu, 20 Aug 2009 10:26:32 -0400 Subject: [Mod_nss-list] OCSP errors In-Reply-To: <8DA11B342D7A5643A515ACBF8B72D9876671FD3B@IMCMBX3.MITRE.ORG> References: <8DA11B342D7A5643A515ACBF8B72D9876671FC20@IMCMBX3.MITRE.ORG> <4A8C6AE6.5090807@redhat.com> <8DA11B342D7A5643A515ACBF8B72D9876671FD3B@IMCMBX3.MITRE.ORG> Message-ID: <4A8D5D18.2050509@redhat.com> Kim, Ernest wrote: >> -----Original Message----- >> From: Rob Crittenden [mailto:rcritten at redhat.com] >> Sent: Wednesday, August 19, 2009 5:13 PM >> To: Kim, Ernest >> Cc: mod_nss-list at redhat.com >> Subject: Re: [Mod_nss-list] OCSP errors >> >> Kim, Ernest wrote: >>> Hi all. I was wondering if someone could help me out. I'm trying to >> use >>> mod_nss with OCSP enabled. I get the following error messages when I >> do: >>> >>> >>> [Wed Aug 19 15:09:40 2009] [error] Certificate not verified: >> 'RapidSSL' >>> [Wed Aug 19 15:09:40 2009] [error] SSL Library Error: -8068 The OCSP >>> server has refused this request as unauthorized >>> >>> [Wed Aug 19 15:09:40 2009] [error] Unable to verify certificate >>> 'RapidSSL'. Add "NSSEnforceValidCerts off" to nss.conf so the server >> can >>> start until the problem can be resolved. >>> >>> >>> >>> I have a SSL certificate for the server issued from RapidSSL. When I >> do >>> a certutil -V on the certificate, it says the certificate is valid. >> From >>> the looks of the error message, the RapidSSL certificate is being sent >>> to the OCSP server. Is this what is happening? If so, is there a way I >>> can have this not happen? Thanks. Here is a copy of my nss.conf file: > > Hi Rob, thanks for your reply. > >> The server is validating its own server certificate at startup and that >> request is failing so the server is refusing to start. > > I don't understand why this is. With OCSP turned off, I can start my server > using the same RapidSSL certificate for https without having to use the . > Furthermore when I do a certutil -V on my RapidSSL certificate, it responds > saying that the certificate is valid. Here are the results of my certutil -L > -d... Right, the problem isn't with the certificate validity. When the server starts and OCSP is enabled then NSS is going to use OCSP to valid it. The OCSP response is signed by an untrusted entity so NSS is marking the certificate as unverified so the server refuses to start. > > Server-Cert u,u,u > Equifax-CA CT,C,C > alpha u,pu,u > RapidSSL-CA CT,C,C > RapidSSL u,u,u > cacert CTu,Cu,Cu > ocsp-responder CT,C,C > > certutil -V -n RapidSSL -u V comes up with this: > > certutil -V -n RapidSSL -u V -d /etc/httpd/alias/ > certutil: certificate is valid You might want to try /usr/lib/nss/unsupported-tools/ocspclnt as well. You might be more details on the OCSP response. >> You need to trust the certificate that is signing the OCSP response. I >> didn't see that after a quick look on the RapidSSL site, maybe their >> support can point you to it. > > I do trust the certificate, It's the certificate with the nickname > ocsp-responder. It's issued by the DoD. Ok, there is a bit of a difference in your configuration vs your database. You set NSSOCSPDefaultName to ocsp-disa-mil-responder but the cert nickname is ocsp-responder. Can you try changing the configuration to match the nickname? rob > > I appreciate any help you can give me on this. Thanks. > > -Ernie > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3245 bytes Desc: S/MIME Cryptographic Signature URL: From ekim at mitre.org Thu Aug 20 14:07:16 2009 From: ekim at mitre.org (Kim, Ernest) Date: Thu, 20 Aug 2009 10:07:16 -0400 Subject: [Mod_nss-list] OCSP errors In-Reply-To: <4A8C6AE6.5090807@redhat.com> References: <8DA11B342D7A5643A515ACBF8B72D9876671FC20@IMCMBX3.MITRE.ORG> <4A8C6AE6.5090807@redhat.com> Message-ID: <8DA11B342D7A5643A515ACBF8B72D9876671FD3B@IMCMBX3.MITRE.ORG> >-----Original Message----- >From: Rob Crittenden [mailto:rcritten at redhat.com] >Sent: Wednesday, August 19, 2009 5:13 PM >To: Kim, Ernest >Cc: mod_nss-list at redhat.com >Subject: Re: [Mod_nss-list] OCSP errors > >Kim, Ernest wrote: >> Hi all. I was wondering if someone could help me out. I'm trying to >use >> mod_nss with OCSP enabled. I get the following error messages when I >do: >> >> >> >> [Wed Aug 19 15:09:40 2009] [error] Certificate not verified: >'RapidSSL' >> >> [Wed Aug 19 15:09:40 2009] [error] SSL Library Error: -8068 The OCSP >> server has refused this request as unauthorized >> >> [Wed Aug 19 15:09:40 2009] [error] Unable to verify certificate >> 'RapidSSL'. Add "NSSEnforceValidCerts off" to nss.conf so the server >can >> start until the problem can be resolved. >> >> >> >> I have a SSL certificate for the server issued from RapidSSL. When I >do >> a certutil -V on the certificate, it says the certificate is valid. >From >> the looks of the error message, the RapidSSL certificate is being sent >> to the OCSP server. Is this what is happening? If so, is there a way I >> can have this not happen? Thanks. Here is a copy of my nss.conf file: > Hi Rob, thanks for your reply. >The server is validating its own server certificate at startup and that >request is failing so the server is refusing to start. I don't understand why this is. With OCSP turned off, I can start my server using the same RapidSSL certificate for https without having to use the . Furthermore when I do a certutil -V on my RapidSSL certificate, it responds saying that the certificate is valid. Here are the results of my certutil -L -d... Server-Cert u,u,u Equifax-CA CT,C,C alpha u,pu,u RapidSSL-CA CT,C,C RapidSSL u,u,u cacert CTu,Cu,Cu ocsp-responder CT,C,C certutil -V -n RapidSSL -u V comes up with this: certutil -V -n RapidSSL -u V -d /etc/httpd/alias/ certutil: certificate is valid >You need to trust the certificate that is signing the OCSP response. I >didn't see that after a quick look on the RapidSSL site, maybe their >support can point you to it. I do trust the certificate, It's the certificate with the nickname ocsp-responder. It's issued by the DoD. I appreciate any help you can give me on this. Thanks. -Ernie -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3497 bytes Desc: not available URL: From ekim at mitre.org Thu Aug 20 14:46:04 2009 From: ekim at mitre.org (Kim, Ernest) Date: Thu, 20 Aug 2009 10:46:04 -0400 Subject: [Mod_nss-list] OCSP errors In-Reply-To: <4A8D5D18.2050509@redhat.com> References: <8DA11B342D7A5643A515ACBF8B72D9876671FC20@IMCMBX3.MITRE.ORG> <4A8C6AE6.5090807@redhat.com> <8DA11B342D7A5643A515ACBF8B72D9876671FD3B@IMCMBX3.MITRE.ORG> <4A8D5D18.2050509@redhat.com> Message-ID: <8DA11B342D7A5643A515ACBF8B72D9876671FD66@IMCMBX3.MITRE.ORG> >-----Original Message----- >From: Rob Crittenden [mailto:rcritten at redhat.com] >Sent: Thursday, August 20, 2009 10:27 AM >To: Kim, Ernest >Cc: mod_nss-list at redhat.com >Subject: Re: [Mod_nss-list] OCSP errors > [TRIMMED] >> >> Hi Rob, thanks for your reply. >> >>> The server is validating its own server certificate at startup and >that >>> request is failing so the server is refusing to start. >> >> I don't understand why this is. With OCSP turned off, I can start my >server >> using the same RapidSSL certificate for https without having to use >the . >> Furthermore when I do a certutil -V on my RapidSSL certificate, it >responds >> saying that the certificate is valid. Here are the results of my >certutil -L >> -d... > >Right, the problem isn't with the certificate validity. When the server >starts and OCSP is enabled then NSS is going to use OCSP to valid it. >The OCSP response is signed by an untrusted entity so NSS is marking the >certificate as unverified so the server refuses to start. Ohhh... I just had a light bulb moment. So correct me if I'm wrong here, because we have the default OCSP responder turned on, the RapidSSL certificate is being sent to our default OCSP responder for validity. But our SSL certificate wasn't issued by our default OSCP responder. It was issued by RapidSSL which is a child of Equifax. Our default OCSP responder is the DoD's OCSP responder for CACs. And as a result, when the DoD responder gets the RapidSSL it's sending back an invalid cert message. And this is the reason why NSS is giving the error messages it is. If I remove the default responder settings, I should be okay right? The OCSP responder in the RapidSSL certificate (if there is one) will say that the certificate is valid (hopefully), right? > >> >> Server-Cert u,u,u >> Equifax-CA CT,C,C >> alpha u,pu,u >> RapidSSL-CA CT,C,C >> RapidSSL u,u,u >> cacert CTu,Cu,Cu >> ocsp-responder CT,C,C >> >> certutil -V -n RapidSSL -u V comes up with this: >> >> certutil -V -n RapidSSL -u V -d /etc/httpd/alias/ >> certutil: certificate is valid > >You might want to try /usr/lib/nss/unsupported-tools/ocspclnt as well. >You might be more details on the OCSP response. > >>> You need to trust the certificate that is signing the OCSP response. >I >>> didn't see that after a quick look on the RapidSSL site, maybe their >>> support can point you to it. >> >> I do trust the certificate, It's the certificate with the nickname >> ocsp-responder. It's issued by the DoD. > >Ok, there is a bit of a difference in your configuration vs your >database. You set NSSOCSPDefaultName to ocsp-disa-mil-responder but the >cert nickname is ocsp-responder. Can you try changing the configuration >to match the nickname? Yup they do. It was a typo on my part when writing up the email message. -Ernie -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3497 bytes Desc: not available URL: