mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 15:00:04 +00:00
cred: Declare GIT_CREDTYPE_SSH_MEMORY unconditionally
Declare GIT_CREDTYPE_SSH_MEMORY to have consistent API independently of whether libgit2 was built with or without in-memory key passing support. Or rather, to have it at all since build-time definitions are not stored in headers.
This commit is contained in:
parent
1679ec1204
commit
f7142b5e4a
@ -109,14 +109,12 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
GIT_CREDTYPE_USERNAME = (1u << 5),
|
GIT_CREDTYPE_USERNAME = (1u << 5),
|
||||||
|
|
||||||
#ifdef GIT_SSH_MEMORY_CREDENTIALS
|
|
||||||
/**
|
/**
|
||||||
* Credentials read from memory.
|
* Credentials read from memory.
|
||||||
*
|
*
|
||||||
* Only available for libssh2+OpenSSL for now.
|
* Only available for libssh2+OpenSSL for now.
|
||||||
*/
|
*/
|
||||||
GIT_CREDTYPE_SSH_MEMORY = (1u << 6),
|
GIT_CREDTYPE_SSH_MEMORY = (1u << 6),
|
||||||
#endif
|
|
||||||
} git_credtype_t;
|
} git_credtype_t;
|
||||||
|
|
||||||
/* The base structure for all credential types */
|
/* The base structure for all credential types */
|
||||||
|
@ -39,9 +39,7 @@ const char *git_cred__username(git_cred *cred)
|
|||||||
return c->username;
|
return c->username;
|
||||||
}
|
}
|
||||||
case GIT_CREDTYPE_SSH_KEY:
|
case GIT_CREDTYPE_SSH_KEY:
|
||||||
#ifdef GIT_SSH_MEMORY_CREDENTIALS
|
|
||||||
case GIT_CREDTYPE_SSH_MEMORY:
|
case GIT_CREDTYPE_SSH_MEMORY:
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
git_cred_ssh_key *c = (git_cred_ssh_key *) cred;
|
git_cred_ssh_key *c = (git_cred_ssh_key *) cred;
|
||||||
return c->username;
|
return c->username;
|
||||||
|
Loading…
Reference in New Issue
Block a user