Paramiko/cryptography弃用警告:CryptographyDeprecationWarning: 在EllipticCurvePublicNumbers上已弃用encode_point

10

每次进行简单的SSH连接时,我不断收到以下弃用警告:

2019-03-04 02:21:14 [transport] INFO : Connected (version 2.0, client OpenSSH_7.4)
/usr/local/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:39: 
  CryptographyDeprecationWarning: encode_point has been deprecated 
  on EllipticCurvePublicNumbers and will be removed in a future 
  version. Please use EllipticCurvePublicKey.public_bytes to obtain 
  both compressed and uncompressed point encoding.
m.add_string(self.Q_C.public_numbers().encode_point())
/usr/local/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:96: 
  CryptographyDeprecationWarning: Support for unsafe construction of 
  public numbers from encoded data will be removed in a future version. 
  Please use EllipticCurvePublicKey.from_encoded_point
  self.curve, Q_S_bytes
/usr/local/lib/python2.7/site-packages/paramiko/kex_ecdh_nist.py:111: 
CryptographyDeprecationWarning: encode_point has been deprecated on 
   EllipticCurvePublicNumbers and will be removed in a future version. 
   Please use EllipticCurvePublicKey.public_bytes to obtain both 
   compressed and uncompressed point encoding.
hm.add_string(self.Q_C.public_numbers().encode_point())
2019-03-04 02:21:14 [transport] INFO : 
   Authentication (keyboard-interactive) successful!

这更像是一个烦恼,因为程序能够成功运行,你有什么方法可以摆脱这些消息吗?

我正在使用Python 2.7.9和Paramiko 2.4.2。

1个回答

15

2
谢谢!解决了。很高兴知道Paramiko正在发布修复程序。 - mbenhalima

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接