proxy/installer/configure-proxy.sh | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
New commits:
commit 8d8508e7b1a00128c348a9161f9a234fb5b0cddd
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 29 10:22:20 2011 +0200
do not ask for SSL_CNAME if it set in answer file to empty array
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index d46fcb0..cdd0816 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -314,12 +314,15 @@ default_or_input "Country code" SSL_COUNTRY ''
default_or_input "Email" SSL_EMAIL "$TRACEBACK_EMAIL"
if [ ${#SSL_CNAME_PARSED[@]} -eq 0 ]; then
- default_or_input "Cname aliases (separated by space)" SSL_CNAME_ASK
''
- CNAME=($SSL_CNAME_ASK)
- for ALIAS in ${CNAME[@]}; do
- SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname=$ALIAS
- done
- check_ca_conf
+ VARIABLE_ISSET=$(set | grep "^SSL_CNAME=")
+ if [ -z $VARIABLE_ISSET ]; then
+ default_or_input "Cname aliases (separated by space)" SSL_CNAME_ASK
''
+ CNAME=($SSL_CNAME_ASK)
+ for ALIAS in ${CNAME[@]}; do
+ SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname=$ALIAS
+ done
+ check_ca_conf
+ fi
fi
/usr/bin/rhn-proxy-activate --server="$RHN_PARENT" \
commit 8c08d49f4ea97ae2e9eac7ca806bb8365dd75580
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 29 10:13:49 2011 +0200
local can be used only in functions
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 6134ebf..d46fcb0 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -316,7 +316,6 @@ default_or_input "Email" SSL_EMAIL
"$TRACEBACK_EMAIL"
if [ ${#SSL_CNAME_PARSED[@]} -eq 0 ]; then
default_or_input "Cname aliases (separated by space)" SSL_CNAME_ASK
''
CNAME=($SSL_CNAME_ASK)
- local ALIAS
for ALIAS in ${CNAME[@]}; do
SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname=$ALIAS
done
commit 90fe9a4a194078a1965c18689b4786da411bb117
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 29 10:13:06 2011 +0200
fail if CA configuration file do not copy extension
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 41d4f8a..6134ebf 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -187,6 +187,23 @@ is_hosted () {
return $?
}
+check_ca_conf () {
+ if ! grep '^[[:space:]]*copy_extensions[[:space:]]*=[[:space:]]*copy'
/root/ssl-build/rhn-ca-openssl.cnf >/dev/null \
+ && [ ${#SSL_CNAME_PARSED[@]} -gt 0 ]; then
+ cat <<WARNING
+It seems you tried to use the --set-cname option. On inspection we noticed that the
openssl configuration file we use is missing a critically important option. Without this
option, not only will multi host SSL certificates not work, but the planet Earth will
implode in a massive rip in the time/space continuum. To avoid this failure, we choose to
gracefully exit here and request for you to edit the openssl configuration file
+ /root/ssl-build/rhn-ca-openssl.cnf
+and add this line:
+ copy_extensions = copy
+in
+ [ ca ]
+section.
+Then re-run this script again.
+WARNING
+ exit 3
+ fi
+}
+
#do we have yum or up2date?
YUM_OR_UPDATE="up2date -i"
UPGRADE="up2date -u"
@@ -247,6 +264,8 @@ CA_KEYS
exit 1
fi
+check_ca_conf
+
if ! /sbin/runuser nobody -s /bin/sh --command="[ -r $CA_CHAIN ]" ; then
echo Error: File $CA_CHAIN is not readable by nobody user.
exit 1
@@ -301,6 +320,7 @@ if [ ${#SSL_CNAME_PARSED[@]} -eq 0 ]; then
for ALIAS in ${CNAME[@]}; do
SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname=$ALIAS
done
+ check_ca_conf
fi
/usr/bin/rhn-proxy-activate --server="$RHN_PARENT" \
Show replies by date