MCPcopy Create free account
hub / github.com/git/git / is_literal_ssh_key

Function is_literal_ssh_key

gpg-interface.c:817–826  ·  view source on GitHub ↗

* Returns 1 if `string` contains a literal ssh key, 0 otherwise * `key` will be set to the start of the actual key if a prefix is present. */

Source from the content-addressed store, hash-verified

815 * `key` will be set to the start of the actual key if a prefix is present.
816 */
817static int is_literal_ssh_key(const char *string, const char **key)
818{
819 if (skip_prefix(string, "key::", key))
820 return 1;
821 if (starts_with(string, "ssh-")) {
822 *key = string;
823 return 1;
824 }
825 return 0;
826}
827
828static char *get_ssh_key_fingerprint(const char *signing_key)
829{

Callers 3

get_ssh_key_fingerprintFunction · 0.85
sign_buffer_sshFunction · 0.85

Calls 1

starts_withFunction · 0.85

Tested by

no test coverage detected