@@ -37,7 +37,7 @@ typedef enum {
3737 * Hostkey information taken from libssh2
3838 */
3939typedef struct {
40- git_cert parent ;
40+ git_cert parent ; /**< The parent cert */
4141
4242 /**
4343 * A hostkey type from libssh2, either
@@ -62,11 +62,13 @@ typedef struct {
6262 * X.509 certificate information
6363 */
6464typedef struct {
65- git_cert parent ;
65+ git_cert parent ; /**< The parent cert */
66+
6667 /**
6768 * Pointer to the X.509 certificate data
6869 */
6970 void * data ;
71+
7072 /**
7173 * Length of the memory block pointed to by `data`.
7274 */
@@ -144,14 +146,16 @@ typedef struct git_cred git_cred;
144146 */
145147struct git_cred {
146148 git_credtype_t credtype ; /**< A type of credential */
149+
150+ /** The deallocator for this type of credentials */
147151 void GIT_CALLBACK (free )(git_cred * cred );
148152};
149153
150154/** A plaintext username and password */
151155typedef struct {
152- git_cred parent ;
153- char * username ;
154- char * password ;
156+ git_cred parent ; /**< The parent cred */
157+ char * username ; /**< The username to authenticate as */
158+ char * password ; /**< The password to use */
155159} git_cred_userpass_plaintext ;
156160
157161
@@ -172,42 +176,52 @@ typedef void GIT_CALLBACK(git_cred_ssh_interactive_cb)(const char* name, int nam
172176 * A ssh key from disk
173177 */
174178typedef struct git_cred_ssh_key {
175- git_cred parent ;
176- char * username ;
177- char * publickey ;
178- char * privatekey ;
179- char * passphrase ;
179+ git_cred parent ; /**< The parent cred */
180+ char * username ; /**< The username to authenticate as */
181+ char * publickey ; /**< The path to a public key */
182+ char * privatekey ; /**< The path to a private key */
183+ char * passphrase ; /**< Passphrase used to decrypt the private key */
180184} git_cred_ssh_key ;
181185
182186/**
183187 * Keyboard-interactive based ssh authentication
184188 */
185189typedef struct git_cred_ssh_interactive {
186- git_cred parent ;
187- char * username ;
190+ git_cred parent ; /**< The parent cred */
191+ char * username ; /**< The username to authenticate as */
192+
193+ /**
194+ * Callback used for authentication.
195+ */
188196 git_cred_ssh_interactive_cb prompt_callback ;
189- void * payload ;
197+
198+ void * payload ; /**< Payload passed to prompt_callback */
190199} git_cred_ssh_interactive ;
191200
192201/**
193202 * A key with a custom signature function
194203 */
195204typedef struct git_cred_ssh_custom {
196- git_cred parent ;
197- char * username ;
198- char * publickey ;
199- size_t publickey_len ;
205+ git_cred parent ; /**< The parent cred */
206+ char * username ; /**< The username to authenticate as */
207+ char * publickey ; /**< The public key data */
208+ size_t publickey_len ; /**< Length of the public key */
209+
210+ /**
211+ * Callback used to sign the data.
212+ */
200213 git_cred_sign_cb sign_callback ;
201- void * payload ;
214+
215+ void * payload ; /**< Payload passed to prompt_callback */
202216} git_cred_ssh_custom ;
203217
204218/** A key for NTLM/Kerberos "default" credentials */
205219typedef struct git_cred git_cred_default ;
206220
207221/** Username-only credential information */
208222typedef struct git_cred_username {
209- git_cred parent ;
210- char username [1 ];
223+ git_cred parent ; /**< The parent cred */
224+ char username [1 ]; /**< The username to authenticate as */
211225} git_cred_username ;
212226
213227/**
0 commit comments