--- trunk/openssl/openssl-make-certs.sh 2010/03/04 12:50:39 998 +++ trunk/openssl/openssl-make-certs.sh 2010/03/04 15:49:23 1002 @@ -1,5 +1,5 @@ #!/bin/sh -# $Header: /root/magellan-cvs/src/openssl/openssl-make-certs.sh,v 1.2 2010-03-04 12:50:39 niro Exp $ +# $Header: /root/magellan-cvs/src/openssl/openssl-make-certs.sh,v 1.3 2010-03-04 15:49:23 niro Exp $ SSLDIR="${SSLDIR-/etc/ssl}" SSLCONFIG="${SSLCONFIG-${SSLDIR}/openssl.cnf}" @@ -38,7 +38,9 @@ openssl req -new -x509 -nodes -config ${SSLCONFIG} -out ${CERTFILE} -keyout ${KEYFILE} -days 365 || die "Certificate request failed!" # combine cert and keyfile to one cert -cat ${CERTFILE} ${KEYFILE} > ${CERTFILE} || die "Combine failed!" +cat ${CERTFILE} ${KEYFILE} > ${CERTFILE}.combined || die "Combine [cat] failed!" +rm ${CERTFILE} || die "Combine [rm] failed!" +mv ${CERTFILE}{.combined,} || die "Combine [mv] failed!" chown root:root ${CERTFILE} ${KEYFILE} || die "Ownership failed!" chmod 0400 ${CERTFILE} ${KEYFILE} || die "Permissions failed!" echo