diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fcdb13 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/* +*.log diff --git a/csr.yaml b/csr-sample.yaml similarity index 60% rename from csr.yaml rename to csr-sample.yaml index d75128c..8022aca 100644 --- a/csr.yaml +++ b/csr-sample.yaml @@ -1,6 +1,6 @@ --- - C: 'FR' + C: 'Te' ST: 'PACA' L: 'Gap' O: 'ProHacktive SAS' - OU: 'prohacktive.io' \ No newline at end of file + OU: 'prohacktive.io' diff --git a/csr_tools/csrgen.py b/csr_tools/csrgen.py index 3296202..f18bf99 100755 --- a/csr_tools/csrgen.py +++ b/csr_tools/csrgen.py @@ -190,16 +190,6 @@ class Certificate: self.opts['O'] = self._ask("Enter your Organization Name (eg, company) [FTW Enterprise]: ", default='FTW Enterprise') elif field is 'OU': self.opts['OU'] = self._ask("Enter your Organizational Unit (eg, section) [IT]: ", default='IT') - elif field is 'hostname': - self.opts['hostname'] = self._ask("Enter your Common Name (eg, DNS name) [{n}]:".format(n=platform.node()), default=platform.node()) - - # 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' # Parse the contents of the YAML file and then # auto setup values. @@ -392,7 +382,7 @@ def main(argv): cert.getCSRSubjects() if args.file: - cert.generateFromFile(args.file) + cert.loadNodes(args.file) else: cert.generateCSR() except KeyboardInterrupt: