From ebeee7631d3eb9667e4c9f80734574204f70ea18 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 4 Jul 2022 19:23:31 +0200 Subject: [PATCH] pki: Do not check for DSA headers when DSA is not built in Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider --- src/pki.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pki.c b/src/pki.c index cd186093..d4fea5b3 100644 --- a/src/pki.c +++ b/src/pki.c @@ -77,10 +77,12 @@ enum ssh_keytypes_e pki_privatekey_type_from_string(const char *privkey) { char *start = NULL; +#ifdef HAVE_DSA start = strstr(privkey, DSA_HEADER_BEGIN); if (start != NULL) { return SSH_KEYTYPE_DSS; } +#endif /* HAVE_DSA */ start = strstr(privkey, RSA_HEADER_BEGIN); if (start != NULL) {