Commit 8c158010 authored by Michael Biebl's avatar Michael Biebl

Imported Upstream version 1.1.91

parent bd86fbb9
AUTOMAKE_OPTIONS = foreign
SUBDIRS = common src
SUBDIRS = shared src
if WITH_GNOME
SUBDIRS += auth-dialog properties po
......@@ -30,8 +30,7 @@ EXTRA_DIST = nm-openvpn-service.name.in \
$(dbusservice_DATA) \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
nm-test-helpers.h
intltool-update.in
CLEANFILES = $(nmvpnservice_DATA) *~
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
......
......@@ -194,7 +194,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = common src auth-dialog properties po
DIST_SUBDIRS = shared src auth-dialog properties po
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
COPYING ChangeLog NEWS README compile config.guess config.sub \
depcomp install-sh ltmain.sh missing
......@@ -405,7 +405,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = common src $(am__append_1)
SUBDIRS = shared src $(am__append_1)
dbusservicedir = $(sysconfdir)/dbus-1/system.d
dbusservice_DATA = nm-openvpn-service.conf
nmvpnservicedir = $(NM_VPN_SERVICE_DIR)
......@@ -420,8 +420,7 @@ EXTRA_DIST = nm-openvpn-service.name.in \
$(dbusservice_DATA) \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
nm-test-helpers.h
intltool-update.in
CLEANFILES = $(nmvpnservice_DATA) *~
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
......
......@@ -10,6 +10,7 @@ This is a new stable release of network-manager-openvpn. Notable changes includ
* Various import/export fixes
* Add support for --ping option to backend
* Translation updates
* Add support for importing inline keys, secrets and PKCS12 certificates
The following features were backported to 1.0.x releases from 1.0.0 to 1.0.8
are also present in NetworkManager-openvpn-1.2:
......
......@@ -6,6 +6,7 @@ nm_openvpn_auth_dialog_CPPFLAGS = \
$(LIBNM_CFLAGS) \
$(LIBNMA_CFLAGS) \
$(LIBSECRET_CFLAGS) \
-I$(top_srcdir)/shared \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DBINDIR=\""$(bindir)"\" \
......@@ -19,6 +20,6 @@ nm_openvpn_auth_dialog_LDADD = \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS) \
$(LIBSECRET_LIBS) \
$(top_builddir)/common/libnm-vpn-plugin-openvpn-common.la
$(top_builddir)/shared/libnm-vpn-plugin-openvpn-shared.la
CLEANFILES = *~
......@@ -112,7 +112,7 @@ am__DEPENDENCIES_1 =
nm_openvpn_auth_dialog_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) \
$(top_builddir)/common/libnm-vpn-plugin-openvpn-common.la
$(top_builddir)/shared/libnm-vpn-plugin-openvpn-shared.la
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
......@@ -349,6 +349,7 @@ nm_openvpn_auth_dialog_CPPFLAGS = \
$(LIBNM_CFLAGS) \
$(LIBNMA_CFLAGS) \
$(LIBSECRET_CFLAGS) \
-I$(top_srcdir)/shared \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DBINDIR=\""$(bindir)"\" \
......@@ -362,7 +363,7 @@ nm_openvpn_auth_dialog_LDADD = \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS) \
$(LIBSECRET_LIBS) \
$(top_builddir)/common/libnm-vpn-plugin-openvpn-common.la
$(top_builddir)/shared/libnm-vpn-plugin-openvpn-shared.la
CLEANFILES = *~
all: all-am
......
......@@ -22,25 +22,23 @@
* 2005 Tim Niemueller [www.niemueller.de]
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#define SECRET_API_SUBJECT_TO_CHANGE
#include <libsecret/secret.h>
#include <NetworkManager.h>
#include "nm-default.h"
#include <nm-vpn-service-plugin.h>
#include <nma-vpn-password-dialog.h>
#include "../common/utils.h"
#include "../src/nm-openvpn-service-defines.h"
#include "utils.h"
#include "nm-openvpn-service-defines.h"
#define KEYRING_UUID_TAG "connection-uuid"
#define KEYRING_SN_TAG "setting-name"
......
noinst_LTLIBRARIES=libnm-vpn-plugin-openvpn-common.la
if WITH_LIBNM_GLIB
noinst_LTLIBRARIES += libnm-openvpn-common.la
endif
libnm_vpn_plugin_openvpn_common_la_CPPFLAGS = \
$(LIBNM_CFLAGS) \
-I$(top_srcdir)/src/
libnm_openvpn_common_la_CPPFLAGS = \
-DNM_OPENVPN_OLD \
$(LIBNM_GLIB_CFLAGS) \
-I$(top_srcdir)/src/
libnm_vpn_plugin_openvpn_common_la_SOURCES= \
utils.c \
utils.h \
nm-glib-compat.h
libnm_openvpn_common_la_SOURCES = \
$(libnm_vpn_plugin_openvpn_common_la_SOURCES)
libnm_vpn_plugin_openvpn_common_la_LIBADD = \
$(LIBNM_LIBS)
libnm_openvpn_common_la_LIBADD = \
$(LIBNM_GLIB_LIBS)
EXTRA_DIST = nm-glib-compat.h
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright 2014 Red Hat, Inc.
*/
#ifndef __NM_GLIB_COMPAT_H__
#define __NM_GLIB_COMPAT_H__
#include <glib.h>
#include <glib-object.h>
#if !GLIB_CHECK_VERSION(2,34,0)
#define g_clear_pointer(pp, destroy) \
G_STMT_START { \
G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \
/* Only one access, please */ \
gpointer *_pp = (gpointer *) (pp); \
gpointer _p; \
/* This assignment is needed to avoid a gcc warning */ \
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
\
(void) (0 ? (gpointer) *(pp) : 0); \
do \
_p = g_atomic_pointer_get (_pp); \
while G_UNLIKELY (!g_atomic_pointer_compare_and_exchange (_pp, _p, NULL)); \
\
if (_p) \
_destroy (_p); \
} G_STMT_END
#endif
#endif /* __NM_GLIB_COMPAT_H__ */
......@@ -81,6 +81,9 @@
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Define if more asserts are enabled */
#undef NM_MORE_ASSERTS
/* Name of package */
#undef PACKAGE
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for NetworkManager-openvpn 1.1.90.
# Generated by GNU Autoconf 2.69 for NetworkManager-openvpn 1.1.91.
#
# Report bugs to <https://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager>.
#
......@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='NetworkManager-openvpn'
PACKAGE_TARNAME='NetworkManager-openvpn'
PACKAGE_VERSION='1.1.90'
PACKAGE_STRING='NetworkManager-openvpn 1.1.90'
PACKAGE_VERSION='1.1.91'
PACKAGE_STRING='NetworkManager-openvpn 1.1.91'
PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager'
PACKAGE_URL=''
......@@ -845,6 +845,7 @@ enable_nls
enable_more_warnings
with_tests
with_dist_version
with_more_asserts
'
ac_precious_vars='build_alias
host_alias
......@@ -1413,7 +1414,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures NetworkManager-openvpn 1.1.90 to adapt to many kinds of systems.
\`configure' configures NetworkManager-openvpn 1.1.91 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1484,7 +1485,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of NetworkManager-openvpn 1.1.90:";;
short | recursive ) echo "Configuration of NetworkManager-openvpn 1.1.91:";;
esac
cat <<\_ACEOF
......@@ -1528,6 +1529,8 @@ Optional Packages:
--with-dist-version=<dist-version>
Define the custom version (like distribution package
name and revision)
--with-more-asserts=level
Enable more assertions for debugging (default: 0)
Some influential environment variables:
CC C compiler command
......@@ -1634,7 +1637,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
NetworkManager-openvpn configure 1.1.90
NetworkManager-openvpn configure 1.1.91
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2057,7 +2060,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by NetworkManager-openvpn $as_me 1.1.90, which was
It was created by NetworkManager-openvpn $as_me 1.1.91, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2920,7 +2923,7 @@ fi
# Define the identity of the package.
PACKAGE='NetworkManager-openvpn'
VERSION='1.1.90'
VERSION='1.1.91'
cat >>confdefs.h <<_ACEOF
......@@ -14765,7 +14768,28 @@ _ACEOF
fi
ac_config_files="$ac_config_files Makefile src/Makefile common/Makefile auth-dialog/Makefile properties/Makefile properties/tests/Makefile properties/tests/conf/Makefile po/Makefile.in"
# Check whether --with-more-asserts was given.
if test "${with_more_asserts+set}" = set; then :
withval=$with_more_asserts; more_asserts=${with_more_asserts}
else
more_asserts=no
fi
if test "${more_asserts}" = "no"; then
more_asserts=0
else
if test "${more_asserts}" = "yes"; then
more_asserts=100
fi
fi
cat >>confdefs.h <<_ACEOF
#define NM_MORE_ASSERTS $more_asserts
_ACEOF
ac_config_files="$ac_config_files Makefile src/Makefile auth-dialog/Makefile properties/Makefile properties/tests/Makefile properties/tests/conf/Makefile po/Makefile.in shared/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
......@@ -15317,7 +15341,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by NetworkManager-openvpn $as_me 1.1.90, which was
This file was extended by NetworkManager-openvpn $as_me 1.1.91, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -15383,7 +15407,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
NetworkManager-openvpn config.status 1.1.90
NetworkManager-openvpn config.status 1.1.91
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......@@ -15802,12 +15826,12 @@ do
"default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;
"auth-dialog/Makefile") CONFIG_FILES="$CONFIG_FILES auth-dialog/Makefile" ;;
"properties/Makefile") CONFIG_FILES="$CONFIG_FILES properties/Makefile" ;;
"properties/tests/Makefile") CONFIG_FILES="$CONFIG_FILES properties/tests/Makefile" ;;
"properties/tests/conf/Makefile") CONFIG_FILES="$CONFIG_FILES properties/tests/conf/Makefile" ;;
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
"shared/Makefile") CONFIG_FILES="$CONFIG_FILES shared/Makefile" ;;
"po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
......
AC_PREREQ(2.52)
AC_INIT(NetworkManager-openvpn,
1.1.90,
1.1.91,
https://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager,
NetworkManager-openvpn)
AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-xz])
......@@ -116,14 +116,27 @@ if ! test x"$ac_distver" = x""; then
AC_DEFINE_UNQUOTED(DIST_VERSION, "$ac_distver", [Define the distribution version string])
fi
AC_ARG_WITH(more-asserts,
AS_HELP_STRING([--with-more-asserts=level], [Enable more assertions for debugging (default: 0)]),
[more_asserts=${with_more_asserts}],
[more_asserts=no])
if test "${more_asserts}" = "no"; then
more_asserts=0
else
if test "${more_asserts}" = "yes"; then
more_asserts=100
fi
fi
AC_DEFINE_UNQUOTED(NM_MORE_ASSERTS, $more_asserts, [Define if more asserts are enabled])
AC_CONFIG_FILES([
Makefile
src/Makefile
common/Makefile
auth-dialog/Makefile
properties/Makefile
properties/tests/Makefile
properties/tests/conf/Makefile
po/Makefile.in
shared/Makefile
])
AC_OUTPUT
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2008 Red Hat, Inc.
*/
#ifndef NM_TEST_HELPERS_H
#define NM_TEST_HELPERS_H
#include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
static void
FAIL(const char *test_name, const char *fmt, ...)
{
va_list args;
char buf[500];
snprintf (buf, 500, "FAIL: (%s) %s\n", test_name, fmt);
va_start (args, fmt);
vfprintf (stderr, buf, args);
va_end (args);
_exit (1);
}
#define ASSERT(x, test_name, fmt, ...) \
{ \
if (!(x)) { \
FAIL (test_name, fmt, ## __VA_ARGS__); \
} \
}
#endif /* NM_TEST_HELPERS_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -23,7 +23,8 @@ ui_DATA = nm-openvpn-dialog.ui
common_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/shared \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(datadir)/locale\"
......@@ -34,7 +35,7 @@ libnm_vpn_plugin_openvpn_la_CFLAGS = \
$(LIBNMA_CFLAGS)
libnm_openvpn_properties_la_CFLAGS = \
-DNM_OPENVPN_OLD \
-DNM_OPENVPN_OLD \
$(common_CFLAGS) \
$(LIBNM_GLIB_CFLAGS) \
$(LIBNM_GTK_CFLAGS)
......@@ -43,13 +44,13 @@ libnm_vpn_plugin_openvpn_la_LIBADD = \
$(GTK_LIBS) \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS) \
$(top_builddir)/common/libnm-vpn-plugin-openvpn-common.la
$(top_builddir)/shared/libnm-vpn-plugin-openvpn-shared.la
libnm_openvpn_properties_la_LIBADD = \
$(GTK_LIBS) \
$(LIBNM_GLIB_LIBS) \
$(LIBNM_GTK_LIBS) \
$(top_builddir)/common/libnm-openvpn-common.la
$(top_builddir)/shared/libnm-openvpn-shared.la
libnm_vpn_plugin_openvpn_la_LDFLAGS = \
-avoid-version
......
......@@ -136,7 +136,7 @@ LTLIBRARIES = $(plugin_LTLIBRARIES)
am__DEPENDENCIES_1 =
libnm_openvpn_properties_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(top_builddir)/common/libnm-openvpn-common.la
$(top_builddir)/shared/libnm-openvpn-shared.la
am__objects_1 = libnm_openvpn_properties_la-nm-openvpn.lo \
libnm_openvpn_properties_la-auth-helpers.lo \
libnm_openvpn_properties_la-import-export.lo
......@@ -155,7 +155,7 @@ libnm_openvpn_properties_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@WITH_LIBNM_GLIB_TRUE@ $(plugindir)
libnm_vpn_plugin_openvpn_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(top_builddir)/common/libnm-vpn-plugin-openvpn-common.la
$(top_builddir)/shared/libnm-vpn-plugin-openvpn-shared.la
am_libnm_vpn_plugin_openvpn_la_OBJECTS = \
libnm_vpn_plugin_openvpn_la-nm-openvpn.lo \
libnm_vpn_plugin_openvpn_la-auth-helpers.lo \
......@@ -456,7 +456,8 @@ ui_DATA = nm-openvpn-dialog.ui
common_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/shared \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(datadir)/locale\"
......@@ -467,7 +468,7 @@ libnm_vpn_plugin_openvpn_la_CFLAGS = \
$(LIBNMA_CFLAGS)
libnm_openvpn_properties_la_CFLAGS = \
-DNM_OPENVPN_OLD \
-DNM_OPENVPN_OLD \
$(common_CFLAGS) \
$(LIBNM_GLIB_CFLAGS) \
$(LIBNM_GTK_CFLAGS)
......@@ -476,13 +477,13 @@ libnm_vpn_plugin_openvpn_la_LIBADD = \
$(GTK_LIBS) \
$(LIBNM_LIBS) \
$(LIBNMA_LIBS) \
$(top_builddir)/common/libnm-vpn-plugin-openvpn-common.la
$(top_builddir)/shared/libnm-vpn-plugin-openvpn-shared.la
libnm_openvpn_properties_la_LIBADD = \
$(GTK_LIBS) \
$(LIBNM_GLIB_LIBS) \
$(LIBNM_GTK_LIBS) \
$(top_builddir)/common/libnm-openvpn-common.la
$(top_builddir)/shared/libnm-openvpn-shared.la
libnm_vpn_plugin_openvpn_la_LDFLAGS = \
-avoid-version
......
......@@ -21,9 +21,7 @@
*
**************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <string.h>
#include <sys/types.h>
......@@ -33,31 +31,12 @@
#include <unistd.h>
#include <errno.h>
#include <glib/gi18n-lib.h>
#ifdef NM_OPENVPN_OLD
#define NM_VPN_LIBNM_COMPAT
#include <nm-setting-connection.h>
#include <nm-setting-8021x.h>
#include <nm-utils.h>
#include <nm-ui-utils.h>
#define OPENVPN_EDITOR_PLUGIN_ERROR NM_SETTING_VPN_ERROR
#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
#else /* !NM_OPENVPN_OLD */
#include <NetworkManager.h>
#include <nma-ui-utils.h>
#define OPENVPN_EDITOR_PLUGIN_ERROR NM_CONNECTION_ERROR
#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
#endif
#include "nm-default.h"
#include "auth-helpers.h"
#include "nm-openvpn.h"
#include "../src/nm-openvpn-service-defines.h"
#include "../common/utils.h"
#include "nm-openvpn-service-defines.h"
#include "utils.h"
#define BLOCK_HANDLER_ID "block-handler-id"
......@@ -918,6 +897,7 @@ static const char *advanced_keys[] = {
NM_OPENVPN_KEY_RENEG_SECONDS,
NM_OPENVPN_KEY_TLS_REMOTE,
NM_OPENVPN_KEY_REMOTE_RANDOM,
NM_OPENVPN_KEY_TUN_IPV6,
NM_OPENVPN_KEY_REMOTE_CERT_TLS,
NM_OPENVPN_KEY_PING,
NM_OPENVPN_KEY_PING_EXIT,
......@@ -1677,6 +1657,12 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
}
value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TUN_IPV6);
if (value && !strcmp (value, "yes")) {
widget = GTK_WIDGET (gtk_builder_get_object (builder, "tun_ipv6_checkbutton"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
}
widget = GTK_WIDGET (gtk_builder_get_object (builder, "cipher_combo"));
value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_CIPHER);
populate_cipher_combo (GTK_COMBO_BOX (widget), value);
......@@ -2001,6 +1987,10 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_REMOTE_RANDOM), g_strdup ("yes"));
widget = GTK_WIDGET (gtk_builder_get_object (builder, "tun_ipv6_checkbutton"));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_TUN_IPV6), g_strdup ("yes"));
widget = GTK_WIDGET (gtk_builder_get_object (builder, "cipher_combo"));
model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
......
This diff is collapsed.
......@@ -30,7 +30,14 @@
#include <NetworkManager.h>
#endif
NMConnection *do_import (const char *path, char **lines, GError **error);
extern const char *_nmovpn_test_temp_path;
gboolean _nmovpn_test_args_parse_line (const char *line,
gsize line_len,
const char ***out_p,
char **out_error);
NMConnection *do_import (const char *path, const char *contents, gsize contents_len, GError **error);
gboolean do_export (const char *path, NMConnection *connection, GError **error);
......
......@@ -1470,6 +1470,25 @@ config: remote-random</property>
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="tun_ipv6_checkbutton">
<property name="label" translatable="yes">IPv6 tun link</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Build a tun link capable of forwarding IPv6 traffic
config: tun-ipv6</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="float_checkbutton">
<property name="label" translatable="yes">Accept authenticated packets from any address (F_loat)</property>
......@@ -1489,7 +1508,7 @@ config: float</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="position">10</property>
</packing>
</child>
<child>
......
This diff is collapsed.
SUBDIRS = conf
AM_CFLAGS = -I${top_srcdir}
AM_CFLAGS = \
-I${top_srcdir}/shared \
-I${top_srcdir}/properties \
-DTEST_SRCDIR="\"$(abs_srcdir)\"" \
-DTEST_BUILDDIR="\"$(abs_builddir)\""
noinst_PROGRAMS = \
test-import-export
if WITH_LIBNM_GLIB
noinst_PROGRAMS += test-import-export-glib
endif
noinst_PROGRAMS = test-import-export
test_import_export_SOURCES = \
test-import-export.c
......@@ -20,10 +29,28 @@ test_import_export_LDADD = \
$(LIBNMA_LIBS) \
$(top_builddir)/properties/libnm-vpn-plugin-openvpn.la
if WITH_TESTS
check-local: test-import-export
$(abs_builddir)/test-import-export $(abs_srcdir)/conf $(abs_builddir)/conf
test_import_export_glib_SOURCES = \
test-import-export.c
test_import_export_glib_CPPFLAGS = \
-DNM_OPENVPN_OLD \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBNM_GLIB_CFLAGS) \
$(LIBNM_GTK_CFLAGS)
test_import_export_glib_LDADD = \
$(GTHREAD_LIBS) \
$(GTK_LIBS) \
$(LIBNM_GLIB_LIBS) \
$(LIBNM_GTK_LIBS) \
$(top_builddir)/properties/libnm-openvpn-properties.la
TESTS = \
test-import-export
if WITH_LIBNM_GLIB
TESTS += test-import-export-glib
endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.