1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

agent: Add known keys to sshcontrol.

* agent/command-ssh.c (ssh_identity_register): Add a key to sshcontrol
even if it is already in the private key store.
* tests/openpgp/ssh.scm: Test this.

GnuPG-bug-id: 2316
Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-07-19 16:48:38 +02:00
parent d7a405de83
commit 270f7f7b8b
2 changed files with 21 additions and 7 deletions

View file

@ -50,3 +50,15 @@
(unless (string-contains? (call-popen `(,SSH-ADD -l "-E" md5) "") hash)
(error "key not added"))))
car keys)
(info "Checking for issue2316...")
(unlink (string-append GNUPGHOME "/sshcontrol"))
(pipe:do
(pipe:open (path-join (in-srcdir "samplekeys")
(string-append "ssh-rsa.key"))
(logior O_RDONLY O_BINARY))
(pipe:spawn `(,SSH-ADD -)))
(unless
(string-contains? (call-popen `(,SSH-ADD -l "-E" md5) "")
"MD5:c9:85:b5:55:00:84:a9:82:5a:df:d6:62:1b:5a:28:22")
(error "known private key not (re-)added to sshcontrol"))