#!/bin/sh
#
-# $Id: httpscert,v 1.1.2.2 2005/12/15 21:59:57 eoberlander Exp $
# new : generate new certificate
# read: read issuer in certificate and verify if it is the same as hostname
ISSUER=`openssl x509 -in /etc/httpd/server.crt -text -noout | grep Issuer | /usr/bin/cut -f2 -d '='`
HOSTNAME=`/bin/hostname -f`
if [ "$ISSUER" != "$HOSTNAME" ]; then
- echo "Certificate issuer '$ISSUER' is not the same as the hostname'$HOSTNAME'"
+ echo "Certificate issuer '$ISSUER' is not the same as the hostname '$HOSTNAME'"
echo "Probably host or domain name has been changed in setup"
echo "You could remake server certificate with '/usr/local/bin/httpscert new'"
exit 1