DescriptionThis patch bundle implements the first step of a new SSL connection system on the client side. It allows the user to choose between secure and insecure connection and makes Tryton obey to this. Tryton does no longer auto-discover SSL nor does it change from a secure to an insecure connection automatically.
The fall back has been a major security issue: If the connection was started secure, but the server (or an eavesdropper) switched of SSL, the socket would silently reconnect without encryption. The user did not have any chance to avoid this. (The status bar icon is updated _after_ data has been send.)
Change Details:
* GUI: New CheckButton to allow the user selecting "Secure
Connection". (common.common.request_server())
Under the hood:
* rpc.server_version is the function which is called first when
connection to a server -- no matter wether it's a login, a create,
drop or restore dialog. THus only this function takes an argument
"secure" which may chance the secure-state of the connection. All
other functions (esp. login, db_list, db_exec) are not changing this
status.
* pysocket.py: Switched to OpenSSL, since the Python standard module
ssl is only available from Python 2.6 up. Unfortunatly OpenSSL has a
ready dull, quite low-level interface.
* pysocket.py: Do not auto-detect SSL and not *NOT* fall back to
insecure connection if server does not use SSL.
* ipv6.py: New module.
Some refactoring has been done, too:
* common/common.py: New class ConnectionDescription to remove
redundant code of build and parsing netrpc-"urls" and some other
related code.
* gui/*: Dalogs Login, Create, Drop, Restore now use this
ConnectionDescription and return hostname and port already separated
instead of a sting.
* pysocket: some code cleanup. E.g. moved the "if ssl" statement out
of the inner loops.
* rpc.py: some code cleanup. Esp. moved the redundant code for
connecting the PySocket() into a common function.
Patch Set 1 #
Total comments: 21
Patch Set 2 : Fixed some minor glitches ced found. #Patch Set 3 : moved ipv6.py into pysocket as ced suggested #
MessagesTotal messages: 8
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||