|
|
|
@ -50,7 +50,7 @@ def client_post_cert (client, clVars, show_info = False):
|
|
|
|
|
print _("Certificate not send!")
|
|
|
|
|
else:
|
|
|
|
|
if show_info:
|
|
|
|
|
print _(" Your certifitate id = %d") %(result_post_cert[0])
|
|
|
|
|
print _(" Your certifitate id - %d") %(result_post_cert[0])
|
|
|
|
|
try:
|
|
|
|
|
if result_post_cert[1] == -2:
|
|
|
|
|
print _("expiry date certificate has passed")
|
|
|
|
@ -135,7 +135,7 @@ def get_password(text1 = None, text2 = None):
|
|
|
|
|
def client_post_request (cert_path, args):
|
|
|
|
|
if os.path.exists(cert_path + 'req_id'):
|
|
|
|
|
print _("You have sent a request to sign the certificate.")
|
|
|
|
|
_print (_("request id = %s") %open(cert_path + 'req_id', 'r').read())
|
|
|
|
|
_print (_("request id - %s") %open(cert_path + 'req_id', 'r').read())
|
|
|
|
|
ans = raw_input (_("Send new request? y/[n]: "))
|
|
|
|
|
if not ans.lower() in ['y','yes']:
|
|
|
|
|
return 0
|
|
|
|
@ -178,7 +178,7 @@ def client_post_request (cert_path, args):
|
|
|
|
|
fc = open(os.path.join(cert_path, 'req_id'), 'w')
|
|
|
|
|
fc.write(res)
|
|
|
|
|
fc.close()
|
|
|
|
|
_print (_("Your request id = %s") %res)
|
|
|
|
|
_print (_("Your request id - %s") %res)
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
def client_get_cert(cert_path, args):
|
|
|
|
@ -220,7 +220,7 @@ def client_get_cert(cert_path, args):
|
|
|
|
|
return 1
|
|
|
|
|
elif cert == '2':
|
|
|
|
|
print _("Request for the signing has not yet reviewed.")
|
|
|
|
|
print _("Your request id = %s") %req_id
|
|
|
|
|
print _("Your request id - %s") %req_id
|
|
|
|
|
return 1
|
|
|
|
|
elif cert == '3':
|
|
|
|
|
print _("Request on signature does not match sent earlier.")
|
|
|
|
@ -236,7 +236,7 @@ def client_get_cert(cert_path, args):
|
|
|
|
|
os.unlink(cert_path + 'req_id')
|
|
|
|
|
except OSError, e:
|
|
|
|
|
_print (e.message)
|
|
|
|
|
print 'OK. Certificate save. Your certificate id = %s' %req_id
|
|
|
|
|
print 'OK. Certificate save. Your certificate id - %s' %req_id
|
|
|
|
|
user_name = pwd.getpwuid(os.getuid()).pw_name
|
|
|
|
|
try:
|
|
|
|
|
pwdObj = pwd.getpwnam(user_name)
|
|
|
|
|