Commit 07555096 authored by Alain Takoudjou's avatar Alain Takoudjou

ca: fix empty parameter on request certificate command

parent 0eff0c1f
......@@ -51,12 +51,20 @@ def parseArguments():
default='Company Unit',
help='The Organisation Unit Name')
return parser.parse_args()
return parser
def requestCertificateWeb():
config = parseArguments()
parser = parseArguments()
config = parser.parse_args()
if not config.cn or not config.ca_url:
parser.print_help()
exit(1)
base_dir = os.path.dirname(config.cert_file)
os.chdir(os.path.abspath(base_dir))
ca = CertificateAuthorityRequest(config.key_file, config.cert_file,
config.ca_cert_file, config.ca_url)
......
......@@ -38,7 +38,7 @@ def parseArguments():
parser.add_argument('--crl_file',
help='Path of Certificate Revocation List file. Default: $crl_dir/cacrl.pem')
parser.add_argument('--host',
default=[],
default='127.0.0.1',
help='Host or IP of ca server.')
parser.add_argument('--port',
default='9086',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment