char line[1024], *token;
while (!public && fgets(line, sizeof(line), file))
- { /* the format is: ssh-[rsa|ecdsa-...] <key(base64)> <identifier> */
- if (!strpfx(line, "ssh-"))
+ { /* the format is: ssh-rsa|ecdsa-... <key(base64)> <identifier> */
+ if (!strpfx(line, "ssh-rsa") && !strpfx(line, ECDSA_PREFIX))
{
continue;
}
typedef struct sshkey_public_key_t sshkey_public_key_t;
/**
- * Public key implementation supporting RFC 4253 decoding.
+ * Public key implementation supporting RFC 4253/RFC 5656 decoding.
*/
struct sshkey_public_key_t {