Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ec0a55

Browse files
committed
Make git_cred_ssh_custom_new() naming more consistent
1 parent 478408c commit 8ec0a55

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

include/git2/transport.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ typedef struct git_cred_ssh_custom {
9999
char *publickey;
100100
size_t publickey_len;
101101
void *sign_callback;
102-
void *sign_data;
102+
void *payload;
103103
} git_cred_ssh_custom;
104104

105105
/** A key for NTLM/Kerberos "default" credentials */
@@ -186,17 +186,17 @@ GIT_EXTERN(int) git_cred_ssh_key_from_agent(
186186
* @param username username to use to authenticate
187187
* @param publickey The bytes of the public key.
188188
* @param publickey_len The length of the public key in bytes.
189-
* @param sign_fn The callback method to sign the data during the challenge.
190-
* @param sign_data The data to pass to the sign function.
189+
* @param sign_callback The callback method to sign the data during the challenge.
190+
* @param payload Additional data to pass to the callback.
191191
* @return 0 for success or an error code for failure
192192
*/
193193
GIT_EXTERN(int) git_cred_ssh_custom_new(
194194
git_cred **out,
195195
const char *username,
196196
const char *publickey,
197197
size_t publickey_len,
198-
git_cred_sign_callback sign_fn,
199-
void *sign_data);
198+
git_cred_sign_callback sign_callback,
199+
void *payload);
200200

201201
/**
202202
* Create a "default" credential usable for Negotiate mechanisms like NTLM

src/transports/cred.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ int git_cred_ssh_custom_new(
204204
const char *publickey,
205205
size_t publickey_len,
206206
git_cred_sign_callback sign_callback,
207-
void *sign_data)
207+
void *payload)
208208
{
209209
git_cred_ssh_custom *c;
210210

@@ -228,7 +228,7 @@ int git_cred_ssh_custom_new(
228228

229229
c->publickey_len = publickey_len;
230230
c->sign_callback = sign_callback;
231-
c->sign_data = sign_data;
231+
c->payload = payload;
232232

233233
*cred = &c->parent;
234234
return 0;

src/transports/ssh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static int _git_ssh_authenticate_session(
310310

311311
rc = libssh2_userauth_publickey(
312312
session, c->username, (const unsigned char *)c->publickey,
313-
c->publickey_len, c->sign_callback, &c->sign_data);
313+
c->publickey_len, c->sign_callback, &c->payload);
314314
break;
315315
}
316316
case GIT_CREDTYPE_SSH_INTERACTIVE: {

0 commit comments

Comments
 (0)