Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
paramiko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Python
Modules
paramiko
Commits
dc21498576e4
Commit
dc21498576e4
authored
11 years ago
by
Jeff Forcier
Browse files
Options
Downloads
Patches
Plain Diff
Apply slightly modified version of patch from #162
parent
eeb7f081ca01
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
paramiko/packet.py
+4
-8
4 additions, 8 deletions
paramiko/packet.py
with
4 additions
and
8 deletions
paramiko/packet.py
+
4
−
8
View file @
dc214985
...
@@ -33,5 +33,4 @@
...
@@ -33,5 +33,4 @@
from
paramiko.message
import
Message
from
paramiko.message
import
Message
got_r_hmac
=
False
try
:
try
:
...
@@ -37,4 +36,3 @@
...
@@ -37,4 +36,3 @@
try
:
try
:
import
r_hmac
from
r_hmac
import
HMAC
got_r_hmac
=
True
except
ImportError
:
except
ImportError
:
...
@@ -40,3 +38,4 @@
...
@@ -40,3 +38,4 @@
except
ImportError
:
except
ImportError
:
pass
from
Crypto.Hash.HMAC
import
HMAC
def
compute_hmac
(
key
,
message
,
digest_class
):
def
compute_hmac
(
key
,
message
,
digest_class
):
...
@@ -42,8 +41,5 @@
...
@@ -42,8 +41,5 @@
def
compute_hmac
(
key
,
message
,
digest_class
):
def
compute_hmac
(
key
,
message
,
digest_class
):
if
got_r_hmac
:
return
HMAC
(
key
,
message
,
digest_class
).
digest
()
return
r_hmac
.
HMAC
(
key
,
message
,
digest_class
).
digest
()
from
Crypto.Hash
import
HMAC
return
HMAC
.
HMAC
(
key
,
message
,
digest_class
).
digest
()
class
NeedRekeyException
(
Exception
):
class
NeedRekeyException
(
Exception
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment