Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/generate-certificate.in

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

revision 2745 by niro, Fri Jan 29 08:41:46 2016 UTC revision 2748 by niro, Fri Jan 29 12:32:15 2016 UTC
# Line 16  }" Line 16  }"
16  SSLCONFIG="${SSLCONFIG-${SSLDIR}/openssl.cnf}"  SSLCONFIG="${SSLCONFIG-${SSLDIR}/openssl.cnf}"
17  CERTDIR="${SSLDIR}/certs"  CERTDIR="${SSLDIR}/certs"
18  KEYDIR="${SSLDIR}/private"  KEYDIR="${SSLDIR}/private"
19  CERTNAME="mcore"  CERTNAME="mcored"
20  CERTFILE="${CERTDIR}/${CERTNAME}.pem"  CERTFILE="${CERTDIR}/${CERTNAME}.pem"
21  KEYFILE="${KEYDIR}/${CERTNAME}.key"  KEYFILE="${KEYDIR}/${CERTNAME}.key"
22    
# Line 27  type -P openssl > /dev/null || die "open Line 27  type -P openssl > /dev/null || die "open
27  [ -f ${CERTFILE} ] && die "${CERTFILE} already exists, won't overwrite!"  [ -f ${CERTFILE} ] && die "${CERTFILE} already exists, won't overwrite!"
28  [ -f ${KEYFILE} ] && die "${KEYFILE} already exists, won't overwrite!"  [ -f ${KEYFILE} ] && die "${KEYFILE} already exists, won't overwrite!"
29    
30  openssl req -new -x509 -nodes -config ${SSLCONFIG} -out ${CERTFILE} -keyout ${KEYFILE} -days 365 || die "Certificate request failed!"  openssl req -new -x509 -sha1 -nodes -config ${SSLCONFIG} -out ${CERTFILE} -keyout ${KEYFILE} -days 365 || die "Certificate request failed!"
31  openssl x509 -subject -fingerprint -noout -in ${CERTFILE} || die "Fingerprint failed!"  openssl x509 -sha1 -subject -fingerprint -noout -in ${CERTFILE} || die "Fingerprint failed!"

Legend:
Removed from v.2745  
changed lines
  Added in v.2748