Make it possible to disable DSA.
Patch from Lars Nordin <Lars.Nordin@SDlabs.se>.
This commit is contained in:
parent
16af813b81
commit
c46cbd46e2
@ -111,6 +111,7 @@ _libssh2_rsa_sha1_verify(libssh2_rsa_ctx * rsactx,
|
|||||||
return (ret == 1) ? 0 : -1;
|
return (ret == 1) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBSSH2_DSA
|
||||||
int
|
int
|
||||||
_libssh2_dsa_new(libssh2_dsa_ctx ** dsactx,
|
_libssh2_dsa_new(libssh2_dsa_ctx ** dsactx,
|
||||||
const unsigned char *p,
|
const unsigned char *p,
|
||||||
@ -166,6 +167,7 @@ _libssh2_dsa_sha1_verify(libssh2_dsa_ctx * dsactx,
|
|||||||
|
|
||||||
return (ret == 1) ? 0 : -1;
|
return (ret == 1) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
#endif /* LIBSSH_DSA */
|
||||||
|
|
||||||
int
|
int
|
||||||
_libssh2_cipher_init(_libssh2_cipher_ctx * h,
|
_libssh2_cipher_init(_libssh2_cipher_ctx * h,
|
||||||
@ -367,6 +369,7 @@ _libssh2_rsa_new_private(libssh2_rsa_ctx ** rsa,
|
|||||||
filename, passphrase);
|
filename, passphrase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBSSH2_DSA
|
||||||
int
|
int
|
||||||
_libssh2_dsa_new_private(libssh2_dsa_ctx ** dsa,
|
_libssh2_dsa_new_private(libssh2_dsa_ctx ** dsa,
|
||||||
LIBSSH2_SESSION * session,
|
LIBSSH2_SESSION * session,
|
||||||
@ -387,6 +390,7 @@ _libssh2_dsa_new_private(libssh2_dsa_ctx ** dsa,
|
|||||||
return read_private_key_from_file((void **) dsa, read_dsa,
|
return read_private_key_from_file((void **) dsa, read_dsa,
|
||||||
filename, passphrase);
|
filename, passphrase);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBSSH_DSA */
|
||||||
|
|
||||||
int
|
int
|
||||||
_libssh2_rsa_sha1_sign(LIBSSH2_SESSION * session,
|
_libssh2_rsa_sha1_sign(LIBSSH2_SESSION * session,
|
||||||
@ -419,6 +423,7 @@ _libssh2_rsa_sha1_sign(LIBSSH2_SESSION * session,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBSSH2_DSA
|
||||||
int
|
int
|
||||||
_libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
|
_libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
|
||||||
const unsigned char *hash,
|
const unsigned char *hash,
|
||||||
@ -453,5 +458,6 @@ _libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* LIBSSH_DSA */
|
||||||
|
|
||||||
#endif /* !LIBSSH2_LIBGCRYPT */
|
#endif /* !LIBSSH2_LIBGCRYPT */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user