From 31c39b05337590c3f64dac265a0e6dbba53f7e91 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 28 Jul 2019 09:15:41 -0700 Subject: Expose more known_hosts related constants This brings us up to date with the current set of host key and known host key enum variants so that we can parse and edit current known_hosts files. This also adds a convenience `From` impl that allows converting from the host key type to a known hosts entry type. --- libssh2-sys/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libssh2-sys') diff --git a/libssh2-sys/lib.rs b/libssh2-sys/lib.rs index 5c2dea4..be9e8bf 100644 --- a/libssh2-sys/lib.rs +++ b/libssh2-sys/lib.rs @@ -33,6 +33,10 @@ pub const LIBSSH2_FLAG_COMPRESS: c_int = 2; pub const LIBSSH2_HOSTKEY_TYPE_UNKNOWN: c_int = 0; pub const LIBSSH2_HOSTKEY_TYPE_RSA: c_int = 1; pub const LIBSSH2_HOSTKEY_TYPE_DSS: c_int = 2; +pub const LIBSSH2_HOSTKEY_TYPE_ECDSA_256: c_int = 3; +pub const LIBSSH2_HOSTKEY_TYPE_ECDSA_384: c_int = 4; +pub const LIBSSH2_HOSTKEY_TYPE_ECDSA_521: c_int = 5; +pub const LIBSSH2_HOSTKEY_TYPE_ED25519: c_int = 6; pub const LIBSSH2_METHOD_KEX: c_int = 0; pub const LIBSSH2_METHOD_HOSTKEY: c_int = 1; @@ -120,6 +124,7 @@ pub const LIBSSH2_FX_LINK_LOOP: c_int = 21; pub const LIBSSH2_HOSTKEY_HASH_MD5: c_int = 1; pub const LIBSSH2_HOSTKEY_HASH_SHA1: c_int = 2; +pub const LIBSSH2_HOSTKEY_HASH_SHA256: c_int = 3; pub const LIBSSH2_KNOWNHOST_FILE_OPENSSH: c_int = 1; @@ -139,6 +144,7 @@ pub const LIBSSH2_KNOWNHOST_KEY_SSHDSS: c_int = 3 << 18; pub const LIBSSH2_KNOWNHOST_KEY_ECDSA_256: c_int = 4 << 18; pub const LIBSSH2_KNOWNHOST_KEY_ECDSA_384: c_int = 5 << 18; pub const LIBSSH2_KNOWNHOST_KEY_ECDSA_521: c_int = 6 << 18; +pub const LIBSSH2_KNOWNHOST_KEY_ED25519: c_int = 7 << 18; pub const LIBSSH2_KNOWNHOST_KEY_UNKNOWN: c_int = 15 << 18; pub const LIBSSH2_FXF_READ: c_ulong = 0x00000001; -- cgit v1.2.3