<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
First of all, thank you very much to both of you for your help.
Yesterday I had a meeting the whole day, that's why I couldn't answer
the emails...<br>
<br>
Currently, I'm doind all my tests with a Ubuntu Linux 10.04, using
Apache 2.2.14 with mod_nss 1.0.8. I downloaded the source from <b><a class="moz-txt-link-freetext" href="http://directory.fedoraproject.org/wiki/Mod_nss">http://directory.fedoraproject.org/wiki/Mod_nss</a></b>
and compiled it. The SSL connection is working... but I have the
problem I told you with SSL client.<br>
<br>
After all the emails, I'm trying the last solution, the one whi Luis
told me. I tried to use the directive<br>
<br>
NSSRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \<br>
    and %{SSL_CLIENT_VERIFY} eq "SUCCESS"   )<br>
<br>
and it works... but it also asks for the certificate the first time you
connect... I would like it to ask for the certificate just when the
user clicks some link (I got it working with mod_ssl). Do you know any
solution for this?<br>
<br>
By the way.. wich language is the one _NSSRequire is using for the
conditions?<br>
<br>
Thank you very much. I'll continue with the research<br>
<br>
<br>
On 02/09/10 12:07, Luis Neves wrote:
<blockquote cite="mid:COL110-W54B56E3787CCEA97F6E89EA78C0@phx.gbl"
 type="cite">
  <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>Hi
again! Sorry everybody for so much posts<br>
  <br>
Hola Tomas,<br>
What seems the best practices on this case is<br>
  <br>
Putting the NSSverifyclient optional outside location and then playing
with the SSLRequire (or NSSRequire in mod_nss case)<br>
like for ex:<br>
  <br>
<<span class="searchTerm">Location</span> /><br>
NSSRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \<br>
            and %{SSL_CLIENT_S_DN_O} eq "mycompany"  \                
                                                 <br>
            and %{SSL_CLIENT_S_DN_OU} in {"myrole"})                  
                                         <br>
</Location> <br>
  <br>
or:<br>
  <br>
NSSRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \<br>
    and %{SSL_CLIENT_VERIFY} eq "SUCCESS"   )<br>
  <br>
  <br>
or using a virtualhost just for the authenticated part of the site<br>
  <br>
Um abraço<br>
Luis<br>
  <br>
  <br>
  <br>
  <br>
 <br>
  <br>
  <hr id="stopSpelling">From: <a class="moz-txt-link-abbreviated" href="mailto:luisneves@hotmail.com">luisneves@hotmail.com</a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:rcritten@redhat.com">rcritten@redhat.com</a>; <a class="moz-txt-link-abbreviated" href="mailto:ttormo@indenova.com">ttormo@indenova.com</a><br>
Date: Thu, 2 Sep 2010 08:36:20 +0000<br>
CC: <a class="moz-txt-link-abbreviated" href="mailto:mod_nss-list@redhat.com">mod_nss-list@redhat.com</a><br>
Subject: Re: [Mod_nss-list] Problem configuring Client certificate
Authentication<br>
  <br>
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="Generator" content="Microsoft SafeHTML">
  <style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

  </style>
Hi Robe, indeed Ive tested by myself and have the same renegotiation
error as well<br>
  <br>
Played with the settings Ive told to Tomas but still got the problem<br>
Played with the Apache env variables you mentioned but to no avail,
same problem.<br>
  <br>
