diff options
author | NIIBE Yutaka <[email protected]> | 2015-09-29 06:33:59 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2015-09-29 06:33:59 +0000 |
commit | 5c067d54d349fdfb3243634789c8841515d2c28f (patch) | |
tree | 6d1707f729e8fa96eceb11f6ad138a8fc97931c1 | |
parent | agent: RSA signature verification by gpg-agent. (diff) | |
download | gnupg-5c067d54d349fdfb3243634789c8841515d2c28f.tar.gz gnupg-5c067d54d349fdfb3243634789c8841515d2c28f.zip |
ssh: Fix fingerprint computation for EdDSA key.
* common/ssh-utils.c (get_fingerprint): Handle the prefix of 0x40.
* common/t-ssh-utils.c (sample_keys): Add a new key.
--
Also adding Ed25519 test key.
-rw-r--r-- | common/ssh-utils.c | 2 | ||||
-rw-r--r-- | common/t-ssh-utils.c | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/common/ssh-utils.c b/common/ssh-utils.c index fab798dc7..58586a1aa 100644 --- a/common/ssh-utils.c +++ b/common/ssh-utils.c @@ -196,6 +196,8 @@ get_fingerprint (gcry_sexp_t key, void **r_fpr, size_t *r_len, int as_string) err = gpg_err_make (default_errsource, GPG_ERR_INV_SEXP); goto leave; } + blob++; + bloblen--; lenbuf[0] = bloblen >> 24; lenbuf[1] = bloblen >> 16; lenbuf[2] = bloblen >> 8; diff --git a/common/t-ssh-utils.c b/common/t-ssh-utils.c index 9639584d9..961f451dc 100644 --- a/common/t-ssh-utils.c +++ b/common/t-ssh-utils.c @@ -163,6 +163,25 @@ static struct { const char *key; const char *fpr; } sample_keys[] = { ")", /* Passphrase="abc" */ "1e:a6:94:ab:bd:81:73:5f:22:bc:0e:c7:89:f6:68:df" }, + { /* OpenSSH 6.7p1 generated key: */ + "(protected-private-key " + "(ecc " + "(curve Ed25519)" + "(flags eddsa)" + "(q #40A3577AA7830C50EBC15B538E9505DB2F0D2FFCD57EA477DD83dcaea530f3c277#)" + "(protected openpgp-s2k3-sha1-aes-cbc " + "(" + "(sha1 #FA8123F1A37CBC1F# \"3812352\")" + "#7671C7387E2DD931CC62C35CBBE08A28#)" + "#75e928f4698172b61dffe9ef2ada1d3473f690f3879c5386e2717e5b2fa46884" + "b189ee409827aab0ff37f62996e040b5fa7e75fc4d8152c8734e2e648dff90c9" + "e8c3e39ea7485618d05c34b1b74ff59676e9a3d932245cc101b5904777a09f86#)" + "(protected-at \"20150928T050210\")" + ")" + "(comment \"eddsa w/o comment\")" + ")", /* Passphrase="abc" */ + "f1:fa:c8:a6:40:bb:b9:a1:65:d7:62:65:ac:26:78:0e" + }, { NULL, NULL |