[vlc-commits] access: sftp: add ecdsa key matching for known_hosts
Francois Cartegnie
git at videolan.org
Mon Jun 4 17:51:11 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun 4 17:33:32 2018 +0200| [afee1e72a8e08866bbe35d1a57e859cac81052b4] | committer: Francois Cartegnie
access: sftp: add ecdsa key matching for known_hosts
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=afee1e72a8e08866bbe35d1a57e859cac81052b4
---
modules/access/sftp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index e26d2419d8..9e20b8c47b 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -307,7 +307,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