diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-16 01:47:30 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-16 17:02:32 +0200 |
commit | 0782fc43f809b1c2a5001453ccb064a4afcfc2b9 (patch) | |
tree | 8eb9d299dbafc3e44f5e2251cc464b622319cbba /include/git2/transport.h | |
parent | 0fef38999abc74b8237971f96295f461631d9d1d (diff) | |
download | libgit2-0782fc43f809b1c2a5001453ccb064a4afcfc2b9.tar.gz |
net: use only structs to pass information about cert
Instead of spreading the data in function arguments, some of which
aren't used for ssh and having a struct only for ssh, use a struct for
both, using a common parent to pass to the callback.
Diffstat (limited to 'include/git2/transport.h')
-rw-r--r-- | include/git2/transport.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h index 06d090f4a..4fa637292 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -24,6 +24,11 @@ GIT_BEGIN_DECL * Hostkey information taken from libssh2 */ typedef struct { + /** + * Type of certificate. Here to share the header with + * `git_cert`. + */ + git_cert_t cert_type; /** * A hostkey type from libssh2, either * `LIBSSH2_HOSTKEY_HASH_MD5` or `LIBSSH2_HOSTKEY_HASH_SHA1` @@ -36,6 +41,25 @@ typedef struct { unsigned char hash[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; + /** + * Pointer to the X.509 certificate data + */ + void *data; + /** + * Length of the memory block pointed to by `data`. + */ + size_t len; +} git_cert_x509; + /* *** Begin interface for credentials acquisition *** */ |