1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

pki: Do not check for DSA headers when DSA is not built in

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2022-07-04 19:23:31 +02:00
committed by Andreas Schneider
parent aca482a5a5
commit ebeee7631d

View File

@@ -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) {