summaryrefslogtreecommitdiff
path: root/libssh2-sys
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2019-07-28 09:15:41 -0700
committerWez Furlong <wez@wezfurlong.org>2019-07-29 08:32:36 -0700
commit31c39b05337590c3f64dac265a0e6dbba53f7e91 (patch)
tree417acec675ed21e7956cbeca4d0c269f2652aef4 /libssh2-sys
parent12ff5ea72aee8804ce41792489961523bda4cb4b (diff)
downloadssh2-rs-31c39b05337590c3f64dac265a0e6dbba53f7e91.zip
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.
Diffstat (limited to 'libssh2-sys')
-rw-r--r--libssh2-sys/lib.rs6
1 files changed, 6 insertions, 0 deletions
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;