From 15796cbc4dee55ec26ca1304e9eedf405dcb62ec Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 30 Oct 2013 15:05:37 -0700 Subject: [PATCH] Set ENABLE_SSH_PUBLIC_KEY if support for in-memory keys found in libssh. --- configure.ac | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/configure.ac b/configure.ac index bee0332b..8d2d3903 100644 --- a/configure.ac +++ b/configure.ac @@ -529,6 +529,32 @@ AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh}" = "xyes" -a "x${have_pango} AC_SUBST(SSH_LIBS) +# +# Private key from string support within SSH +# + +if test "x${have_libssh}" = "xyes" +then + + have_ssh_pubkey=yes + AC_CHECK_DECL([ssh_pki_import_privkey_base64], + [], [have_ssh_pubkey=no], + [[#include ]]) + + if test "x${have_ssh_pubkey}" = "xno" + then + AC_MSG_WARN([ + -------------------------------------------- + No support for in-memory public keys found in libssh. + Support for public key authentication will not be built. + --------------------------------------------]) + else + AC_DEFINE([ENABLE_SSH_PUBLIC_KEY]) + fi + +fi + + AC_CONFIG_FILES([Makefile tests/Makefile src/libguac/Makefile