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:
committed by
Andreas Schneider
parent
aca482a5a5
commit
ebeee7631d
@@ -77,10 +77,12 @@ enum ssh_keytypes_e pki_privatekey_type_from_string(const char *privkey)
|
|||||||
{
|
{
|
||||||
char *start = NULL;
|
char *start = NULL;
|
||||||
|
|
||||||
|
#ifdef HAVE_DSA
|
||||||
start = strstr(privkey, DSA_HEADER_BEGIN);
|
start = strstr(privkey, DSA_HEADER_BEGIN);
|
||||||
if (start != NULL) {
|
if (start != NULL) {
|
||||||
return SSH_KEYTYPE_DSS;
|
return SSH_KEYTYPE_DSS;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_DSA */
|
||||||
|
|
||||||
start = strstr(privkey, RSA_HEADER_BEGIN);
|
start = strstr(privkey, RSA_HEADER_BEGIN);
|
||||||
if (start != NULL) {
|
if (start != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user