From: Xidorn Quan Date: Tue, 28 May 2013 02:36:21 +0000 (+0800) Subject: credential-osxkeychain: support more protocols X-Git-Tag: v1.8.4-rc0~188^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/de56ccf7999ca53370f44f252b780a970d639f9e?hp=--cc credential-osxkeychain: support more protocols Add protocol imap, imaps, ftp and smtp for credential-osxkeychain. Signed-off-by: Xidorn Quan Acked-by: John Szakmeister Acked-by: Jeff King Signed-off-by: Junio C Hamano --- de56ccf7999ca53370f44f252b780a970d639f9e diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c index 3940202b36..bcd3f575a3 100644 --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c @@ -127,10 +127,20 @@ static void read_credential(void) *v++ = '\0'; if (!strcmp(buf, "protocol")) { - if (!strcmp(v, "https")) + if (!strcmp(v, "imap")) + protocol = kSecProtocolTypeIMAP; + else if (!strcmp(v, "imaps")) + protocol = kSecProtocolTypeIMAPS; + else if (!strcmp(v, "ftp")) + protocol = kSecProtocolTypeFTP; + else if (!strcmp(v, "ftps")) + protocol = kSecProtocolTypeFTPS; + 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); }