[vlc-commits] access: sftp: add ecdsa key matching for known_hosts

Francois Cartegnie git at videolan.org
Mon Jun 25 21:59:22 CEST 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun  4 17:33:32 2018 +0200| [618252caea1641e2b86315514900f143d23e090e] | committer: Jean-Baptiste Kempf

access: sftp: add ecdsa key matching for known_hosts

(cherry picked from commit afee1e72a8e08866bbe35d1a57e859cac81052b4)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=618252caea1641e2b86315514900f143d23e090e
---

 modules/access/sftp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 1219f573a1..5bc054d310 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -306,7 +306,19 @@ static int Open( vlc_object_t* p_this )
         case LIBSSH2_HOSTKEY_TYPE_DSS:
             knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_SSHDSS;
             break;
+#if LIBSSH2_VERSION_NUM >= 0x010801
+        case LIBSSH2_HOSTKEY_TYPE_ECDSA_256:
+            knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_ECDSA_256;
+            break;
+
+        case LIBSSH2_HOSTKEY_TYPE_ECDSA_384:
+            knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_ECDSA_384;
+            break;
 
+        case LIBSSH2_HOSTKEY_TYPE_ECDSA_521:
+            knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_ECDSA_521;
+            break;
+#endif
         default:
             msg_Err( p_access, "Host uses unrecognized session-key algorithm" );
             libssh2_knownhost_free( ssh_knownhosts );



More information about the vlc-commits mailing list