From 58a575cbe3ae3c4f7f336e73a5654fde359c391d Mon Sep 17 00:00:00 2001 From: Courtney Cotton Date: Sun, 15 Feb 2015 12:21:14 -0800 Subject: [PATCH] Added user input prompt for CSR Values --- csrgen.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/csrgen.py b/csrgen.py index b588d30..7afa723 100644 --- a/csrgen.py +++ b/csrgen.py @@ -17,11 +17,19 @@ import argparse # Generate Certificate Signing Request (CSR) def generateCSR(nodename, sans = []): - C = 'US' - ST = 'New York' - L = 'Location' - O = 'Organization' - OU = 'Organizational Unit' + C = raw_input('Enter your country: ') + ST = raw_input("Enter your state: ") + L = raw_input("Enter your location: ") + O = raw_input("Enter your organization: ") + OU = raw_input("Enter your organizational unit: ") + + # Allows you to permanently set values required for CSR + # To use, comment raw_input and uncomment this section. + # C = 'US' + # ST = 'New York' + # L = 'Location' + # O = 'Organization' + # OU = 'Organizational Unit' csrfile = 'host.csr' keyfile = 'host.key'