cfgupgrade: Use new bootstrap function for certs and keys
authorMichael Hanselmann <hansmi@google.com>
Fri, 12 Mar 2010 10:49:16 +0000 (11:49 +0100)
committerMichael Hanselmann <hansmi@google.com>
Fri, 12 Mar 2010 15:45:00 +0000 (16:45 +0100)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

tools/cfgupgrade

index e7be591..5ecc098 100755 (executable)
@@ -174,13 +174,7 @@ def main():
                     backup=True)
 
     if not options.dry_run:
-      if not os.path.exists(options.RAPI_CERT_FILE):
-        logging.debug("Writing RAPI certificate to %s", options.RAPI_CERT_FILE)
-        bootstrap.GenerateSelfSignedSslCert(options.RAPI_CERT_FILE)
-
-      if not os.path.exists(options.HMAC_CLUSTER_KEY):
-        logging.debug("Writing HMAC key to %s", options.HMAC_CLUSTER_KEY)
-        bootstrap.GenerateHmacKey(options.HMAC_CLUSTER_KEY)
+      bootstrap.GenerateClusterCrypto(False, False, False)
 
   except:
     logging.critical("Writing configuration failed. It is probably in an"