diff --git a/pym/console/__init__.py b/pym/console/__init__.py old mode 100755 new mode 100644 diff --git a/pym/console/application/cert_func.py b/pym/console/application/cert_func.py index 912686d..53c37fa 100644 --- a/pym/console/application/cert_func.py +++ b/pym/console/application/cert_func.py @@ -95,11 +95,11 @@ def new_key_req(key, cert_path, server_host_name, private_key_passwd=None, passphrase_callback rsa = generateRSAKey() - rsa.save_key(key + '_pub', cipher=None, callback=lambda *unused: None) + rsa.save_key(key + '_pub', cipher=None, callback=lambda *unused: "") pkey = makePKey(rsa) if not passphrase_callback(private_key_passwd): - pkey.save_key(key, cipher=None, callback=lambda *unused: None) + pkey.save_key(key, cipher=None, callback=lambda *unused: "") else: pkey.save_key(key, callback=lambda *unused: str(private_key_passwd)) diff --git a/pym/console/application/cl_client.py b/pym/console/application/cl_client.py index 476fab9..d57820e 100644 --- a/pym/console/application/cl_client.py +++ b/pym/console/application/cl_client.py @@ -128,7 +128,7 @@ def connect_with_cert(cert, path_to_cert, url, args, wait_thread, clVarsCore, client = None bio = M2Crypto.BIO.openfile(CERT_KEY) - rsa = M2Crypto.m2.rsa_read_key(bio._ptr(), lambda *unused: None) + rsa = M2Crypto.m2.rsa_read_key(bio._ptr(), lambda *unused: "") store_passwd = None if not rsa: port = args.port or clVarsCore.Get('core.cl_core_port') diff --git a/pym/console/application/client_class.py b/pym/console/application/client_class.py index b4d92e4..e4fc255 100644 --- a/pym/console/application/client_class.py +++ b/pym/console/application/client_class.py @@ -495,7 +495,7 @@ class HTTPSClientCertTransport(HttpTransport): OpenSSL.SSL.FILETYPE_PEM, file(key).read(), str(password)) else: bio = M2Crypto.BIO.openfile(key) - rsa = M2Crypto.m2.rsa_read_key(bio._ptr(), lambda *unused: None) + rsa = M2Crypto.m2.rsa_read_key(bio._ptr(), lambda *unused: "") if not rsa: raise OpenSSL.crypto.Error client_keyobj = OpenSSL.crypto.load_privatekey( diff --git a/pym/console/application/create_cert.py b/pym/console/application/create_cert.py index 56cf366..1711d26 100644 --- a/pym/console/application/create_cert.py +++ b/pym/console/application/create_cert.py @@ -26,7 +26,7 @@ setLocalTranslate('cl_console3', sys.modules[__name__]) def passphrase_callback(v): if type(v) == int or not v: - return None + return "" return str(v) @@ -92,7 +92,7 @@ def makeRequest(pubkey, pkey, serv_host, auto=False): name.C = lang # Двухсимвольный код страны (Country); req.set_subject_name(name) - ext1 = X509.new_extension('Comment', 'Auto Generated') + ext1 = X509.new_extension('nsComment', 'Auto Generated') extstack = X509.X509_Extension_Stack() extstack.push(ext1) req.add_extensions(extstack) diff --git a/pym/console/console_main.py b/pym/console/console_main.py old mode 100755 new mode 100644 diff --git a/pym/console/datavars.py b/pym/console/datavars.py old mode 100755 new mode 100644 diff --git a/pym/console/variables/console.py b/pym/console/variables/console.py old mode 100755 new mode 100644