summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnders Borum <anders@algoritmer.dk>2019-11-20 11:21:14 +0100
committerAnders Borum <anders@algoritmer.dk>2019-11-20 11:24:14 +0100
commit48c3f7e1f12bda5f801413bbf6604048e281ec14 (patch)
tree77d0817309ee2af0e0e7c4eb5bdcb4ee0b132fb4 /include
parent47dd665a62c3ac826277e6eda1287cf9291e8620 (diff)
downloadlibgit2-48c3f7e1f12bda5f801413bbf6604048e281ec14.tar.gz
ssh: include sha256 host key hash when supported
Diffstat (limited to 'include')
-rw-r--r--include/git2/cert.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/cert.h b/include/git2/cert.h
index 61a92d4d6..e8cd2d180 100644
--- a/include/git2/cert.h
+++ b/include/git2/cert.h
@@ -78,6 +78,8 @@ typedef enum {
GIT_CERT_SSH_MD5 = (1 << 0),
/** SHA-1 is available */
GIT_CERT_SSH_SHA1 = (1 << 1),
+ /** SHA-256 is available */
+ GIT_CERT_SSH_SHA256 = (1 << 2),
} git_cert_ssh_t;
/**
@@ -103,6 +105,12 @@ typedef struct {
* have the SHA-1 hash of the hostkey.
*/
unsigned char hash_sha1[20];
+
+ /**
+ * Hostkey hash. If type has `GIT_CERT_SSH_SHA256` set, this will
+ * have the SHA-256 hash of the hostkey.
+ */
+ unsigned char hash_sha256[32];
} git_cert_hostkey;
/**