From: Xidorn Quan Date: Mon, 27 May 2013 07:57:11 GMT Subject: [PATCH] credential-osxkeychain: support more protocols Message-ID: <1369641431-44504-1-git-send-email-quanxunzhen@gmail.com> Add protocol ftp, smtp, and ssh for credential-osxkeychain. --- contrib/credential/osxkeychain/git-credential-osxkeychain.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c index 3940202..4ddcfb3 100644 --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c @@ -127,10 +127,16 @@ static void read_credential(void) *v++ = '\0'; if (!strcmp(buf, "protocol")) { - if (!strcmp(v, "https")) + if (!strcmp(v, "ftp")) + protocol = kSecProtocolTypeFTP; + else if (!strcmp(v, "https")) protocol = kSecProtocolTypeHTTPS; else if (!strcmp(v, "http")) protocol = kSecProtocolTypeHTTP; + else if (!strcmp(v, "smtp")) + protocol = kSecProtocolTypeSMTP; + else if (!strcmp(v, "ssh")) + protocol = kSecProtocolTypeSSH; else /* we don't yet handle other protocols */ exit(0); } -- 1.8.3