From: Xidorn Quan Date: Mon, 27 May 2013 14:35:59 GMT Subject: [PATCH v2] credential-osxkeychain: support more protocols Message-ID: <1369665359-48242-1-git-send-email-quanxunzhen@gmail.com> In-Reply-To: <1369641431-44504-1-git-send-email-quanxunzhen@gmail.com> Add protocol ftp and smtp for credential-osxkeychain. Acked-by: John Szakmeister Signed-off-by: Xidorn Quan --- contrib/credential/osxkeychain/git-credential-osxkeychain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c index 3940202..648fadd 100644 --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c @@ -127,10 +127,14 @@ 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 /* we don't yet handle other protocols */ exit(0); } -- 1.8.3