Magellan Linux

Diff of /trunk/openssl/openssl-make-certs.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 998 by niro, Thu Mar 4 12:50:39 2010 UTC revision 1002 by niro, Thu Mar 4 15:49:23 2010 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # $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 $
3    
4  SSLDIR="${SSLDIR-/etc/ssl}"  SSLDIR="${SSLDIR-/etc/ssl}"
5  SSLCONFIG="${SSLCONFIG-${SSLDIR}/openssl.cnf}"  SSLCONFIG="${SSLCONFIG-${SSLDIR}/openssl.cnf}"
# Line 38  read Line 38  read
38    
39  openssl req -new -x509 -nodes -config ${SSLCONFIG} -out ${CERTFILE} -keyout ${KEYFILE} -days 365 || die "Certificate request failed!"  openssl req -new -x509 -nodes -config ${SSLCONFIG} -out ${CERTFILE} -keyout ${KEYFILE} -days 365 || die "Certificate request failed!"
40  # combine cert and keyfile to one cert  # combine cert and keyfile to one cert
41  cat ${CERTFILE} ${KEYFILE} > ${CERTFILE} || die "Combine failed!"  cat ${CERTFILE} ${KEYFILE} > ${CERTFILE}.combined || die "Combine [cat] failed!"
42    rm ${CERTFILE} || die "Combine [rm] failed!"
43    mv ${CERTFILE}{.combined,} || die "Combine [mv] failed!"
44  chown root:root ${CERTFILE} ${KEYFILE} || die "Ownership failed!"  chown root:root ${CERTFILE} ${KEYFILE} || die "Ownership failed!"
45  chmod 0400 ${CERTFILE} ${KEYFILE} || die "Permissions failed!"  chmod 0400 ${CERTFILE} ${KEYFILE} || die "Permissions failed!"
46  echo  echo

Legend:
Removed from v.998  
changed lines
  Added in v.1002