From 518dd33c94e041db0444c7d1f33da363bb8e3faf Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Thu, 24 Mar 2016 11:59:32 +0100 Subject: Imported Upstream version 5.4.0 --- src/libcharon/plugins/vici/Makefile.am | 8 +- src/libcharon/plugins/vici/Makefile.in | 22 +- src/libcharon/plugins/vici/README.md | 98 +++- src/libcharon/plugins/vici/perl/Makefile.am | 27 + src/libcharon/plugins/vici/perl/Makefile.in | 567 ++++++++++++++++++ .../plugins/vici/perl/Vici-Session/Changes | 6 + .../plugins/vici/perl/Vici-Session/MANIFEST | 9 + .../plugins/vici/perl/Vici-Session/Makefile.PL | 11 + .../plugins/vici/perl/Vici-Session/README.pod | 649 +++++++++++++++++++++ .../vici/perl/Vici-Session/lib/Vici/Message.pm | 256 ++++++++ .../vici/perl/Vici-Session/lib/Vici/Packet.pm | 191 ++++++ .../vici/perl/Vici-Session/lib/Vici/Session.pm | 204 +++++++ .../vici/perl/Vici-Session/lib/Vici/Transport.pm | 88 +++ .../vici/perl/Vici-Session/t/Vici-Session.t | 18 + src/libcharon/plugins/vici/python/Makefile.in | 2 + src/libcharon/plugins/vici/python/vici/session.py | 8 + src/libcharon/plugins/vici/ruby/Makefile.in | 2 + src/libcharon/plugins/vici/ruby/lib/vici.rb | 6 + src/libcharon/plugins/vici/vici_cert_info.c | 57 ++ src/libcharon/plugins/vici/vici_cert_info.h | 32 + src/libcharon/plugins/vici/vici_config.c | 359 +++++++++--- src/libcharon/plugins/vici/vici_config.h | 5 +- src/libcharon/plugins/vici/vici_control.c | 187 +++++- src/libcharon/plugins/vici/vici_cred.c | 69 +-- src/libcharon/plugins/vici/vici_plugin.c | 3 +- src/libcharon/plugins/vici/vici_query.c | 374 +++++++++--- src/libcharon/plugins/vici/vici_tests.c | 1 - 27 files changed, 3043 insertions(+), 216 deletions(-) create mode 100644 src/libcharon/plugins/vici/perl/Makefile.am create mode 100644 src/libcharon/plugins/vici/perl/Makefile.in create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/Changes create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/MANIFEST create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/Makefile.PL create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/README.pod create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm create mode 100644 src/libcharon/plugins/vici/perl/Vici-Session/t/Vici-Session.t create mode 100644 src/libcharon/plugins/vici/vici_cert_info.c create mode 100644 src/libcharon/plugins/vici/vici_cert_info.h (limited to 'src/libcharon/plugins/vici') diff --git a/src/libcharon/plugins/vici/Makefile.am b/src/libcharon/plugins/vici/Makefile.am index c99d23e4e..ca9b49906 100644 --- a/src/libcharon/plugins/vici/Makefile.am +++ b/src/libcharon/plugins/vici/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/libstrongswan \ - -I$(top_srcdir)/src/libhydra \ + -I$(top_srcdir)/src/libstrongswan/plugins/pubkey \ -I$(top_srcdir)/src/libcharon \ -DIPSEC_PIDDIR=\"${piddir}\" @@ -18,6 +18,7 @@ libstrongswan_vici_la_SOURCES = \ vici_message.h vici_message.c \ vici_builder.h vici_builder.c \ vici_dispatcher.h vici_dispatcher.c \ + vici_cert_info.h vici_cert_info.c \ vici_query.h vici_query.c \ vici_control.h vici_control.c \ vici_config.h vici_config.c \ @@ -38,6 +39,7 @@ ipseclib_LTLIBRARIES = libvici.la libvici_la_SOURCES = \ vici_message.c vici_message.h \ vici_builder.c vici_builder.h \ + vici_cert_info.h vici_cert_info.c \ libvici.c libvici.h libvici_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la @@ -79,3 +81,7 @@ endif if USE_PYTHON_EGGS SUBDIRS += python endif + +if USE_PERL_CPAN +SUBDIRS += perl +endif diff --git a/src/libcharon/plugins/vici/Makefile.in b/src/libcharon/plugins/vici/Makefile.in index 1a7870ae9..86ed00792 100644 --- a/src/libcharon/plugins/vici/Makefile.in +++ b/src/libcharon/plugins/vici/Makefile.in @@ -82,6 +82,7 @@ TESTS = vici_tests$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) @USE_RUBY_GEMS_TRUE@am__append_1 = ruby @USE_PYTHON_EGGS_TRUE@am__append_2 = python +@USE_PERL_CPAN_TRUE@am__append_3 = perl subdir = src/libcharon/plugins/vici DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp @@ -134,9 +135,10 @@ LTLIBRARIES = $(ipseclib_LTLIBRARIES) $(noinst_LTLIBRARIES) \ $(plugin_LTLIBRARIES) libstrongswan_vici_la_LIBADD = am_libstrongswan_vici_la_OBJECTS = vici_socket.lo vici_message.lo \ - vici_builder.lo vici_dispatcher.lo vici_query.lo \ - vici_control.lo vici_config.lo vici_cred.lo vici_attribute.lo \ - vici_authority.lo vici_logger.lo vici_plugin.lo + vici_builder.lo vici_dispatcher.lo vici_cert_info.lo \ + vici_query.lo vici_control.lo vici_config.lo vici_cred.lo \ + vici_attribute.lo vici_authority.lo vici_logger.lo \ + vici_plugin.lo libstrongswan_vici_la_OBJECTS = $(am_libstrongswan_vici_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -150,7 +152,8 @@ libstrongswan_vici_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @MONOLITHIC_TRUE@am_libstrongswan_vici_la_rpath = libvici_la_DEPENDENCIES = \ $(top_builddir)/src/libstrongswan/libstrongswan.la -am_libvici_la_OBJECTS = vici_message.lo vici_builder.lo libvici.lo +am_libvici_la_OBJECTS = vici_message.lo vici_builder.lo \ + vici_cert_info.lo libvici.lo libvici_la_OBJECTS = $(am_libvici_la_OBJECTS) am__EXEEXT_1 = vici_tests$(EXEEXT) am__dirstamp = $(am__leading_dot)dirstamp @@ -270,7 +273,7 @@ am__tty_colors = { \ std=''; \ fi; \ } -DIST_SUBDIRS = ruby python +DIST_SUBDIRS = ruby python perl DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -509,6 +512,8 @@ strongswan_conf = @strongswan_conf@ strongswan_options = @strongswan_options@ swanctldir = @swanctldir@ sysconfdir = @sysconfdir@ +systemd_CFLAGS = @systemd_CFLAGS@ +systemd_LIBS = @systemd_LIBS@ systemd_daemon_CFLAGS = @systemd_daemon_CFLAGS@ systemd_daemon_LIBS = @systemd_daemon_LIBS@ systemd_journal_CFLAGS = @systemd_journal_CFLAGS@ @@ -524,7 +529,7 @@ xml_CFLAGS = @xml_CFLAGS@ xml_LIBS = @xml_LIBS@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/libstrongswan \ - -I$(top_srcdir)/src/libhydra \ + -I$(top_srcdir)/src/libstrongswan/plugins/pubkey \ -I$(top_srcdir)/src/libcharon \ -DIPSEC_PIDDIR=\"${piddir}\" @@ -538,6 +543,7 @@ libstrongswan_vici_la_SOURCES = \ vici_message.h vici_message.c \ vici_builder.h vici_builder.c \ vici_dispatcher.h vici_dispatcher.c \ + vici_cert_info.h vici_cert_info.c \ vici_query.h vici_query.c \ vici_control.h vici_control.c \ vici_config.h vici_config.c \ @@ -553,6 +559,7 @@ ipseclib_LTLIBRARIES = libvici.la libvici_la_SOURCES = \ vici_message.c vici_message.h \ vici_builder.c vici_builder.h \ + vici_cert_info.h vici_cert_info.c \ libvici.c libvici.h libvici_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la @@ -578,7 +585,7 @@ vici_tests_LDADD = \ $(top_builddir)/src/libstrongswan/libstrongswan.la \ $(top_builddir)/src/libstrongswan/tests/libtest.la -SUBDIRS = $(am__append_1) $(am__append_2) +SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) all: all-recursive .SUFFIXES: @@ -739,6 +746,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vici_attribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vici_authority.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vici_builder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vici_cert_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vici_config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vici_control.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vici_cred.Plo@am__quote@ diff --git a/src/libcharon/plugins/vici/README.md b/src/libcharon/plugins/vici/README.md index b9531d8a5..52929bd74 100644 --- a/src/libcharon/plugins/vici/README.md +++ b/src/libcharon/plugins/vici/README.md @@ -258,7 +258,8 @@ Initiates an SA while streaming _control-log_ events. { child = - timeout = + ike = + timeout = init-limits = loglevel = } => { @@ -266,6 +267,9 @@ Initiates an SA while streaming _control-log_ events. errmsg = } +The default timeout of 0 waits indefinitely for a result, and a timeout value +of -1 returns a result immediately. + ### terminate() ### Terminates an SA while streaming _control-log_ events. @@ -275,19 +279,40 @@ Terminates an SA while streaming _control-log_ events. ike = child_id = ike_id = - timeout = + timeout = loglevel = } => { success = errmsg = } +The default timeout of 0 waits indefinitely for a result, and a timeout value +of -1 returns a result immediately. + +### redirect() ### + +Redirect a client-initiated IKE_SA to another gateway. Only for IKEv2 and if +supported by the peer. + + { + ike = + ike-id = + peer-ip = + peer-id = + } => { + success = + errmsg = + } + ### install() ### Install a trap, drop or bypass policy defined by a CHILD_SA config. { child = + ike = } => { success = errmsg = @@ -361,7 +386,9 @@ call includes all certificates known by the daemon, not only those loaded over vici. { - type = + type = + flag = subject = } => { # completes after streaming list-cert events @@ -419,7 +446,8 @@ Unload a previously loaded connection definition by name. Load a certificate into the daemon. { - type = + type = + flag = data = } => { success = @@ -544,6 +572,16 @@ List the currently loaded pools. } } +### get-algorithms() ### + +List currently loaded algorithms and their implementation. + + {} => { + = { + = + } + } + ## Server-issued events ## Based on the packet layer, the vici plugin raises event messages using named @@ -588,8 +626,10 @@ command. version = state = local-host = + local-port = local-id = remote-host = + remote-port = remote-id = remote-xauth-id = remote-eap-id = @@ -735,9 +775,13 @@ The _list-cert_ event is issued to stream loaded certificates during an active _list-certs_ command. { - type = + type = + flag = has_privkey = data = + subject = + not-before =