summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2014-12-29 16:06:33 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2014-12-29 16:06:33 +0100
commit3880a8ed80a4b1e2c052bd62f328bba2f869d5ae (patch)
tree991cefe889d1c313685cd4693b96b94de7e93af3 /src
parent0e969e0316fe6437898c31ca57a3d187e5ee59f1 (diff)
Fix the dh.c build with libgcrypt
Fixes bug reported by gentoo at https://bugs.gentoo.org/show_bug.cgi?id=533424 The function was only used by EDCSA backend which are not supported by the libgcrypt code anyway.
Diffstat (limited to 'src')
-rw-r--r--src/dh.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dh.c b/src/dh.c
index 84355d48..010a1dda 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -407,14 +407,17 @@ bignum make_string_bn(ssh_string string){
return bn;
}
+#ifdef HAVE_LIBCRYPTO
+/** @internal
+ * @brief converts the content of a SSH string in an already allocated bignum
+ * @warning only available with OpenSSL builds
+ */
void make_string_bn_inplace(ssh_string string, bignum bnout) {
unsigned int len = ssh_string_len(string);
-#ifdef HAVE_LIBGCRYPT
- #error "unsupported"
-#elif defined HAVE_LIBCRYPTO
bignum_bin2bn(string->data, len, bnout);
-#endif
}
+#endif /* HAVE_LIBCRYPTO */
+
ssh_string dh_get_e(ssh_session session) {
return make_bignum_string(session->next_crypto->e);