diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-16 02:27:16 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-16 17:02:32 +0200 |
| commit | 286369a81fc2e1d77a7a134d5c140f023af1298b (patch) | |
| tree | 6e93287c02cc6153860ed0323da95a3b9772edd5 /include/git2 | |
| parent | ebda0970765e881feddd1879fb39ac9a3aa951a8 (diff) | |
| download | libgit2-286369a81fc2e1d77a7a134d5c140f023af1298b.tar.gz | |
ssh: provide our own types for host key lengths
Instead of using the libssh2 defines, provide our own, which eases usage
as we do not need to check whether libgit2 was built with libssh2 or not.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/transport.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h index 4fa637292..6c568be65 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -21,6 +21,16 @@ GIT_BEGIN_DECL /** + * Type of SSH host fingerprint + */ +typedef enum { + /** MD5, 16 bytes */ + GIT_CERT_SSH_MD5, + /** SHA-1, 20 bytes */ + GIT_CERT_SSH_SHA1, +} git_cert_ssh_type ; + +/** * Hostkey information taken from libssh2 */ typedef struct { @@ -31,9 +41,9 @@ typedef struct { git_cert_t cert_type; /** * A hostkey type from libssh2, either - * `LIBSSH2_HOSTKEY_HASH_MD5` or `LIBSSH2_HOSTKEY_HASH_SHA1` + * `GIT_CERT_SSH_MD5` or `GIT_CERT_SSH_SHA1` */ - int type; + git_cert_ssh_type type; /** * Hostkey hash. If the type is MD5, only the first 16 bytes * will be set. |
