I'm currently wrapping the git_cred
API in Objective-Git, and I don't understand some of the expected arguments. For reference, here are the "offending" prototypes :
int git_cred_ssh_publickey_new(
git_cred **out,
const char *username,
const char *publickey, size_t publickey_len,
git_cred_sign_callback sign_fn, void *sign_data);
int git_cred_sign_callback(
LIBSSH2_SESSION *session,
unsigned char **sig, size_t *sig_len,
const unsigned char *data, size_t data_len,
void **abstract);
(I extracted the last one from the #define LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC
).
What is git_cred_sign_callback
used for ? It takes a LIBSSH2_SESSION
which is pretty low-level, even from the POV of libgit2
, and I'm not sure what I'm expected to do in that callback...