• Daiki Ueno's avatar
    ssh-agent: Make public key parsing robuster · 65e20169
    Daiki Ueno authored
    Previously, _gkd_ssh_agent_parse_public_key() accepted OpenSSH v1
    keys, because the second component of the key line looks like a valid
    base64 blob:
    
      2048 65537 2444136...
    
    This patch checks that the component is really base64 encoded, by
    checking the length is a multiple of 4.
    
    Note that this solution is not perfect, as there could be a key with a
    public exponent whose decimal length is multiple of 4.  More thorough
    approach would be to call ssh-keygen -l on each public key.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795699
    65e20169
Name
Last commit
Last update
..
control Loading commit data...
dbus Loading commit data...
login Loading commit data...
ssh-agent Loading commit data...
.gitignore Loading commit data...
Makefile.am Loading commit data...
gkd-capability.c Loading commit data...
gkd-capability.h Loading commit data...
gkd-glue.c Loading commit data...
gkd-glue.h Loading commit data...
gkd-main.c Loading commit data...
gkd-main.h Loading commit data...
gkd-pkcs11.c Loading commit data...
gkd-pkcs11.h Loading commit data...
gkd-test.c Loading commit data...
gkd-test.h Loading commit data...
gkd-util.c Loading commit data...
gkd-util.h Loading commit data...
gnome-keyring-pkcs11.desktop.in.in Loading commit data...
gnome-keyring-secrets.desktop.in.in Loading commit data...
gnome-keyring-ssh.desktop.in.in Loading commit data...
org.freedesktop.secrets.service.in Loading commit data...
org.gnome.keyring.service.in Loading commit data...
test-shutdown.c Loading commit data...
test-startup.c Loading commit data...