summaryrefslogtreecommitdiff
path: root/proto/rpki/rpki.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2020-02-04 10:15:35 +0100
committerMaria Matejka <mq@ucw.cz>2020-02-04 10:15:35 +0100
commit027a3e66f786be8863784aefb043097b41090896 (patch)
tree4049bdb280e338384ace7cedac87e5f4963aa486 /proto/rpki/rpki.c
parent4bbc10614f3431c37e6352f5a6ea5c693c31021e (diff)
RPKI: Allow build without libSSH
Diffstat (limited to 'proto/rpki/rpki.c')
-rw-r--r--proto/rpki/rpki.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c
index 70cd0cdd..aa07f7d9 100644
--- a/proto/rpki/rpki.c
+++ b/proto/rpki/rpki.c
@@ -579,7 +579,9 @@ rpki_init_cache(struct rpki_proto *p, struct rpki_config *cf)
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");
@@ -683,6 +685,7 @@ rpki_reconfigure_cache(struct rpki_proto *p UNUSED, struct rpki_cache *cache, st
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;
@@ -695,6 +698,7 @@ rpki_reconfigure_cache(struct rpki_proto *p UNUSED, struct rpki_cache *cache, st
try_fast_reconnect = 1;
}
}
+#endif
#define TEST_INTERVAL(name, Name) \
if (cache->name##_interval != new->name##_interval || \
@@ -813,7 +817,9 @@ rpki_show_proto_info(struct proto *P)
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;
};
@@ -887,9 +893,11 @@ rpki_check_config(struct rpki_config *cf)
/* 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;
}