Will read carefully your link but it looks the only solution is
avoiding at all costs using verifyclient inside location tags... :(<br>
  <br>
Luis<br>
  <br>
  <br>
> Date: Wed, 1 Sep 2010 08:59:01 -0400<br>
> From: <a class="moz-txt-link-abbreviated" href="mailto:rcritten@redhat.com">rcritten@redhat.com</a><br>
> To: <a class="moz-txt-link-abbreviated" href="mailto:ttormo@indenova.com">ttormo@indenova.com</a><br>
> CC: <a class="moz-txt-link-abbreviated" href="mailto:mod_nss-list@redhat.com">mod_nss-list@redhat.com</a><br>
> Subject: Re: [Mod_nss-list] Problem configuring Client certificate
Authentication<br>
> <br>
> Tomás Tormo wrote:<br>
> > Greetings<br>
> ><br>
> > I'm trying to configure mod_nss in Apache in order to use it
as my<br>
> > client certificate authentication mechanism, but I'm having
problems<br>
> > with it..<br>
> ><br>
> > I'd like to use client authentication in some parts of a
website... so I<br>
> > tried to do it as with mod_ssl, using the Location directive
with the<br>
> > NSSVerifyClient require directive inside, but I never
works... I always<br>
> > get this error...<br>
> ><br>
> > Mon Aug 30 14:17:34 2010] [info] Requesting connection
re-negotiation<br>
> > [Mon Aug 30 14:17:34 2010] [debug] nss_engine_kernel.c(404):
Performing<br>
> > full renegotiation: complete handshake protocol<br>
> > [Mon Aug 30 14:17:34 2010] [debug] nss_engine_kernel.c(426):
Awaiting<br>
> > re-negotiation handshake<br>
> > *[Mon Aug 30 14:17:34 2010] [info] Read error -12176<br>
> > [Mon Aug 30 14:17:34 2010] [error] Re-negotiation handshake
failed: Not<br>
> > accepted by client!?*<br>
> > [Mon Aug 30 14:17:34 2010] [debug] mod_deflate.c(615): [client<br>
> > 192.168.125.53] Zlib: Compressed 283 to 216 : URL /files,
referer:<br>
> > <a class="moz-txt-link-freetext" href="https://amsterdam/">https://amsterdam/</a><br>
> > [Mon Aug 30 14:17:34 2010] [info] (70014)End of file found:
SSL input<br>
> > filter read failed.<br>
> > [Mon Aug 30 14:17:34 2010] [info] Connection to child 69
closed (server<br>
> > amsterdam:443, client 192.168.125.53)<br>
> ><br>
> > After this, I checked the documentation and it says I can work<br>
> > per-server or per-directory context... So I tried to do it
per-server<br>
> > and It works perfectly.. but, as I told you, this is not the
solution<br>
> > I'm looking for.. so I tried to configure it per-directory...
but it<br>
> > doesn't work neither...<br>
> ><br>
> > Here I attach my per-directory configuration... Is just a
test but this<br>
> > is more or less how it should look at the end:<br>
> ><br>
> ><br>
> ><br>
> > /<VirtualHost *:443><br>
> ><br>
> > ServerName amsterdam<br>
> ><br>
> > LogLevel debug<br>
> > ErrorLog /var/log/apache2/testmodnss/error.log<br>
> > CustomLog /var/log/apache2/testmodnss/access.log combined<br>
> > DocumentRoot /var/www/testmodnss<br>
> ><br>
> > # ssl<br>
> > NSSEngine on<br>
> > RewriteEngine on<br>
> > NSSCipherSuite<br>
> >
-des,-desede3,-rc2,-rc2export,-rc4,-rc4export,+rsa_3des_sha,+rsa_des_56_sha,+rsa_des_sha,+rsa_null_md5,+rsa_null_sha,+rsa_rc2_40_md5,+rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_rc4_40_md5,+rsa_rc4_56_sha,+fortezza,+fortezza_rc4_128_sha,+fortezza_null,+fips_des_sha,+fips_3des_sha,+rsa_aes_128_sha,+rsa_aes_256_sha<br>
> ><br>
> > NSSProtocol All<br>
> ><br>
> > ## Certificate database. It contains both public and private
key of the<br>
> > ssl server. It also contains the CA certificate of the
allowed client<br>
> > certificates<br>
> > NSSCertificateDatabase /etc/apache2/certs/nss/<br>
> ><br>
> > NSSNickName Server-Cert<br>
> ><br>
> ><br>
> > # ssl client<br>
> ><br>
> > <Directive "/var/www/testmodnss/files/"><br>
> ><br>
> > AllowOverride all<br>
> > NSSVerifyClient require<br>
> > NSSOptions +ExportCertData<br>
> > NSSOptions +StdEnvVars<br>
> ><br>
> > </Location><br>
> ><br>
> > </VirtualHost><br>
> ><br>
> > NSSPassPhraseHelper /usr/sbin/nss_pcache<br>
> ><br>
> > /<br>
> ><br>
> > Could you please help me?<br>
> ><br>
> > Thank you very much<br>
> <br>
> Sorry for the delayed response.<br>
> <br>
> What version of mod_nss and which browser (and version) are you
using? I <br>
> wonder if you have a newer browser and an older mod_nss and are
bumping <br>
> into the SSL renegotiation changes that went into the NSS crypto
system <br>
> to handle
<a class="moz-txt-link-freetext" href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3555">http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3555</a>. <br>
> This KB article includes some tuning information for NSS in
general: <br>
> <a class="moz-txt-link-freetext" href="https://access.redhat.com/kb/docs/DOC-20491">https://access.redhat.com/kb/docs/DOC-20491</a><br>
> <br>
> The latest mod_nss provides some tuning knobs for this as
mentioned by <br>
> Luid (NSSRenegotiation and NSSRequireSafeNegotiation) that are <br>
> equivalent to the environment variables in the KB article, just
more <br>
> convenient. mod_nss defaults to SSL_RENEGOTIATE_NEVER and setting <br>
> NSSRenegotiation is the equivalent of SSL_RENEGOTIATE_REQUIRES_XTN.<br>
> <br>
> So this is a long way of saying, try adding export <br>
> NSS_SSL_ENABLE_RENEGOTIATION=u or NSS_SSL_ENABLE_RENEGOTIATION=r
to your <br>
> Apache environment (/etc/sysconfig/httpd on Red Hat and Fedora
systems).<br>
> <br>
> I'll be away again until next week in case you have any follow-up
questions.<br>
> <br>
> rob<br>
> <br>
> _______________________________________________<br>
> Mod_nss-list mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:Mod_nss-list@redhat.com">Mod_nss-list@redhat.com</a><br>
> <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/mod_nss-list">https://www.redhat.com/mailman/listinfo/mod_nss-list</a><br>
  <br>
_______________________________________________
Mod_nss-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Mod_nss-list@redhat.com">Mod_nss-list@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/mod_nss-list">https://www.redhat.com/mailman/listinfo/mod_nss-list</a> </blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Un saludo,

Tomás Tormo Franco
Area de sistemas

INDENOVA S.L.
C/ Dels Traginers 14, 2º B
Polígono Vara de Quart
46014 Valencia
Tel. (34) 96 381 99 47
Fax. (34) 96 381 99 48

<a class="moz-txt-link-abbreviated" href="mailto:ttormo@indenova.com">ttormo@indenova.com</a>
<a class="moz-txt-link-freetext" href="http://www.indenova.com">http://www.indenova.com</a>

Descárguese gratuitamente el software eSigna Viewer para visualizar documentos firmados electrónicamente: <a class="moz-txt-link-freetext" href="http://www.indenova.com/eSignaViewer.php">http://www.indenova.com/eSignaViewer.php</a>
</pre>
</body>
</html>