summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-06-29 22:51:18 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2015-07-10 09:28:33 -0500
commit79698030b090b017aea6d33fb3f02d3fcb046738 (patch)
treeaa4c8bc19a32ca7ef95f6ba6ada90bf9e33e1791 /include/git2
parent9847d80ddc97b85ca38e158dc4781f0a3c6081ca (diff)
downloadlibgit2-79698030b090b017aea6d33fb3f02d3fcb046738.tar.gz
git_cert: child types use proper base type
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/transport.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h
index 2eeebd565..fd55eac0a 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -37,39 +37,32 @@ typedef enum {
* Hostkey information taken from libssh2
*/
typedef struct {
+ git_cert parent;
+
/**
- * Type of certificate. Here to share the header with
- * `git_cert`.
+ * A hostkey type from libssh2, either
+ * `GIT_CERT_SSH_MD5` or `GIT_CERT_SSH_SHA1`
*/
- git_cert_t cert_type;
- /**
- * A hostkey type from libssh2, either
- * `GIT_CERT_SSH_MD5` or `GIT_CERT_SSH_SHA1`
- */
git_cert_ssh_t type;
- /**
- * Hostkey hash. If type has `GIT_CERT_SSH_MD5` set, this will
- * have the MD5 hash of the hostkey.
- */
+ /**
+ * Hostkey hash. If type has `GIT_CERT_SSH_MD5` set, this will
+ * have the MD5 hash of the hostkey.
+ */
unsigned char hash_md5[16];
- /**
- * Hostkey hash. If type has `GIT_CERT_SSH_SHA1` set, this will
- * have the SHA-1 hash of the hostkey.
- */
- unsigned char hash_sha1[20];
+ /**
+ * Hostkey hash. If type has `GIT_CERT_SSH_SHA1` set, this will
+ * have the SHA-1 hash of the hostkey.
+ */
+ unsigned char hash_sha1[20];
} git_cert_hostkey;
/**
* X.509 certificate information
*/
typedef struct {
- /**
- * Type of certificate. Here to share the header with
- * `git_cert`.
- */
- git_cert_t cert_type;
+ git_cert parent;
/**
* Pointer to the X.509 certificate data
*/