)
AC_ARG_ENABLE([libssh],
- [AS_HELP_STRING([--enable-libssh], [enable LibSSH support together with RPKI @<:@try@:>@])],
+ [AS_HELP_STRING([--enable-libssh], [enable LibSSH support in RPKI @<:@try@:>@])],
[],
[enable_libssh=try]
)
if test "$fail" != yes ; then
AC_DEFINE([HAVE_LIBSSH], [1], [Define to 1 if you have the `ssh' library (-lssh).])
DAEMON_LIBS="-lssh $DAEMON_LIBS"
- proto_rpki=rpki
enable_libssh=yes
else
if test "$enable_libssh" = yes ; then
fi
fi
-all_protocols="$proto_bfd babel bgp mrt ospf perf pipe radv rip $proto_rpki static"
+all_protocols="$proto_bfd babel bgp mrt ospf perf pipe radv rip rpki static"
all_protocols=`echo $all_protocols | sed 's/ /,/g'`
AC_MSG_RESULT([ Debugging: $enable_debug])
AC_MSG_RESULT([ POSIX threads: $enable_pthreads])
AC_MSG_RESULT([ Routing protocols: $protocols])
+AC_MSG_RESULT([ LibSSH support in RPKI: $enable_libssh])
AC_MSG_RESULT([ Kernel MPLS support: $enable_mpls_kernel])
AC_MSG_RESULT([ Client: $enable_client])
rpki_transport_ssh_init:
{
+#if HAVE_LIBSSH
rpki_check_unused_transport();
RPKI_CFG->tr_config.spec = cfg_allocz(sizeof(struct rpki_tr_ssh_config));
RPKI_CFG->tr_config.type = RPKI_TR_SSH;
+#else
+ cf_error("This build doesn't support SSH");
+#endif
};
rpki_transport_ssh_opts:
switch (cf->tr_config.type)
{
case RPKI_TR_TCP: rpki_tr_tcp_init(cache->tr_sock); break;
+#if HAVE_LIBSSH
case RPKI_TR_SSH: rpki_tr_ssh_init(cache->tr_sock); break;
+#endif
};
CACHE_DBG(cache, "Connection object created");
CACHE_TRACE(D_EVENTS, cache, "Transport type changed");
return NEED_RESTART;
}
+#if HAVE_LIBSSH
else if (new->tr_config.type == RPKI_TR_SSH)
{
struct rpki_tr_ssh_config *ssh_old = (void *) old->tr_config.spec;
try_fast_reconnect = 1;
}
}
+#endif
#define TEST_INTERVAL(name, Name) \
if (cache->name##_interval != new->name##_interval || \
switch (cf->tr_config.type)
{
+#if HAVE_LIBSSH
case RPKI_TR_SSH: transport_name = "SSHv2"; break;
+#endif
case RPKI_TR_TCP: transport_name = "Unprotected over TCP"; break;
};
/* Set default port numbers */
switch (cf->tr_config.type)
{
+#if HAVE_LIBSSH
case RPKI_TR_SSH:
cf->port = RPKI_SSH_PORT;
break;
+#endif
default:
cf->port = RPKI_TCP_PORT;
}
#include "rpki.h"
+#if HAVE_LIBSSH
+
static int
rpki_tr_ssh_open(struct rpki_tr_sock *tr)
{
tr->open_fp = &rpki_tr_ssh_open;
tr->ident_fp = &rpki_tr_ssh_ident;
}
+
+#endif
/* Types of supported transports */
enum rpki_tr_type {
RPKI_TR_TCP, /* Unprotected transport over TCP */
+#if HAVE_LIBSSH
RPKI_TR_SSH, /* Protected transport by SSHv2 connection */
+#endif
};
/* Common configure structure for transports */