aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-02-07 16:05:32 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-05-14 17:26:18 +0200
commit8152c6aba49a4ffb9658f3c2e0ef74e670fd49ec (patch)
treef49e3e3befd3e653f55f0a3d43f2a4af2b06ab5d /src
parent7cc159d72079770937b9aebadf40e9f2c4fafbc6 (diff)
downloadlibssh-8152c6aba49a4ffb9658f3c2e0ef74e670fd49ec.tar.gz
libssh-8152c6aba49a4ffb9658f3c2e0ef74e670fd49ec.tar.xz
libssh-8152c6aba49a4ffb9658f3c2e0ef74e670fd49ec.zip
knownhosts: Ignore OpenSSH markers related to certificates
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/knownhosts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/knownhosts.c b/src/knownhosts.c
index dd302123..bc5e6176 100644
--- a/src/knownhosts.c
+++ b/src/knownhosts.c
@@ -233,6 +233,12 @@ static int ssh_known_hosts_read_entries(const char *match,
continue;
}
+ /* Skip lines starting with markers (@cert-authority, @revoked):
+ * we do not completely support them anyway */
+ if (p[0] == '@') {
+ continue;
+ }
+
rc = ssh_known_hosts_parse_line(match,
line,
&entry);