Skip to content

Commit

Permalink
use the password as encryption key is discouraged but not illegal
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@12453 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 21, 2016
1 parent 725e051 commit 2e2b40f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,11 +865,12 @@ def do_validate_encryption(auth, tcp_auth, encryption, tcp_encryption, password_
raise InitException("tcp-encryption %s cannot be used without a tcp authentication module or keyfile (see --tcp-encryption-keyfile option)" % tcp_encryption)
if pass_key and env_key and pass_key==env_key:
raise InitException("encryption and authentication should not use the same value")
if password_file and encryption_keyfile and password_file==encryption_keyfile:
if encryption:
raise InitException("encryption %s should not use the same file as the password authentication file" % encryption)
elif tcp_encryption:
raise InitException("tcp-encryption %s should not use the same file as the password authentication file" % tcp_encryption)
#discouraged but not illegal:
#if password_file and encryption_keyfile and password_file==encryption_keyfile:
# if encryption:
# raise InitException("encryption %s should not use the same file as the password authentication file" % encryption)
# elif tcp_encryption:
# raise InitException("tcp-encryption %s should not use the same file as the password authentication file" % tcp_encryption)

def dump_frames(*arsg):
frames = sys._current_frames()
Expand Down

0 comments on commit 2e2b40f

Please sign in to comment.