|
|
|
@ -163,8 +163,10 @@ def get_certificate(cert_path, data_path, certbase, client_cert_path):
|
|
|
|
|
if ca_root in open(system_ca_db, 'r').read():
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
if not path.isdir (client_cert_path + 'ca'):
|
|
|
|
|
os.makedirs(client_cert_path + 'ca')
|
|
|
|
|
root_cert_md5 = client_cert_path + "ca/cert_list"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
md5 = hashlib.md5()
|
|
|
|
|
md5.update(ca_root)
|
|
|
|
|
md5sum = md5.hexdigest()
|
|
|
|
@ -200,13 +202,12 @@ def get_certificate(cert_path, data_path, certbase, client_cert_path):
|
|
|
|
|
print _('Not found field "CN" in certificate!')
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
fd = open(cl_client_cert_dir + '/ca/' + filename, 'w')
|
|
|
|
|
fd = open(client_cert_path + 'ca/' + filename, 'w')
|
|
|
|
|
fd.write(ca_root)
|
|
|
|
|
fd.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
user_root_cert = clVars.Get('cl_user_root_cert')
|
|
|
|
|
user_root_cert = user_root_cert.replace("~",homePath)
|
|
|
|
|
user_root_cert = client_cert_path + "ca/ca_root.crt"
|
|
|
|
|
fa = open(user_root_cert, 'a')
|
|
|
|
|
fa.write(ca_root)
|
|
|
|
|
fa.close()
|
|
|
|
|