From 13622f056480880baaaf3bb9fdef783812728746 Mon Sep 17 00:00:00 2001 From: Joni Hahkala Date: Fri, 10 Feb 2012 13:42:31 +0000 Subject: [PATCH] fixes from frantisek to make the hostname and ca name hashing work also on sl5 and 6 --- bin/generate-test-certificates.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/generate-test-certificates.sh b/bin/generate-test-certificates.sh index 9f723cb..20a18f4 100755 --- a/bin/generate-test-certificates.sh +++ b/bin/generate-test-certificates.sh @@ -514,7 +514,11 @@ function add_ca_grid_sec { if [ ! -d 'grid-security/certificates-slashwithoutnamespaces' ]; then mkdir -p 'grid-security/certificates-slashwithoutnamespaces' fi - hash=$(openssl x509 -subject_hash_old -noout -in $1-ca/$1.cert) + if [ x"`openssl version`" \< x"OpenSSL 1.0.0" ]; then + hash=$(openssl x509 -hash -noout -in $1-ca/$1.cert) + else + hash=$(openssl x509 -subject_hash_old -noout -in $1-ca/$1.cert) + fi cp $1-ca/$1.cert grid-security/certificates/${hash}.0 cp $1-ca/$1.crl grid-security/certificates/${hash}.r0 # generating a signing_policy file @@ -1219,7 +1223,7 @@ which openssl openssl version #get full hostname -hostname_space=`hostname -A` +hostname_space=`hostname -A 2>/dev/null || hostname -f` #remove trailing space hostname_full=`echo $hostname_space` echo host name is [$hostname_full] -- 1.8.2.3