node_manager_fkie: added a workaround for "CTR mode needs counter parameter, not IV"
import os
import paramiko
import shlex
-import sys
import threading
import rospy
@@ -41,6 +40,16 @@ import rospy
from supervised_popen import SupervisedPopen
import node_manager_fkie as nm
+import Crypto.Cipher.AES
+orig_new = Crypto.Cipher.AES.new
+
+
+# workaround for https://github.com/paramiko/paramiko/pull/714
+def fixed_AES_new(key, mode, IV='', counter=None, segment_size=0):
+ if Crypto.Cipher.AES.MODE_CTR == mode:
+ IV = ''
+ return orig_new(key, mode, IV, counter, segment_size)
+
class AuthenticationRequest(Exception):
''' '''
@@ -63,6 +72,8 @@ class SSHhandler(object):
SSH_AUTH = {} # host : user
def __init__(self):
+ # workaround for https://github.com/paramiko/paramiko/pull/714
+ Crypto.Cipher.AES.new = fixed_AES_new
self.mutex = threading.RLock()
def remove(self, host):
