Skip to content

Commit cb4d6c2

Browse files
committed
Merge branch 'xq/credential-osxkeychain'
* xq/credential-osxkeychain: credential-osxkeychain: support more protocols
2 parents 6bf2227 + de56ccf commit cb4d6c2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

contrib/credential/osxkeychain/git-credential-osxkeychain.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,20 @@ static void read_credential(void)
127127
*v++ = '\0';
128128

129129
if (!strcmp(buf, "protocol")) {
130-
if (!strcmp(v, "https"))
130+
if (!strcmp(v, "imap"))
131+
protocol = kSecProtocolTypeIMAP;
132+
else if (!strcmp(v, "imaps"))
133+
protocol = kSecProtocolTypeIMAPS;
134+
else if (!strcmp(v, "ftp"))
135+
protocol = kSecProtocolTypeFTP;
136+
else if (!strcmp(v, "ftps"))
137+
protocol = kSecProtocolTypeFTPS;
138+
else if (!strcmp(v, "https"))
131139
protocol = kSecProtocolTypeHTTPS;
132140
else if (!strcmp(v, "http"))
133141
protocol = kSecProtocolTypeHTTP;
142+
else if (!strcmp(v, "smtp"))
143+
protocol = kSecProtocolTypeSMTP;
134144
else /* we don't yet handle other protocols */
135145
exit(0);
136146
}

0 commit comments

Comments
 (0)