本文介绍了Paramiko /加密技术弃用警告:CryptographyDeprecationWarning:EllipticCurvePublicNumbers弃用了encode_point的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I keep getting the following deprecation warnings when doing simple SSH connections:

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!

随着程序成功运行,更多的烦恼是如何摆脱这些烦恼消息?

This more of an annoyance, as the program runs successfully, any ideas on how to get rid of these messages?

我正在将Paramiko 2.4.2与Python 2.7.9一起使用

I am using Paramiko 2.4.2 with Python 2.7.9

推荐答案

此问题已在Paramiko 2.5.0中修复:





This has been fixed in Paramiko 2.5.0 already:
https://www.paramiko.org/changelog.html#2.5.0
https://github.com/paramiko/paramiko/pull/1379
https://github.com/paramiko/paramiko/issues/1369

这篇关于Paramiko /加密技术弃用警告:CryptographyDeprecationWarning:EllipticCurvePublicNumbers弃用了encode_point的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 10:27