summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-10-21 13:06:27 -0700
committerVicent Martí <vicent@github.com>2013-10-21 13:06:27 -0700
commit86774742a9bd3f3d4fc37ab35b2800abffeccfd8 (patch)
treeb023c35c23c22ad2004a58bc9b2d2f3549224176 /src
parent901c34f233cf49c75a1fa9a4a7e97cfe5b87269e (diff)
parent2648dc1a06f5431552ae272432207d456232c1e5 (diff)
downloadlibgit2-86774742a9bd3f3d4fc37ab35b2800abffeccfd8.tar.gz
Merge pull request #1903 from ethomson/ssh
Allowed credential types should be a bitfield
Diffstat (limited to 'src')
-rw-r--r--src/transports/cred.c2
-rw-r--r--src/transports/ssh.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/transports/cred.c b/src/transports/cred.c
index 35aaf4f91..79b17e88d 100644
--- a/src/transports/cred.c
+++ b/src/transports/cred.c
@@ -58,7 +58,7 @@ int git_cred_userpass_plaintext_new(
{
git_cred_userpass_plaintext *c;
- assert(cred);
+ assert(cred && username && password);
c = git__malloc(sizeof(git_cred_userpass_plaintext));
GITERR_CHECK_ALLOC(c);
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 62f3f0bbf..647211f63 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -349,7 +349,8 @@ static int _git_ssh_setup_conn(
if (t->owner->cred_acquire_cb(
&t->cred, t->owner->url, user,
GIT_CREDTYPE_USERPASS_PLAINTEXT |
- GIT_CREDTYPE_SSH_KEYFILE_PASSPHRASE,
+ GIT_CREDTYPE_SSH_KEYFILE_PASSPHRASE |
+ GIT_CREDTYPE_SSH_PUBLICKEY,
t->owner->cred_acquire_payload) < 0)
goto on_error;