JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for TB-SUPPORT Archives


TB-SUPPORT Archives

TB-SUPPORT Archives


TB-SUPPORT@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

TB-SUPPORT Home

TB-SUPPORT Home

TB-SUPPORT  April 2013

TB-SUPPORT April 2013

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Fwd: Re: Error while reading certificates or CRLs

From:

Stephen Jones <[log in to unmask]>

Reply-To:

Testbed Support for GridPP member institutes <[log in to unmask]>

Date:

Thu, 25 Apr 2013 15:49:19 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (163 lines)

-------- Original Message --------

Great! We got rid of the junk (look at the last two jobs in
here now, click the green squares to see stdout/err)
http://na62.gla.ac.uk/index.php?task=jobs&site=LIV&nev=300
Thanks a lot! Best regards,

Dan -- Dan PROTOPOPESCU, University of Glasgow,

-------- End of Original Message --------

Hi All,

Re: msg above.

We had a request of fix a stream of error messages that were coming
out of  the Liverpool cluster into the output of NA62 jobs.

In short, the errors occurred because some of the *.0 files in
/etc/grid-security/certificates had no related *.r0 file. There
is a long explanation of that given below. We "fixed it" here by
applying a script that is also given below. There are other
fixes (also below) which may be better (mine is hacky).

Anyway, that's all I'm saying, else I'll make a lot of work
for myself. Obviously I'll  assist anyone who wants to do
something similar. I'm not sure how to progress this, as it
is "fixed" in newer version (e.g. SL6) of the WN software, so I
am told,  so it's not worth making a big deal out of it, maybe.

As well as the script, and the explanation, I'm also attaching
another fix, given by David Groep, that uses a different
approach. I hope this helps someone.

Cheers,

Steve

--- THE HACKY SCRIPT ---

[root@imageserver trunk]# cat ./modules/lcg/files/r0fix.sh
#!/bin/bash

if [ ! -d /etc/grid-security/certificates ]; then
   echo No /etc/grid-security/certificates dir
   exit 2
fi

# Go over each real CA pem
cd /etc/grid-security/certificates
for pem in *pem; do
   IFS='
'
   # Find the two .0 links to this pem file, and get the hash stems
   count=0; for line in `ls -lrt *.0 | grep $pem`; do
     count=`expr $count + 1`
     stem=`echo $line | sed -e "s/ ->.*//" | sed -e "s/.* //" | sed -e 
"s/\.0//"`
     stem[$count]=$stem
   done

   # The logic is this: if the r0 for one stem does not exist, yet the r0
   # for the other stem does, then make a link from the missing r0 file
   # to the present one.

   if [ ! -f ${stem[1]}.r0 ]; then
     if [ -f ${stem[2]}.r0 ]; then
       ln -s ${stem[2]}.r0  ${stem[1]}.r0
     fi
   fi

   if [ ! -f ${stem[2]}.r0 ]; then
     if [ -f ${stem[1]}.r0 ]; then
       ln -s ${stem[1]}.r0  ${stem[2]}.r0
     fi
   fi
done

--- THE LONG EXPLANATION ---


The framework on a node requires each CA certificate pem
file to be  accompanied by a link, e.g 1a2bc3d4.0 The name of the
link is computed by hashing the content of the
CA certificate pem file. It is used to allow
fast lookups or something like that. Each CA package
has the hash link built in, so the link is put on
when the package is installed.

Anyway, periodically, revocation files are downloaded
for each CA. By convention they are given the same stem as
the hash link, but with the extension .r0, e.g. 1a2bc3d4.r0
They match, so it is easy to load the .0 file and apply its
revocations from the matching .r0 file. That's all fine and dandy.
BTW: That tomcat lib you mentioned _requires_ both .0 and .r0 files
or it complains.

But at some point (between 0.9 and 1.0), openssl changed the
way it computes  hashes (i.e. from MD5 to SHA1, different
hash algorithms). So any site may use a different set of
hash values to some other site, depending on the version of
openssl used locally. That situation sucked.

So the managers of the CA releases packaged BOTH links
(MD5 and SHA1) into the rpm, e.g. 1a2bc3d4.0 and (say)
d5c6b7a8.0. Now, whatever version of openssl you have, the
links needed are right there.

But here's the problem: a program called fetch-crl periodically
brings down the new revocation files. It uses the local version
of openssl to compute the name for the file, thus it
matches _one of_ the two hash links put in by the package,
e.g. either 1a2bc3d4.r0 or d5c6b7a8.r0. The other link
does not receive an associated revocation file, because openssl
does not have to logic  to compute the name.

Hence, your "trustmanager Tomcat connector" comes across
a .0 link with no associated .r0 revocation list. And it throws
an exception etc.

There are many solutions. I am told that the problem will
go when SL6 is used. I'm CC'ing David Groep; he knows
about that. Here at Liverpool, for now, I'm simply "guessing"
the name of the missing link from the evidence lying around
in the /etc/grid-security/certificates directory. Once I guess
it, I just put a link in to the good .r0 file from the missing one.
It should work. The script that does the "guessing" is below.

--- ANOTHER FIX, MAYBE BETTER? ---

 > From David Groep

Hi Stephen, Maarten,

Writing out both hashes is actually the *default behaviour* of fetch-crl3
*provided* the openssl version used by fetch-crl is 1.0.0 or above.
This is the case on RHEL6 and above, for instance.

On the command line, type:

  /usr/bin/openssl version

and if it says "1.0.x" you should have been fine. If you see 1.0.0 and
still lack dual hash, read on.

If your system default openssl is too old, install another instance
and set the openssl command used by fetch-crl to point to this new 1.0.0
binary, for example in the config file /etc/fetch-crl.conf:

   openssl=/usr/local/bin/openssl1

Also, make sure the default fetch-crl output formats have not been re-set
to something different than the default. Look out for config options 
"formats"
(when set, this should include "openssl"), and "opensslmode" (if set, it 
must
be set to "dual").

The options described above are available in all versions of fetch-crl3.

     Cheers,
     DavidG.

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager