Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport: fix the preferred KEX algorithms for gssapi-keyex (2.0) #1060

Merged
merged 1 commit into from Sep 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions paramiko/transport.py
Expand Up @@ -132,6 +132,11 @@ class Transport(threading.Thread, ClosingContextManager):
'diffie-hellman-group-exchange-sha1',
'diffie-hellman-group-exchange-sha256',
)
_preferred_gsskex = (
'gss-gex-sha1-toWM5Slw5Ew8Mqkay+al2g==',
'gss-group14-sha1-toWM5Slw5Ew8Mqkay+al2g==',
'gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g==',
)
_preferred_compression = ('none',)

_cipher_info = {
Expand Down Expand Up @@ -333,12 +338,7 @@ def __init__(self,
self.gss_host = None
if self.use_gss_kex:
self.kexgss_ctxt = GSSAuth("gssapi-keyex", gss_deleg_creds)
self._preferred_kex = ('gss-gex-sha1-toWM5Slw5Ew8Mqkay+al2g==',
'gss-group14-sha1-toWM5Slw5Ew8Mqkay+al2g==',
'gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g==',
'diffie-hellman-group-exchange-sha1',
'diffie-hellman-group14-sha1',
'diffie-hellman-group1-sha1')
self._preferred_kex = self._preferred_gsskex + self._preferred_kex

# state used during negotiation
self.kex_engine = None
Expand Down