vendor/libgit2/src/transports/ssh.c in rugged-0.23.3 vs vendor/libgit2/src/transports/ssh.c in rugged-0.24.0b0
- old
+ new
@@ -525,14 +525,14 @@
if ((error = _git_ssh_session_create(&session, s->io)) < 0)
goto done;
if (t->owner->certificate_check_cb != NULL) {
- git_cert_hostkey cert = { 0 }, *cert_ptr;
+ git_cert_hostkey cert = {{ 0 }}, *cert_ptr;
const char *key;
- cert.cert_type = GIT_CERT_HOSTKEY_LIBSSH2;
+ cert.parent.cert_type = GIT_CERT_HOSTKEY_LIBSSH2;
key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA1);
if (key != NULL) {
cert.type |= GIT_CERT_SSH_SHA1;
memcpy(&cert.hash_sha1, key, 20);
@@ -754,11 +754,13 @@
*out = 0;
list = libssh2_userauth_list(session, username, strlen(username));
/* either error, or the remote accepts NONE auth, which is bizarre, let's punt */
- if (list == NULL && !libssh2_userauth_authenticated(session))
+ if (list == NULL && !libssh2_userauth_authenticated(session)) {
+ ssh_error(session, "Failed to retrieve list of SSH authentication methods");
return -1;
+ }
ptr = list;
while (ptr) {
if (*ptr == ',')
ptr++;