- simplify/correct certificate generation
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 7 Apr 2006 04:28:16 +0000 (04:28 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 7 Apr 2006 04:28:16 +0000 (04:28 +0000)
plc.d/ssl

index 6480db3..77c2445 100755 (executable)
--- a/plc.d/ssl
+++ b/plc.d/ssl
@@ -7,7 +7,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: ssl,v 1.1 2006/04/06 21:51:59 mlhuang Exp $
+# $Id: ssl,v 1.2 2006/04/07 03:36:04 mlhuang Exp $
 #
 
 # Source function library and configuration
@@ -65,16 +65,8 @@ case "$1" in
            if [ ! -f ${!ssl_crt} ] ; then
                mkdir -p $(dirname ${!ssl_crt})
                openssl req -new -x509 -days 365 -set_serial $RANDOM \
-                   -nodes -keyout ${!ssl_key} -out ${!ssl_crt} <<EOF
---
-US
-NJ
-Princeton
-PlanetLab Federation
-$PLC_NAME Central
-${!hostname}
-$PLC_MAIL_SUPPORT_ADDRESS
-EOF
+                   -batch -subj "/CN=${!hostname}" \
+                   -nodes -keyout ${!ssl_key} -out ${!ssl_crt}
                check
                chmod 644 ${!ssl_crt}
            fi