|
|
|
@ -127,8 +127,13 @@ def client_post_request (cert_path, args):
|
|
|
|
|
ans = raw_input (_("Send a new request? y/[n]: "))
|
|
|
|
|
if not ans.lower() in ['y','yes']:
|
|
|
|
|
return 0
|
|
|
|
|
clVars = DataVarsCore()
|
|
|
|
|
clVars.importCore()
|
|
|
|
|
clVars.flIniFile()
|
|
|
|
|
|
|
|
|
|
url = "https://%s:%d/?wsdl" %(args.by_host, args.port)
|
|
|
|
|
port = args.port or clVars.Get('core.cl_core_port')
|
|
|
|
|
|
|
|
|
|
url = "https://%s:%d/?wsdl" %(args.by_host, port)
|
|
|
|
|
print '%s\n'% url, _("connecting...")
|
|
|
|
|
from client_class import Client_suds
|
|
|
|
|
try:
|
|
|
|
@ -172,6 +177,10 @@ def client_post_request (cert_path, args):
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
def client_get_cert(cert_path, args):
|
|
|
|
|
clVars = DataVarsCore()
|
|
|
|
|
clVars.importCore()
|
|
|
|
|
clVars.flIniFile()
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(os.path.join(cert_path, 'req_id')):
|
|
|
|
|
print _("Request not sent or file %s deleted") \
|
|
|
|
|
%(os.path.join(cert_path, 'req_id'))
|
|
|
|
@ -180,7 +189,8 @@ def client_get_cert(cert_path, args):
|
|
|
|
|
req_id = fc.read()
|
|
|
|
|
fc.close()
|
|
|
|
|
|
|
|
|
|
url = "https://%s:%d/?wsdl" %(args.from_host, args.port)
|
|
|
|
|
port = args.port or clVars.Get('core.cl_core_port')
|
|
|
|
|
url = "https://%s:%d/?wsdl" %(args.from_host, port)
|
|
|
|
|
print '%s\n' %url, _("connecting...")
|
|
|
|
|
|
|
|
|
|
from client_class import Client_suds
|
|
|
|
@ -242,9 +252,6 @@ def client_get_cert(cert_path, args):
|
|
|
|
|
os.chmod(cert_file, 0600)
|
|
|
|
|
|
|
|
|
|
if ca_root:
|
|
|
|
|
clVars = DataVarsCore()
|
|
|
|
|
clVars.importCore()
|
|
|
|
|
clVars.flIniFile()
|
|
|
|
|
system_ca_db = clVars.Get('core.cl_glob_root_cert')
|
|
|
|
|
if os.path.exists(system_ca_db):
|
|
|
|
|
if ca_root in open(system_ca_db, 'r').read():
|
|
|
|
|