diff -Nru volume-key-0.3.10/ChangeLog volume-key-0.3.12/ChangeLog --- volume-key-0.3.10/ChangeLog 2018-05-21 08:28:25.000000000 +0000 +++ volume-key-0.3.12/ChangeLog 2018-10-08 11:24:58.000000000 +0000 @@ -1,3 +1,44 @@ +2018-10-07 Jiri Kucera + + * configure.ac: Release 0.3.12. + * configure.ac: Added `--with-python' and `--with-python3' flags. + * NEWS: Update. + * Makefile.am + * contrib/Makefile.am + * doc/Makefile.am + * lib/Makefile.am + * python/Makefile.am + * python/python/Makefile.am + * python/python3/Makefile.am + * src/Makefile.am + * tests/Makefile.am: Makefile.am in the top source directory was splitted + to smaller parts per subdirectory as there has been conflicts in rules due + to adding back the Python 2 support. + * python/volume_key.i: Adding PyString_AsStringAndSize and + PyString_FromStringAndSize functions/macros to resolve compatibility issues + between Python 2 and Python 3 C API. + * po/*.po: Update line numbers. + * tests/packet_roundtrips.c + * tests/packet_roundtrips.sh: Path fix. + +2018-07-17 Jiri Kucera + + * configure.ac: Release 0.3.11. + * NEWS: Update. + * Makefile.am (EXTRA_DIST): Added tests for contrib/email scripts. + + * configure.ac: Switch to Python 3. + * Makefile.am (-PYTHON_CPPFLAGS) + (python__volume_key_la_{{CPP,LD}FLAGS,LIBADD}): Switch to Python 3. + * contrib/email/escrow-receive + * contrib/email/escrow-transit: Port to Python 3. + * contrib/email/tests/test-escrow-receive + * contrib/email/tests/test-escrow-transit + * contrib/email/tests/utest.sh + * contrib/email/tests/mailsrv.py + * contrib/email/tests/sendpkt.py: Added tests for contrib/email + scripts. + 2018-05-16 Jiri Kucera * configure.ac: Release 0.3.10. diff -Nru volume-key-0.3.10/configure volume-key-0.3.12/configure --- volume-key-0.3.10/configure 2018-05-21 08:29:55.000000000 +0000 +++ volume-key-0.3.12/configure 2018-10-08 11:32:21.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for volume_key 0.3.10. +# Generated by GNU Autoconf 2.69 for volume_key 0.3.12. # # Report bugs to . # @@ -11,7 +11,7 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # -# Copyright (C) 2009, 2010 Red Hat, Inc. All rights reserved. +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU General # Public License v.2. @@ -605,8 +605,8 @@ # Identity of this package. PACKAGE_NAME='volume_key' PACKAGE_TARNAME='volume_key' -PACKAGE_VERSION='0.3.10' -PACKAGE_STRING='volume_key 0.3.10' +PACKAGE_VERSION='0.3.12' +PACKAGE_STRING='volume_key 0.3.12' PACKAGE_BUGREPORT='https://pagure.io/volume_key' PACKAGE_URL='https://pagure.io/volume_key' @@ -684,6 +684,29 @@ PKG_CONFIG_PATH PKG_CONFIG GPG +HAVE_PYTHON3_FALSE +HAVE_PYTHON3_TRUE +PYTHON3_LDFLAGS +PYTHON3_LIBS +PYTHON3_CFLAGS +PYTHON3_INCLUDES +pkgpy3execdir +py3execdir +pkgpython3dir +python3dir +PYTHON3_PLATFORM +PYTHON3_EXEC_PREFIX +PYTHON3_PREFIX +PYTHON3_VERSION +PYTHON3_CONFIG +PYTHON3 +HAVE_PYTHON_FALSE +HAVE_PYTHON_TRUE +PYTHON_LDFLAGS +PYTHON_LIBS +PYTHON_CFLAGS +PYTHON_INCLUDES +PYTHON_CONFIG pkgpyexecdir pyexecdir pkgpythondir @@ -819,6 +842,8 @@ with_gnu_ld with_sysroot enable_libtool_lock +with_python +with_python3 with_gpgme_prefix enable_nls enable_rpath @@ -1390,7 +1415,7 @@ # 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 volume_key 0.3.10 to adapt to many kinds of systems. +\`configure' configures volume_key 0.3.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1460,7 +1485,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of volume_key 0.3.10:";; + short | recursive ) echo "Configuration of volume_key 0.3.12:";; esac cat <<\_ACEOF @@ -1495,6 +1520,8 @@ --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). + --with-python enable building Python 2 bindings + --with-python3 enable building Python 3 bindings --with-gpgme-prefix=PFX prefix where GPGME is installed (optional) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib @@ -1599,14 +1626,14 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -volume_key configure 0.3.10 +volume_key configure 0.3.12 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (C) 2009, 2010 Red Hat, Inc. All rights reserved. +Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU General Public License v.2. @@ -1892,7 +1919,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by volume_key $as_me 0.3.10, which was +It was created by volume_key $as_me 0.3.12, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2762,7 +2789,7 @@ # Define the identity of the package. PACKAGE='volume_key' - VERSION='0.3.10' + VERSION='0.3.12' # Some tools Automake needs. @@ -2847,7 +2874,10 @@ fi -# Checks for programs. +########################## +## Checks for programs. ## +########################## + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -12130,7 +12160,30 @@ # Only expand once: -for ac_prog in python2.7 python2.6 python2 python + +## +# Check whether to create Python bindings. +withval="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to create Python 2 bindings" >&5 +$as_echo_n "checking whether to create Python 2 bindings... " >&6; } + +# Check whether --with-python was given. +if test "${with_python+set}" = set; then : + withval=$with_python; use_python="$withval" +else + use_python=auto +fi + +# no, old, yes +python_found=no +if test "x$use_python" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: testing" >&5 +$as_echo "testing" >&6; } + # Try to find Python 2 interpreter: + for ac_prog in python2.7 python2.6 python2.5 python2.4 python do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -12174,8 +12227,10 @@ test -n "$PYTHON" && break done -test -n "$PYTHON" || PYTHON="Python is required" +test -n "$PYTHON" || PYTHON="no" + if test "x$PYTHON" != xno; then + # We have Python 2 interpreter, check its version: @@ -12184,13 +12239,13 @@ if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.6" >&5 -$as_echo_n "checking whether $PYTHON version is >= 2.6... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.4" >&5 +$as_echo_n "checking whether $PYTHON version is >= 2.4... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x -minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0] +minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] @@ -12211,8 +12266,8 @@ else # Otherwise, try each interpreter until we find one that satisfies # VERSION. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5 -$as_echo_n "checking for a Python interpreter with version >= 2.6... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.4" >&5 +$as_echo_n "checking for a Python interpreter with version >= 2.4... " >&6; } if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else @@ -12223,7 +12278,7 @@ # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x -minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0] +minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] @@ -12289,7 +12344,7 @@ if test "$PYTHON" = :; then - as_fn_error $? "Python 2.6 or 2.7 is required" "$LINENO" 5 + python_found=old else @@ -12433,9 +12488,306 @@ pkgpyexecdir=\${pyexecdir}/$PACKAGE + python_found=yes + fi + + fi + __vk_tmp="" + case x$python_found in + xold) + __vk_tmp="Python 2.4 or later" + ;; + xno) + __vk_tmp="Python 2 interpreter" + ;; + esac + if test "x$__vk_tmp" = x; then + # Extract the first word of "python2-config python-config", so it can be a program name with args. +set dummy python2-config python-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS + test -z "$ac_cv_path_PYTHON_CONFIG" && ac_cv_path_PYTHON_CONFIG="no" + ;; +esac +fi +PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG +if test -n "$PYTHON_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 +$as_echo "$PYTHON_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x${PYTHON_CONFIG}" = xno; then + __vk_tmp=python2-config + fi + fi + if test "x$__vk_tmp" != x; then + if test "x$use_python" = xyes; then + as_fn_error $? "$__vk_tmp is required but not installed" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $__vk_tmp is not found - Python 2 bindings will not be created" >&5 +$as_echo "$as_me: WARNING: $__vk_tmp is not found - Python 2 bindings will not be created" >&2;} + fi + else + PYTHON_INCLUDES=`${PYTHON_CONFIG} --includes 2> /dev/null` + PYTHON_CFLAGS=`${PYTHON_CONFIG} --cflags 2> /dev/null` + PYTHON_LIBS=`${PYTHON_CONFIG} --libs 2> /dev/null` + PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2> /dev/null` + + + + + fi +fi + if test x$python_found = xyes; then + HAVE_PYTHON_TRUE= + HAVE_PYTHON_FALSE='#' +else + HAVE_PYTHON_TRUE='#' + HAVE_PYTHON_FALSE= +fi + + +## +# Check whether to create Python 3 bindings. +withval="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Python 3 bindings" >&5 +$as_echo_n "checking whether to use Python 3 bindings... " >&6; } + +# Check whether --with-python3 was given. +if test "${with_python3+set}" = set; then : + withval=$with_python3; use_python3="$withval" +else + use_python3=auto +fi + +# no, old, yes +python3_found=no +if test "x$use_python3" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: testing" >&5 +$as_echo "testing" >&6; } + # Try to find Python 3 interpreter: + for ac_prog in python3.6 python3.5 python3 python +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON3+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON3 in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON3="$PYTHON3" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON3="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON3=$ac_cv_path_PYTHON3 +if test -n "$PYTHON3"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 +$as_echo "$PYTHON3" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PYTHON3" && break +done +test -n "$PYTHON3" || PYTHON3="no" + + if test "x$PYTHON3" != xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON3 version is >= 3.5" >&5 +$as_echo_n "checking whether $PYTHON3 version is >= 3.5... " >&6; } + python3_found=old + __vk_tmp=`${PYTHON3} -c 'import sys; sys.stdout.write(repr(sys.version_info.major))'`; __vk_ec=$? + test x$__vk_ec = x0 || __vk_tmp=0 + if test $__vk_tmp -ge 3; then + __vk_tmp=`${PYTHON3} -c 'import sys; sys.stdout.write(repr(sys.version_info.minor))'`; __vk_ec=$? + test x$__vk_ec = x0 || __vk_tmp=0 + if test $__vk_tmp -ge 5; then + python3_found=yes + fi + fi + if test x$python3_found = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + elif test x$__vk_tmp = x0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } + fi + fi + __vk_tmp="" + case x$python3_found in + xold) + __vk_tmp="Python 3.5 or later" + ;; + xno) + __vk_tmp="Python 3 interpreter" + ;; + esac + if test "x$__vk_tmp" = x; then + # Extract the first word of "python3-config", so it can be a program name with args. +set dummy python3-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON3_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON3_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON3_CONFIG="$PYTHON3_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON3_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PYTHON3_CONFIG" && ac_cv_path_PYTHON3_CONFIG="no" + ;; +esac +fi +PYTHON3_CONFIG=$ac_cv_path_PYTHON3_CONFIG +if test -n "$PYTHON3_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_CONFIG" >&5 +$as_echo "$PYTHON3_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x${PYTHON3_CONFIG}" = xno; then + __vk_tmp=python3-config + fi + fi + if test "x$__vk_tmp" != x; then + if test "x$use_python3" = xyes; then + as_fn_error $? "$__vk_tmp is required but not installed" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $__vk_tmp is not found - Python 3 bindings will not be created" >&5 +$as_echo "$as_me: WARNING: $__vk_tmp is not found - Python 3 bindings will not be created" >&2;} + fi + else + # PYTHON3_VERSION: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON3 version" >&5 +$as_echo_n "checking for $PYTHON3 version... " >&6; } + PYTHON3_VERSION=`${PYTHON3} -c "import sys; sys.stdout.write(sys.version[:3])"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_VERSION" >&5 +$as_echo "$PYTHON3_VERSION" >&6; } + + # PYTHON3_PREFIX: + PYTHON3_PREFIX='${prefix}' + + # PYTHON3_EXEC_PREFIX: + PYTHON3_EXEC_PREFIX='${exec_prefix}' + + # PYTHON3_PLATFORM: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON3 platform" >&5 +$as_echo_n "checking for $PYTHON3 platform... " >&6; } + PYTHON3_PLATFORM=`${PYTHON3} -c "import sys; sys.stdout.write(sys.platform)"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_PLATFORM" >&5 +$as_echo "$PYTHON3_PLATFORM" >&6; } + + # python3dir, pkgpython3dir: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON3 script directory" >&5 +$as_echo_n "checking for $PYTHON3 script directory... " >&6; } + PYTHON3_PYTHONDIR=`${PYTHON3} -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0, 0, prefix='$PYTHON3_PREFIX'))"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_PYTHONDIR" >&5 +$as_echo "$PYTHON3_PYTHONDIR" >&6; } + python3dir=$PYTHON3_PYTHONDIR + + pkgpython3dir=\${python3dir}/$PACKAGE + + # py3execdir, pkgpy3execdir: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON3 extension module directory" >&5 +$as_echo_n "checking for $PYTHON3 extension module directory... " >&6; } + PYTHON3_PYEXECDIR=`${PYTHON3} -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1, 0, prefix='$PYTHON3_EXEC_PREFIX'))"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_PYEXECDIR" >&5 +$as_echo "$PYTHON3_PYEXECDIR" >&6; } + py3execdir=$PYTHON3_PYEXECDIR + + pkgpy3execdir=\${py3execdir}/$PACKAGE + + # PYTHON3_{INCLUDES,CFLAGS,LIBS,LDFLAGS} + PYTHON3_INCLUDES=`${PYTHON3_CONFIG} --includes 2> /dev/null` + PYTHON3_CFLAGS=`${PYTHON3_CONFIG} --cflags 2> /dev/null` + PYTHON3_LIBS=`${PYTHON3_CONFIG} --libs 2> /dev/null` + PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags 2> /dev/null` + + + + + fi +fi + if test x$python3_found = xyes; then + HAVE_PYTHON3_TRUE= + HAVE_PYTHON3_FALSE='#' +else + HAVE_PYTHON3_TRUE='#' + HAVE_PYTHON3_FALSE= +fi # Extract the first word of "gpg2", so it can be a program name with args. @@ -15473,7 +15825,7 @@ $as_echo "$enable_Werror" >&6; } fi -ac_config_files="$ac_config_files Makefile po/Makefile.in" +ac_config_files="$ac_config_files Makefile contrib/Makefile doc/Makefile lib/Makefile po/Makefile.in python/Makefile python/python/Makefile python/python3/Makefile src/Makefile tests/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -15608,6 +15960,14 @@ as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PYTHON3_TRUE}" && test -z "${HAVE_PYTHON3_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PYTHON3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -16005,7 +16365,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by volume_key $as_me 0.3.10, which was +This file was extended by volume_key $as_me 0.3.12, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16072,7 +16432,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -volume_key config.status 0.3.10 +volume_key config.status 0.3.12 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16496,7 +16856,15 @@ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "python/python/Makefile") CONFIG_FILES="$CONFIG_FILES python/python/Makefile" ;; + "python/python3/Makefile") CONFIG_FILES="$CONFIG_FILES python/python3/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff -Nru volume-key-0.3.10/configure.ac volume-key-0.3.12/configure.ac --- volume-key-0.3.10/configure.ac 2018-05-21 08:28:25.000000000 +0000 +++ volume-key-0.3.12/configure.ac 2018-10-08 11:24:58.000000000 +0000 @@ -1,8 +1,8 @@ # Process this file with autoconf to produce a configure script. -AC_INIT([volume_key], [0.3.10], [https://pagure.io/volume_key], , +AC_INIT([volume_key], [0.3.12], [https://pagure.io/volume_key], , [https://pagure.io/volume_key]) AC_COPYRIGHT( -[Copyright (C) 2009, 2010 Red Hat, Inc. All rights reserved. +[Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU General Public License v.2. @@ -23,13 +23,165 @@ AC_CONFIG_AUX_DIR([admin]) AM_INIT_AUTOMAKE([no-dist-gzip dist-xz no-define subdir-objects -Wall]) -# Checks for programs. +########################## +## Checks for programs. ## +########################## + AC_PROG_CC AM_PROG_CC_C_O AM_PROG_AR LT_INIT([disable-static]) -AC_PATH_PROGS(PYTHON, python2.7 python2.6 python2 python, [Python is required]) -AM_PATH_PYTHON([2.6], [], AC_MSG_ERROR([Python 2.6 or 2.7 is required])) + +## +# Check whether to create Python bindings. +withval="" +AC_MSG_CHECKING([whether to create Python 2 bindings]) +AC_ARG_WITH([python], +AS_HELP_STRING([--with-python], [enable building Python 2 bindings]), +[use_python="$withval"], +[use_python=auto]) +# no, old, yes +python_found=no +if test "x$use_python" = xno; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([testing]) + # Try to find Python 2 interpreter: + AC_PATH_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2.4 python], [no]) + if test "x$PYTHON" != xno; then + # We have Python 2 interpreter, check its version: + AM_PATH_PYTHON([2.4], [python_found=yes], [python_found=old]) + fi + __vk_tmp="" + case x$python_found in + xold) + __vk_tmp="Python 2.4 or later" + ;; + xno) + __vk_tmp="Python 2 interpreter" + ;; + esac + if test "x$__vk_tmp" = x; then + AC_PATH_PROG([PYTHON_CONFIG], [python2-config python-config], [no]) + if test "x${PYTHON_CONFIG}" = xno; then + __vk_tmp=python2-config + fi + fi + if test "x$__vk_tmp" != x; then + if test "x$use_python" = xyes; then + AC_MSG_ERROR([$__vk_tmp is required but not installed]) + else + AC_MSG_WARN([$__vk_tmp is not found - Python 2 bindings will not be created]) + fi + else + PYTHON_INCLUDES=`${PYTHON_CONFIG} --includes 2> /dev/null` + PYTHON_CFLAGS=`${PYTHON_CONFIG} --cflags 2> /dev/null` + PYTHON_LIBS=`${PYTHON_CONFIG} --libs 2> /dev/null` + PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2> /dev/null` + AC_SUBST([PYTHON_INCLUDES]) + AC_SUBST([PYTHON_CFLAGS]) + AC_SUBST([PYTHON_LIBS]) + AC_SUBST([PYTHON_LDFLAGS]) + fi +fi +AM_CONDITIONAL([HAVE_PYTHON], [test x$python_found = xyes]) + +## +# Check whether to create Python 3 bindings. +withval="" +AC_MSG_CHECKING([whether to use Python 3 bindings]) +AC_ARG_WITH([python3], +AS_HELP_STRING([--with-python3], [enable building Python 3 bindings]), +[use_python3="$withval"], +[use_python3=auto]) +# no, old, yes +python3_found=no +if test "x$use_python3" = xno; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([testing]) + # Try to find Python 3 interpreter: + AC_PATH_PROGS([PYTHON3], [python3.6 python3.5 python3 python], [no]) + if test "x$PYTHON3" != xno; then + AC_MSG_CHECKING([whether $PYTHON3 version is >= 3.5]) + python3_found=old + __vk_tmp=`${PYTHON3} -c 'import sys; sys.stdout.write(repr(sys.version_info.major))'`; __vk_ec=$? + test x$__vk_ec = x0 || __vk_tmp=0 + if test $__vk_tmp -ge 3; then + __vk_tmp=`${PYTHON3} -c 'import sys; sys.stdout.write(repr(sys.version_info.minor))'`; __vk_ec=$? + test x$__vk_ec = x0 || __vk_tmp=0 + if test $__vk_tmp -ge 5; then + python3_found=yes + fi + fi + if test x$python3_found = xyes; then + AC_MSG_RESULT([yes]) + elif test x$__vk_tmp = x0; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([error]) + fi + fi + __vk_tmp="" + case x$python3_found in + xold) + __vk_tmp="Python 3.5 or later" + ;; + xno) + __vk_tmp="Python 3 interpreter" + ;; + esac + if test "x$__vk_tmp" = x; then + AC_PATH_PROG([PYTHON3_CONFIG], [python3-config], [no]) + if test "x${PYTHON3_CONFIG}" = xno; then + __vk_tmp=python3-config + fi + fi + if test "x$__vk_tmp" != x; then + if test "x$use_python3" = xyes; then + AC_MSG_ERROR([$__vk_tmp is required but not installed]) + else + AC_MSG_WARN([$__vk_tmp is not found - Python 3 bindings will not be created]) + fi + else + # PYTHON3_VERSION: + AC_MSG_CHECKING([for $PYTHON3 version]) + PYTHON3_VERSION=`${PYTHON3} -c "import sys; sys.stdout.write(sys.version[[:3]])"` + AC_MSG_RESULT([$PYTHON3_VERSION]) + AC_SUBST([PYTHON3_VERSION]) + # PYTHON3_PREFIX: + AC_SUBST([PYTHON3_PREFIX], ['${prefix}']) + # PYTHON3_EXEC_PREFIX: + AC_SUBST([PYTHON3_EXEC_PREFIX], ['${exec_prefix}']) + # PYTHON3_PLATFORM: + AC_MSG_CHECKING([for $PYTHON3 platform]) + PYTHON3_PLATFORM=`${PYTHON3} -c "import sys; sys.stdout.write(sys.platform)"` + AC_MSG_RESULT([$PYTHON3_PLATFORM]) + AC_SUBST([PYTHON3_PLATFORM]) + # python3dir, pkgpython3dir: + AC_MSG_CHECKING([for $PYTHON3 script directory]) + PYTHON3_PYTHONDIR=`${PYTHON3} -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0, 0, prefix='$PYTHON3_PREFIX'))"` + AC_MSG_RESULT([$PYTHON3_PYTHONDIR]) + AC_SUBST([python3dir], [$PYTHON3_PYTHONDIR]) + AC_SUBST([pkgpython3dir], [\${python3dir}/$PACKAGE]) + # py3execdir, pkgpy3execdir: + AC_MSG_CHECKING([for $PYTHON3 extension module directory]) + PYTHON3_PYEXECDIR=`${PYTHON3} -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1, 0, prefix='$PYTHON3_EXEC_PREFIX'))"` + AC_MSG_RESULT([$PYTHON3_PYEXECDIR]) + AC_SUBST([py3execdir], [$PYTHON3_PYEXECDIR]) + AC_SUBST([pkgpy3execdir], [\${py3execdir}/$PACKAGE]) + # PYTHON3_{INCLUDES,CFLAGS,LIBS,LDFLAGS} + PYTHON3_INCLUDES=`${PYTHON3_CONFIG} --includes 2> /dev/null` + PYTHON3_CFLAGS=`${PYTHON3_CONFIG} --cflags 2> /dev/null` + PYTHON3_LIBS=`${PYTHON3_CONFIG} --libs 2> /dev/null` + PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags 2> /dev/null` + AC_SUBST([PYTHON3_INCLUDES]) + AC_SUBST([PYTHON3_CFLAGS]) + AC_SUBST([PYTHON3_LIBS]) + AC_SUBST([PYTHON3_LDFLAGS]) + fi +fi +AM_CONDITIONAL([HAVE_PYTHON3], [test x$python3_found = xyes]) AC_PATH_PROG([GPG], [gpg2]) AC_ARG_VAR([GPG]) @@ -92,5 +244,5 @@ fi dnl po/Makefile -AC_CONFIG_FILES([Makefile po/Makefile.in]) +AC_CONFIG_FILES([Makefile contrib/Makefile doc/Makefile lib/Makefile po/Makefile.in python/Makefile python/python/Makefile python/python3/Makefile src/Makefile tests/Makefile]) AC_OUTPUT diff -Nru volume-key-0.3.10/contrib/email/escrow-receive volume-key-0.3.12/contrib/email/escrow-receive --- volume-key-0.3.10/contrib/email/escrow-receive 2018-05-17 10:17:22.000000000 +0000 +++ volume-key-0.3.12/contrib/email/escrow-receive 2018-07-13 15:32:22.000000000 +0000 @@ -1,8 +1,9 @@ -#!/usr/bin/python2 -# -# A simple utility to receive volume_key escrow packets via e-mail +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# A simple utility to receive volume_key escrow packets via e-mail. # # Copyright (C) 2010 Marko Myllynen +# Copyright (C) 2018 Jiří Kučera # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -16,6 +17,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, see . +# +"""A simple utility to receive volume_key escrow packets via e-mail""" import datetime import smtplib @@ -24,78 +27,138 @@ import email import sys import os +import argparse -from email.MIMEText import MIMEText +from email.mime.text import MIMEText -MAX_EMAIL_SIZE = 4096 -SMTP_SERVER = "localhost" -ADMIN_EMAIL = "root@localhost.localdomain" -ESCROW_DIR = "/var/local/escrows" -LOG = "/var/log/escrow.log" - -checksum = escrow = sender = None -log = open(LOG, 'a') -now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") - -# Read in and process the received email escrow packet -log.write("INFO: Starting to process an email escrow packet on " + now + "\n") -msg = email.message_from_string(sys.stdin.read(MAX_EMAIL_SIZE)) -if msg.is_multipart(): - for part in msg.walk(): - # Parse packet source information from the message body - if not part.get('Content-Disposition'): - for line in str(part.get_payload()).split('\n'): - if "MD5 checksum: " in line: - checksum = line.split("MD5 checksum: ")[-1] - if "packet from: " in line: - sender = line.split("packet from: ")[-1] - # Save the escrow packet - else: - if not sender: - continue - escrow = ESCROW_DIR + "/" + sender.replace("/", "_") + "-" + now.replace(" ", "-") - os.umask(0266) - f = open(escrow, 'wb') - f.write(base64.b64decode(part.get_payload())) - f.close() - -if checksum is None or escrow is None or sender is None: - log.write("ERROR: Malformed email escrow packet received.\n") - now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") - log.write("INFO: Processing completed on " + now + "\n") - log.close() - sys.exit(1) - -# Verify packet checksum -checksum_ok = checksum == hashlib.md5(file(escrow).read()).hexdigest() -if checksum_ok: - reply = "Your backup passphrase has been successfully received.\n" - reply = reply + "\nYou should now remove the escrow packet file from your computer.\n" - status = "-VALID-PACKET" - log.write("INFO: Received valid escrow packet from " + sender + "\n") -else: - reply = "Error receiving your backup passphrase packet!\n" - status = "-CHECKSUM-ERROR" - log.write("WARNING: Received invalid email escrow packet from " + sender + "\n") - log.write("WARNING: Marking escrow packet invalid: " + escrow + "\n") - -# Inform the sender -msg = MIMEText(reply) -msg['Subject'] = reply.split('\n')[0] -msg['From'] = ADMIN_EMAIL -msg['To'] = sender -s = smtplib.SMTP(SMTP_SERVER) -try: - s.sendmail(ADMIN_EMAIL, sender, msg.as_string()) +reply_backup_rcv_ok = """\ +Your backup passphrase has been successfully received. + +You should now remove the escrow packet file from your computer. +""" +reply_backup_rcv_error = """\ +Error receiving your backup passphrase packet! +""" + +checksum = None +escrow = None +sender = None + +bye = sys.exit + +def tostr(s): + if isinstance(s, str): + return s + elif isinstance(s, bytes): + return str(s, encoding='latin') + return str(s) + +def now(): + return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + +def wrapwrite(f): + def p(fmt, *args): + f.write("{}\n".format(fmt.format(*args))) + return p + +def parse_args(): + parser = argparse.ArgumentParser(description=__doc__, allow_abbrev=False) + parser.add_argument( + "-s", "--size", metavar="N", + type=int, default=4096, + help="maximal size of e-mail (in bytes)" + ) + parser.add_argument( + "-H", "--host", metavar="HOST[:PORT]", + default="localhost", + help="set the SMTP host" + ) + parser.add_argument( + "-a", "--admin", metavar="EMAIL", + default="root@localhost.localdomain", + help="set the admin e-mail" + ) + parser.add_argument( + "-d", "--escrow-dir", metavar="PATH", dest="escrow_dir", + default="/var/local/escrows", + help="set the directory for the received escrow packets" + ) + parser.add_argument( + "-l", "--log", metavar="LOGFILE", + default="/var/log/escrow.log", + help="set the path to the log file" + ) + return parser.parse_args() + +args = parse_args() +MAX_EMAIL_SIZE = args.size +SMTP_SERVER = args.host +ADMIN_EMAIL = args.admin +ESCROW_DIR = args.escrow_dir +LOG = args.log + +tt_sender = str.maketrans("/ ", "__", "<>") +tt_time = str.maketrans("/ :", "---", "<>") + +with open(LOG, 'a') as l: + log = wrapwrite(l) + # Read in and process the received email escrow packet + log("INFO: Starting to process an email escrow packet on {}", now()) + msg = email.message_from_string(sys.stdin.read(MAX_EMAIL_SIZE)) + if msg.is_multipart(): + for part in msg.walk(): + # Parse packet source information from the message body + if not part.get('Content-Disposition'): + for line in tostr(part.get_payload()).split('\n'): + if "MD5 checksum: " in line: + checksum = line.split("MD5 checksum: ")[-1] + if "packet from: " in line: + sender = line.split("packet from: ")[-1] + # Save the escrow packet + else: + if not sender: + continue + escrow = "{}/{}-{}".format( + ESCROW_DIR, + sender.translate(tt_sender), now().translate(tt_time) + ) + os.umask(0o266) + with open(escrow, 'wb') as f: + f.write(base64.b64decode(part.get_payload())) + + if checksum is None or escrow is None or sender is None: + log("ERROR: Malformed email escrow packet received.") + log("INFO: Processing completed on {}", now()) + bye(1) + + # Verify packet checksum + with open(escrow, 'rb') as f: + checksum_ok = checksum == hashlib.md5(f.read()).hexdigest() if checksum_ok: - log.write("INFO: Marking escrow packet valid: " + escrow + "\n") -except smtplib.SMTPRecipientsRefused: - log.write("WARNING: Invalid escrow packet sender: " + sender + "\n") - log.write("WARNING: Marking escrow packet invalid: " + escrow + "\n") - status = status + "-UNKNOWN-SENDER" -s.quit() - -os.rename(escrow, escrow + status) -now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") -log.write("INFO: Processing completed on " + now + "\n") -log.close() + reply = reply_backup_rcv_ok + status = "-VALID-PACKET" + log("INFO: Received valid escrow packet from {}", sender) + else: + reply = reply_backup_rcv_error + status = "-CHECKSUM-ERROR" + log("WARNING: Received invalid email escrow packet from {}", sender) + log("WARNING: Marking escrow packet invalid: {}", escrow) + + # Inform the sender + msg = MIMEText(reply) + msg['Subject'] = reply.split('\n')[0] + msg['From'] = ADMIN_EMAIL + msg['To'] = sender + s = smtplib.SMTP(SMTP_SERVER) + try: + s.sendmail(ADMIN_EMAIL, sender, msg.as_string()) + if checksum_ok: + log("INFO: Marking escrow packet valid: {}", escrow) + except smtplib.SMTPRecipientsRefused: + log("WARNING: Invalid escrow packet sender: {}", sender) + log("WARNING: Marking escrow packet invalid: {}", escrow) + status += "-UNKNOWN-SENDER" + s.quit() + + os.rename(escrow, escrow + status) + log("INFO: Processing completed on {}", now()) diff -Nru volume-key-0.3.10/contrib/email/escrow-transit volume-key-0.3.12/contrib/email/escrow-transit --- volume-key-0.3.10/contrib/email/escrow-transit 2018-05-17 10:17:22.000000000 +0000 +++ volume-key-0.3.12/contrib/email/escrow-transit 2018-07-16 21:01:35.000000000 +0000 @@ -1,8 +1,10 @@ -#!/usr/bin/python2 +#!/usr/bin/python3 +# -*- coding: utf-8 -*- # # A simple utility to tranfer volume_key escrow packets to a server # # Copyright (C) 2010 Marko Myllynen +# Copyright (C) 2018 Jiří Kučera # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -16,222 +18,388 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, see . +# +"""A simple utility to tranfer volume_key escrow packets to a server""" import subprocess -import optparse +import argparse import smtplib import hashlib import string import random import base64 -import shlex import sys import os +import io -from email import Encoders -from email.MIMEBase import MIMEBase -from email.MIMEText import MIMEText -from email.MIMEMultipart import MIMEMultipart +from email.encoders import encode_base64 +from email.mime.base import MIMEBase +from email.mime.text import MIMEText +from email.mime.multipart import MIMEMultipart # Script version VERSION = "0.1" # Configuration MAIL_RECIP = "escrow@localhost.localdomain" -SMTP_SERVER = "localhost" +SMTP_SERVER = "localhost.com" ESCROW_DIR = "/root" # Rudimentary intranet connectivity check against a host, None to disable TEST_HOST_CONN = "intra.example.com" #TEST_HOST_CONN = None +me = os.path.basename(sys.argv[0]) +here = os.path.dirname(os.path.realpath(__file__)) +bye = sys.exit + +def tostr(s): + if isinstance(s, str): + return s + elif isinstance(s, bytes): + return str(s, encoding='latin') + return str(s) + +def fwrite(f, nl, fmt, *args): + f.write(fmt.format(*args)) + if nl: + f.write('\n') + else: + f.flush() + +def wout(fmt, *args): + fwrite(sys.stdout, False, fmt, *args) + +def pout(fmt, *args): + fwrite(sys.stdout, True, fmt, *args) + +def perr(fmt, *args): + fwrite(sys.stderr, True, fmt, *args) + +def error(ec, fmt, *args): + perr(fmt, *args) + bye(ec) + # Command line parser def parse_cmd_line(): """Parse command line arguments""" - usage = "%prog <-c CERT|-f PACKET> [options]" - parser = optparse.OptionParser(usage) - parser.disable_interspersed_args() - parser.description = "A simple utility to tranfer volume_key escrow packets to a server" - parser.add_option("-V", "--version", dest="version", - action="store_const", const=1, default=0, - help="show program's version number and exit") - parser.add_option("-v", "--verbose", dest="verbose", - action="store_const", const=1, default=0, - help="verbose execution") - parser.add_option("-c", "--public-cert", dest="cert", - help="public certificate file to create a new packet") - parser.add_option("-f", "--use-file", dest="file", - help="use an existing escrow packet file") - parser.add_option("-r", "--mail-recipient", dest="recip", - action="store", type="string", default=MAIL_RECIP, - help="mail recipient, default: " + MAIL_RECIP) - parser.add_option("-s", "--mail-sender", dest="sender", - help="e-mail sender") - parser.add_option("-x", "--remove-files", dest="remove", - action="store_const", const=1, default=0, - help="remove all used files after successful execution") - parser.add_option("-y", "--assume-yes", dest="all_yes", - action="store_const", const=1, default=0, - help="non-interactive mode, no confirmations asked") - return parser.parse_args() + + parser = argparse.ArgumentParser(description=__doc__, allow_abbrev=False) + parser.add_argument( + "-V", "--version", dest="version", + action="store_const", const=1, default=0, + help="show program's version number and exit" + ) + parser.add_argument( + "-v", "--verbose", dest="verbose", + action="store_const", const=1, default=0, + help="verbose execution" + ) + parser.add_argument( + "-b", "--batch", dest="batch", + action="store_const", const=1, default=0, + help="run as batch (including underlying programs), invert -y" + ) + parser.add_argument( + "-c", "--public-cert", metavar="FILE", dest="cert", + default="", + help="public certificate file to create a new packet" + ) + parser.add_argument( + "-f", "--use-file", metavar="FILE", dest="file", + default="", + help="use an existing escrow packet file" + ) + parser.add_argument( + "-r", "--mail-recipient", metavar="ADDRESS", dest="recip", + default=MAIL_RECIP, + help="mail recipient, default: {}".format(MAIL_RECIP) + ) + parser.add_argument( + "-s", "--mail-sender", metavar="ADDRESS", dest="sender", + default="", + help="e-mail sender" + ) + parser.add_argument( + "-x", "--remove-files", dest="remove", + action="store_const", const=1, default=0, + help="remove all used files after successful execution" + ) + parser.add_argument( + "-y", "--assume-yes", dest="all_yes", + action="store_const", const=1, default=0, + help="non-interactive mode, no confirmations asked" + ) + parser.add_argument( + "-p", "--fs-prefix", metavar="PATH_PREFIX", dest="fs_prefix", + default="", + help="prefix of /proc and /dev (allow testing)" + ) + parser.add_argument( + "-H", "--smtp-host", metavar="HOST[:PORT]", dest="smtp_host", + default=SMTP_SERVER, + help="SMTP server address, default: {}".format(SMTP_SERVER) + ) + parser.add_argument( + "-I", "--intranet-host", metavar="HOST[:PORT]", dest="intranet_host", + default=TEST_HOST_CONN, + help="host to which the connectivity is checked against, default: {}" \ + .format(repr(TEST_HOST_CONN)) + ) + parser.add_argument( + "-d", "--escrow-dir", metavar="PATH", dest="escrow_dir", + default=ESCROW_DIR, + help="directory the escrow packets are written to, default: {}" \ + .format(ESCROW_DIR) + ) + parser.add_argument( + "--only-stdout", dest="only_stdout", + action="store_const", const=1, default=0, + help="all messages goes to stdout" + ) + parser.add_argument( + 'args', nargs=argparse.REMAINDER, help=argparse.SUPPRESS + ) + return parser.parse_known_args() + +def get_host_and_port(host, port): + i = host.rfind(':') + if i < 0: + return host, port + return host[:i], int(host[i + 1:]) # Check connectivity to a host def host_conn_check(host): import socket try: - socket.getaddrinfo(host, 80, 0, 0, socket.SOL_TCP) + host, port = get_host_and_port(host, 80) + socket.getaddrinfo(host, port, 0, 0, socket.SOL_TCP) return True except: return False -# Get and verify an email address -def get_verify_email(default, suggestion=None, id=None, all_yes=False, verbose=False): - if id: id = " " + id + " " - else: id = " " +def yes_or_no_or_cancel(prompt): + info = "" + while True: + answer = input("{}{} ([y]es/[n]o/[c]ancel) ".format(info, prompt)) + info = "" + if not answer: + continue + if answer[0] in ('y', 'n', 'c'): + return answer[0] + info = "Incorrect answer {}. ".format(repr(answer)) + +def get_and_verify_email_address( + default, host, suggestion=None, side=None, all_yes=False, verbose=False +): + side = " {} ".format(side) if side else " " email = None - if default and not suggestion: + if suggestion: + email = suggestion + if email is None and default: email = default - while not email: - if suggestion: - email = suggestion - suggestion = None - else: - email = raw_input("Please enter" + id + "e-mail address:\n") - if not all_yes: - accept = raw_input("Using" + id + "address '" + email + "' - is this ok? (y/n) ") - if accept != "y": - email = None - - s = smtplib.SMTP(SMTP_SERVER) - s.putcmd("vrfy", email) - reply = s.getreply()[0] - s.quit() - if not (reply == 250 or reply == 251 or reply == 252): - print >> sys.stderr, email + ": verification failed - address unknown." - return None - - if verbose: print "Tentatively verified" + id + "address " + email + "." - + all_yes_ = all_yes + while True: + while not email: + email = input("Please enter{}e-mail address: ".format(side)) + answer = 'y' if all_yes_ else yes_or_no_or_cancel( + "Using{}address '{}' - is this ok?".format(side, email) + ) + all_yes_ = all_yes + if answer == "n": + email = None + continue + elif answer == "c": + return None + # Answer is yes. + with smtplib.SMTP(host) as server: + reply = server.verify(email) + if reply[0] not in (250, 251, 252): + perr("{} reply: {} {}", host, reply[0], tostr(reply[1])) + perr("{}: verification failed - address unknown.", email) + # e-mail address was invalid, prompt the user for another one; + # we clear all_yes temporarily to get the user chance to quit the + # endless loop in the case the SMTP server has "deny everyone" + # policy + all_yes_ = False + email = None + continue + if verbose: + pout("Tentatively verified{}address {}.", side, email) + break return email # Get the LUKS partition -def get_luks_partition(): +def get_luks_partition(p, verbose=False): luks_parts = [] - for part in open('/proc/partitions', 'r').readlines(): + with open('{}/proc/partitions'.format(p), 'r') as f: + lines = f.readlines() + for part in lines: if not part.strip() or "#blocks" in part: continue - dev = "/dev/" + part.strip().split()[-1] - if not os.access(dev, os.R_OK|os.W_OK): - print >> sys.stderr, "Only root can add new backup passphrases." - sys.exit(2) - cmd = "cryptsetup isLuks " + dev - r = subprocess.call(shlex.split(cmd), stdout=open('/dev/null', 'w'), stderr=subprocess.STDOUT) - if r == 0: + dev = "{}/dev/{}".format(p, part.strip().split()[-1]) + if not os.access(dev, os.R_OK | os.W_OK): + error(2, "Only root can add new backup passphrases.") + if subprocess.call( + ['cryptsetup', 'isLuks', dev], + stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT + ) == 0: luks_parts.append(dev) if len(luks_parts) == 0: - print >> sys.stderr, "No LUKS partitions detected." - sys.exit(2) + error(2, "No LUKS partitions detected.") if len(luks_parts) > 1: - print >> sys.stderr, "Multiple LUKS partitions detected." - if opts.verbose: print "Create the escrow packet(s) manually " \ - "with volume_key(1) and use the -f option." - sys.exit(2) + perr("Multiple LUKS partitions detected.") + if verbose: + pout( + "Create the escrow packet(s) manually " \ + "with volume_key(1) and use the -f option." + ) + bye(2) return luks_parts[0] # Main def main(): """A simple utility to tranfer volume_key escrow packets to a server""" - (opts, args) = parse_cmd_line() + opts, args = parse_cmd_line() + + if opts.only_stdout: + sys.stderr = sys.stdout + if opts.batch: + opts.all_yes = 1 - opts.all_yes if opts.version: - print os.path.basename(sys.argv[0]) + " " + VERSION - sys.exit(0) + pout("{} {}", me, VERSION) + bye(0) - if len(args) > 0 or \ - (opts.file and opts.cert) or \ - (not opts.file and not opts.cert): - print >> sys.stderr, os.path.basename(sys.argv[0]) + ": use -h for help" - sys.exit(1) + if len(args) > 0 or ((not opts.file) is (not opts.cert)): + error(1, "{}: use -h for help", me) # Test intranet connectivity against the defined host - if TEST_HOST_CONN is not None: - if opts.verbose: print "Testing intranet connectivity against " + TEST_HOST_CONN + "... ", - sys.stdout.flush() - if not host_conn_check(TEST_HOST_CONN): - if opts.verbose: print "failed." - print "You must be connected to intranet in order to use this tool." - sys.exit(1) - if opts.verbose: print "ok." + if opts.intranet_host: + if opts.verbose: + wout("Testing intranet connectivity against {}... ", + opts.intranet_host + ) + if not host_conn_check(opts.intranet_host): + if opts.verbose: + pout("failed.") + pout( + "You must be connected to intranet in order to use this tool." + ) + bye(1) + if opts.verbose: + pout("ok.") # Set sender email address - sender = None - while not sender: - sender = get_verify_email(sender, opts.sender, "sender", opts.all_yes, opts.verbose) + sender = get_and_verify_email_address( + None, opts.smtp_host, opts.sender, "sender", + opts.all_yes, opts.verbose + ) + if not sender: + error(1, "{}: missing sender e-mail address (canceled by user)", me) # Set recipient address - recipient = None - while not recipient: - recipient = get_verify_email(MAIL_RECIP, opts.recip, "recipient", opts.all_yes, opts.verbose) + recipient = get_and_verify_email_address( + MAIL_RECIP, opts.smtp_host, opts.recip, "recipient", + opts.all_yes, opts.verbose + ) + if not recipient: + error(1, "{}: missing recipient e-mail address (canceled by user)", me) escrow = None # Use the specified escrow file if opts.file: - open(opts.file, 'rb').close() + with open(opts.file, 'rb'): + pass escrow = opts.file else: # Create a new backup passphrase escrow file - part = get_luks_partition() - escrow = ESCROW_DIR + "/escrow" + part.replace("/", "-") + "-backup-passphrase" - escrow = escrow + "-" + "".join(random.sample(string.letters+string.digits, 6)) - - print "About to add a random backup passphrase to LUKS partition " + part + "." - open(opts.cert, 'rb').close() + part = get_luks_partition(opts.fs_prefix, opts.verbose) + escrow = "{}/escrow{}-backup-passphrase-{}".format( + opts.escrow_dir, part.replace("/", "-"), + "".join(random.sample(string.ascii_letters + string.digits, 6)) + ) + pout( + "About to add a random backup passphrase to LUKS partition {}.", + part + ) + with open(opts.cert, 'rb'): + pass accept = "y" if not opts.all_yes: - accept = raw_input("Is this ok? (y/n) ") + accept = input("Is this ok? (y/n) ") if accept != "y": - if opts.verbose: print "Operation aborted." - sys.exit(3) + if opts.verbose: + pout("Operation aborted.") + bye(3) # Add a random backup passphrase to the LUKS device - print "Current passphrase for " + part + " needed to unlock the device." - cmd = "volume_key --save " + part + " -c " + opts.cert + " --create-random-passphrase " + escrow + " --output-format asymmetric" - r = subprocess.call(shlex.split(cmd)) - if r != 0: - print >> sys.stderr, "Operation failed." - sys.exit(4) - if opts.verbose: print "Random passphrase has been successfully added to " + part + "." - print "Encrypted packet stored at " + escrow + "." + pout("Current passphrase for {} needed to unlock the device.", part) + command = ['volume_key'] + kwargs = {} + if opts.batch: + command.append('--batch') + # jkucera: extract passphrase from stdin manually; constructions + # like `subprocess.call(command)` or + # `subprocess.call(command, stdin=...)` makes volume_key + # complaining about missing passphrase + idata = "" + while True: + idata += sys.stdin.read(1) + if not idata or idata[-1] == '\0': + break + kwargs = dict(input=bytes(idata, encoding=sys.stdin.encoding)) + command.extend([ + '--save', part, + '-c', opts.cert, + '--create-random-passphrase', escrow, + '--output-format', 'asymmetric' + ]) + if subprocess.run(command, **kwargs).returncode != 0: + error(4, "Operation failed.") + if opts.verbose: + pout("Random passphrase has been successfully added to {}.", part) + pout("Encrypted packet stored at {}.", escrow) # Read in the escrow packet as a base64 encoded binary attachment - if opts.verbose: print "Using escrow packet " + escrow + "." - fp = open(escrow, 'rb') - packet = MIMEBase('application', 'octet-stream') - packet.set_payload(fp.read()) - fp.close() - Encoders.encode_base64(packet) - packet.add_header('Content-Disposition', 'attachment; filename="%s"' % escrow) - md5_sum = hashlib.md5(file(escrow).read()).hexdigest() + if opts.verbose: + pout("Using escrow packet {}.", escrow) + with open(escrow, 'rb') as f: + packet = MIMEBase('application', 'octet-stream') + packet.set_payload(f.read()) + encode_base64(packet) + packet.add_header( + 'Content-Disposition', 'attachment; filename="{}"'.format(escrow) + ) + with open(escrow, 'rb') as f: + md5_sum = hashlib.md5(f.read()).hexdigest() # Prepare the transfer msg = MIMEMultipart() - msg['Subject'] = "Backup Passphrase Escrow Packet from " + sender + msg['Subject'] = "Backup Passphrase Escrow Packet from {}".format(sender) msg['From'] = sender msg['To'] = recipient - text = "Backup passphrase escrow packet from: %s" % sender - text = text + "\n\nPacket MD5 checksum: " + md5_sum + "\n" - msg.attach(MIMEText(text, 'plain')) + msg.attach(MIMEText( + "Backup passphrase escrow packet from: {}\n" \ + "\n" \ + "Packet MD5 checksum: {}\n".format(sender, md5_sum), + 'plain' + )) msg.attach(packet) # Transfer the packet rc = 0 - s = smtplib.SMTP(SMTP_SERVER) - for e in s.sendmail(sender, recipient, msg.as_string()): + s = smtplib.SMTP(opts.smtp_host) + # NOTE(jkucera): Always raise smtplib.SMTPRecipientsRefused for just one + # recipient which is refused. + try: + s.sendmail(sender, recipient, msg.as_string()) + except smtplib.SMTPRecipientsRefused: rc = 5 if rc == 0: - print "Escrow packet successfully sent to %s." % recipient + pout("Escrow packet successfully sent to {}.", recipient) s.quit() # Remove the packet if requested @@ -239,15 +407,18 @@ if opts.remove and rc == 0: accept = "y" if not opts.all_yes: - accept = raw_input("Removing escrow packet " + escrow + " - is this ok? (y/n) ") + accept = input( + "Removing escrow packet {} - is this ok? (y/n) ".format(escrow) + ) if accept != "y": - if opts.verbose: print "Escrow packet not removed." + if opts.verbose: + pout("Escrow packet not removed.") if accept == "y": os.unlink(escrow) removed = True - print "Escrow packet " + escrow + " removed." + pout("Escrow packet {} removed.", escrow) if rc == 0 and not removed and opts.verbose: - print "Remove the escrow packet after receiving confirmation e-mail." + pout("Remove the escrow packet after receiving confirmation e-mail.") # All done. sys.exit(rc) diff -Nru volume-key-0.3.10/contrib/email/tests/mailsrv.py volume-key-0.3.12/contrib/email/tests/mailsrv.py --- volume-key-0.3.10/contrib/email/tests/mailsrv.py 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/contrib/email/tests/mailsrv.py 2018-07-16 13:25:15.000000000 +0000 @@ -0,0 +1,125 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# Sink mail server. +# +# Copyright (C) 2018 Jiří Kučera +# +# 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, see . +# +"""Sink mail server""" + +import sys +import os +import argparse +import asyncore +import smtpd + +here = os.path.dirname(os.path.realpath(__file__)) +sys.path.insert(0, here) + +from sendpkt import parse_host as sendpkt_parse_host + +def error(ec, fmt, *args): + sys.stderr.write("{}\n".format(fmt.format(*args))) + sys.exit(ec) + +def parse_host(host): + try: + return sendpkt_parse_host(host) + except Exception as e: + error(1, "{}", e) + +def parse_args(argv): + parser = argparse.ArgumentParser(description=__doc__, allow_abbrev=False) + parser.add_argument( + "-b", "--banned", metavar='LIST', + default="", + help="comma-separated list of banned recipients" + ) + parser.add_argument( + "-B", "--ban-levels", metavar='LIST', dest="ban_levels", + default="rcpt", + help="comma-separated list of lowercase SMTP command names to which" \ + " the ban is applied to; supported commands are" \ + " 'vrfy', 'rcpt' and 'data'; default command is 'rcpt'" + ) + parser.add_argument( + "-s", "--sink", metavar='PATH', + default="email.msg", + help="the place all e-mails are thrown to" + ) + parser.add_argument( + "-d", "--debug", + action="store_true", default=False, + help="print the communication to stderr" + ) + parser.add_argument( + "host", metavar='HOST[:PORT]', nargs='?', + default="localhost:25", + help="local address" + ) + return parser.parse_args(args=argv) + +class BanningChannel(smtpd.SMTPChannel): + def smtp_VRFY(self, arg): + if arg and 'vrfy' in self.smtp_server.ban_levels_: + user, _ = self._getaddr(arg) + # Test if user is banned: + if user in self.smtp_server.banned_ \ + or user and user.split('@')[-1] in self.smtp_server.banned_: + self.push("550 user <{}> is banned".format(user)) + return + super().smtp_VRFY(arg) + def smtp_RCPT(self, arg): + rcpt = arg + if rcpt and 'rcpt' in self.smtp_server.ban_levels_: + rcpt = self._strip_command_keyword('TO:', rcpt) + rcpt, _ = self._getaddr(rcpt) + # Test if the recipient is banned: + if rcpt in self.smtp_server.banned_ \ + or rcpt and rcpt.split('@')[-1] in self.smtp_server.banned_: + self.push("554 banned recipient <{}>".format(rcpt)) + return + super().smtp_RCPT(arg) + +class SinkMailServer(smtpd.SMTPServer): + channel_class = BanningChannel + def __init__(self, sink, banned, ban_levels, *args, **kwargs): + self.sink_ = sink + self.banned_ = banned.split(",") + self.ban_levels_ = ban_levels.split(",") + super().__init__(*args, **kwargs) + def process_message(self, peer, mailfrom, rcpttos, data, **kwargs): + if 'data' in self.ban_levels_ and ( + mailfrom in self.banned_ \ + or mailfrom and mailfrom.split('@')[-1] in self.banned_ + ): + return "554 banned user <{}>".format(mailfrom) + with open(self.sink_, 'wb') as f: + f.write(data) + +def main(argv): + args = parse_args(argv) + if args.debug: + smtpd.DEBUGSTREAM = sys.stderr + server = SinkMailServer( + args.sink, args.banned, args.ban_levels, parse_host(args.host), None + ) + try: + asyncore.loop() + except KeyboardInterrupt: + pass + +if __name__ == '__main__': + main(sys.argv[1:]) diff -Nru volume-key-0.3.10/contrib/email/tests/sendpkt.py volume-key-0.3.12/contrib/email/tests/sendpkt.py --- volume-key-0.3.10/contrib/email/tests/sendpkt.py 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/contrib/email/tests/sendpkt.py 2018-07-13 12:11:52.000000000 +0000 @@ -0,0 +1,164 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# Send an escrow packet. +# +# Copyright (C) 2018 Jiří Kučera +# +# 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, see . +# +"""Send an escrow packet""" + +import sys +import os +import argparse +import hashlib +import smtplib +import email + +def wout(fmt, *args): + sys.stdout.write(fmt.format(*args)) + +def perror(fmt, *args): + sys.stderr.write("{}\n".format(fmt.format(*args))) + +def getemail(sender): + parts = [p for p in sender.split() if p] + if parts and parts[-1].startswith('<') and parts[-1].endswith('>'): + return parts[-1][1:-1] + return sender + +def parse_args(argv): + parser = argparse.ArgumentParser(description=__doc__, allow_abbrev=False) + parser.add_argument( + "-s", "--subject", metavar='SUBJECT', + default="Escrow packet", + help="a subject of e-mail" + ) + parser.add_argument( + "-f", "--from", metavar='SENDER', required=True, dest='sender', + help="an address of sender" + ) + parser.add_argument( + "-t", "--to", metavar='RECIPIENT', required=True, + action='append', default=[], dest='recipients', + help="addresses of recipients" + ) + parser.add_argument( + "-p", "--packet", metavar='PATH', required=True, + help="a path to file with escrow packet" + ) + parser.add_argument( + "-d", "--dump", + action='store_true', default=False, + help="dump e-mail to the file (do not send it); " \ + "if --output is not provided, use stdout" + ) + parser.add_argument( + "-o", "--output", metavar='PATH', + default="", + help="set the output for --dump (no output means stdout)" + ) + parser.add_argument( + "-b", "--binary", + action='store_true', default=False, + help="e-mail will be dumped as binary" + ) + parser.add_argument( + "-v", "--verbose", + action='store_true', default=False, + help="be verbose" + ) + parser.add_argument( + "-H", "--host", metavar="HOST[:PORT]", + default="localhost:25", + help="set the SMTP server host name and port" + ) + return parser.parse_args(args=argv) + +def parse_host(host): + h_p = host.split(':') + if len(h_p) == 1: + h_p.append('25') + assert len(h_p) == 2, "Invalid SMTP host ({}).".format(host) + h, p = h_p + assert len(h) > 0 and len(p) > 0, "Invalid SMTP host ({}).".format(host) + try: + p = int(p) + except ValueError: + raise Exception("Nonnumeric port ({}).".format(p)) + assert p >= 0, "Negative port ({}).".format(p) + return h, p + +def verify_args(args): + assert len(args.subject) > 0, "Missing subject." + assert len(args.sender) > 0, "Missing sender." + assert len(args.recipients) > 0, "No recipients." + assert len(args.packet) > 0, "Missing path to escrow packet file." + args.host = "{}:{}".format(*parse_host(args.host)) + +def main(argv): + try: + args = parse_args(argv) + verify_args(args) + msg = email.message.EmailMessage() + msg['Subject'] = args.subject + msg['From'] = args.sender + msg['To'] = ', '.join(args.recipients) + with open(args.packet, 'rb') as f: + data = f.read() + msg.set_content("packet from: {}\nMD5 checksum: {}\n".format( + getemail(args.sender), hashlib.md5(data).hexdigest() + )) + msg.add_attachment( + data, + maintype='application', + subtype='octet-stream', + filename=os.path.basename(args.packet) + ) + if args.dump: + mode = 'w' + if args.binary: + mode += 'b' + if len(args.output) > 0: + with open(args.output, mode) as f: + if args.binary: + f.write(msg.as_bytes()) + else: + f.write(msg.as_string()) + else: + sys.stdout.write(msg.as_string()) + else: + host, port = args.host.split(':') + try: + if args.verbose: + wout("Sending packet to {} (host: {})... ", + msg['To'], args.host + ) + with smtplib.SMTP(host=host, port=int(port)) as s: + s.send_message(msg) + if args.verbose: + wout("ok\n") + except: + if args.verbose: + wout("FAILED\n") + raise + except Exception as e: + perror("{}", repr(e)) + return 1 + except: + return 2 + return 0 + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) diff -Nru volume-key-0.3.10/contrib/email/tests/test-escrow-receive volume-key-0.3.12/contrib/email/tests/test-escrow-receive --- volume-key-0.3.10/contrib/email/tests/test-escrow-receive 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/contrib/email/tests/test-escrow-receive 2018-07-14 19:04:39.000000000 +0000 @@ -0,0 +1,285 @@ +#!/bin/bash +# +# A script that tests escrow-receive functionality. +# +# Copyright (C) 2018 Jiří Kučera +# +# 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, see . +# + +. $(dirname $0)/utest.sh + +initialize $0 + +SMTP_HOST=localhost +SMTP_PORT=2525 +LOCALADDR=$SMTP_HOST:$SMTP_PORT +export SMTP_HOST SMTP_PORT LOCALADDR + +SINK_FILE=$HERE/email$TEST_PID.msg +LOGFILE=$HERE/escrow.log +ESCROW_DIR=$HERE/escrows +TIME_LIMIT=5 +DATE_RE="[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2} [[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}" +export SINK_FILE LOGFILE ESCROW_DIR TIME_LIMIT DATE_RE + +COMPANY='company.com' +ADMIN_EMAIL="root@$COMPANY" +ALICE_EMAIL="alice@$COMPANY" +ALICE="Alice <$ALICE_EMAIL>" +BOB_EMAIL="bob@$COMPANY" +BOB="Bob <$BOB_EMAIL>" +BOB_PACKET_RE="$(re_escape $BOB_EMAIL)-[[:digit:]]{4}(-[[:digit:]][[:digit:]]){5}" +BOB_VALID_PACKET_RE="$BOB_PACKET_RE-VALID-PACKET" +BOB_VALID_PACKET_UNKNOWN_SENDER_RE="$BOB_VALID_PACKET_RE-UNKNOWN-SENDER" +BOB_CHECKSUM_ERROR_RE="$BOB_PACKET_RE-CHECKSUM-ERROR" +export COMPANY ADMIN_EMAIL ALICE_EMAIL ALICE +export BOB_EMAIL BOB BOB_PACKET_RE BOB_VALID_PACKET_RE +export BOB_VALID_PACKET_UNKNOWN_SENDER_RE BOB_CHECKSUM_ERROR_RE + +## +# setup +# +# Prepare test environment. +function setup() { + banner "::$FUNCNAME" + runcmd "Creating $ESCROW_DIR" \ + "mkdir -p $ESCROW_DIR" + runcmd "Creating an image $TEST_IMG (10 x 1024kB)" \ + "dd if=/dev/urandom of=$TEST_IMG bs=1024k count=10" + runcmd "Format the image $TEST_IMG as LUKS" \ + "echo -n $TEST_PASSWD | cryptsetup -q luksFormat $TEST_IMG -" + runcmd "Get escrow packet $TEST_PACKET from LUKS image $TEST_IMG" \ + "printf %b '$TEST_PASSWD\\0$TEST_PASSWD\\0$TEST_PASSWD\\0' | volume_key --batch --save $TEST_IMG --output=$TEST_PACKET" +} + +## +# test_escrow_receive +# +# Basic escrow-receive test. +function test_escrow_receive() { + banner "::$FUNCNAME" + # Ensure there is no old products/processes: + kill_smtp_server + sweep_escrow_receive_products + sleep 1 + # Do the test: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $LOCALADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + runcmd "Sending packet $TEST_PACKET" \ + "$HERE/sendpkt.py --from \"$BOB\" --to \"$ALICE\" --packet $TEST_PACKET --dump | $HERE/../escrow-receive -H $LOCALADDR -a $ADMIN_EMAIL -d $ESCROW_DIR -l $LOGFILE" + runcmd "Waiting for response (max ${TIME_LIMIT}s)" \ + "wait_file $SINK_FILE $TIME_LIMIT" + kill_smtp_server + # Verify the response: + assert_linematch $SINK_FILE "$(re_escape 'Subject: Your backup passphrase has been successfully received.')" + assert_linematch $SINK_FILE "$(re_escape "From: $ADMIN_EMAIL")" + assert_linematch $SINK_FILE "$(re_escape "To: $BOB_EMAIL")" + assert_linematch $SINK_FILE "$(re_escape 'Your backup passphrase has been successfully received.')" + assert_linematch $SINK_FILE "$(re_escape 'You should now remove the escrow packet file from your computer.')" + # Verify the received packet: + FILES=( $(enumerate_files $ESCROW_DIR "$BOB_VALID_PACKET_RE") ) + assert_equal ${#FILES[@]} 1 "number of files in $ESCROW_DIR matching $BOB_VALID_PACKET_RE is 1" + assert_identical ${FILES[0]} $TEST_PACKET + # Verify the log: + assert_linematch $LOGFILE "INFO: Starting to process an email escrow packet on $DATE_RE" + assert_linematch $LOGFILE "INFO: Received valid escrow packet from $(re_escape "$BOB_EMAIL")" + assert_linematch $LOGFILE "INFO: Marking escrow packet valid: $(re_escape "$ESCROW_DIR")/$BOB_PACKET_RE" + assert_linematch $LOGFILE "INFO: Processing completed on $DATE_RE" + # Remove products: + sweep_escrow_receive_products +} +TESTS+=( test_escrow_receive ) + +## +# test_escrow_receive_missing_md5_checksum +# +# Test the reaction on malformed email (missing MD5 checksum). +function test_escrow_receive_missing_md5_checksum() { + banner "::$FUNCNAME" + # Ensure there is no old products: + sweep_escrow_receive_products + # Do the test: + runcmd "Sending packet $TEST_PACKET" \ + "$HERE/sendpkt.py --from \"$BOB\" --to \"$ALICE\" --packet $TEST_PACKET --dump | sed -e '/^MD5 checksum:/d' | $HERE/../escrow-receive -H $LOCALADDR -a $ADMIN_EMAIL -d $ESCROW_DIR -l $LOGFILE" 1 + # Verify the received packet: + FILES=( $(enumerate_files $ESCROW_DIR "$BOB_PACKET_RE") ) + assert_equal ${#FILES[@]} 1 "number of files in $ESCROW_DIR matching $BOB_PACKET_RE is 1" + assert_identical ${FILES[0]} $TEST_PACKET + # Verify the log: + assert_linematch $LOGFILE "INFO: Starting to process an email escrow packet on $DATE_RE" + assert_linematch $LOGFILE "$(re_escape 'ERROR: Malformed email escrow packet received.')" + assert_linematch $LOGFILE "INFO: Processing completed on $DATE_RE" + # Remove products: + sweep_escrow_receive_products +} +TESTS+=( test_escrow_receive_missing_md5_checksum ) + +## +# test_escrow_receive_missing_sender +# +# Test the reaction on malformed email (missing sender). +function test_escrow_receive_missing_sender() { + banner "::$FUNCNAME" + # Ensure there is no old products: + sweep_escrow_receive_products + # Do the test: + runcmd "Sending packet $TEST_PACKET" \ + "$HERE/sendpkt.py --from \"$BOB\" --to \"$ALICE\" --packet $TEST_PACKET --dump | sed -e '/^packet from:/d' | $HERE/../escrow-receive -H $LOCALADDR -a $ADMIN_EMAIL -d $ESCROW_DIR -l $LOGFILE" 1 + # Verify there are no escrows: + assert_empty_dir $ESCROW_DIR + # Verify the log: + assert_linematch $LOGFILE "INFO: Starting to process an email escrow packet on $DATE_RE" + assert_linematch $LOGFILE "$(re_escape 'ERROR: Malformed email escrow packet received.')" + assert_linematch $LOGFILE "INFO: Processing completed on $DATE_RE" + # Remove products: + sweep_escrow_receive_products +} +TESTS+=( test_escrow_receive_missing_sender ) + +## +# test_escrow_receive_missing_both +# +# Test the reaction on malformed email (both MD5 checksum and sender are +# missing). +function test_escrow_receive_missing_both() { + banner "::$FUNCNAME" + # Ensure there is no old products: + sweep_escrow_receive_products + # Do the test: + runcmd "Sending packet $TEST_PACKET" \ + "$HERE/sendpkt.py --from \"$BOB\" --to \"$ALICE\" --packet $TEST_PACKET --dump | sed -e '/^MD5 checksum:/d' -e '/^packet from:/d' | $HERE/../escrow-receive -H $LOCALADDR -a $ADMIN_EMAIL -d $ESCROW_DIR -l $LOGFILE" 1 + # Verify there are no escrows: + assert_empty_dir $ESCROW_DIR + # Verify the log: + assert_linematch $LOGFILE "INFO: Starting to process an email escrow packet on $DATE_RE" + assert_linematch $LOGFILE "$(re_escape 'ERROR: Malformed email escrow packet received.')" + assert_linematch $LOGFILE "INFO: Processing completed on $DATE_RE" + # Remove products: + sweep_escrow_receive_products +} +TESTS+=( test_escrow_receive_missing_both ) + +## +# test_escrow_receive_bad_md5_checksum +# +# Test the reaction on bad MD5 checksum. +function test_escrow_receive_bad_md5_checksum() { + banner "::$FUNCNAME" + # Ensure there is no old products/processes: + kill_smtp_server + sweep_escrow_receive_products + sleep 1 + # Do the test: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $LOCALADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + runcmd "Sending packet $TEST_PACKET" \ + "$HERE/sendpkt.py --from \"$BOB\" --to \"$ALICE\" --packet $TEST_PACKET --dump | sed -e '/^MD5 checksum:/ y/0123456789abcdef/fedcba9876543210/' | sed -e 's/^MDa 3h13ksum:/MD5 checksum:/' | $HERE/../escrow-receive -H $LOCALADDR -a $ADMIN_EMAIL -d $ESCROW_DIR -l $LOGFILE" + runcmd "Waiting for response (max ${TIME_LIMIT}s)" \ + "wait_file $SINK_FILE $TIME_LIMIT" + kill_smtp_server + # Verify the response: + assert_linematch $SINK_FILE "$(re_escape 'Subject: Error receiving your backup passphrase packet!')" + assert_linematch $SINK_FILE "$(re_escape "From: $ADMIN_EMAIL")" + assert_linematch $SINK_FILE "$(re_escape "To: $BOB_EMAIL")" + assert_linematch $SINK_FILE "$(re_escape 'Error receiving your backup passphrase packet!')" + # Verify the received packet: + FILES=( $(enumerate_files $ESCROW_DIR "$BOB_CHECKSUM_ERROR_RE") ) + assert_equal ${#FILES[@]} 1 "number of files in $ESCROW_DIR matching $BOB_CHECKSUM_ERROR_RE is 1" + assert_identical ${FILES[0]} $TEST_PACKET + # Verify the log: + assert_linematch $LOGFILE "INFO: Starting to process an email escrow packet on $DATE_RE" + assert_linematch $LOGFILE "WARNING: Received invalid email escrow packet from $(re_escape "$BOB_EMAIL")" + assert_linematch $LOGFILE "WARNING: Marking escrow packet invalid: $(re_escape "$ESCROW_DIR")/$BOB_PACKET_RE" + assert_linematch $LOGFILE "INFO: Processing completed on $DATE_RE" + # Remove products: + sweep_escrow_receive_products +} +TESTS+=( test_escrow_receive_bad_md5_checksum ) + +## +# test_escrow_receive_recipients_refused +# +# Test the reaction on refused email. +function test_escrow_receive_recipients_refused() { + banner "::$FUNCNAME" + # Ensure there is no old products/processes: + kill_smtp_server + sweep_escrow_receive_products + sleep 1 + # Do the test: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -b $COMPANY -s $SINK_FILE $LOCALADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + runcmd "Sending packet $TEST_PACKET" \ + "$HERE/sendpkt.py --from \"$BOB\" --to \"$ALICE\" --packet $TEST_PACKET --dump | $HERE/../escrow-receive -H $LOCALADDR -a $ADMIN_EMAIL -d $ESCROW_DIR -l $LOGFILE" + kill_smtp_server + # Verify the received packet: + FILES=( $(enumerate_files $ESCROW_DIR "$BOB_VALID_PACKET_UNKNOWN_SENDER_RE") ) + assert_equal ${#FILES[@]} 1 "number of files in $ESCROW_DIR matching $BOB_VALID_PACKET_UNKNOWN_SENDER_RE is 1" + assert_identical ${FILES[0]} $TEST_PACKET + # Verify the log: + assert_linematch $LOGFILE "INFO: Starting to process an email escrow packet on $DATE_RE" + assert_linematch $LOGFILE "INFO: Received valid escrow packet from $(re_escape "$BOB_EMAIL")" + assert_linematch $LOGFILE "WARNING: Invalid escrow packet sender: $(re_escape "$BOB_EMAIL")" + assert_linematch $LOGFILE "WARNING: Marking escrow packet invalid: $(re_escape "$ESCROW_DIR")/$BOB_PACKET_RE" + assert_linematch $LOGFILE "INFO: Processing completed on $DATE_RE" + # Remove products: + sweep_escrow_receive_products +} +TESTS+=( test_escrow_receive_recipients_refused ) + +## +# kill_smtp_server +# +# Stops SMTP server. +function kill_smtp_server() { + local V + + V=$(read_var MAILSRV_PID 0) + if [[ $V -ne 0 ]]; then + runcmd -s "Stopping SMTP server (pid: $V)" \ + "kill -9 $V && write_var MAILSRV_PID 0" + fi +} + +## +# sweep_escrow_receive_products +# +# Remove escrow-receive products. +function sweep_escrow_receive_products() { + remove_file ${SINK_FILE/[0-9]*./*.} + empty_dir $ESCROW_DIR + remove_file $LOGFILE +} + +## +# cleanup +# +# Remove auxiliary files and processes. +function cleanup() { + banner "::$FUNCNAME" + kill_smtp_server + sweep_escrow_receive_products + remove_file $TEST_PACKET + remove_file $TEST_IMG + remove_dir $ESCROW_DIR +} + +runtests "$@" diff -Nru volume-key-0.3.10/contrib/email/tests/test-escrow-transit volume-key-0.3.12/contrib/email/tests/test-escrow-transit --- volume-key-0.3.10/contrib/email/tests/test-escrow-transit 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/contrib/email/tests/test-escrow-transit 2018-07-16 20:52:14.000000000 +0000 @@ -0,0 +1,923 @@ +#!/bin/bash +# +# A script that tests escrow-transit functionality. +# +# Copyright (C) 2018 Jiří Kučera +# +# 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, see . +# + +. $(dirname $0)/utest.sh + +initialize $0 + +STDIN=$HERE/stdin.$TEST_PID +STDOUT=$HERE/stdout.$TEST_PID +NONEXISTING_FILE=$HERE/.nonexisting-file +export STDIN STDOUT NONEXISTING_FILE + +TESTROOT=$HERE/testroot +BIN=$TESTROOT/bin +DEV=$TESTROOT/dev +PROC=$TESTROOT/proc +PARTITIONS=$PROC/partitions +FAKESDA=$DEV/fakesda +FAKESDA1=$DEV/fakesda1 +FAKESDA2=$DEV/fakesda2 +FAKESDA3=$DEV/fakesda3 +FAKEDM_0=$DEV/fakedm-0 +FAKEDM_1=$DEV/fakedm-1 +FAKEDM_2=$DEV/fakedm-2 +FAKEDM_3=$DEV/fakedm-3 +VOLUME_KEY=$BIN/volume_key +BLOCKSIZE=1024k +NBLOCKS=10 +export TESTROOT BIN DEV PROC PARTITIONS +export FAKESDA FAKESDA1 FAKESDA2 FAKESDA3 +export FAKEDM_0 FAKEDM_1 FAKEDM_2 FAKEDM_3 +export VOLUME_KEY +export BLOCKSIZE NBLOCKS + +FAKESDA_LIST=( $FAKESDA $FAKESDA1 $FAKESDA2 $FAKESDA3 ) +FAKEDM_LIST=( $FAKEDM_0 $FAKEDM_1 $FAKEDM_2 $FAKEDM_3 ) + +CERTBITS=4096 +CERTPASS=k1773ns +CERTDAYS=2 +PRIVKEY=$HERE/privkey.pem +PRIVKEY_PASSLESS=${PRIVKEY%.*}-passless.pem +OPENSSL_CNF=$HERE/openssl.cnf +CERT=$HERE/cert.pem +export CERTBITS CERTPASS CERTDAYS PRIVKEY PRIVKEY_PASSLESS OPENSSL_CNF CERT + +BAD_HOST='foo?bar?baz?' +GOOD_HOST=localhost +BAD_PORT=foo +GOOD_PORT=2525 +MAILSRV_ADDR=$GOOD_HOST:$GOOD_PORT +MAILSRV_PID=0 +SINK_FILE=$HERE/email$TEST_PID.msg +TIME_LIMIT=5 +BANNED_SERVER=$GOOD_HOST.localdomain +export BAD_HOST GOOD_HOST BAD_PORT GOOD_PORT +export MAILSRV_ADDR MAILSRV_PID SINK_FILE TIME_LIMIT BANNED_SERVER + +ET_NAME=escrow-transit +ET_VERSION=0.1 +ET_MAIL_RECIP=$(cat $HERE/../$ET_NAME | grep -E '^MAIL_RECIP = ' | sed -E -e 's/^MAIL_RECIP = "(.*)"$/\1/g') +ESCROW_DIR=$HERE/escrows +ENCRYPTED_FAKESDA2_PACKET_RE="escrow$(re_escape $(echo -n $FAKESDA2 | sed -e s,/,-,g))-backup-passphrase-[[:alnum:]]{6}" +COMPANY=company.com +ALICE=alice@$COMPANY +BOB=bob@$COMPANY +export ET_NAME ET_VERSION ET_MAIL_RECIP +export ESCROW_DIR +export ENCRYPTED_FAKESDA2_PACKET_RE +export COMPANY ALICE BOB + +## +# create_openssl_cnf +# +# Create an OpenSSL configuration file. +function create_openssl_cnf() { + ( + echo "RANDFILE = \$ENV::HOME/.rnd" + echo "" + echo "[ ca ]" + echo "default_ca = CA_default" + echo "" + echo "[ CA_default ]" + echo "default_md = sha256" + echo "" + echo "[ req ]" + echo "default_bits = $CERTBITS" + echo "default_keyfile = $PRIVKEY" + echo "distinguished_name = req_distinguished_name" + echo "attributes = req_attributes" + echo "prompt = no" + echo "output_password = $CERTPASS" + echo "" + echo "[ req_distinguished_name ]" + echo "C = NN" + echo "ST = Narnia" + echo "L = Cair Paravel" + echo "O = Wardrobe, Inc." + echo "OU = Magic Portal" + echo "CN = Caspian X" + echo "emailAddress = princecaspian@cairparavel.nn" + echo "" + echo "[ req_attributes ]" + echo "challengePassword = A challenge password" + ) > $OPENSSL_CNF +} + +## +# create_partitions_file +# +# Create $TESTROOT/proc/partitions. +function create_partitions_file() { + local T + local N + ( + echo "major minor #blocks name" + echo "" + for P in ${FAKESDA_LIST[@]}; do + T=${P##*/} + N=${T//[a-z]/}; N=${N:-0} + echo " 8 ${N} ${NBLOCKS} ${T}" + done + for P in ${FAKEDM_LIST[@]}; do + T=${P##*/} + N=${T//[a-z-]/} + echo " 253 ${N} ${NBLOCKS} ${T}" + done + ) > $PARTITIONS +} + +## +# make_me_luks FAKE_PARTITION +# +# Make FAKE_PARTITION a LUKS device by copying the LUKS formated image over it. +function make_me_luks() { + runcmd "Making $1 LUKS" \ + "cp $TEST_IMG $1" +} + +## +# restore_me FAKE_PARTITION +# +# Restore FAKE_PARTITION. +function restore_me() { + runcmd "Restoring $1 back" \ + "cp $TEST_IMG_BK $1" +} + +## +# setup +# +# Prepare test environment. +function setup() { + banner "::$FUNCNAME" + runcmd "Creating $ESCROW_DIR" \ + "mkdir -p $ESCROW_DIR" + info "Creating certificates:" + runcmd "- generating RSA private key $PRIVKEY" \ + "openssl genrsa -aes256 -passout pass:$CERTPASS -out $PRIVKEY $CERTBITS" + runcmd "- removing pass phrase from $PRIVKEY" \ + "openssl rsa -passin pass:$CERTPASS -in $PRIVKEY -out $PRIVKEY_PASSLESS && mv $PRIVKEY_PASSLESS $PRIVKEY" + runcmd "- creating $OPENSSL_CNF" \ + "create_openssl_cnf" + runcmd "- creating $CERT" \ + "openssl req -config $OPENSSL_CNF -key $PRIVKEY -new -x509 -days $CERTDAYS -sha256 -out $CERT" + info "Preparing $TESTROOT:" + runcmd "- creating $BIN" \ + "mkdir -p $BIN" + runcmd "- creating $DEV" \ + "mkdir -p $DEV" + runcmd "- creating $PROC" \ + "mkdir -p $PROC" + runcmd "- creating an image $TEST_IMG ($NBLOCKS x ${BLOCKSIZE}B)" \ + "dd if=/dev/urandom of=$TEST_IMG bs=$BLOCKSIZE count=$NBLOCKS" + runcmd "- creating a backup of $TEST_IMG ($TEST_IMG_BK)" \ + "cp $TEST_IMG $TEST_IMG_BK" + runcmd "- format the image $TEST_IMG as LUKS" \ + "echo -n $TEST_PASSWD | cryptsetup -q luksFormat $TEST_IMG -" + runcmd "- get escrow packet $TEST_PACKET from LUKS image $TEST_IMG" \ + "printf %b '$TEST_PASSWD\\0$TEST_PASSWD\\0$TEST_PASSWD\\0' | volume_key --batch --save $TEST_IMG --output=$TEST_PACKET" + runcmd "- creating fake volume_key" \ + "create_fake_script $VOLUME_KEY 1" + for P in ${FAKESDA_LIST[@]}; do + runcmd "- copying $TEST_IMG_BK to $P" \ + "cp $TEST_IMG_BK $P" + done + for P in ${FAKEDM_LIST[@]}; do + runcmd "- copying $TEST_IMG_BK to $P" \ + "cp $TEST_IMG_BK $P" + done + runcmd "- creating $PARTITIONS" \ + "create_partitions_file" +} + +## +# test_escrow_transit_version +# +# Test -V option. +function test_escrow_transit_version() { + local C + + banner "::$FUNCNAME" + # Run the test: + C="$HERE/../$ET_NAME -V --only-stdout" + runcmd "Running $C" \ + "$C" + cp $TEST_TEMP $STDOUT + # Check the output: + assert_linematch $STDOUT "$(re_escape "$ET_NAME $ET_VERSION")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR +} +TESTS+=( test_escrow_transit_version ) + +## +# test_escrow_transit_redundant_options +# +# Test escrow-transit reaction on redundant options. +function test_escrow_transit_redundant_options() { + local C + + banner "::$FUNCNAME" + # Run the test: + C="$HERE/../$ET_NAME --only-stdout -f $TEST_PACKET --foo -c $CERT --bar baz" + runcmd "Running $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Check the output: + assert_linematch $STDOUT "$(re_escape "$ET_NAME: use -h for help")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR +} +TESTS+=( test_escrow_transit_redundant_options ) + +## +# test_escrow_transit_both_file_and_cert_are_present +# +# Test escrow-transit reaction on both -f and -c options. +function test_escrow_transit_both_file_and_cert_are_present() { + local C + + banner "::$FUNCNAME" + # Run the test: + C="$HERE/../$ET_NAME -v -f $TEST_PACKET -c $CERT --only-stdout" + runcmd "Running $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Check the output: + assert_linematch $STDOUT "$(re_escape "$ET_NAME: use -h for help")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR +} +TESTS+=( test_escrow_transit_both_file_and_cert_are_present ) + +## +# test_escrow_transit_both_file_and_cert_are_missing +# +# Test escrow-transit reaction on missing both -f and -c options. +function test_escrow_transit_both_file_and_cert_are_missing() { + local C + + banner "::$FUNCNAME" + # Run the test: + C="$HERE/../$ET_NAME -v --only-stdout" + runcmd "Running $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Check the output: + assert_linematch $STDOUT "$(re_escape "$ET_NAME: use -h for help")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR +} +TESTS+=( test_escrow_transit_both_file_and_cert_are_missing ) + +## +# test_escrow_transit_intraconn_unknown_host +# +# Test escrow-transit reaction on unknown intranet host. +function test_escrow_transit_intraconn_unknown_host() { + local C + + banner "::$FUNCNAME" + # Run the test: + C="$HERE/../$ET_NAME -v -I $BAD_HOST -f $TEST_PACKET --only-stdout" + runcmd "Runnig $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $BAD_HOST... failed.")" + assert_linematch $STDOUT "$(re_escape "You must be connected to intranet in order to use this tool.")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR +} +TESTS+=( test_escrow_transit_intraconn_unknown_host ) + +## +# test_escrow_transit_intraconn_bad_port +# +# Test escrow-transit reaction on bad intranet host port. +function test_escrow_transit_intraconn_bad_port() { + local C + + banner "::$FUNCNAME" + # Run the test: + C="$HERE/../$ET_NAME -v -I $GOOD_HOST:$BAD_PORT -f $TEST_PACKET --only-stdout" + runcmd "Runnig $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST:$BAD_PORT... failed.")" + assert_linematch $STDOUT "$(re_escape "You must be connected to intranet in order to use this tool.")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR +} +TESTS+=( test_escrow_transit_intraconn_bad_port ) + +## +# test_escrow_transit_get_and_verify_email +# +# Test escrow-transit reaction on email retrieval. +function test_escrow_transit_get_and_verify_email() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -B vrfy -b $BANNED_SERVER -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + # sender: + # Using sender address '$BOB' - is this ok? (y/n/c) n + # Please enter sender e-mail address: $ALICE + # Using sender address '$ALICE' - is this ok? (y/n/c) y + # receiver: + # Using recipient address '$ET_MAIL_RECIP' - is this ok? (y/n/c) y + # # $ET_MAIL_RECIP is banned + # Please enter recipient e-mail address: $ET_MAIL_RECIP + # Using recipient address '$ET_MAIL_RECIP' - is this ok? (y/n/c) d + # Incorrect answer 'd'. Using recipient address '$ET_MAIL_RECIP' - is this ok? (y/n/c) c + runcmd "Preparing STDIN" \ + "fecho $STDIN n $ALICE y y $ET_MAIL_RECIP d c" + # Run the test: + C="cat $STDIN | $HERE/../$ET_NAME -v -f $NONEXISTING_FILE -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r \"\" -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Using sender address '$BOB' - is this ok? ([y]es/[n]o/[c]ancel) Please enter sender e-mail address: Using sender address '$ALICE' - is this ok? ([y]es/[n]o/[c]ancel) Tentatively verified sender address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "Using recipient address '$ET_MAIL_RECIP' - is this ok? ([y]es/[n]o/[c]ancel) $MAILSRV_ADDR reply: 550 user <$ET_MAIL_RECIP> is banned")" + assert_linematch $STDOUT "$(re_escape "$ET_MAIL_RECIP: verification failed - address unknown.")" + assert_linematch $STDOUT "$(re_escape "Please enter recipient e-mail address: Using recipient address '$ET_MAIL_RECIP' - is this ok? ([y]es/[n]o/[c]ancel) Incorrect answer 'd'. Using recipient address '$ET_MAIL_RECIP' - is this ok? ([y]es/[n]o/[c]ancel) $ET_NAME: missing recipient e-mail address (canceled by user)")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_get_and_verify_email ) + +## +# test_escrow_transit_nonexisting_escrow_packet +# +# Test escrow-transit reaction on nonexisting escrow packet. +function test_escrow_transit_nonexisting_escrow_packet() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + # Run the test: + C="$HERE/../$ET_NAME -v -f $NONEXISTING_FILE -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -y -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "FileNotFoundError: [Errno 2] No such file or directory: '$NONEXISTING_FILE'")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_nonexisting_escrow_packet ) + +## +# test_escrow_transit_access_to_partition_denied +# +# Test escrow-transit reaction on no access rights to partition. +function test_escrow_transit_access_to_partition_denied() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + runcmd "Marking $FAKESDA2 as read only" \ + "chmod a-w $FAKESDA2" + # Run the test: + C="$HERE/../$ET_NAME -v -p $TESTROOT -c $NONEXISTING_FILE -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -y -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 2 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Restore fake partitions permissions: + runcmd "Restoring $FAKESDA2 permissions" \ + "chmod 664 $FAKESDA2" + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "Only root can add new backup passphrases.")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_access_to_partition_denied ) + +## +# test_escrow_transit_no_luks_device +# +# Test escrow-transit reaction on no luks device on system. +function test_escrow_transit_no_luks_device() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + # Run the test: + C="$HERE/../$ET_NAME -v -p $TESTROOT -c $NONEXISTING_FILE -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -y -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 2 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "No LUKS partitions detected.")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_no_luks_device ) + +## +# test_escrow_transit_multiple_luks_devices +# +# Test escrow-transit reaction on multiple luks devices on the system. +function test_escrow_transit_multiple_luks_devices() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + make_me_luks $FAKESDA3 + # Run the test: + C="$HERE/../$ET_NAME -v -p $TESTROOT -c $NONEXISTING_FILE -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -y -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 2 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + restore_me $FAKESDA3 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "Multiple LUKS partitions detected.")" + assert_linematch $STDOUT "$(re_escape "Create the escrow packet(s) manually with volume_key(1) and use the -f option.")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_multiple_luks_devices ) + +## +# test_escrow_transit_nonexisting_certificate +# +# Test escrow-transit reaction on nonexisting certificate. +function test_escrow_transit_nonexisting_certificate() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + # Run the test: + C="$HERE/../$ET_NAME -v -p $TESTROOT -c $NONEXISTING_FILE -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -y -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 1 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "About to add a random backup passphrase to LUKS partition $FAKESDA2.")" + assert_linematch $STDOUT "$(re_escape "FileNotFoundError: [Errno 2] No such file or directory: '$NONEXISTING_FILE'")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_nonexisting_certificate ) + +## +# test_escrow_transit_abort_operation +# +# Test escrow-transit reaction on aborting the operation by user. +function test_escrow_transit_abort_operation() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + runcmd "Preparing STDIN" \ + "fecho $STDIN y y n" + # Run the test: + C="cat $STDIN | $HERE/../$ET_NAME -v -p $TESTROOT -c $CERT -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 3 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Using sender address '$BOB' - is this ok? ([y]es/[n]o/[c]ancel) Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Using recipient address '$ALICE' - is this ok? ([y]es/[n]o/[c]ancel) Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "About to add a random backup passphrase to LUKS partition $FAKESDA2.")" + assert_linematch $STDOUT "$(re_escape "Is this ok? (y/n) Operation aborted.")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_abort_operation ) + +## +# test_escrow_transit_volume_key_fails +# +# Test escrow-transit reaction on volume_key error. +function test_escrow_transit_volume_key_fails() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -b $COMPANY -B rcpt -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + # Run the test: + C="PATH=$BIN${PATH:+:$PATH} $HERE/../$ET_NAME -v -p $TESTROOT -c $CERT -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -y -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 4 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "About to add a random backup passphrase to LUKS partition $FAKESDA2.")" + assert_linematch $STDOUT "$(re_escape "Current passphrase for $FAKESDA2 needed to unlock the device.")" + assert_linematch $STDOUT "$(re_escape "Operation failed.")" + # Check that no packet was created: + assert_empty_dir $ESCROW_DIR + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_volume_key_fails ) + +## +# test_escrow_transit_volume_key_makes_packet +# +# Test if escrow-transit can make an escrow packet using volume_key. +function test_escrow_transit_volume_key_makes_packet() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -b $COMPANY -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + # Run the test: + C="printf %b '$TEST_PASSWD\\0' | $HERE/../$ET_NAME -v -b -p $TESTROOT -c $CERT -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" 5 + cp $TEST_TEMP $STDOUT + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "About to add a random backup passphrase to LUKS partition $FAKESDA2.")" + assert_linematch $STDOUT "$(re_escape "Current passphrase for $FAKESDA2 needed to unlock the device.")" + assert_linematch $STDOUT "$(re_escape "Random passphrase has been successfully added to $FAKESDA2.")" + assert_linematch $STDOUT "Encrypted packet stored at $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE\." + assert_linematch $STDOUT "Using escrow packet $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE\." + # Check that a packet was created: + FILES=( $(enumerate_files $ESCROW_DIR "$ENCRYPTED_FAKESDA2_PACKET_RE") ) + assert_equal ${#FILES[@]} 1 "number of files in $ESCROW_DIR matching $ENCRYPTED_FAKESDA2_PACKET_RE is 1" + # Check that no email was received: + assert_nofile $SINK_FILE + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_volume_key_makes_packet ) + +## +# test_escrow_transit_create_and_send_packet +# +# Test if escrow-transit creates and sends a packet. +function test_escrow_transit_create_and_send_packet() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + # Run the test: + C="printf %b 'y\\ny\\ny\\n$TEST_PASSWD\\0n\\n' | $HERE/../$ET_NAME -v -b -y -x -p $TESTROOT -c $CERT -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" + cp $TEST_TEMP $STDOUT + runcmd "Waiting for response (max ${TIME_LIMIT}s)" \ + "wait_file $SINK_FILE $TIME_LIMIT" + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Using sender address '$BOB' - is this ok? ([y]es/[n]o/[c]ancel) Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Using recipient address '$ALICE' - is this ok? ([y]es/[n]o/[c]ancel) Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "About to add a random backup passphrase to LUKS partition $FAKESDA2.")" + assert_linematch $STDOUT "$(re_escape "Is this ok? (y/n) Current passphrase for $FAKESDA2 needed to unlock the device.")" + assert_linematch $STDOUT "$(re_escape "Random passphrase has been successfully added to $FAKESDA2.")" + assert_linematch $STDOUT "Encrypted packet stored at $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE\." + assert_linematch $STDOUT "Using escrow packet $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE\." + assert_linematch $STDOUT "$(re_escape "Escrow packet successfully sent to $ALICE.")" + assert_linematch $STDOUT "Removing escrow packet $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE - is this ok\? \(y/n\) Escrow packet not removed\." + assert_linematch $STDOUT "$(re_escape "Remove the escrow packet after receiving confirmation e-mail.")" + # Check the packet: + FILES=( $(enumerate_files $ESCROW_DIR "$ENCRYPTED_FAKESDA2_PACKET_RE") ) + assert_equal ${#FILES[@]} 1 "number of files in $ESCROW_DIR matching $ENCRYPTED_FAKESDA2_PACKET_RE is 1" + CHECKSUM=$(md5sum ${FILES[0]} | sed -E -e 's/^([0-9A-Fa-f]+).*$/\1/g') + # Check the email: + assert_linematch $SINK_FILE "Subject: Backup Passphrase Escrow Packet from $BOB" + assert_linematch $SINK_FILE "From: $BOB" + assert_linematch $SINK_FILE "To: $ALICE" + assert_linematch $SINK_FILE "Backup passphrase escrow packet from: $BOB" + assert_linematch $SINK_FILE "Packet MD5 checksum: $CHECKSUM" + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_create_and_send_packet ) + +## +# test_escrow_transit_create_send_and_remove_packet +# +# Test if escrow-transit creates, sends, and removes a packet. +function test_escrow_transit_create_send_and_remove_packet() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + # Run the test: + C="printf %b 'y\\ny\\ny\\n$TEST_PASSWD\\0y\\n' | $HERE/../$ET_NAME -v -b -y -x -p $TESTROOT -c $CERT -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" + cp $TEST_TEMP $STDOUT + runcmd "Waiting for response (max ${TIME_LIMIT}s)" \ + "wait_file $SINK_FILE $TIME_LIMIT" + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Using sender address '$BOB' - is this ok? ([y]es/[n]o/[c]ancel) Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Using recipient address '$ALICE' - is this ok? ([y]es/[n]o/[c]ancel) Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "About to add a random backup passphrase to LUKS partition $FAKESDA2.")" + assert_linematch $STDOUT "$(re_escape "Is this ok? (y/n) Current passphrase for $FAKESDA2 needed to unlock the device.")" + assert_linematch $STDOUT "$(re_escape "Random passphrase has been successfully added to $FAKESDA2.")" + assert_linematch $STDOUT "Encrypted packet stored at $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE\." + assert_linematch $STDOUT "Using escrow packet $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE\." + assert_linematch $STDOUT "$(re_escape "Escrow packet successfully sent to $ALICE.")" + assert_linematch $STDOUT "Removing escrow packet $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE - is this ok\? \(y/n\) Escrow packet $(re_escape $ESCROW_DIR)/$ENCRYPTED_FAKESDA2_PACKET_RE removed\." + # Check there are no packets: + assert_empty_dir $ESCROW_DIR + # Check the email: + assert_linematch $SINK_FILE "Subject: Backup Passphrase Escrow Packet from $BOB" + assert_linematch $SINK_FILE "From: $BOB" + assert_linematch $SINK_FILE "To: $ALICE" + assert_linematch $SINK_FILE "Backup passphrase escrow packet from: $BOB" + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_create_send_and_remove_packet ) + +## +# test_escrow_transit_send_packet +# +# Test if escrow-transit sends a packet. +function test_escrow_transit_send_packet() { + local C + + banner "::$FUNCNAME" + # Clean previous garbage: + kill_smtp_server + sweep_escrow_transit_products + sleep 1 + # Prepare data & processes: + runcmd "Launching SMTP server" \ + "$HERE/mailsrv.py -s $SINK_FILE $MAILSRV_ADDR & write_var MAILSRV_PID \$!" + sleep 1 + info "SMTP server pid: $(read_var MAILSRV_PID 0)" + make_me_luks $FAKESDA2 + # Run the test: + C="$HERE/../$ET_NAME -v -y -p $TESTROOT -f $TEST_PACKET -I $GOOD_HOST -H $MAILSRV_ADDR -s $BOB -r $ALICE -d $ESCROW_DIR --only-stdout" + runcmd "Running $C" \ + "$C" + cp $TEST_TEMP $STDOUT + runcmd "Waiting for response (max ${TIME_LIMIT}s)" \ + "wait_file $SINK_FILE $TIME_LIMIT" + # Kill unused processes: + kill_smtp_server + # Restore fake partitions: + restore_me $FAKESDA2 + # Check the output: + assert_linematch $STDOUT "$(re_escape "Testing intranet connectivity against $GOOD_HOST... ok.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified sender address $BOB.")" + assert_linematch $STDOUT "$(re_escape "Tentatively verified recipient address $ALICE.")" + assert_linematch $STDOUT "$(re_escape "Using escrow packet $TEST_PACKET.")" + assert_linematch $STDOUT "$(re_escape "Escrow packet successfully sent to $ALICE.")" + # Check there are no packets: + assert_empty_dir $ESCROW_DIR + # Check the email: + assert_linematch $SINK_FILE "Subject: Backup Passphrase Escrow Packet from $BOB" + assert_linematch $SINK_FILE "From: $BOB" + assert_linematch $SINK_FILE "To: $ALICE" + assert_linematch $SINK_FILE "Backup passphrase escrow packet from: $BOB" + assert_linematch $SINK_FILE "Packet MD5 checksum: $(md5sum $TEST_PACKET | sed -E -e 's/^([0-9A-Fa-f]+).*$/\1/g')" + # Remove this test products: + sweep_escrow_transit_products +} +TESTS+=( test_escrow_transit_send_packet ) + +## +# kill_smtp_server +# +# Stops SMTP server. +function kill_smtp_server() { + local V + + V=$(read_var MAILSRV_PID 0) + if [[ $V -ne 0 ]]; then + runcmd -s "Stopping SMTP server (pid: $V)" \ + "kill -9 $V && write_var MAILSRV_PID 0" + fi +} + +## +# sweep_escrow_transit_products +# +# Remove escrow-transit products. +function sweep_escrow_transit_products() { + remove_file ${SINK_FILE/[0-9]*./*.} + empty_dir $ESCROW_DIR +} + +## +# cleanup +# +# Remove auxiliary files and processes. +function cleanup() { + banner "::$FUNCNAME" + kill_smtp_server + sweep_escrow_transit_products + remove_file ${STDIN/.[0-9]*/.*} + remove_file ${STDOUT/.[0-9]*/.*} + remove_file $PRIVKEY + remove_file $PRIVKEY_PASSLESS + remove_file $CERT + remove_file $OPENSSL_CNF + remove_file $TEST_IMG + remove_file $TEST_IMG_BK + remove_file $TEST_PACKET + remove_dir $TESTROOT + remove_dir $ESCROW_DIR +} + +runtests "$@" diff -Nru volume-key-0.3.10/contrib/email/tests/utest.sh volume-key-0.3.12/contrib/email/tests/utest.sh --- volume-key-0.3.10/contrib/email/tests/utest.sh 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/contrib/email/tests/utest.sh 2018-07-16 20:40:44.000000000 +0000 @@ -0,0 +1,386 @@ +# +# Common test utilities. +# +# Copyright (C) 2018 Jiří Kučera +# +# 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, see . +# + +# Script name: +ME="" +# Script directory: +HERE="" +# Script's PID: +TEST_PID=0 +# Log file: +TEST_LOG="" +# Temporary file: +TEST_TEMP="" +# LUKS passphrase used by tests: +TEST_PASSWD="" +# Test image: +TEST_IMG="" +# Test image backup: +TEST_IMG_BK="" +# Test packet: +TEST_PACKET="" +# Dry run flag (only print what's going on): +TEST_DRYRUN=0 + +export ME HERE TEST_PID TEST_LOG TEST_TEMP TEST_PASSWD +export TEST_IMG TEST_IMG_BK TEST_PACKET TEST_DRYRUN + +# Array with tests: +declare -a TESTS + +## +# initialize PATH_TO_SCRIPT +# +# Initialize script variables. +function initialize() { + ME=$(basename $1) + HERE=$(dirname $1) + TEST_PID=$$ + TEST_LOG="$HERE/$ME.log" + # Clear the log: + echo -n "" > "$TEST_LOG" + TEST_TEMP="/var/tmp/$ME$$.tmp" + TEST_PASSWD="testluks" + TEST_IMG="$HERE/$ME.img" + TEST_IMG_BK="$TEST_IMG.bk" + TEST_PACKET="$HERE/$ME.escrow" + TEST_DRYRUN=0 +} + +## +# cleanup_ +# +# Remove all except logs; occasionally, call `cleanup`. +function cleanup_() { + [[ x$(type -t cleanup) != xfunction ]] || cleanup + rm -f ${TEST_TEMP/[0-9]*./*.} $HERE/*.var +} + +## +# info [-n] MESSAGE +# +# Write MESSAGE to the log and to the stdout. `-n` prevents end lines. +function info() { + local T + + [[ "$1" == -n ]] && { T="$1"; shift; } + echo $T "$*" | tee -a $TEST_LOG +} + +## +# error MESSAGE +# +# Print error MESSAGE and exit. +function error() { + echo "$ME: $*" >&2 + exit 1 +} + +## +# fecho FILE [WORD1 WORD2 ...] +# +# Put each WORD# to FILE, one WORD# per line. +function fecho() { + local F + + F=$1 + [[ "$F" ]] && shift && ( + while [[ $# -gt 0 ]]; do + echo "$1" + shift + done + ) > $F +} + +## +# underline STRING [CHAR] +# +# Underline STRING with the given CHAR (default is `=`). +function underline() { + info "$1" + info "${1//?/${2:-=}}" +} + +## +# banner +# +# Print intro banner. +function banner() { + local T + + info "" + underline "[$(date '+%Y-%m-%d %H:%M:%S %z')] Running $ME$1:" + info "" +} + +## +# re_escape TEXT +# +# Escape regexp special characters. +function re_escape() { + local P + + P="${1//\\/\\\\}" + P="${P//\./\\.}" + P="${P//\?/\\?}" + P="${P//\[/\\[}" + P="${P//\]/\\]}" + P="${P//(/\\(}" + P="${P//)/\\)}" + P="${P//\'/@sq@}" + echo -n "$P" +} + +## +# enumerate_files DIR PATTERN +# +# Enumerate all files in DIR that matches PATTERN. +function enumerate_files() { + for f in $(ls -a1 $1); do + if [[ $f =~ ^$2$ ]]; then + echo "$1/$f" + fi + done +} + +## +# read_var NAME [DEFAULT] +# +# Read NAME's value from persistent storage. If NAME does not exist, return +# DEFAULT. +function read_var() { + [[ -f $HERE/$TEST_PID-$1.var ]] && cat $HERE/$TEST_PID-$1.var || echo -n "$2" +} + +## +# write_var NAME VALUE +# +# Write VALUE to persistent storage under the NAME. +function write_var() { + echo -n $2 > $HERE/$TEST_PID-$1.var +} + +## +# wait_file FILE DURATION +# +# Wait until FILE appears, but no longer than DURATION seconds. Fails if FILE +# does not appear during waiting. +function wait_file() { + local T + + T=$2 + until [[ $T -le 0 || -f "$1" ]]; do + sleep 1 + T=$(( T - 1 )) + done + [[ -f "$1" ]] +} + +## +# create_fake_script FILE [EXITCODE] +# +# Create an executable script that always exits with EXITCODE (0 as default). +function create_fake_script() { + ( + echo '#!/bin/bash' + echo "" + echo "exit ${2:-0}" + ) > $1 && chmod a+x $1 +} + +## +# remove_file FILE +# +# Remove FILE. +function remove_file() { + runcmd -s "Removing $1" \ + "rm -f $1" +} + +## +# remove_dir DIR +# +# Remove DIR. +function remove_dir() { + runcmd -s "Removing $1" \ + "rm -rfd $1" +} + +## +# empty_dir DIR +# +# Remove the content of DIR. +function empty_dir() { + runcmd -s "Removing $1's content" \ + "rm -rf $1/*" +} + +## +# assert_equal A B DETAILS +# +# Fail if A != B; also print DETAILS about A and B comparison. +function assert_equal() { + runcmd "Checking if $3" \ + "[[ $1 -eq $2 ]]" +} + +## +# assert_linematch FILE PATTERN +# +# Check if FILE contains at least one line matching PATTERN. +function assert_linematch() { + runcmd "Checking if $1 contains line that matches ${2//@sq@/\\\'}" \ + "[[ \"\$(cat $1 | sed -e s/\'/@sq@/g | grep -E '^$2$')\" ]]" +} + +## +# assert_nofile FILE +# +# Check if FILE is not a file or does not exist. +function assert_nofile() { + runcmd "Checking if $1 is not a file" \ + "[[ ! -f $1 ]]" +} + +## +# assert_identical FILE1 FILE2 +# +# Check whether FILE1 and FILE2 are identical. +function assert_identical() { + runcmd "Checking if $1 and $2 are identical" \ + "diff $1 $2" +} + +## +# assert_empty_dir DIR +# +# Check whether DIR is empty. +function assert_empty_dir() { + runcmd "Checking if $1 is empty" \ + "[[ -z \"\$(ls -A $1)\" ]]" +} + +## +# runcmd [ -s | --soft ] INFO COMMAND [EXITCODE] +# +# Print INFO about what's going on and run COMMAND. If --soft is given, do not +# terminate process when error occurrs. Also test if COMMAND ends with EXITCODE +# (default EXITCODE is 0). +function runcmd() { + local E + local S + local X + + S=0 + [[ "x$1" =~ ^x-s|x--soft$ ]] && { S=1; shift; } + X=${3:-0} + info -n "$1... " + ( + if [[ $TEST_DRYRUN -ne 0 ]]; then + echo "[DRY RUN] $2" + else + eval "$2" + fi + ) > $TEST_TEMP 2>&1 + E=$? + if [[ $E -eq $X ]]; then + info "ok" + else + info "FAILED" + fi + cat $TEST_TEMP | while read L; do info ">>> $L"; done + [[ $E -eq $X ]] || [[ $S -eq 1 ]] || { [[ $E -eq 0 ]] && exit 1; } || exit $E +} + +## +# dophase PHASE +# +# Perform a PHASE, where PHASE is usually a user defined function. For internal +# use only. +function dophase() { + local E + + [[ x$(type -t $1) != xfunction ]] && error "function was expected" + ( eval $1 ); E=$? + [[ $E -ne 0 ]] && { info "==[ FAILED ]=="; cleanup_; exit $E; } + info "==[ PASSED ]==" +} + +## +# runtests OPTIONS +# +# Run all tests. OPTIONS are: +# +# -h, -?, --help print help and exit +# --dry-run only print what's going on +# --debug also print what's bash doing +# --setup run setup only +# --cleanup do cleanup manually +# +function runtests() { + local D + local P + local S + + D=0 + S=0 + for P; do + case $P in + -h | -? | --help) + echo "$ME [ -h | -? | --help | --dry-run | --debug | --setup | --cleanup ]" + echo "" + echo "Options:" + echo "" + echo " -h, -?, --help print this screen and exit" + echo " --dry-run only print what's going on" + echo " --debug also print what's bash doing" + echo " --setup run setup only" + echo " --cleanup do cleanup manually" + echo "" + exit 0 + ;; + --dry-run) + TEST_DRYRUN=1 + ;; + --debug) + D=1 + ;; + --setup) + S=1 + ;; + --cleanup) + cleanup_ + exit 0 + ;; + *) + error "invalid option: $P" + ;; + esac + done + [[ $D -ne 0 ]] && set -x + dophase setup + [[ $S -ne 0 ]] && exit 0 + for t in ${TESTS[@]}; do + dophase $t + done + cleanup_ + info "" + info "[[[ ALL TESTS PASSED ]]]" + info "" +} diff -Nru volume-key-0.3.10/contrib/Makefile.am volume-key-0.3.12/contrib/Makefile.am --- volume-key-0.3.10/contrib/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/contrib/Makefile.am 2018-09-18 14:00:38.000000000 +0000 @@ -0,0 +1,30 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +EXTRA_DIST = email/README \ + email/escrow-receive \ + email/escrow-transit \ + email/tests/test-escrow-receive \ + email/tests/test-escrow-transit \ + email/tests/utest.sh \ + email/tests/mailsrv.py \ + email/tests/sendpkt.py diff -Nru volume-key-0.3.10/contrib/Makefile.in volume-key-0.3.12/contrib/Makefile.in --- volume-key-0.3.10/contrib/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/contrib/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,528 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = contrib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +EXTRA_DIST = email/README \ + email/escrow-receive \ + email/escrow-transit \ + email/tests/test-escrow-receive \ + email/tests/test-escrow-transit \ + email/tests/utest.sh \ + email/tests/mailsrv.py \ + email/tests/sendpkt.py + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu contrib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/debian/changelog volume-key-0.3.12/debian/changelog --- volume-key-0.3.10/debian/changelog 2018-07-11 14:45:13.000000000 +0000 +++ volume-key-0.3.12/debian/changelog 2018-10-09 05:33:07.000000000 +0000 @@ -1,3 +1,23 @@ +volume-key (0.3.12-2) unstable; urgency=medium + + * Team upload + * Enable Python3 bindings + + -- Michael Biebl Tue, 09 Oct 2018 07:33:07 +0200 + +volume-key (0.3.12-1) unstable; urgency=medium + + * Team upload + * New upstream version 0.3.12 + * Rebase patches + * Bump Standards-Version to 4.2.1 + * Explicitly disable building of Python2/3 bindings. + This allows us to drop the python-dev Build-Depends and we no longer + need to clean up the built files afterwards. + * Use find to delete libtool .la files + + -- Michael Biebl Tue, 09 Oct 2018 07:10:14 +0200 + volume-key (0.3.10-1) unstable; urgency=medium * Team upload diff -Nru volume-key-0.3.10/debian/clean volume-key-0.3.12/debian/clean --- volume-key-0.3.10/debian/clean 2018-07-11 14:45:13.000000000 +0000 +++ volume-key-0.3.12/debian/clean 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/tmp diff -Nru volume-key-0.3.10/debian/control volume-key-0.3.12/debian/control --- volume-key-0.3.10/debian/control 2018-07-11 14:45:13.000000000 +0000 +++ volume-key-0.3.12/debian/control 2018-10-09 05:33:07.000000000 +0000 @@ -10,9 +10,9 @@ libgpgme11-dev, libblkid-dev, swig, - python-dev, - libnss3-tools -Standards-Version: 4.1.5 + libnss3-tools, + python3-dev, +Standards-Version: 4.2.1 Rules-Requires-Root: no Vcs-Browser: https://salsa.debian.org/utopia-team/volume-key Vcs-Git: https://salsa.debian.org/utopia-team/volume-key.git @@ -61,6 +61,22 @@ . The main goal of the software is to allow restoring access to an encrypted hard drive if the primary user forgets the passphrase. The encryption key + back up can also be useful for extracting data after a hardware or software + failure that corrupts the header of the encrypted volume, or to access the + company data after an employee leaves abruptly. + +Package: python3-volume-key +Section: python +Architecture: any +Depends: ${python3:Depends}, + ${shlibs:Depends}, + ${misc:Depends}, +Provides: ${python3:Provides} +Description: Python 3 bindings for volume-key + This package provides Python3 bindings for the volume-key library. + . + The main goal of the software is to allow restoring access to an encrypted + hard drive if the primary user forgets the passphrase. The encryption key back up can also be useful for extracting data after a hardware or software failure that corrupts the header of the encrypted volume, or to access the company data after an employee leaves abruptly. diff -Nru volume-key-0.3.10/debian/patches/Revert-Switch-to-gpg2.patch volume-key-0.3.12/debian/patches/Revert-Switch-to-gpg2.patch --- volume-key-0.3.10/debian/patches/Revert-Switch-to-gpg2.patch 2018-07-11 14:45:13.000000000 +0000 +++ volume-key-0.3.12/debian/patches/Revert-Switch-to-gpg2.patch 2018-10-09 05:33:07.000000000 +0000 @@ -10,12 +10,12 @@ 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 40c3906..39481a8 100644 +index 4eda5eb..106128a 100644 --- a/configure.ac +++ b/configure.ac -@@ -31,9 +31,10 @@ LT_INIT([disable-static]) - AC_PATH_PROGS(PYTHON, python2.7 python2.6 python2 python, [Python is required]) - AM_PATH_PYTHON([2.6], [], AC_MSG_ERROR([Python 2.6 or 2.7 is required])) +@@ -183,9 +183,10 @@ else + fi + AM_CONDITIONAL([HAVE_PYTHON3], [test x$python3_found = xyes]) -AC_PATH_PROG([GPG], [gpg2]) +dnl Not gpg2, it cannot receive passphrases from gpgme diff -Nru volume-key-0.3.10/debian/python3-volume-key.install volume-key-0.3.12/debian/python3-volume-key.install --- volume-key-0.3.10/debian/python3-volume-key.install 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/debian/python3-volume-key.install 2018-10-09 05:33:07.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/python3.*/site-packages/ diff -Nru volume-key-0.3.10/debian/rules volume-key-0.3.12/debian/rules --- volume-key-0.3.10/debian/rules 2018-07-11 14:45:13.000000000 +0000 +++ volume-key-0.3.12/debian/rules 2018-10-09 05:33:07.000000000 +0000 @@ -7,11 +7,15 @@ GPGME_LOG = $(CURDIR)/debian/tmp/gpgme.log %: - dh $@ + dh $@ --with python3 + +override_dh_auto_configure: + dh_auto_configure -- \ + --without-python \ + --with-python3 override_dh_install: - rm -f $(CURDIR)/debian/tmp/usr/lib/*/*.la - rm -rf $(CURDIR)/debian/tmp/usr/lib/python2.7/ + find debian/tmp -name '*.la' -print -delete dh_install override_dh_missing: diff -Nru volume-key-0.3.10/doc/Makefile.am volume-key-0.3.12/doc/Makefile.am --- volume-key-0.3.10/doc/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/doc/Makefile.am 2018-09-19 06:31:30.000000000 +0000 @@ -0,0 +1,23 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +dist_man_MANS = volume_key.8 diff -Nru volume-key-0.3.10/doc/Makefile.in volume-key-0.3.12/doc/Makefile.in --- volume-key-0.3.10/doc/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/doc/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,600 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man8dir = $(mandir)/man8 +am__installdirs = "$(DESTDIR)$(man8dir)" +NROFF = nroff +MANS = $(dist_man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +dist_man_MANS = volume_key.8 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man8: $(dist_man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man8 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man8 + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/lib/Makefile.am volume-key-0.3.12/lib/Makefile.am --- volume-key-0.3.10/lib/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/lib/Makefile.am 2018-09-18 14:08:04.000000000 +0000 @@ -0,0 +1,39 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +VERSION_INFO = 3:3:2 + +lib_LTLIBRARIES = libvolume_key.la +pkginclude_HEADERS = libvolume_key.h + +libvolume_key_la_SOURCES = SECerrs.h SSLerrs.h \ + crypto.c crypto.h \ + kmip.c kmip.h \ + libvolume_key.c libvolume_key.h \ + nss_error.c nss_error.h \ + ui.c ui.h \ + volume.c volume.h \ + volume_luks.c volume_luks.h +libvolume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) +libvolume_key_la_LDFLAGS = -version-info $(VERSION_INFO) +libvolume_key_la_LIBADD = $(blkid_LIBS) $(glib_LIBS) $(GPGME_LIBS) \ + $(LTLIBINTL) $(libcryptsetup_LIBS) $(nss_LIBS) diff -Nru volume-key-0.3.10/lib/Makefile.in volume-key-0.3.12/lib/Makefile.in --- volume-key-0.3.10/lib/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/lib/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,832 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = lib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +libvolume_key_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libvolume_key_la_OBJECTS = libvolume_key_la-crypto.lo \ + libvolume_key_la-kmip.lo libvolume_key_la-libvolume_key.lo \ + libvolume_key_la-nss_error.lo libvolume_key_la-ui.lo \ + libvolume_key_la-volume.lo libvolume_key_la-volume_luks.lo +libvolume_key_la_OBJECTS = $(am_libvolume_key_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libvolume_key_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libvolume_key_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/admin/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libvolume_key_la_SOURCES) +DIST_SOURCES = $(libvolume_key_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(pkginclude_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +VERSION_INFO = 3:3:2 +lib_LTLIBRARIES = libvolume_key.la +pkginclude_HEADERS = libvolume_key.h +libvolume_key_la_SOURCES = SECerrs.h SSLerrs.h \ + crypto.c crypto.h \ + kmip.c kmip.h \ + libvolume_key.c libvolume_key.h \ + nss_error.c nss_error.h \ + ui.c ui.h \ + volume.c volume.h \ + volume_luks.c volume_luks.h + +libvolume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) +libvolume_key_la_LDFLAGS = -version-info $(VERSION_INFO) +libvolume_key_la_LIBADD = $(blkid_LIBS) $(glib_LIBS) $(GPGME_LIBS) \ + $(LTLIBINTL) $(libcryptsetup_LIBS) $(nss_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu lib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libvolume_key.la: $(libvolume_key_la_OBJECTS) $(libvolume_key_la_DEPENDENCIES) $(EXTRA_libvolume_key_la_DEPENDENCIES) + $(AM_V_CCLD)$(libvolume_key_la_LINK) -rpath $(libdir) $(libvolume_key_la_OBJECTS) $(libvolume_key_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvolume_key_la-crypto.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvolume_key_la-kmip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvolume_key_la-libvolume_key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvolume_key_la-nss_error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvolume_key_la-ui.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvolume_key_la-volume.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvolume_key_la-volume_luks.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libvolume_key_la-crypto.lo: crypto.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvolume_key_la-crypto.lo -MD -MP -MF $(DEPDIR)/libvolume_key_la-crypto.Tpo -c -o libvolume_key_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvolume_key_la-crypto.Tpo $(DEPDIR)/libvolume_key_la-crypto.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto.c' object='libvolume_key_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvolume_key_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c + +libvolume_key_la-kmip.lo: kmip.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvolume_key_la-kmip.lo -MD -MP -MF $(DEPDIR)/libvolume_key_la-kmip.Tpo -c -o libvolume_key_la-kmip.lo `test -f 'kmip.c' || echo '$(srcdir)/'`kmip.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvolume_key_la-kmip.Tpo $(DEPDIR)/libvolume_key_la-kmip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kmip.c' object='libvolume_key_la-kmip.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvolume_key_la-kmip.lo `test -f 'kmip.c' || echo '$(srcdir)/'`kmip.c + +libvolume_key_la-libvolume_key.lo: libvolume_key.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvolume_key_la-libvolume_key.lo -MD -MP -MF $(DEPDIR)/libvolume_key_la-libvolume_key.Tpo -c -o libvolume_key_la-libvolume_key.lo `test -f 'libvolume_key.c' || echo '$(srcdir)/'`libvolume_key.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvolume_key_la-libvolume_key.Tpo $(DEPDIR)/libvolume_key_la-libvolume_key.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libvolume_key.c' object='libvolume_key_la-libvolume_key.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvolume_key_la-libvolume_key.lo `test -f 'libvolume_key.c' || echo '$(srcdir)/'`libvolume_key.c + +libvolume_key_la-nss_error.lo: nss_error.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvolume_key_la-nss_error.lo -MD -MP -MF $(DEPDIR)/libvolume_key_la-nss_error.Tpo -c -o libvolume_key_la-nss_error.lo `test -f 'nss_error.c' || echo '$(srcdir)/'`nss_error.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvolume_key_la-nss_error.Tpo $(DEPDIR)/libvolume_key_la-nss_error.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nss_error.c' object='libvolume_key_la-nss_error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvolume_key_la-nss_error.lo `test -f 'nss_error.c' || echo '$(srcdir)/'`nss_error.c + +libvolume_key_la-ui.lo: ui.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvolume_key_la-ui.lo -MD -MP -MF $(DEPDIR)/libvolume_key_la-ui.Tpo -c -o libvolume_key_la-ui.lo `test -f 'ui.c' || echo '$(srcdir)/'`ui.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvolume_key_la-ui.Tpo $(DEPDIR)/libvolume_key_la-ui.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ui.c' object='libvolume_key_la-ui.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvolume_key_la-ui.lo `test -f 'ui.c' || echo '$(srcdir)/'`ui.c + +libvolume_key_la-volume.lo: volume.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvolume_key_la-volume.lo -MD -MP -MF $(DEPDIR)/libvolume_key_la-volume.Tpo -c -o libvolume_key_la-volume.lo `test -f 'volume.c' || echo '$(srcdir)/'`volume.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvolume_key_la-volume.Tpo $(DEPDIR)/libvolume_key_la-volume.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='volume.c' object='libvolume_key_la-volume.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvolume_key_la-volume.lo `test -f 'volume.c' || echo '$(srcdir)/'`volume.c + +libvolume_key_la-volume_luks.lo: volume_luks.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvolume_key_la-volume_luks.lo -MD -MP -MF $(DEPDIR)/libvolume_key_la-volume_luks.Tpo -c -o libvolume_key_la-volume_luks.lo `test -f 'volume_luks.c' || echo '$(srcdir)/'`volume_luks.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvolume_key_la-volume_luks.Tpo $(DEPDIR)/libvolume_key_la-volume_luks.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='volume_luks.c' object='libvolume_key_la-volume_luks.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvolume_key_la-volume_luks.lo `test -f 'volume_luks.c' || echo '$(srcdir)/'`volume_luks.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-libLTLIBRARIES \ + uninstall-pkgincludeHEADERS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/Makefile.am volume-key-0.3.12/Makefile.am --- volume-key-0.3.10/Makefile.am 2018-05-16 15:17:11.000000000 +0000 +++ volume-key-0.3.12/Makefile.am 2018-09-19 07:22:14.000000000 +0000 @@ -20,59 +20,6 @@ AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ $(libcryptsetup_CFLAGS) $(nss_CFLAGS) LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' -PYTHON_CPPFLAGS = -I/usr/include/python$(PYTHON_VERSION) ## Targets -SUBDIRS = po - -bin_PROGRAMS = src/volume_key -dist_man_MANS = doc/volume_key.8 - -lib_LTLIBRARIES = lib/libvolume_key.la -pkginclude_HEADERS = lib/libvolume_key.h - -pyexec_PYTHON = python/volume_key.py -pyexec_LTLIBRARIES = python/_volume_key.la - -TESTS = tests/packet_roundtrips.sh - -EXTRA_DIST = contrib/email/README contrib/email/escrow-receive \ - contrib/email/escrow-transit \ - python/volume_key.i \ - tests/packet_roundtrips.sh tests/packet_roundtrips_luks_passphrase \ - tests/packet_roundtrips_luks_symmetric - -## Rules -python/volume_key_wrap.c python/volume_key.py: python/volume_key.i - swig -Wall -python -I$(top_srcdir) -o python/volume_key_wrap.c \ - $(top_srcdir)/python/volume_key.i - -python/volume_key.py: python/volume_key_wrap.c - -## Dependency data -lib_libvolume_key_la_SOURCES = lib/SECerrs.h lib/SSLerrs.h \ - lib/crypto.c lib/crypto.h \ - lib/kmip.c lib/kmip.h \ - lib/libvolume_key.c lib/libvolume_key.h \ - lib/nss_error.c lib/nss_error.h \ - lib/ui.c lib/ui.h \ - lib/volume.c lib/volume.h lib/volume_luks.c lib/volume_luks.h -lib_libvolume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) -lib_libvolume_key_la_LDFLAGS = -version-info 3:3:2 -lib_libvolume_key_la_LIBADD = $(blkid_LIBS) $(glib_LIBS) $(GPGME_LIBS) \ - $(LTLIBINTL) $(libcryptsetup_LIBS) $(nss_LIBS) - -python__volume_key_la_SOURCES = python/volume_key_wrap.c -python__volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -python__volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) -python__volume_key_la_LIBADD = lib/libvolume_key.la -lpython$(PYTHON_VERSION) \ - $(glib_LIBS) $(nss_LIBS) - -src_volume_key_SOURCES = src/volume_key.c -src_volume_key_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) -src_volume_key_LDADD = lib/libvolume_key.la $(glib_LIBS) $(nss_LIBS) - -tests_packet_roundtrips_SOURCES = tests/packet_roundtrips.c -tests_packet_roundtrips_LDADD = lib/libvolume_key.la $(glib_LIBS) $(nss_LIBS) - -check_PROGRAMS = tests/packet_roundtrips +SUBDIRS = contrib doc lib po python src tests diff -Nru volume-key-0.3.10/Makefile.in volume-key-0.3.12/Makefile.in --- volume-key-0.3.10/Makefile.in 2018-05-21 08:29:56.000000000 +0000 +++ volume-key-0.3.12/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -28,9 +28,6 @@ # Street, Fifth Floor, Boston, MA 02110-1301, USA. # Author: Miloslav Trmač - - - VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -105,8 +102,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = src/volume_key$(EXEEXT) -check_PROGRAMS = tests/packet_roundtrips$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ @@ -120,87 +115,13 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(pyexec_PYTHON) $(pkginclude_HEADERS) \ - $(am__DIST_COMMON) + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyexecdir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pyexecdir)" \ - "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(pyexec_LTLIBRARIES) -am__DEPENDENCIES_1 = -lib_libvolume_key_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -am__dirstamp = $(am__leading_dot)dirstamp -am_lib_libvolume_key_la_OBJECTS = lib/lib_libvolume_key_la-crypto.lo \ - lib/lib_libvolume_key_la-kmip.lo \ - lib/lib_libvolume_key_la-libvolume_key.lo \ - lib/lib_libvolume_key_la-nss_error.lo \ - lib/lib_libvolume_key_la-ui.lo \ - lib/lib_libvolume_key_la-volume.lo \ - lib/lib_libvolume_key_la-volume_luks.lo -lib_libvolume_key_la_OBJECTS = $(am_lib_libvolume_key_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -lib_libvolume_key_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(lib_libvolume_key_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -python__volume_key_la_DEPENDENCIES = lib/libvolume_key.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_python__volume_key_la_OBJECTS = \ - python/python__volume_key_la-volume_key_wrap.lo -python__volume_key_la_OBJECTS = $(am_python__volume_key_la_OBJECTS) -python__volume_key_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(python__volume_key_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -PROGRAMS = $(bin_PROGRAMS) -am_src_volume_key_OBJECTS = src/src_volume_key-volume_key.$(OBJEXT) -src_volume_key_OBJECTS = $(am_src_volume_key_OBJECTS) -src_volume_key_DEPENDENCIES = lib/libvolume_key.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_tests_packet_roundtrips_OBJECTS = \ - tests/packet_roundtrips.$(OBJEXT) -tests_packet_roundtrips_OBJECTS = \ - $(am_tests_packet_roundtrips_OBJECTS) -tests_packet_roundtrips_DEPENDENCIES = lib/libvolume_key.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -213,34 +134,8 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/admin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(lib_libvolume_key_la_SOURCES) \ - $(python__volume_key_la_SOURCES) $(src_volume_key_SOURCES) \ - $(tests_packet_roundtrips_SOURCES) -DIST_SOURCES = $(lib_libvolume_key_la_SOURCES) \ - $(python__volume_key_la_SOURCES) $(src_volume_key_SOURCES) \ - $(tests_packet_roundtrips_SOURCES) +SOURCES = +DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ @@ -254,14 +149,6 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) -am__pep3147_tweak = \ - sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|' -py_compile = $(top_srcdir)/admin/py-compile -man8dir = $(mandir)/man8 -NROFF = nroff -MANS = $(dist_man_MANS) -HEADERS = $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -269,7 +156,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope check recheck distdir dist dist-all distcheck + cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, @@ -291,195 +178,17 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/admin/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/admin/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(top_srcdir)/admin/ar-lib \ - $(top_srcdir)/admin/compile $(top_srcdir)/admin/config.guess \ +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/admin/ar-lib $(top_srcdir)/admin/compile \ + $(top_srcdir)/admin/config.guess \ $(top_srcdir)/admin/config.rpath \ - $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/depcomp \ - $(top_srcdir)/admin/install-sh $(top_srcdir)/admin/ltmain.sh \ - $(top_srcdir)/admin/missing $(top_srcdir)/admin/py-compile \ - $(top_srcdir)/admin/test-driver ABOUT-NLS AUTHORS COPYING \ - ChangeLog INSTALL NEWS README admin/ar-lib admin/compile \ - admin/config.guess admin/config.rpath admin/config.sub \ - admin/depcomp admin/install-sh admin/ltmain.sh admin/missing \ - admin/py-compile + $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/install-sh \ + $(top_srcdir)/admin/ltmain.sh $(top_srcdir)/admin/missing \ + ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README \ + admin/ar-lib admin/compile admin/config.guess \ + admin/config.rpath admin/config.sub admin/install-sh \ + admin/ltmain.sh admin/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -600,7 +309,22 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ @@ -663,12 +387,16 @@ nss_LIBS = @nss_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +py3execdir = @py3execdir@ pyexecdir = @pyexecdir@ +python3dir = @python3dir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ @@ -683,49 +411,11 @@ $(libcryptsetup_CFLAGS) $(nss_CFLAGS) LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' -PYTHON_CPPFLAGS = -I/usr/include/python$(PYTHON_VERSION) -SUBDIRS = po -dist_man_MANS = doc/volume_key.8 -lib_LTLIBRARIES = lib/libvolume_key.la -pkginclude_HEADERS = lib/libvolume_key.h -pyexec_PYTHON = python/volume_key.py -pyexec_LTLIBRARIES = python/_volume_key.la -TESTS = tests/packet_roundtrips.sh -EXTRA_DIST = contrib/email/README contrib/email/escrow-receive \ - contrib/email/escrow-transit \ - python/volume_key.i \ - tests/packet_roundtrips.sh tests/packet_roundtrips_luks_passphrase \ - tests/packet_roundtrips_luks_symmetric - -lib_libvolume_key_la_SOURCES = lib/SECerrs.h lib/SSLerrs.h \ - lib/crypto.c lib/crypto.h \ - lib/kmip.c lib/kmip.h \ - lib/libvolume_key.c lib/libvolume_key.h \ - lib/nss_error.c lib/nss_error.h \ - lib/ui.c lib/ui.h \ - lib/volume.c lib/volume.h lib/volume_luks.c lib/volume_luks.h - -lib_libvolume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) -lib_libvolume_key_la_LDFLAGS = -version-info 3:3:2 -lib_libvolume_key_la_LIBADD = $(blkid_LIBS) $(glib_LIBS) $(GPGME_LIBS) \ - $(LTLIBINTL) $(libcryptsetup_LIBS) $(nss_LIBS) - -python__volume_key_la_SOURCES = python/volume_key_wrap.c -python__volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -python__volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) -python__volume_key_la_LIBADD = lib/libvolume_key.la -lpython$(PYTHON_VERSION) \ - $(glib_LIBS) $(nss_LIBS) - -src_volume_key_SOURCES = src/volume_key.c -src_volume_key_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) -src_volume_key_LDADD = lib/libvolume_key.la $(glib_LIBS) $(nss_LIBS) -tests_packet_roundtrips_SOURCES = tests/packet_roundtrips.c -tests_packet_roundtrips_LDADD = lib/libvolume_key.la $(glib_LIBS) $(nss_LIBS) +SUBDIRS = contrib doc lib po python src tests all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -775,433 +465,14 @@ distclean-hdr: -rm -f config.h stamp-h1 -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ - } - -uninstall-pyexecLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ - done - -clean-pyexecLTLIBRARIES: - -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) - @list='$(pyexec_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -lib/$(am__dirstamp): - @$(MKDIR_P) lib - @: > lib/$(am__dirstamp) -lib/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) lib/$(DEPDIR) - @: > lib/$(DEPDIR)/$(am__dirstamp) -lib/lib_libvolume_key_la-crypto.lo: lib/$(am__dirstamp) \ - lib/$(DEPDIR)/$(am__dirstamp) -lib/lib_libvolume_key_la-kmip.lo: lib/$(am__dirstamp) \ - lib/$(DEPDIR)/$(am__dirstamp) -lib/lib_libvolume_key_la-libvolume_key.lo: lib/$(am__dirstamp) \ - lib/$(DEPDIR)/$(am__dirstamp) -lib/lib_libvolume_key_la-nss_error.lo: lib/$(am__dirstamp) \ - lib/$(DEPDIR)/$(am__dirstamp) -lib/lib_libvolume_key_la-ui.lo: lib/$(am__dirstamp) \ - lib/$(DEPDIR)/$(am__dirstamp) -lib/lib_libvolume_key_la-volume.lo: lib/$(am__dirstamp) \ - lib/$(DEPDIR)/$(am__dirstamp) -lib/lib_libvolume_key_la-volume_luks.lo: lib/$(am__dirstamp) \ - lib/$(DEPDIR)/$(am__dirstamp) - -lib/libvolume_key.la: $(lib_libvolume_key_la_OBJECTS) $(lib_libvolume_key_la_DEPENDENCIES) $(EXTRA_lib_libvolume_key_la_DEPENDENCIES) lib/$(am__dirstamp) - $(AM_V_CCLD)$(lib_libvolume_key_la_LINK) -rpath $(libdir) $(lib_libvolume_key_la_OBJECTS) $(lib_libvolume_key_la_LIBADD) $(LIBS) -python/$(am__dirstamp): - @$(MKDIR_P) python - @: > python/$(am__dirstamp) -python/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) python/$(DEPDIR) - @: > python/$(DEPDIR)/$(am__dirstamp) -python/python__volume_key_la-volume_key_wrap.lo: \ - python/$(am__dirstamp) python/$(DEPDIR)/$(am__dirstamp) - -python/_volume_key.la: $(python__volume_key_la_OBJECTS) $(python__volume_key_la_DEPENDENCIES) $(EXTRA_python__volume_key_la_DEPENDENCIES) python/$(am__dirstamp) - $(AM_V_CCLD)$(python__volume_key_la_LINK) -rpath $(pyexecdir) $(python__volume_key_la_OBJECTS) $(python__volume_key_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -src/$(am__dirstamp): - @$(MKDIR_P) src - @: > src/$(am__dirstamp) -src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/$(DEPDIR) - @: > src/$(DEPDIR)/$(am__dirstamp) -src/src_volume_key-volume_key.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) - -src/volume_key$(EXEEXT): $(src_volume_key_OBJECTS) $(src_volume_key_DEPENDENCIES) $(EXTRA_src_volume_key_DEPENDENCIES) src/$(am__dirstamp) - @rm -f src/volume_key$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(src_volume_key_OBJECTS) $(src_volume_key_LDADD) $(LIBS) -tests/$(am__dirstamp): - @$(MKDIR_P) tests - @: > tests/$(am__dirstamp) -tests/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/$(DEPDIR) - @: > tests/$(DEPDIR)/$(am__dirstamp) -tests/packet_roundtrips.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) - -tests/packet_roundtrips$(EXEEXT): $(tests_packet_roundtrips_OBJECTS) $(tests_packet_roundtrips_DEPENDENCIES) $(EXTRA_tests_packet_roundtrips_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/packet_roundtrips$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tests_packet_roundtrips_OBJECTS) $(tests_packet_roundtrips_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f lib/*.$(OBJEXT) - -rm -f lib/*.lo - -rm -f python/*.$(OBJEXT) - -rm -f python/*.lo - -rm -f src/*.$(OBJEXT) - -rm -f tests/*.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvolume_key_la-crypto.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvolume_key_la-kmip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvolume_key_la-libvolume_key.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvolume_key_la-nss_error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvolume_key_la-ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvolume_key_la-volume.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvolume_key_la-volume_luks.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/python__volume_key_la-volume_key_wrap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_volume_key-volume_key.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/packet_roundtrips.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -lib/lib_libvolume_key_la-crypto.lo: lib/crypto.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvolume_key_la-crypto.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvolume_key_la-crypto.Tpo -c -o lib/lib_libvolume_key_la-crypto.lo `test -f 'lib/crypto.c' || echo '$(srcdir)/'`lib/crypto.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/$(DEPDIR)/lib_libvolume_key_la-crypto.Tpo lib/$(DEPDIR)/lib_libvolume_key_la-crypto.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/crypto.c' object='lib/lib_libvolume_key_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvolume_key_la-crypto.lo `test -f 'lib/crypto.c' || echo '$(srcdir)/'`lib/crypto.c - -lib/lib_libvolume_key_la-kmip.lo: lib/kmip.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvolume_key_la-kmip.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvolume_key_la-kmip.Tpo -c -o lib/lib_libvolume_key_la-kmip.lo `test -f 'lib/kmip.c' || echo '$(srcdir)/'`lib/kmip.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/$(DEPDIR)/lib_libvolume_key_la-kmip.Tpo lib/$(DEPDIR)/lib_libvolume_key_la-kmip.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/kmip.c' object='lib/lib_libvolume_key_la-kmip.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvolume_key_la-kmip.lo `test -f 'lib/kmip.c' || echo '$(srcdir)/'`lib/kmip.c - -lib/lib_libvolume_key_la-libvolume_key.lo: lib/libvolume_key.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvolume_key_la-libvolume_key.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvolume_key_la-libvolume_key.Tpo -c -o lib/lib_libvolume_key_la-libvolume_key.lo `test -f 'lib/libvolume_key.c' || echo '$(srcdir)/'`lib/libvolume_key.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/$(DEPDIR)/lib_libvolume_key_la-libvolume_key.Tpo lib/$(DEPDIR)/lib_libvolume_key_la-libvolume_key.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/libvolume_key.c' object='lib/lib_libvolume_key_la-libvolume_key.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvolume_key_la-libvolume_key.lo `test -f 'lib/libvolume_key.c' || echo '$(srcdir)/'`lib/libvolume_key.c - -lib/lib_libvolume_key_la-nss_error.lo: lib/nss_error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvolume_key_la-nss_error.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvolume_key_la-nss_error.Tpo -c -o lib/lib_libvolume_key_la-nss_error.lo `test -f 'lib/nss_error.c' || echo '$(srcdir)/'`lib/nss_error.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/$(DEPDIR)/lib_libvolume_key_la-nss_error.Tpo lib/$(DEPDIR)/lib_libvolume_key_la-nss_error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/nss_error.c' object='lib/lib_libvolume_key_la-nss_error.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvolume_key_la-nss_error.lo `test -f 'lib/nss_error.c' || echo '$(srcdir)/'`lib/nss_error.c - -lib/lib_libvolume_key_la-ui.lo: lib/ui.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvolume_key_la-ui.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvolume_key_la-ui.Tpo -c -o lib/lib_libvolume_key_la-ui.lo `test -f 'lib/ui.c' || echo '$(srcdir)/'`lib/ui.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/$(DEPDIR)/lib_libvolume_key_la-ui.Tpo lib/$(DEPDIR)/lib_libvolume_key_la-ui.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/ui.c' object='lib/lib_libvolume_key_la-ui.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvolume_key_la-ui.lo `test -f 'lib/ui.c' || echo '$(srcdir)/'`lib/ui.c - -lib/lib_libvolume_key_la-volume.lo: lib/volume.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvolume_key_la-volume.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvolume_key_la-volume.Tpo -c -o lib/lib_libvolume_key_la-volume.lo `test -f 'lib/volume.c' || echo '$(srcdir)/'`lib/volume.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/$(DEPDIR)/lib_libvolume_key_la-volume.Tpo lib/$(DEPDIR)/lib_libvolume_key_la-volume.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/volume.c' object='lib/lib_libvolume_key_la-volume.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvolume_key_la-volume.lo `test -f 'lib/volume.c' || echo '$(srcdir)/'`lib/volume.c - -lib/lib_libvolume_key_la-volume_luks.lo: lib/volume_luks.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvolume_key_la-volume_luks.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvolume_key_la-volume_luks.Tpo -c -o lib/lib_libvolume_key_la-volume_luks.lo `test -f 'lib/volume_luks.c' || echo '$(srcdir)/'`lib/volume_luks.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/$(DEPDIR)/lib_libvolume_key_la-volume_luks.Tpo lib/$(DEPDIR)/lib_libvolume_key_la-volume_luks.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/volume_luks.c' object='lib/lib_libvolume_key_la-volume_luks.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvolume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvolume_key_la-volume_luks.lo `test -f 'lib/volume_luks.c' || echo '$(srcdir)/'`lib/volume_luks.c - -python/python__volume_key_la-volume_key_wrap.lo: python/volume_key_wrap.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python__volume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/python__volume_key_la-volume_key_wrap.lo -MD -MP -MF python/$(DEPDIR)/python__volume_key_la-volume_key_wrap.Tpo -c -o python/python__volume_key_la-volume_key_wrap.lo `test -f 'python/volume_key_wrap.c' || echo '$(srcdir)/'`python/volume_key_wrap.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/python__volume_key_la-volume_key_wrap.Tpo python/$(DEPDIR)/python__volume_key_la-volume_key_wrap.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/volume_key_wrap.c' object='python/python__volume_key_la-volume_key_wrap.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python__volume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/python__volume_key_la-volume_key_wrap.lo `test -f 'python/volume_key_wrap.c' || echo '$(srcdir)/'`python/volume_key_wrap.c - -src/src_volume_key-volume_key.o: src/volume_key.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_volume_key-volume_key.o -MD -MP -MF src/$(DEPDIR)/src_volume_key-volume_key.Tpo -c -o src/src_volume_key-volume_key.o `test -f 'src/volume_key.c' || echo '$(srcdir)/'`src/volume_key.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_volume_key-volume_key.Tpo src/$(DEPDIR)/src_volume_key-volume_key.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/volume_key.c' object='src/src_volume_key-volume_key.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_volume_key-volume_key.o `test -f 'src/volume_key.c' || echo '$(srcdir)/'`src/volume_key.c - -src/src_volume_key-volume_key.obj: src/volume_key.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_volume_key-volume_key.obj -MD -MP -MF src/$(DEPDIR)/src_volume_key-volume_key.Tpo -c -o src/src_volume_key-volume_key.obj `if test -f 'src/volume_key.c'; then $(CYGPATH_W) 'src/volume_key.c'; else $(CYGPATH_W) '$(srcdir)/src/volume_key.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_volume_key-volume_key.Tpo src/$(DEPDIR)/src_volume_key-volume_key.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/volume_key.c' object='src/src_volume_key-volume_key.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_volume_key-volume_key.obj `if test -f 'src/volume_key.c'; then $(CYGPATH_W) 'src/volume_key.c'; else $(CYGPATH_W) '$(srcdir)/src/volume_key.c'; fi` - mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs - -rm -rf lib/.libs lib/_libs - -rm -rf python/.libs python/_libs - -rm -rf src/.libs src/_libs - -rm -rf tests/.libs tests/_libs distclean-libtool: -rm -f libtool config.lt -install-pyexecPYTHON: $(pyexec_PYTHON) - @$(NORMAL_INSTALL) - @list='$(pyexec_PYTHON)'; dlist=; list2=; test -n "$(pyexecdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - $(am__strip_dir) \ - dlist="$$dlist $$f"; \ - list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ - for file in $$list2; do echo $$file; done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyexecdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pyexecdir)" || exit $$?; \ - done || exit $$?; \ - if test -n "$$dlist"; then \ - $(am__py_compile) --destdir "$(DESTDIR)" \ - --basedir "$(pyexecdir)" $$dlist; \ - else :; fi - -uninstall-pyexecPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(pyexec_PYTHON)'; test -n "$(pyexecdir)" || list=; \ - py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$py_files" || exit 0; \ - dir='$(DESTDIR)$(pyexecdir)'; \ - pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ - pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ - py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ - echo "$$py_files_pep3147";\ - pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ - pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ - st=0; \ - for files in \ - "$$py_files" \ - "$$pyc_files" \ - "$$pyo_files" \ - "$$pyc_files_pep3147" \ - "$$pyo_files_pep3147" \ - ; do \ - $(am__uninstall_files_from_dir) || st=$$?; \ - done; \ - exit $$st -install-man8: $(dist_man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(dist_man_MANS)'; \ - test -n "$(man8dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.8[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -1309,169 +580,6 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -tests/packet_roundtrips.sh.log: tests/packet_roundtrips.sh - @p='tests/packet_roundtrips.sh'; \ - b='tests/packet_roundtrips.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @@ -1660,18 +768,10 @@ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) \ - config.h -install-binPROGRAMS: install-libLTLIBRARIES - +all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -1692,39 +792,25 @@ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f lib/$(DEPDIR)/$(am__dirstamp) - -rm -f lib/$(am__dirstamp) - -rm -f python/$(DEPDIR)/$(am__dirstamp) - -rm -f python/$(am__dirstamp) - -rm -f src/$(DEPDIR)/$(am__dirstamp) - -rm -f src/$(am__dirstamp) - -rm -f tests/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-pyexecLTLIBRARIES \ - mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf lib/$(DEPDIR) python/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags dvi: dvi-recursive @@ -1738,14 +824,13 @@ info-am: -install-data-am: install-man install-pkgincludeHEADERS +install-data-am: install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ - install-pyexecLTLIBRARIES install-pyexecPYTHON +install-exec-am: install-html: install-html-recursive @@ -1755,7 +840,7 @@ install-info-am: -install-man: install-man8 +install-man: install-pdf: install-pdf-recursive @@ -1770,14 +855,12 @@ maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf lib/$(DEPDIR) python/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive @@ -1787,47 +870,30 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ - uninstall-man uninstall-pkgincludeHEADERS \ - uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON - -uninstall-man: uninstall-man8 +uninstall-am: -.MAKE: $(am__recursive_targets) all check-am install-am install-strip +.MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--refresh check check-TESTS check-am clean clean-binPROGRAMS \ - clean-checkPROGRAMS clean-cscope clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-pyexecLTLIBRARIES \ - cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man \ - install-man8 install-pdf install-pdf-am \ - install-pkgincludeHEADERS install-ps install-ps-am \ - install-pyexecLTLIBRARIES install-pyexecPYTHON install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am recheck tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ - uninstall-man uninstall-man8 uninstall-pkgincludeHEADERS \ - uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am .PRECIOUS: Makefile -python/volume_key_wrap.c python/volume_key.py: python/volume_key.i - swig -Wall -python -I$(top_srcdir) -o python/volume_key_wrap.c \ - $(top_srcdir)/python/volume_key.i - -python/volume_key.py: python/volume_key_wrap.c - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru volume-key-0.3.10/NEWS volume-key-0.3.12/NEWS --- volume-key-0.3.10/NEWS 2018-05-16 14:55:58.000000000 +0000 +++ volume-key-0.3.12/NEWS 2018-10-08 11:24:58.000000000 +0000 @@ -1,3 +1,9 @@ +Changes in version 0.3.12: +- Added back the Python 2 support. + +Changes in version 0.3.11: +- Switched to Python 3. + Changes in version 0.3.10: - Updated translations. - Switched to gpg2. Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/as.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/as.gmo differ diff -Nru volume-key-0.3.10/po/as.po volume-key-0.3.12/po/as.po --- volume-key-0.3.10/po/as.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/as.po 2018-10-08 11:33:11.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:37-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Assamese (http://www.transifex.com/projects/p/fedora/language/" @@ -398,7 +398,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS ভলিউম খুলিবলৈ ত্ৰুটি: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "প্ৰমাণপত্ৰ ডিক'ড কৰিবলৈ ত্ৰুটি" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/bg.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/bg.gmo differ diff -Nru volume-key-0.3.10/po/bg.po volume-key-0.3.12/po/bg.po --- volume-key-0.3.10/po/bg.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/bg.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2017-05-10 02:56-0400\n" "Last-Translator: Valentin Laskov \n" "Language-Team: Bulgarian \n" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "Грешка при отваряне на LUKS том: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Грешка при декодиране на сертификат" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/bn.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/bn.gmo differ Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/bn_IN.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/bn_IN.gmo differ diff -Nru volume-key-0.3.10/po/bn_IN.po volume-key-0.3.12/po/bn_IN.po --- volume-key-0.3.10/po/bn_IN.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/bn_IN.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:37-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Bengali (India) \n" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS ভলিউম খুলতে ত্রুটি: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "সার্টিফিকেট ডি-কোড করতে ত্রুটি" diff -Nru volume-key-0.3.10/po/bn.po volume-key-0.3.12/po/bn.po --- volume-key-0.3.10/po/bn.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/bn.po 2018-10-08 11:33:11.000000000 +0000 @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:37-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Bengali \n" @@ -399,7 +399,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS ভলিউম খুলতে ত্রুটি: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "সার্টিফিকেট ডি-কোড করতে ত্রুটি" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/ca.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/ca.gmo differ diff -Nru volume-key-0.3.10/po/ca.po volume-key-0.3.12/po/ca.po --- volume-key-0.3.10/po/ca.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/ca.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-12-09 03:17-0500\n" "Last-Translator: Robert Antoni Buj Gelonch \n" "Language-Team: Catalan \n" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "S'ha produït un error en obrir el volum LUKS: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "S'ha produït un error en la descodificació del certificat" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/cs.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/cs.gmo differ diff -Nru volume-key-0.3.10/po/cs.po volume-key-0.3.12/po/cs.po --- volume-key-0.3.10/po/cs.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/cs.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2016-09-12 05:03-0400\n" "Last-Translator: Zdenek \n" "Language-Team: Czech (http://www.transifex.com/projects/p/fedora/language/" @@ -397,7 +397,7 @@ msgid "Error opening LUKS volume: " msgstr "Chyba při otevírání svazku LUKS: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Chyba při dekódování certifikátu" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/de_CH.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/de_CH.gmo differ diff -Nru volume-key-0.3.10/po/de_CH.po volume-key-0.3.12/po/de_CH.po --- volume-key-0.3.10/po/de_CH.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/de_CH.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:38-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: LANGUAGE \n" @@ -394,7 +394,7 @@ msgid "Error opening LUKS volume: " msgstr "" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/de.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/de.gmo differ diff -Nru volume-key-0.3.10/po/de.po volume-key-0.3.12/po/de.po --- volume-key-0.3.10/po/de.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/de.po 2018-10-08 11:33:11.000000000 +0000 @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:37-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: German \n" @@ -400,7 +400,7 @@ msgid "Error opening LUKS volume: " msgstr "Fehler beim Öffnen des LUKS-Datenträgers: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Fehler beim Decodieren des Zertifikats" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/en_GB.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/en_GB.gmo differ diff -Nru volume-key-0.3.10/po/en_GB.po volume-key-0.3.12/po/en_GB.po --- volume-key-0.3.10/po/en_GB.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/en_GB.po 2018-10-08 11:33:11.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:38-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "Error opening LUKS volume: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Error decoding certificate" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/es.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/es.gmo differ diff -Nru volume-key-0.3.10/po/es.po volume-key-0.3.12/po/es.po --- volume-key-0.3.10/po/es.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/es.po 2018-10-08 11:33:11.000000000 +0000 @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2016-09-08 07:39-0400\n" "Last-Translator: William Moreno Reyes \n" "Language-Team: Spanish \n" @@ -409,7 +409,7 @@ msgid "Error opening LUKS volume: " msgstr "Error al intentar abrir el volumen LUKS" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Error al intentar decodificar el certificado" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/eu.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/eu.gmo differ diff -Nru volume-key-0.3.10/po/eu.po volume-key-0.3.12/po/eu.po --- volume-key-0.3.10/po/eu.po 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/eu.po 2018-10-08 11:33:11.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:38-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Basque (http://www.transifex.com/projects/p/fedora/language/" @@ -393,7 +393,7 @@ msgid "Error opening LUKS volume: " msgstr "Errorea LUKS bolumena irekitzean: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/fr.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/fr.gmo differ diff -Nru volume-key-0.3.10/po/fr.po volume-key-0.3.12/po/fr.po --- volume-key-0.3.10/po/fr.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/fr.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-12-30 12:45-0500\n" "Last-Translator: Jérôme Fenal \n" "Language-Team: French \n" @@ -402,7 +402,7 @@ msgid "Error opening LUKS volume: " msgstr "Erreur lors de l'ouverture du volume LUKS :" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Erreur lors du décodage du certificat" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/gu.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/gu.gmo differ diff -Nru volume-key-0.3.10/po/gu.po volume-key-0.3.12/po/gu.po --- volume-key-0.3.10/po/gu.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/gu.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:38-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Gujarati \n" @@ -396,7 +396,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS વોલ્યુમને ખોલી રહ્યા હોય ત્યારે ભૂલ: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "પ્રમાણપત્રને ડિકોડ કરી રહ્યા હોય ત્યારે ભૂલ" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/hi.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/hi.gmo differ diff -Nru volume-key-0.3.10/po/hi.po volume-key-0.3.12/po/hi.po --- volume-key-0.3.10/po/hi.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/hi.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:38-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Hindi \n" @@ -396,7 +396,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS वॉल्यूम खोलने में त्रुटि: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "प्रणामपत्र डिकोड करने में त्रुटि" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/hu.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/hu.gmo differ diff -Nru volume-key-0.3.10/po/hu.po volume-key-0.3.12/po/hu.po --- volume-key-0.3.10/po/hu.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/hu.po 2018-10-08 11:33:11.000000000 +0000 @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2016-03-08 03:45-0500\n" "Last-Translator: Meskó Balázs \n" "Language-Team: Hungarian \n" @@ -398,7 +398,7 @@ msgid "Error opening LUKS volume: " msgstr "Hiba a LUKS kötet megnyitásakor: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Hiba a tanúsítvány dekódolása során" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/id.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/id.gmo differ diff -Nru volume-key-0.3.10/po/id.po volume-key-0.3.12/po/id.po --- volume-key-0.3.10/po/id.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/id.po 2018-10-08 11:33:11.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:38-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Indonesian \n" @@ -392,7 +392,7 @@ msgid "Error opening LUKS volume: " msgstr "" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/it.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/it.gmo differ diff -Nru volume-key-0.3.10/po/it.po volume-key-0.3.12/po/it.po --- volume-key-0.3.10/po/it.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/it.po 2018-10-08 11:33:11.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:39-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Italian \n" @@ -401,7 +401,7 @@ msgid "Error opening LUKS volume: " msgstr "Errore durante l'apertura del volume LUKS:" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Errore durante la decodifica del certificato" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/ja.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/ja.gmo differ diff -Nru volume-key-0.3.10/po/ja.po volume-key-0.3.12/po/ja.po --- volume-key-0.3.10/po/ja.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/ja.po 2018-10-08 11:33:11.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:39-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Japanese \n" @@ -397,7 +397,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS ボリュームを開く時にエラー: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "証明証の復号化でエラー" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/kn.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/kn.gmo differ diff -Nru volume-key-0.3.10/po/kn.po volume-key-0.3.12/po/kn.po --- volume-key-0.3.10/po/kn.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/kn.po 2018-10-08 11:33:11.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:39-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Kannada (http://www.transifex.com/projects/p/fedora/language/" @@ -398,7 +398,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS ವಾಲ್ಯೂಮ್ ಅನ್ನು ತೆರೆಯುವಲ್ಲಿ ದೋಷ ಉಂಟಾಗಿದೆ: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "ಪ್ರಮಾಣಪತ್ರವನ್ನು ಡೀಕೋಡ್ ಮಾಡುವಲ್ಲಿ ದೋಷ ಉಂಟಾಗಿದೆ" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/ko.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/ko.gmo differ diff -Nru volume-key-0.3.10/po/ko.po volume-key-0.3.12/po/ko.po --- volume-key-0.3.10/po/ko.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/ko.po 2018-10-08 11:33:11.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:39-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Korean (http://www.transifex.com/projects/p/fedora/language/" @@ -398,7 +398,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS 볼륨을 여는 중 발생:" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "인증서 디코딩 오류 발생" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/ml.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/ml.gmo differ diff -Nru volume-key-0.3.10/po/ml.po volume-key-0.3.12/po/ml.po --- volume-key-0.3.10/po/ml.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/ml.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:39-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Malayalam \n" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS വോള്യം തുറക്കുന്നതില്‍ പിശക്: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുന്നതില്‍ പിശക്" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/mr.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/mr.gmo differ diff -Nru volume-key-0.3.10/po/mr.po volume-key-0.3.12/po/mr.po --- volume-key-0.3.10/po/mr.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/mr.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:39-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Marathi (http://www.transifex.com/projects/p/fedora/language/" @@ -397,7 +397,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS खंड उघडतेवेळी त्रुटी: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "प्रमाणपत्र डिकोड करतेवेळी त्रुटी" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/nl.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/nl.gmo differ diff -Nru volume-key-0.3.10/po/nl.po volume-key-0.3.12/po/nl.po --- volume-key-0.3.10/po/nl.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/nl.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2016-01-27 08:25-0500\n" "Last-Translator: Patrick Uiterwijk \n" "Language-Team: Dutch (http://www.transifex.com/projects/p/fedora/language/" @@ -398,7 +398,7 @@ msgid "Error opening LUKS volume: " msgstr "Fout bij het openen van LUKS volume: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Fout bij decoderen van certificaat" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/or.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/or.gmo differ diff -Nru volume-key-0.3.10/po/or.po volume-key-0.3.12/po/or.po --- volume-key-0.3.10/po/or.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/or.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:40-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Oriya (http://www.transifex.com/projects/p/fedora/language/" @@ -396,7 +396,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS ଭଲ୍ୟୁମ ଖୋଲିବାରେ ତ୍ରୁଟି: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "ପ୍ରମାଣପତ୍ର ଅବସଂକେତନ କରିବାରେ ତ୍ରୁଟି" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/pa.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/pa.gmo differ diff -Nru volume-key-0.3.10/po/pa.po volume-key-0.3.12/po/pa.po --- volume-key-0.3.10/po/pa.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/pa.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:40-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Panjabi (Punjabi) \n" @@ -396,7 +396,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS ਵਾਲੀਅਮ ਖੋਲਣ ਦੌਰਾਨ ਗਲਤੀ: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "ਸਾਰਟੀਫਿਕੇਟ ਡੀਕੋਡਿੰਗ ਦੌਰਾਨ ਗਲਤੀ" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/pl.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/pl.gmo differ diff -Nru volume-key-0.3.10/po/pl.po volume-key-0.3.12/po/pl.po --- volume-key-0.3.10/po/pl.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/pl.po 2018-10-08 11:33:11.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2016-09-05 03:38-0400\n" "Last-Translator: Piotr Drąg \n" "Language-Team: Polish \n" @@ -399,7 +399,7 @@ msgid "Error opening LUKS volume: " msgstr "Błąd podczas otwierania woluminu LUKS: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Błąd podczas dekodowania certyfikatu" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/pt_BR.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/pt_BR.gmo differ diff -Nru volume-key-0.3.10/po/pt_BR.po volume-key-0.3.12/po/pt_BR.po --- volume-key-0.3.10/po/pt_BR.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/pt_BR.po 2018-10-08 11:33:11.000000000 +0000 @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2016-03-21 01:45-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Portuguese (Brazil) \n" @@ -398,7 +398,7 @@ msgid "Error opening LUKS volume: " msgstr "Erro ao abrir o volume LUKS: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Erro ao decodificar o certificado" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/pt.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/pt.gmo differ diff -Nru volume-key-0.3.10/po/pt.po volume-key-0.3.12/po/pt.po --- volume-key-0.3.10/po/pt.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/pt.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:40-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Portuguese \n" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "Erro ao abrir o volume LUKS: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Erro ao descodificar o certificado" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/ru.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/ru.gmo differ diff -Nru volume-key-0.3.10/po/ru.po volume-key-0.3.12/po/ru.po --- volume-key-0.3.10/po/ru.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/ru.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:41-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Russian \n" @@ -397,7 +397,7 @@ msgid "Error opening LUKS volume: " msgstr "Ошибка открытия тома LUKS:" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Ошибка декодирования сертификата" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/sk.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/sk.gmo differ diff -Nru volume-key-0.3.10/po/sk.po volume-key-0.3.12/po/sk.po --- volume-key-0.3.10/po/sk.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/sk.po 2018-10-08 11:33:11.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:41-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Slovak (http://www.transifex.com/projects/p/fedora/language/" @@ -393,7 +393,7 @@ msgid "Error opening LUKS volume: " msgstr "" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/sv.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/sv.gmo differ diff -Nru volume-key-0.3.10/po/sv.po volume-key-0.3.12/po/sv.po --- volume-key-0.3.10/po/sv.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/sv.po 2018-10-08 11:33:11.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:41-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Swedish (http://www.transifex.com/projects/p/fedora/language/" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "Fel när LUKS-volym öppnades: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Fel vid avkodning av certifikat" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/ta.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/ta.gmo differ diff -Nru volume-key-0.3.10/po/ta.po volume-key-0.3.12/po/ta.po --- volume-key-0.3.10/po/ta.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/ta.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:41-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Tamil \n" @@ -396,7 +396,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS தொகுதியை திறப்பதில் பிழை: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "சான்றிதழை குறிமுறை நீக்குவதில் பிழை" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/te.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/te.gmo differ diff -Nru volume-key-0.3.10/po/te.po volume-key-0.3.12/po/te.po --- volume-key-0.3.10/po/te.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/te.po 2018-10-08 11:33:11.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:41-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Telugu (http://www.transifex.com/projects/p/fedora/language/" @@ -397,7 +397,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS వాల్యూమ్ తెరుచుటలో దోషము: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "ధృవీకరణపత్రమును డీకోడ్ చేయుటలో దోషము" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/tr.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/tr.gmo differ diff -Nru volume-key-0.3.10/po/tr.po volume-key-0.3.12/po/tr.po --- volume-key-0.3.10/po/tr.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/tr.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:41-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Turkish (http://www.transifex.com/projects/p/fedora/language/" @@ -396,7 +396,7 @@ msgid "Error opening LUKS volume: " msgstr "LUKS hacmi açılırken hata: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Sertifika açılırken hata" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/uk.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/uk.gmo differ diff -Nru volume-key-0.3.10/po/uk.po volume-key-0.3.12/po/uk.po --- volume-key-0.3.10/po/uk.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/uk.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:42-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Ukrainian \n" @@ -396,7 +396,7 @@ msgid "Error opening LUKS volume: " msgstr "Помилка під час спроби відкриття тому LUKS: " -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "Помилка під час спроби декодування сертифіката" diff -Nru volume-key-0.3.10/po/volume_key.pot volume-key-0.3.12/po/volume_key.pot --- volume-key-0.3.10/po/volume_key.pot 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/po/volume_key.pot 2018-10-08 11:33:11.000000000 +0000 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: volume_key 0.3.10\n" +"Project-Id-Version: volume_key 0.3.12\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -390,7 +390,7 @@ msgid "Error opening LUKS volume: " msgstr "" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/zh_CN.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/zh_CN.gmo differ diff -Nru volume-key-0.3.10/po/zh_CN.po volume-key-0.3.12/po/zh_CN.po --- volume-key-0.3.10/po/zh_CN.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/zh_CN.po 2018-10-08 11:33:11.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:42-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Chinese (China) \n" @@ -397,7 +397,7 @@ msgid "Error opening LUKS volume: " msgstr "打开 LUKS 卷时出错:" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "解码证书时出错" Binary files /tmp/tmpfDg5lb/bxRs80SBlZ/volume-key-0.3.10/po/zh_TW.gmo and /tmp/tmpfDg5lb/dMrwACPX7g/volume-key-0.3.12/po/zh_TW.gmo differ diff -Nru volume-key-0.3.10/po/zh_TW.po volume-key-0.3.12/po/zh_TW.po --- volume-key-0.3.10/po/zh_TW.po 2018-05-21 08:42:23.000000000 +0000 +++ volume-key-0.3.12/po/zh_TW.po 2018-10-08 11:33:11.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: volume_key 0.3.9\n" "Report-Msgid-Bugs-To: https://pagure.io/volume_key\n" -"POT-Creation-Date: 2018-05-21 10:42+0200\n" +"POT-Creation-Date: 2018-10-08 13:33+0200\n" "PO-Revision-Date: 2015-03-14 08:42-0400\n" "Last-Translator: Copied by Zanata \n" "Language-Team: Chinese (Taiwan) \n" @@ -395,7 +395,7 @@ msgid "Error opening LUKS volume: " msgstr "開啟 LUKS 儲區時發生錯誤:" -#: python/volume_key.i:369 +#: python/volume_key.i:384 msgid "Error decoding certificate" msgstr "解碼憑證時發生錯誤" diff -Nru volume-key-0.3.10/python/Makefile.am volume-key-0.3.12/python/Makefile.am --- volume-key-0.3.10/python/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/Makefile.am 2018-09-18 14:02:55.000000000 +0000 @@ -0,0 +1,31 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +EXTRA_DIST = volume_key.i + +SUBDIRS = +if HAVE_PYTHON +SUBDIRS += python +endif +if HAVE_PYTHON3 +SUBDIRS += python3 +endif diff -Nru volume-key-0.3.10/python/Makefile.in volume-key-0.3.12/python/Makefile.in --- volume-key-0.3.10/python/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,703 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@HAVE_PYTHON_TRUE@am__append_1 = python +@HAVE_PYTHON3_TRUE@am__append_2 = python3 +subdir = python +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = python python3 +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +EXTRA_DIST = volume_key.i +SUBDIRS = $(am__append_1) $(am__append_2) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu python/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/python/python/Makefile.am volume-key-0.3.12/python/python/Makefile.am --- volume-key-0.3.10/python/python/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python/Makefile.am 2018-09-18 14:03:43.000000000 +0000 @@ -0,0 +1,39 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +SWIG_FLAGS = -python +SWIG_INCLUDES = -I$(top_srcdir) $(PYTHON_INCLUDES) + +pyexec_PYTHON = volume_key.py +pyexec_LTLIBRARIES = _volume_key.la + +_volume_key_la_SOURCES = volume_key_wrap.c +_volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CFLAGS) +_volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) $(PYTHON_LDFLAGS) +_volume_key_la_LIBADD = $(top_builddir)/lib/libvolume_key.la $(PYTHON_LIBS) \ + $(glib_LIBS) $(nss_LIBS) + +volume_key_wrap.c volume_key.py: ../volume_key.i + swig -Wall $(SWIG_FLAGS) $(SWIG_INCLUDES) -o volume_key_wrap.c \ + $(top_srcdir)/python/volume_key.i + +volume_key.py: volume_key_wrap.c diff -Nru volume-key-0.3.10/python/python/Makefile.in volume-key-0.3.12/python/python/Makefile.in --- volume-key-0.3.10/python/python/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,809 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = python/python +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(pyexec_PYTHON) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pyexecdir)" +LTLIBRARIES = $(pyexec_LTLIBRARIES) +am__DEPENDENCIES_1 = +_volume_key_la_DEPENDENCIES = $(top_builddir)/lib/libvolume_key.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am__volume_key_la_OBJECTS = _volume_key_la-volume_key_wrap.lo +_volume_key_la_OBJECTS = $(am__volume_key_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +_volume_key_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(_volume_key_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/admin/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(_volume_key_la_SOURCES) +DIST_SOURCES = $(_volume_key_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) +am__pep3147_tweak = \ + sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|' +py_compile = $(top_srcdir)/admin/py-compile +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ + $(top_srcdir)/admin/py-compile +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +SWIG_FLAGS = -python +SWIG_INCLUDES = -I$(top_srcdir) $(PYTHON_INCLUDES) +pyexec_PYTHON = volume_key.py +pyexec_LTLIBRARIES = _volume_key.la +_volume_key_la_SOURCES = volume_key_wrap.c +_volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CFLAGS) +_volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) $(PYTHON_LDFLAGS) +_volume_key_la_LIBADD = $(top_builddir)/lib/libvolume_key.la $(PYTHON_LIBS) \ + $(glib_LIBS) $(nss_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/python/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu python/python/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ + } + +uninstall-pyexecLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ + done + +clean-pyexecLTLIBRARIES: + -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) + @list='$(pyexec_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +_volume_key.la: $(_volume_key_la_OBJECTS) $(_volume_key_la_DEPENDENCIES) $(EXTRA__volume_key_la_DEPENDENCIES) + $(AM_V_CCLD)$(_volume_key_la_LINK) -rpath $(pyexecdir) $(_volume_key_la_OBJECTS) $(_volume_key_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_volume_key_la-volume_key_wrap.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +_volume_key_la-volume_key_wrap.lo: volume_key_wrap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_volume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _volume_key_la-volume_key_wrap.lo -MD -MP -MF $(DEPDIR)/_volume_key_la-volume_key_wrap.Tpo -c -o _volume_key_la-volume_key_wrap.lo `test -f 'volume_key_wrap.c' || echo '$(srcdir)/'`volume_key_wrap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_volume_key_la-volume_key_wrap.Tpo $(DEPDIR)/_volume_key_la-volume_key_wrap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='volume_key_wrap.c' object='_volume_key_la-volume_key_wrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_volume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _volume_key_la-volume_key_wrap.lo `test -f 'volume_key_wrap.c' || echo '$(srcdir)/'`volume_key_wrap.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pyexecPYTHON: $(pyexec_PYTHON) + @$(NORMAL_INSTALL) + @list='$(pyexec_PYTHON)'; dlist=; list2=; test -n "$(pyexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyexecdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pyexecdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + $(am__py_compile) --destdir "$(DESTDIR)" \ + --basedir "$(pyexecdir)" $$dlist; \ + else :; fi + +uninstall-pyexecPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(pyexec_PYTHON)'; test -n "$(pyexecdir)" || list=; \ + py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$py_files" || exit 0; \ + dir='$(DESTDIR)$(pyexecdir)'; \ + pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ + pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ + py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ + echo "$$py_files_pep3147";\ + pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ + pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ + st=0; \ + for files in \ + "$$py_files" \ + "$$pyc_files" \ + "$$pyo_files" \ + "$$pyc_files_pep3147" \ + "$$pyo_files_pep3147" \ + ; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + exit $$st + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pyexecdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pyexecLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pyexecLTLIBRARIES install-pyexecPYTHON + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pyexecLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-pyexecLTLIBRARIES \ + install-pyexecPYTHON install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am \ + uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON + +.PRECIOUS: Makefile + + +volume_key_wrap.c volume_key.py: ../volume_key.i + swig -Wall $(SWIG_FLAGS) $(SWIG_INCLUDES) -o volume_key_wrap.c \ + $(top_srcdir)/python/volume_key.i + +volume_key.py: volume_key_wrap.c + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/python/python/volume_key.py volume-key-0.3.12/python/python/volume_key.py --- volume-key-0.3.10/python/python/volume_key.py 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python/volume_key.py 2018-10-08 11:33:12.000000000 +0000 @@ -0,0 +1,283 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 3.0.12 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info >= (2, 7, 0): + def swig_import_helper(): + import importlib + pkg = __name__.rpartition('.')[0] + mname = '.'.join((pkg, '_volume_key')).lstrip('.') + try: + return importlib.import_module(mname) + except ImportError: + return importlib.import_module('_volume_key') + _volume_key = swig_import_helper() + del swig_import_helper +elif _swig_python_version_info >= (2, 6, 0): + def swig_import_helper(): + from os.path import dirname + import imp + fp = None + try: + fp, pathname, description = imp.find_module('_volume_key', [dirname(__file__)]) + except ImportError: + import _volume_key + return _volume_key + try: + _mod = imp.load_module('_volume_key', fp, pathname, description) + finally: + if fp is not None: + fp.close() + return _mod + _volume_key = swig_import_helper() + del swig_import_helper +else: + import _volume_key +del _swig_python_version_info + +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_setattr_nondynamic(self, class_type, name, value, static=1): + if (name == "thisown"): + return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'SwigPyObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name, None) + if method: + return method(self, value) + if (not static): + if _newclass: + object.__setattr__(self, name, value) + else: + self.__dict__[name] = value + else: + raise AttributeError("You cannot add attributes to %s" % self) + + +def _swig_setattr(self, class_type, name, value): + return _swig_setattr_nondynamic(self, class_type, name, value, 0) + + +def _swig_getattr(self, class_type, name): + if (name == "thisown"): + return self.this.own() + method = class_type.__swig_getmethods__.get(name, None) + if method: + return method(self) + raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) + + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + +try: + _object = object + _newclass = 1 +except __builtin__.Exception: + class _object: + pass + _newclass = 0 + +SECRET_DEFAULT = _volume_key.SECRET_DEFAULT +SECRET_DATA_ENCRYPTION_KEY = _volume_key.SECRET_DATA_ENCRYPTION_KEY +SECRET_PASSPHRASE = _volume_key.SECRET_PASSPHRASE +VP_IDENTIFICATION = _volume_key.VP_IDENTIFICATION +VP_CONFIGURATION = _volume_key.VP_CONFIGURATION +VP_SECRET = _volume_key.VP_SECRET +VOLUME_FORMAT_LUKS = _volume_key.VOLUME_FORMAT_LUKS +PACKET_FORMAT_UNKNOWN = _volume_key.PACKET_FORMAT_UNKNOWN +PACKET_FORMAT_CLEARTEXT = _volume_key.PACKET_FORMAT_CLEARTEXT +PACKET_FORMAT_ASYMMETRIC = _volume_key.PACKET_FORMAT_ASYMMETRIC +PACKET_FORMAT_ASSYMETRIC = _volume_key.PACKET_FORMAT_ASSYMETRIC +PACKET_FORMAT_PASSPHRASE = _volume_key.PACKET_FORMAT_PASSPHRASE +PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY +PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY +PACKET_MATCH_OK = _volume_key.PACKET_MATCH_OK +PACKET_MATCH_UNSURE = _volume_key.PACKET_MATCH_UNSURE +class UI(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UI, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UI, name) + __repr__ = _swig_repr + + def __init__(self): + this = _volume_key.new_UI() + try: + self.this.append(this) + except __builtin__.Exception: + self.this = this + __swig_destroy__ = _volume_key.delete_UI + __del__ = lambda self: None + __swig_setmethods__["generic_cb"] = _volume_key.UI_generic_cb_set + __swig_getmethods__["generic_cb"] = _volume_key.UI_generic_cb_get + if _newclass: + generic_cb = _swig_property(_volume_key.UI_generic_cb_get, _volume_key.UI_generic_cb_set) + __swig_setmethods__["passphrase_cb"] = _volume_key.UI_passphrase_cb_set + __swig_getmethods__["passphrase_cb"] = _volume_key.UI_passphrase_cb_get + if _newclass: + passphrase_cb = _swig_property(_volume_key.UI_passphrase_cb_get, _volume_key.UI_passphrase_cb_set) + + def set_nss_pwfn_arg(self, data): + return _volume_key.UI_set_nss_pwfn_arg(self, data) +UI_swigregister = _volume_key.UI_swigregister +UI_swigregister(UI) + +class libvk_volume_property(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, libvk_volume_property, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, libvk_volume_property, name) + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + __swig_destroy__ = _volume_key.delete_libvk_volume_property + __del__ = lambda self: None + __swig_getmethods__["label"] = _volume_key.libvk_volume_property_label_get + if _newclass: + label = _swig_property(_volume_key.libvk_volume_property_label_get) + __swig_getmethods__["name"] = _volume_key.libvk_volume_property_name_get + if _newclass: + name = _swig_property(_volume_key.libvk_volume_property_name_get) + __swig_getmethods__["type"] = _volume_key.libvk_volume_property_type_get + if _newclass: + type = _swig_property(_volume_key.libvk_volume_property_type_get) + __swig_getmethods__["value"] = _volume_key.libvk_volume_property_value_get + if _newclass: + value = _swig_property(_volume_key.libvk_volume_property_value_get) +libvk_volume_property_swigregister = _volume_key.libvk_volume_property_swigregister +libvk_volume_property_swigregister(libvk_volume_property) + +class Volume(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Volume, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Volume, name) + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + __swig_destroy__ = _volume_key.delete_Volume + __del__ = lambda self: None + if _newclass: + open = staticmethod(_volume_key.Volume_open) + else: + open = _volume_key.Volume_open + __swig_getmethods__["hostname"] = _volume_key.Volume_hostname_get + if _newclass: + hostname = _swig_property(_volume_key.Volume_hostname_get) + __swig_getmethods__["uuid"] = _volume_key.Volume_uuid_get + if _newclass: + uuid = _swig_property(_volume_key.Volume_uuid_get) + __swig_getmethods__["label"] = _volume_key.Volume_label_get + if _newclass: + label = _swig_property(_volume_key.Volume_label_get) + __swig_getmethods__["path"] = _volume_key.Volume_path_get + if _newclass: + path = _swig_property(_volume_key.Volume_path_get) + __swig_getmethods__["format"] = _volume_key.Volume_format_get + if _newclass: + format = _swig_property(_volume_key.Volume_format_get) + + def dump_properties(self, with_secrets): + return _volume_key.Volume_dump_properties(self, with_secrets) + + def get_secret(self, secret_type, ui): + return _volume_key.Volume_get_secret(self, secret_type, ui) + + def add_secret(self, secret_type, secret): + return _volume_key.Volume_add_secret(self, secret_type, secret) + + def load_packet(self, packet): + return _volume_key.Volume_load_packet(self, packet) + + def apply_packet(self, packet, secret_type, ui): + return _volume_key.Volume_apply_packet(self, packet, secret_type, ui) + + def open_with_packet(self, packet, name): + return _volume_key.Volume_open_with_packet(self, packet, name) + + def create_packet_cleartext(self, secret_type): + return _volume_key.Volume_create_packet_cleartext(self, secret_type) + + def create_packet_assymetric(self, secret_type, cert, ui): + return _volume_key.Volume_create_packet_assymetric(self, secret_type, cert, ui) + + def create_packet_asymmetric(self, secret_type, cert, ui): + return _volume_key.Volume_create_packet_asymmetric(self, secret_type, cert, ui) + + def create_packet_assymetric_from_cert_data(self, secret_type, cert_data, ui, format=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY): + return _volume_key.Volume_create_packet_assymetric_from_cert_data(self, secret_type, cert_data, ui, format) + + def create_packet_asymmetric_from_cert_data(self, secret_type, cert_data, ui, format=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY): + return _volume_key.Volume_create_packet_asymmetric_from_cert_data(self, secret_type, cert_data, ui, format) + + def create_packet_with_passphrase(self, secret_type, passphrase): + return _volume_key.Volume_create_packet_with_passphrase(self, secret_type, passphrase) + + def packet_match_volume(self, vol): + return _volume_key.Volume_packet_match_volume(self, vol) +Volume_swigregister = _volume_key.Volume_swigregister +Volume_swigregister(Volume) + +def Volume_open(path): + return _volume_key.Volume_open(path) +Volume_open = _volume_key.Volume_open + +class Packet(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Packet, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Packet, name) + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + if _newclass: + get_format = staticmethod(_volume_key.Packet_get_format) + else: + get_format = _volume_key.Packet_get_format + if _newclass: + open = staticmethod(_volume_key.Packet_open) + else: + open = _volume_key.Packet_open + if _newclass: + open_unencrypted = staticmethod(_volume_key.Packet_open_unencrypted) + else: + open_unencrypted = _volume_key.Packet_open_unencrypted +Packet_swigregister = _volume_key.Packet_swigregister +Packet_swigregister(Packet) + +def Packet_get_format(packet): + return _volume_key.Packet_get_format(packet) +Packet_get_format = _volume_key.Packet_get_format + +def Packet_open(packet, ui): + return _volume_key.Packet_open(packet, ui) +Packet_open = _volume_key.Packet_open + +def Packet_open_unencrypted(packet): + return _volume_key.Packet_open_unencrypted(packet) +Packet_open_unencrypted = _volume_key.Packet_open_unencrypted + +# This file is compatible with both classic and new-style classes. + + diff -Nru volume-key-0.3.10/python/python/volume_key_wrap.c volume-key-0.3.12/python/python/volume_key_wrap.c --- volume-key-0.3.10/python/python/volume_key_wrap.c 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python/volume_key_wrap.c 2018-10-08 11:33:12.000000000 +0000 @@ -0,0 +1,6172 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.12 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGPYTHON +#define SWIGPYTHON +#endif + +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* Use debug wrappers with the Python release dll */ +# undef _DEBUG +# include +# define _DEBUG +#else +# include +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility macros for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) +#define PyString_Check(name) PyBytes_Check(name) +#define PyString_FromString(x) PyUnicode_FromString(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) +#define PyString_AsString(str) PyBytes_AsString(str) +#define PyString_Size(str) PyBytes_Size(str) +#define PyString_InternFromString(key) PyUnicode_InternFromString(key) +#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE +#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) +#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + + +/* Warning: This function will allocate a new string in Python 3, + * so please call SWIG_Python_str_DelForPy3(x) to free the space. + */ +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03000000 + char *cstr; + char *newstr; + Py_ssize_t len; + str = PyUnicode_AsUTF8String(str); + PyBytes_AsStringAndSize(str, &cstr, &len); + newstr = (char *) malloc(len+1); + memcpy(newstr, cstr, len+1); + Py_XDECREF(str); + return newstr; +#else + return PyString_AsString(str); +#endif +} + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#else +# define SWIG_Python_str_DelForPy3(x) +#endif + + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif + +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +typedef inquiry lenfunc; +typedef intargfunc ssizeargfunc; +typedef intintargfunc ssizessizeargfunc; +typedef intobjargproc ssizeobjargproc; +typedef intintobjargproc ssizessizeobjargproc; +typedef getreadbufferproc readbufferproc; +typedef getwritebufferproc writebufferproc; +typedef getsegcountproc segcountproc; +typedef getcharbufferproc charbufferproc; +static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) +{ + long result = 0; + PyObject *i = PyNumber_Int(x); + if (i) { + result = PyInt_AsLong(i); + Py_DECREF(i); + } + return result; +} +#endif + +#if PY_VERSION_HEX < 0x02050000 +#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) +#endif + +#if PY_VERSION_HEX < 0x02040000 +#define Py_VISIT(op) \ + do { \ + if (op) { \ + int vret = visit((op), arg); \ + if (vret) \ + return vret; \ + } \ + } while (0) +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef struct { + PyTypeObject type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + PyBufferProcs as_buffer; + PyObject *name, *slots; +} PyHeapTypeObject; +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef destructor freefunc; +#endif + +#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ + (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ + (PY_MAJOR_VERSION > 3)) +# define SWIGPY_USE_CAPSULE +# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) +#endif + +#if PY_VERSION_HEX < 0x03020000 +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +#if PY_VERSION_HEX >= 0x03000000 +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) +{ + return PyInstanceMethod_New(func); +} +#else +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) +{ + return NULL; +} +#endif + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) + +#ifdef SWIGPYTHON_BUILTIN +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) +#else +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) +#endif + +#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) + +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +#if defined(SWIGPYTHON_BUILTIN) + +SWIGINTERN void +SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { + PyObject *s = PyString_InternFromString(key); + PyList_Append(seq, s); + Py_DECREF(s); +} + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif + Py_DECREF(obj); + if (public_interface) + SwigPyBuiltin_AddPublicSymbol(public_interface, name); +} + +#else + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif + Py_DECREF(obj); +} + +#endif + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN Py_ssize_t +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + if (min <= 1 && max >= 1) { + Py_ssize_t i; + objs[0] = args; + for (i = 1; i < max; ++i) { + objs[i] = 0; + } + return 2; + } + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + Py_ssize_t i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) +#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) + +#ifdef __cplusplus +extern "C" { +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; + PyTypeObject *pytype; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + data->pytype = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData *data) { + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +#ifdef SWIGPYTHON_BUILTIN + PyObject *dict; +#endif +} SwigPyObject; + + +#ifdef SWIGPYTHON_BUILTIN + +SWIGRUNTIME PyObject * +SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + + if (!sobj->dict) + sobj->dict = PyDict_New(); + + Py_INCREF(sobj->dict); + return sobj->dict; +} + +#endif + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +SwigPyObject_repr(SwigPyObject *v) +#else +SwigPyObject_repr(SwigPyObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); + if (v->next) { +# ifdef METH_NOARGS + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +# else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +# endif +# if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +# else + PyString_ConcatAndDel(&repr,nrep); +# endif + } + return repr; +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, would it also be useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); + return res; +} + + +SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); + +#ifdef SWIGPYTHON_BUILTIN +static swig_type_info *SwigPyObject_stype = 0; +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + SwigPyClientData *cd; + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + assert(cd); + assert(cd->pytype); + return cd->pytype; +} +#else +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); + return type; +} +#endif + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { +#ifdef SWIGPYTHON_BUILTIN + PyTypeObject *target_tp = SwigPyObject_type(); + if (PyType_IsSubtype(op->ob_type, target_tp)) + return 1; + return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); +#else + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +#endif +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + + /* PyObject_CallFunction() has the potential to silently drop + the active active exception. In cases of unnamed temporary + variable or where we just finished iterating over a generator + StopIteration will be active right now, and this needs to + remain true upon return from SwigPyObject_dealloc. So save + and restore. */ + + PyObject *val = NULL, *type = NULL, *tb = NULL; + PyErr_Fetch(&val, &type, &tb); + + if (data->delargs) { + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + if (!res) + PyErr_WriteUnraisable(destroy); + + PyErr_Restore(val, type, tb); + + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +SwigPyObject_next(PyObject* v) +#else +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_disown(PyObject *v) +#else +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_acquire(PyObject *v) +#else +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#elif (PY_VERSION_HEX < 0x02050000) + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#else + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +SwigPyObject_getattr(SwigPyObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +SwigPyObject_TypeOnce(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_long, /*nb_long*/ +#else + 0, /*nb_reserved*/ +#endif + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ +#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + 0, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ +#else + (cmpfunc)SwigPyObject_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + swigpyobject_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpyobject_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpyobject_type) < 0) + return NULL; +#endif + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == SwigPyPacked_TypeOnce()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_TypeOnce(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + (printfunc)SwigPyPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX>=0x03000000 + 0, /* tp_reserved in 3.0.1 */ +#else + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + swigpypacked_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpypacked_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpypacked_type) < 0) + return NULL; +#endif + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} + +static PyObject *swig_this = NULL; + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + if (swig_this == NULL) + swig_this = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + PyObject *obj; + + if (SwigPyObject_Check(pyobj)) + return (SwigPyObject *) pyobj; + +#ifdef SWIGPYTHON_BUILTIN + (void)obj; +# ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + pyobj = PyWeakref_GET_OBJECT(pyobj); + if (pyobj && SwigPyObject_Check(pyobj)) + return (SwigPyObject*) pyobj; + } +# endif + return NULL; +#else + + obj = 0; + +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; +#endif +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + int res; + SwigPyObject *sobj; + int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; + + if (!obj) + return SWIG_ERROR; + if (obj == Py_None && !implicit_conv) { + if (ptr) + *ptr = 0; + return SWIG_OK; + } + + res = SWIG_ERROR; + + sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + res = SWIG_OK; + } else { + if (implicit_conv) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } + } + return res; +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) + return SWIG_ERROR; + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, without calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + if (inst) { + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } +#else + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } +#endif + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst = 0; + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { + SwigPyClientData *clientdata; + PyObject * robj; + int own; + + if (!ptr) + return SWIG_Py_Void(); + + clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + if (clientdata && clientdata->pytype) { + SwigPyObject *newobj; + if (flags & SWIG_BUILTIN_TP_INIT) { + newobj = (SwigPyObject*) self; + if (newobj->ptr) { + PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); + while (newobj->next) + newobj = (SwigPyObject *) newobj->next; + newobj->next = next_self; + newobj = (SwigPyObject *)next_self; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + } else { + newobj = PyObject_New(SwigPyObject, clientdata->pytype); +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + if (newobj) { + newobj->ptr = ptr; + newobj->ty = type; + newobj->own = own; + newobj->next = 0; + return (PyObject*) newobj; + } + return SWIG_Py_Void(); + } + + assert(!(flags & SWIG_BUILTIN_TP_INIT)); + + robj = SwigPyObject_New(ptr, type, own); + if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + Py_DECREF(robj); + robj = inst; + } + return robj; +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else +# ifdef SWIGPY_USE_CAPSULE + type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); +# else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); +# endif + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +#ifdef SWIGPY_USE_CAPSULE +SWIG_Python_DestroyModule(PyObject *obj) +#else +SWIG_Python_DestroyModule(void *vptr) +#endif +{ +#ifdef SWIGPY_USE_CAPSULE + swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); +#else + swig_module_info *swig_module = (swig_module_info *) vptr; +#endif + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); + swig_this = NULL; +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); +#endif +#ifdef SWIGPY_USE_CAPSULE + PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#else + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#endif +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { +#ifdef SWIGPY_USE_CAPSULE + descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); +#else + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); +#endif + } else { + swig_module_info *swig_module = SWIG_GetModule(0); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { +#ifdef SWIGPY_USE_CAPSULE + obj = PyCapsule_New((void*) descriptor, NULL, NULL); +#else + obj = PyCObject_FromVoidPtr(descriptor, NULL); +#endif + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); + } else { + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + } + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : ""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + SWIG_Python_str_DelForPy3(cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); +#if SWIG_POINTER_EXCEPTION + if (flags) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } +#endif + } + return result; +} + +#ifdef SWIGPYTHON_BUILTIN +SWIGRUNTIME int +SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { + PyTypeObject *tp = obj->ob_type; + PyObject *descr; + PyObject *encoded_name; + descrsetfunc f; + int res = -1; + +# ifdef Py_USING_UNICODE + if (PyString_Check(name)) { + name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); + if (!name) + return -1; + } else if (!PyUnicode_Check(name)) +# else + if (!PyString_Check(name)) +# endif + { + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); + return -1; + } else { + Py_INCREF(name); + } + + if (!tp->tp_dict) { + if (PyType_Ready(tp) < 0) + goto done; + } + + descr = _PyType_Lookup(tp, name); + f = NULL; + if (descr != NULL) + f = descr->ob_type->tp_descr_set; + if (!f) { + if (PyString_Check(name)) { + encoded_name = name; + Py_INCREF(name); + } else { + encoded_name = PyUnicode_AsUTF8String(name); + } + PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); + Py_DECREF(encoded_name); + } else { + res = f(descr, obj, value); + } + + done: + Py_DECREF(name); + return res; +} +#endif + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +#include + +#include + +#include +#include + +#include "../../lib/libvolume_key.h" + +#if PY_VERSION_HEX >= 0x03000000 +#undef PyString_AsStringAndSize +#undef PyString_FromStringAndSize +static int +PyString_AsStringAndSize(PyObject *obj, char **buffer, Py_ssize_t *length) +{ + const char *b = PyUnicode_AsUTF8AndSize(obj, length); + if (b == NULL) + return -1; + *buffer = b; + return 0; +} +#define PyString_FromStringAndSize(u, len) PyUnicode_FromStringAndSize(u, len) +#endif + +/* Drop a reference to a Python object. */ +static void +python_free_data (void *data) +{ + PyObject *o; + + o = data; + Py_DECREF (o); +} + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + + +static void * +libvk_volume_create_packet_asymmetric_from_cert_data + (struct libvk_volume *vol, size_t *size, enum libvk_secret secret_type, + const void *cert_data, size_t cert_size, const struct libvk_ui *ui, + GError **error, enum libvk_packet_format format) { + CERTCertificate *cert; + void *res; + + cert = CERT_DecodeCertFromPackage ((char *)cert_data, cert_size); + if (cert == NULL) + { + g_set_error (error, LIBVK_ERROR, LIBVK_ERROR_FAILED, + _("Error decoding certificate")); + return NULL; + } + res = libvk_volume_create_packet_asymmetric_with_format (vol, size, + secret_type, cert, + ui, format, error); + CERT_DestroyCertificate (cert); + return res; +} + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_CERTCertificate swig_types[0] +#define SWIGTYPE_p_GPtrArray swig_types[1] +#define SWIGTYPE_p_char swig_types[2] +#define SWIGTYPE_p_f_p_void__void swig_types[3] +#define SWIGTYPE_p_libvk_packet swig_types[4] +#define SWIGTYPE_p_libvk_ui swig_types[5] +#define SWIGTYPE_p_libvk_volume swig_types[6] +#define SWIGTYPE_p_libvk_volume_property swig_types[7] +#define SWIGTYPE_p_p_GError swig_types[8] +#define SWIGTYPE_p_size_t swig_types[9] +static swig_type_info *swig_types[11]; +static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#if (PY_VERSION_HEX <= 0x02000000) +# if !defined(SWIG_PYTHON_CLASSIC) +# error "This python version requires swig to be run with the '-classic' option" +# endif +#endif + +/*----------------------------------------------- + @(target):= _volume_key.so + ------------------------------------------------*/ +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_init PyInit__volume_key + +#else +# define SWIG_init init_volume_key + +#endif +#define SWIG_name "_volume_key" + +#define SWIGVERSION 0x030012 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); +} + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { +#if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); +#else +#if PY_VERSION_HEX >= 0x03010000 + return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); +#else + return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size)); +#endif +#endif +#else + return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); +#endif + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + +SWIGINTERN struct libvk_ui *new_libvk_ui(void){ + return libvk_ui_new (); + } +SWIGINTERN void delete_libvk_ui(struct libvk_ui *self){ + libvk_ui_free (self); + } + +/* Call a "generic callback" implemented in Python */ +static char * +python_generic_cb (void *data, const char *prompt, int echo) +{ + PyObject *fn, *res; + char *str; + + /* On exception this callback returns NULL, leaving the "top-level" function + wrapper to recognize the exception and return an error. In the unlikely + case the callback is called again after an error, just clear the error + state and start anew. */ + PyErr_Clear (); + fn = data; + res = PyObject_CallFunction (fn, (char *)"sN", prompt, + PyBool_FromLong (echo)); + if (res == NULL) + return NULL; + if (res == Py_None) + { + Py_DECREF (res); + return NULL; + } + str = PyString_AsString (res); + if (str == NULL) + { + Py_DECREF (res); + return NULL; + } + str = g_strdup (str); + Py_DECREF (res); + return str; +} + +/* Call a "passphrase callback" implemented in Python */ +static char * +python_passphrase_cb (void *data, const char *prompt, unsigned failed_attempts) +{ + PyObject *fn, *res; + char *str; + + /* On exception this callback returns NULL, leaving the "top-level" function + wrapper to recognize the exception and return an error. In the unlikely + case the callback is called again after an error, just clear the error + state and start anew. */ + PyErr_Clear (); + fn = data; + res = PyObject_CallFunction (fn, (char *)"sI", prompt, failed_attempts); + if (res == NULL) + return NULL; + if (res == Py_None) + { + Py_DECREF (res); + return NULL; + } + str = PyString_AsString (res); + if (str == NULL) + { + Py_DECREF (res); + return NULL; + } + str = g_strdup (str); + Py_DECREF (res); + return str; +} + +static PyObject * +libvk_ui_generic_cb_get (const struct libvk_ui *ui) +{ + (void)ui; + return NULL; +} + +static void +libvk_ui_generic_cb_set (struct libvk_ui *ui, PyObject *generic_cb) +{ + Py_INCREF (generic_cb); + libvk_ui_set_generic_cb (ui, python_generic_cb, generic_cb, python_free_data); +} + +static PyObject * +libvk_ui_passphrase_cb_get (const struct libvk_ui *ui) +{ + (void)ui; + return NULL; +} + +static void +libvk_ui_passphrase_cb_set (struct libvk_ui *ui, PyObject *passphrase_cb) +{ + Py_INCREF (passphrase_cb); + libvk_ui_set_passphrase_cb (ui, python_passphrase_cb, passphrase_cb, + python_free_data); +} + +SWIGINTERN void delete_libvk_volume_property(struct libvk_volume_property *self){ + libvk_vp_free (self); + } + +static char * +libvk_volume_property_label_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_label(prop); +} + +static char * +libvk_volume_property_name_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_name(prop); +} + +static enum libvk_vp_type +libvk_volume_property_type_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_type (prop); +} + +static char * +libvk_volume_property_value_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_value(prop); +} + +SWIGINTERN void delete_libvk_volume(struct libvk_volume *self){ + libvk_volume_free (self); + } + +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else + if (PyUnicode_Check(obj)) +#endif +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; +#if PY_VERSION_HEX>=0x03000000 +#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if(alloc) *alloc = SWIG_NEWOBJ; +#endif + PyBytes_AsStringAndSize(obj, &cstr, &len); +#else + PyString_AsStringAndSize(obj, &cstr, &len); +#endif + if (cptr) { + if (alloc) { + /* + In python the user should not be able to modify the inner + string representation. To warranty that, if you define + SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string + buffer is always returned. + + The default behavior is just to return the pointer value, + so, be careful. + */ +#if defined(SWIG_PYTHON_SAFE_CSTRINGS) + if (*alloc != SWIG_OLDOBJ) +#else + if (*alloc == SWIG_NEWOBJ) +#endif + { + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + *alloc = SWIG_NEWOBJ; + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + *cptr = PyBytes_AsString(obj); +#else + assert(0); /* Should never reach here with Unicode strings in Python 3 */ +#endif +#else + *cptr = SWIG_Python_str_AsChar(obj); +#endif + } + } + if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + Py_XDECREF(obj); +#endif + return SWIG_OK; + } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + } + if (psize) *psize = len + 1; + + Py_XDECREF(obj); + return SWIG_OK; + } else { + Py_XDECREF(obj); + } + } +#endif +#endif + + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; +#if PY_VERSION_HEX < 0x03000000 + } else if (PyInt_Check(obj)) { + if (val) *val = (double) PyInt_AsLong(obj); + return SWIG_OK; +#endif + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else +#endif + if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + int r; + if (!PyBool_Check(obj)) + return SWIG_ERROR; + r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; +} + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else +#endif + if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + } +#endif + return res; +} + +SWIGINTERN void *libvk_volume_create_packet_assymetric_from_cert_data(struct libvk_volume *self,size_t *size,enum libvk_secret secret_type,void const *cert_data,size_t cert_size,struct libvk_ui const *ui,GError **error,enum libvk_packet_format format){ + return libvk_volume_create_packet_asymmetric_from_cert_data (self, size, + secret_type, + cert_data, + cert_size, ui, + error, format); + } +SWIGINTERN enum libvk_packet_match_result libvk_volume_packet_match_volume(struct libvk_volume *self,struct libvk_volume const *vol,GPtrArray *warnings,GError **error){ + return libvk_packet_match_volume (self, vol, warnings, error); + } + +static char * +libvk_volume_hostname_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_hostname (vol); +} + +static char * +libvk_volume_uuid_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_uuid (vol); +} + +static char * +libvk_volume_label_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_label (vol); +} + +static char * +libvk_volume_path_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_path (vol); +} + +static char * +libvk_volume_format_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_format (vol); +} + +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_new_UI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_UI")) SWIG_fail; + result = (struct libvk_ui *)new_libvk_ui(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_ui, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UI",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UI" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + delete_libvk_ui(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_generic_cb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UI_generic_cb_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_generic_cb_set" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + + if (!PyCallable_Check (obj1)) + SWIG_exception (SWIG_TypeError, "callback expected"); + arg2 = obj1; + + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_ui_generic_cb_set(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_generic_cb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UI_generic_cb_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_generic_cb_get" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)libvk_ui_generic_cb_get(arg1); + + (void)result; + SWIG_exception (SWIG_AttributeError, "unreadable attribute"); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_passphrase_cb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UI_passphrase_cb_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_passphrase_cb_set" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + + if (!PyCallable_Check (obj1)) + SWIG_exception (SWIG_TypeError, "callback expected"); + arg2 = obj1; + + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_ui_passphrase_cb_set(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_passphrase_cb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UI_passphrase_cb_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_passphrase_cb_get" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)libvk_ui_passphrase_cb_get(arg1); + + (void)result; + SWIG_exception (SWIG_AttributeError, "unreadable attribute"); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_set_nss_pwfn_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *arg2 = (void *) 0 ; + void (*arg3)(void *) = (void (*)(void *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + arg3 = python_free_data; + if (!PyArg_ParseTuple(args,(char *)"OO:UI_set_nss_pwfn_arg",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_set_nss_pwfn_arg" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + arg2 = PyTuple_Pack (1, obj1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_ui_set_nss_pwfn_arg(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UI_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_ui, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_libvk_volume_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_libvk_volume_property",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_libvk_volume_property" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + delete_libvk_volume_property(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_label_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_label_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_label_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (char *)libvk_volume_property_label_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_name_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_name_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (char *)libvk_volume_property_name_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + enum libvk_vp_type result; + + if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_type_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_type_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (enum libvk_vp_type)libvk_volume_property_type_get(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_value_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_value_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (char *)libvk_volume_property_value_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *libvk_volume_property_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_volume_property, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_Volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Volume",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Volume" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + delete_libvk_volume(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + GError **arg2 = (GError **) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + GError *err2 = NULL ; + PyObject * obj0 = 0 ; + struct libvk_volume *result = 0 ; + + arg2 = &err2; + if (!PyArg_ParseTuple(args,(char *)"O:Volume_open",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_open" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (struct libvk_volume *)libvk_volume_open((char const *)arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, SWIG_POINTER_OWN | 0 ); + + if (err2 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err2->message); + g_error_free (err2); + } + + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_hostname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Volume_hostname_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_hostname_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_hostname_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_uuid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Volume_uuid_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_uuid_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_uuid_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_label_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Volume_label_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_label_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_label_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Volume_path_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_path_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_path_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_format_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Volume_format_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_format_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_format_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_dump_properties(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + GSList *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Volume_dump_properties",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_dump_properties" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_dump_properties" "', argument " "2"" of type '" "bool""'"); + } + arg2 = (bool)(val2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (GSList *)libvk_volume_dump_properties(arg1,arg2); + + resultobj = PyList_New (0); + while (result != NULL) + { + GSList *next; + PyObject *p; + + p = SWIG_NewPointerObj(result->data, SWIGTYPE_p_libvk_volume_property, + SWIG_POINTER_OWN); + PyList_Append (resultobj, p); + next = result->next; + g_slist_free_1 (result); + result = next; + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_get_secret(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + enum libvk_secret arg2 ; + struct libvk_ui *arg3 = (struct libvk_ui *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + arg4 = &err4; + if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_get_secret",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_get_secret" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_get_secret" "', argument " "2"" of type '" "enum libvk_secret""'"); + } + arg2 = (enum libvk_secret)(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Volume_get_secret" "', argument " "3"" of type '" "struct libvk_ui const *""'"); + } + arg3 = (struct libvk_ui *)(argp3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg2 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_get_secret(arg1,arg2,(struct libvk_ui const *)arg3,arg4); + resultobj = SWIG_Py_Void(); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_add_secret(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + enum libvk_secret arg2 ; + void *arg3 = (void *) 0 ; + size_t arg4 ; + GError **arg5 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + GError *err5 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + arg5 = &err5; + if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_add_secret",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_add_secret" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_add_secret" "', argument " "2"" of type '" "enum libvk_secret""'"); + } + arg2 = (enum libvk_secret)(val2); + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(secret, size)"); + arg3 = buf; + arg4 = len; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg2 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + libvk_volume_add_secret(arg1,arg2,(void const *)arg3,arg4,arg5); + resultobj = SWIG_Py_Void(); + + if (err5 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err5->message); + g_error_free (err5); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_load_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + GError **arg3 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + GError *err3 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + arg3 = &err3; + if (!PyArg_ParseTuple(args,(char *)"OO:Volume_load_packet",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_load_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_load_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_load_packet(arg1,(struct libvk_volume const *)arg2,arg3); + resultobj = SWIG_Py_Void(); + + if (err3 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err3->message); + g_error_free (err3); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_apply_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + enum libvk_secret arg3 ; + struct libvk_ui *arg4 = (struct libvk_ui *) 0 ; + GError **arg5 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + GError *err5 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + arg5 = &err5; + if (!PyArg_ParseTuple(args,(char *)"OOOO:Volume_apply_packet",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_apply_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_apply_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_apply_packet" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_apply_packet" "', argument " "4"" of type '" "struct libvk_ui const *""'"); + } + arg4 = (struct libvk_ui *)(argp4); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_apply_packet(arg1,(struct libvk_volume const *)arg2,arg3,(struct libvk_ui const *)arg4,arg5); + resultobj = SWIG_Py_Void(); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err5 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err5->message); + g_error_free (err5); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_open_with_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + char *arg3 = (char *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + arg4 = &err4; + if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_open_with_packet",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_open_with_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_open_with_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Volume_open_with_packet" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_open_with_packet(arg1,(struct libvk_volume const *)arg2,(char const *)arg3,arg4); + resultobj = SWIG_Py_Void(); + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_cleartext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg4 = &err4; + if (!PyArg_ParseTuple(args,(char *)"OO:Volume_create_packet_cleartext",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_cleartext" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_cleartext" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + result = (void *)libvk_volume_create_packet_cleartext(arg1,arg2,arg3,arg4); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_assymetric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + CERTCertificate *arg4 = (CERTCertificate *) 0 ; + struct libvk_ui *arg5 = (struct libvk_ui *) 0 ; + GError **arg6 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + GError *err6 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg6 = &err6; + if (!PyArg_ParseTuple(args,(char *)"OOOO:Volume_create_packet_assymetric",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_assymetric" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_assymetric" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_CERTCertificate, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_assymetric" "', argument " "4"" of type '" "CERTCertificate *""'"); + } + arg4 = (CERTCertificate *)(argp4); + res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Volume_create_packet_assymetric" "', argument " "5"" of type '" "struct libvk_ui const *""'"); + } + arg5 = (struct libvk_ui *)(argp5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg5) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (void *)libvk_volume_create_packet_assymetric(arg1,arg2,arg3,arg4,(struct libvk_ui const *)arg5,arg6); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err6 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err6->message); + g_error_free (err6); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_asymmetric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + CERTCertificate *arg4 = (CERTCertificate *) 0 ; + struct libvk_ui *arg5 = (struct libvk_ui *) 0 ; + GError **arg6 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + GError *err6 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg6 = &err6; + if (!PyArg_ParseTuple(args,(char *)"OOOO:Volume_create_packet_asymmetric",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_asymmetric" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_asymmetric" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_CERTCertificate, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_asymmetric" "', argument " "4"" of type '" "CERTCertificate *""'"); + } + arg4 = (CERTCertificate *)(argp4); + res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Volume_create_packet_asymmetric" "', argument " "5"" of type '" "struct libvk_ui const *""'"); + } + arg5 = (struct libvk_ui *)(argp5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg5) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (void *)libvk_volume_create_packet_asymmetric(arg1,arg2,arg3,arg4,(struct libvk_ui const *)arg5,arg6); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err6 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err6->message); + g_error_free (err6); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_assymetric_from_cert_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + void *arg4 = (void *) 0 ; + size_t arg5 ; + struct libvk_ui *arg6 = (struct libvk_ui *) 0 ; + GError **arg7 = (GError **) 0 ; + enum libvk_packet_format arg8 = (enum libvk_packet_format) LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + GError *err7 = NULL ; + int val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg7 = &err7; + if (!PyArg_ParseTuple(args,(char *)"OOOO|O:Volume_create_packet_assymetric_from_cert_data",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(cert_data, cert_size)"); + arg4 = buf; + arg5 = len; + } + res6 = SWIG_ConvertPtr(obj3, &argp6,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "6"" of type '" "struct libvk_ui const *""'"); + } + arg6 = (struct libvk_ui *)(argp6); + if (obj4) { + ecode8 = SWIG_AsVal_int(obj4, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "8"" of type '" "enum libvk_packet_format""'"); + } + arg8 = (enum libvk_packet_format)(val8); + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg6) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg8 >= LIBVK_PACKET_FORMAT_END__) + SWIG_exception (SWIG_ValueError, "invalid packet format"); + + result = (void *)libvk_volume_create_packet_assymetric_from_cert_data(arg1,arg2,arg3,(void const *)arg4,arg5,(struct libvk_ui const *)arg6,arg7,arg8); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err7 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err7->message); + g_error_free (err7); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_asymmetric_from_cert_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + void *arg4 = (void *) 0 ; + size_t arg5 ; + struct libvk_ui *arg6 = (struct libvk_ui *) 0 ; + GError **arg7 = (GError **) 0 ; + enum libvk_packet_format arg8 = (enum libvk_packet_format) LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + GError *err7 = NULL ; + int val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg7 = &err7; + if (!PyArg_ParseTuple(args,(char *)"OOOO|O:Volume_create_packet_asymmetric_from_cert_data",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(cert_data, cert_size)"); + arg4 = buf; + arg5 = len; + } + res6 = SWIG_ConvertPtr(obj3, &argp6,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "6"" of type '" "struct libvk_ui const *""'"); + } + arg6 = (struct libvk_ui *)(argp6); + if (obj4) { + ecode8 = SWIG_AsVal_int(obj4, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "8"" of type '" "enum libvk_packet_format""'"); + } + arg8 = (enum libvk_packet_format)(val8); + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg6) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg8 >= LIBVK_PACKET_FORMAT_END__) + SWIG_exception (SWIG_ValueError, "invalid packet format"); + + result = (void *)libvk_volume_create_packet_asymmetric_from_cert_data(arg1,arg2,arg3,(void const *)arg4,arg5,(struct libvk_ui const *)arg6,arg7,arg8); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err7 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err7->message); + g_error_free (err7); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_with_passphrase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + char *arg4 = (char *) 0 ; + GError **arg5 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + GError *err5 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg5 = &err5; + if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_create_packet_with_passphrase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_with_passphrase" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_with_passphrase" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_with_passphrase" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = (char *)(buf4); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (void *)libvk_volume_create_packet_with_passphrase(arg1,arg2,arg3,(char const *)arg4,arg5); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (err5 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err5->message); + g_error_free (err5); + } + + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_packet_match_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + GPtrArray *arg3 = (GPtrArray *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + enum libvk_packet_match_result result; + + arg3 = g_ptr_array_new (); + arg4 = &err4; + if (!PyArg_ParseTuple(args,(char *)"OO:Volume_packet_match_volume",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_packet_match_volume" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_packet_match_volume" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (enum libvk_packet_match_result)libvk_volume_packet_match_volume(arg1,(struct libvk_volume const *)arg2,arg3,arg4); + resultobj = SWIG_From_int((int)(result)); + { + PyObject *warnings; + size_t i; + + warnings = PyList_New (arg3->len); + if (warnings == NULL) + SWIG_fail; + for (i = 0; i < arg3->len; i++) + PyList_SetItem (warnings, i, + PyString_FromString (g_ptr_array_index (arg3, i))); + resultobj = SWIG_Python_AppendOutput(resultobj, warnings); + } + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + { + size_t i; + + for (i = 0; i < arg3->len; i++) + g_free (g_ptr_array_index (arg3, i)); + g_ptr_array_free (arg3, TRUE); + } + return resultobj; +fail: + { + size_t i; + + for (i = 0; i < arg3->len; i++) + g_free (g_ptr_array_index (arg3, i)); + g_ptr_array_free (arg3, TRUE); + } + return NULL; +} + + +SWIGINTERN PyObject *Volume_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_volume, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Packet_get_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + void *arg1 = (void *) 0 ; + size_t arg2 ; + GError **arg3 = (GError **) 0 ; + GError *err3 = NULL ; + PyObject * obj0 = 0 ; + enum libvk_packet_format result; + + arg3 = &err3; + if (!PyArg_ParseTuple(args,(char *)"O:Packet_get_format",&obj0)) SWIG_fail; + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(packet, size)"); + arg1 = buf; + arg2 = len; + } + result = (enum libvk_packet_format)libvk_packet_get_format((void const *)arg1,arg2,arg3); + resultobj = SWIG_From_int((int)(result)); + + if (err3 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err3->message); + g_error_free (err3); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Packet_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + void *arg1 = (void *) 0 ; + size_t arg2 ; + struct libvk_ui *arg3 = (struct libvk_ui *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + struct libvk_volume *result = 0 ; + + arg4 = &err4; + if (!PyArg_ParseTuple(args,(char *)"OO:Packet_open",&obj0,&obj1)) SWIG_fail; + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(packet, size)"); + arg1 = buf; + arg2 = len; + } + res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Packet_open" "', argument " "3"" of type '" "struct libvk_ui const *""'"); + } + arg3 = (struct libvk_ui *)(argp3); + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (struct libvk_volume *)libvk_packet_open((void const *)arg1,arg2,(struct libvk_ui const *)arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, 0 | 0 ); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Packet_open_unencrypted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + void *arg1 = (void *) 0 ; + size_t arg2 ; + GError **arg3 = (GError **) 0 ; + GError *err3 = NULL ; + PyObject * obj0 = 0 ; + struct libvk_volume *result = 0 ; + + arg3 = &err3; + if (!PyArg_ParseTuple(args,(char *)"O:Packet_open_unencrypted",&obj0)) SWIG_fail; + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(packet, size)"); + arg1 = buf; + arg2 = len; + } + result = (struct libvk_volume *)libvk_packet_open_unencrypted((void const *)arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, 0 | 0 ); + + if (err3 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err3->message); + g_error_free (err3); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Packet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_packet, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +static PyMethodDef SwigMethods[] = { + { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, + { (char *)"new_UI", _wrap_new_UI, METH_VARARGS, NULL}, + { (char *)"delete_UI", _wrap_delete_UI, METH_VARARGS, NULL}, + { (char *)"UI_generic_cb_set", _wrap_UI_generic_cb_set, METH_VARARGS, NULL}, + { (char *)"UI_generic_cb_get", _wrap_UI_generic_cb_get, METH_VARARGS, NULL}, + { (char *)"UI_passphrase_cb_set", _wrap_UI_passphrase_cb_set, METH_VARARGS, NULL}, + { (char *)"UI_passphrase_cb_get", _wrap_UI_passphrase_cb_get, METH_VARARGS, NULL}, + { (char *)"UI_set_nss_pwfn_arg", _wrap_UI_set_nss_pwfn_arg, METH_VARARGS, NULL}, + { (char *)"UI_swigregister", UI_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_libvk_volume_property", _wrap_delete_libvk_volume_property, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_label_get", _wrap_libvk_volume_property_label_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_name_get", _wrap_libvk_volume_property_name_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_type_get", _wrap_libvk_volume_property_type_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_value_get", _wrap_libvk_volume_property_value_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_swigregister", libvk_volume_property_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_Volume", _wrap_delete_Volume, METH_VARARGS, NULL}, + { (char *)"Volume_open", _wrap_Volume_open, METH_VARARGS, NULL}, + { (char *)"Volume_hostname_get", _wrap_Volume_hostname_get, METH_VARARGS, NULL}, + { (char *)"Volume_uuid_get", _wrap_Volume_uuid_get, METH_VARARGS, NULL}, + { (char *)"Volume_label_get", _wrap_Volume_label_get, METH_VARARGS, NULL}, + { (char *)"Volume_path_get", _wrap_Volume_path_get, METH_VARARGS, NULL}, + { (char *)"Volume_format_get", _wrap_Volume_format_get, METH_VARARGS, NULL}, + { (char *)"Volume_dump_properties", _wrap_Volume_dump_properties, METH_VARARGS, NULL}, + { (char *)"Volume_get_secret", _wrap_Volume_get_secret, METH_VARARGS, NULL}, + { (char *)"Volume_add_secret", _wrap_Volume_add_secret, METH_VARARGS, NULL}, + { (char *)"Volume_load_packet", _wrap_Volume_load_packet, METH_VARARGS, NULL}, + { (char *)"Volume_apply_packet", _wrap_Volume_apply_packet, METH_VARARGS, NULL}, + { (char *)"Volume_open_with_packet", _wrap_Volume_open_with_packet, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_cleartext", _wrap_Volume_create_packet_cleartext, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_assymetric", _wrap_Volume_create_packet_assymetric, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_asymmetric", _wrap_Volume_create_packet_asymmetric, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_assymetric_from_cert_data", _wrap_Volume_create_packet_assymetric_from_cert_data, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_asymmetric_from_cert_data", _wrap_Volume_create_packet_asymmetric_from_cert_data, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_with_passphrase", _wrap_Volume_create_packet_with_passphrase, METH_VARARGS, NULL}, + { (char *)"Volume_packet_match_volume", _wrap_Volume_packet_match_volume, METH_VARARGS, NULL}, + { (char *)"Volume_swigregister", Volume_swigregister, METH_VARARGS, NULL}, + { (char *)"Packet_get_format", _wrap_Packet_get_format, METH_VARARGS, NULL}, + { (char *)"Packet_open", _wrap_Packet_open, METH_VARARGS, NULL}, + { (char *)"Packet_open_unencrypted", _wrap_Packet_open_unencrypted, METH_VARARGS, NULL}, + { (char *)"Packet_swigregister", Packet_swigregister, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static swig_type_info _swigt__p_CERTCertificate = {"_p_CERTCertificate", "CERTCertificate *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_GPtrArray = {"_p_GPtrArray", "GPtrArray *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_packet = {"_p_libvk_packet", "libvk_packet *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_ui = {"_p_libvk_ui", "struct libvk_ui *|libvk_ui *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_volume = {"_p_libvk_volume", "struct libvk_volume *|libvk_volume *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_volume_property = {"_p_libvk_volume_property", "struct libvk_volume_property *|libvk_volume_property *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_GError = {"_p_p_GError", "GError **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_CERTCertificate, + &_swigt__p_GPtrArray, + &_swigt__p_char, + &_swigt__p_f_p_void__void, + &_swigt__p_libvk_packet, + &_swigt__p_libvk_ui, + &_swigt__p_libvk_volume, + &_swigt__p_libvk_volume_property, + &_swigt__p_p_GError, + &_swigt__p_size_t, +}; + +static swig_cast_info _swigc__p_CERTCertificate[] = { {&_swigt__p_CERTCertificate, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GPtrArray[] = { {&_swigt__p_GPtrArray, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_packet[] = { {&_swigt__p_libvk_packet, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_ui[] = { {&_swigt__p_libvk_ui, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_volume[] = { {&_swigt__p_libvk_volume, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_volume_property[] = { {&_swigt__p_libvk_volume_property, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_GError[] = { {&_swigt__p_p_GError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_CERTCertificate, + _swigc__p_GPtrArray, + _swigc__p_char, + _swigc__p_f_p_void__void, + _swigc__p_libvk_packet, + _swigc__p_libvk_ui, + _swigc__p_libvk_volume, + _swigc__p_libvk_volume_property, + _swigc__p_p_GError, + _swigc__p_size_t, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString(""); +#else + return PyString_FromString(""); +#endif + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; +#else + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif + return str; + } + + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + char *tmp; + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(str); + return 0; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ + (printfunc) swig_varlink_print, /* tp_print */ + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc) swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + varlink_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + varlink_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&varlink_type) < 0) + return NULL; +#endif + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (!c) continue; + c = strstr(c, "swig_ptr: "); + if (c) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif + +SWIGEXPORT +#if PY_VERSION_HEX >= 0x03000000 +PyObject* +#else +void +#endif +SWIG_init(void) { + PyObject *m, *d, *md; +#if PY_VERSION_HEX >= 0x03000000 + static struct PyModuleDef SWIG_module = { +# if PY_VERSION_HEX >= 0x03020000 + PyModuleDef_HEAD_INIT, +# else + { + PyObject_HEAD_INIT(NULL) + NULL, /* m_init */ + 0, /* m_index */ + NULL, /* m_copy */ + }, +# endif + (char *) SWIG_name, + NULL, + -1, + SwigMethods, + NULL, + NULL, + NULL, + NULL + }; +#endif + +#if defined(SWIGPYTHON_BUILTIN) + static SwigPyClientData SwigPyObject_clientdata = { + 0, 0, 0, 0, 0, 0, 0 + }; + static PyGetSetDef this_getset_def = { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { + (PyCFunction) SwigPyObject_own, + (PyCFunction) SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure + }; + PyTypeObject *builtin_pytype; + int builtin_base_count; + swig_type_info *builtin_basetype; + PyObject *tuple; + PyGetSetDescrObject *static_getset; + PyTypeObject *metatype; + PyTypeObject *swigpyobject; + SwigPyClientData *cd; + PyObject *public_interface, *public_symbol; + PyObject *this_descr; + PyObject *thisown_descr; + PyObject *self = 0; + int i; + + (void)builtin_pytype; + (void)builtin_base_count; + (void)builtin_basetype; + (void)tuple; + (void)static_getset; + (void)self; + + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); + assert(metatype); +#endif + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + +#if PY_VERSION_HEX >= 0x03000000 + m = PyModule_Create(&SWIG_module); +#else + m = Py_InitModule((char *) SWIG_name, SwigMethods); +#endif + + md = d = PyModule_GetDict(m); + (void)md; + + SWIG_InitializeModule(0); + +#ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + if (!cd) { + SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { + PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); +# if PY_VERSION_HEX >= 0x03000000 + return NULL; +# else + return; +# endif + } + + /* All objects have a 'this' attribute */ + this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); + (void)this_descr; + + /* All objects have a 'thisown' attribute */ + thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); + (void)thisown_descr; + + public_interface = PyList_New(0); + public_symbol = 0; + (void)public_symbol; + + PyDict_SetItemString(md, "__all__", public_interface); + Py_DECREF(public_interface); + for (i = 0; SwigMethods[i].ml_name != NULL; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); + for (i = 0; swig_const_table[i].name != 0; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); +#endif + + SWIG_InstallConstants(d,swig_const_table); + + + libvk_init (); + + SWIG_Python_SetConstant(d, "SECRET_DEFAULT",SWIG_From_int((int)(LIBVK_SECRET_DEFAULT))); + SWIG_Python_SetConstant(d, "SECRET_DATA_ENCRYPTION_KEY",SWIG_From_int((int)(LIBVK_SECRET_DATA_ENCRYPTION_KEY))); + SWIG_Python_SetConstant(d, "SECRET_PASSPHRASE",SWIG_From_int((int)(LIBVK_SECRET_PASSPHRASE))); + SWIG_Python_SetConstant(d, "VP_IDENTIFICATION",SWIG_From_int((int)(LIBVK_VP_IDENTIFICATION))); + SWIG_Python_SetConstant(d, "VP_CONFIGURATION",SWIG_From_int((int)(LIBVK_VP_CONFIGURATION))); + SWIG_Python_SetConstant(d, "VP_SECRET",SWIG_From_int((int)(LIBVK_VP_SECRET))); + SWIG_Python_SetConstant(d, "VOLUME_FORMAT_LUKS",SWIG_FromCharPtr("crypt_LUKS")); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_UNKNOWN",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_UNKNOWN))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_CLEARTEXT",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_CLEARTEXT))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASYMMETRIC",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASYMMETRIC))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASSYMETRIC",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASSYMETRIC))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_PASSPHRASE",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_PASSPHRASE))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY))); + SWIG_Python_SetConstant(d, "PACKET_MATCH_OK",SWIG_From_int((int)(LIBVK_PACKET_MATCH_OK))); + SWIG_Python_SetConstant(d, "PACKET_MATCH_UNSURE",SWIG_From_int((int)(LIBVK_PACKET_MATCH_UNSURE))); +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else + return; +#endif +} + diff -Nru volume-key-0.3.10/python/python3/Makefile.am volume-key-0.3.12/python/python3/Makefile.am --- volume-key-0.3.10/python/python3/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python3/Makefile.am 2018-09-18 14:06:11.000000000 +0000 @@ -0,0 +1,40 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +SWIG_FLAGS = -python -py3 -modern +SWIG_INCLUDES = -I$(top_srcdir) $(PYTHON3_INCLUDES) +PYTHON = $(PYTHON3) + +py3exec_PYTHON = volume_key.py +py3exec_LTLIBRARIES = _volume_key.la + +_volume_key_la_SOURCES = volume_key_wrap.c +_volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON3_CFLAGS) +_volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) $(PYTHON3_LDFLAGS) +_volume_key_la_LIBADD = $(top_builddir)/lib/libvolume_key.la $(PYTHON3_LIBS) \ + $(glib_LIBS) $(nss_LIBS) + +volume_key_wrap.c volume_key.py: ../volume_key.i + swig -Wall $(SWIG_FLAGS) $(SWIG_INCLUDES) -o volume_key_wrap.c \ + $(top_srcdir)/python/volume_key.i + +volume_key.py: volume_key_wrap.c diff -Nru volume-key-0.3.10/python/python3/Makefile.in volume-key-0.3.12/python/python3/Makefile.in --- volume-key-0.3.10/python/python3/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python3/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,809 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = python/python3 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(py3exec_PYTHON) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(py3execdir)" "$(DESTDIR)$(py3execdir)" +LTLIBRARIES = $(py3exec_LTLIBRARIES) +am__DEPENDENCIES_1 = +_volume_key_la_DEPENDENCIES = $(top_builddir)/lib/libvolume_key.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am__volume_key_la_OBJECTS = _volume_key_la-volume_key_wrap.lo +_volume_key_la_OBJECTS = $(am__volume_key_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +_volume_key_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(_volume_key_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/admin/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(_volume_key_la_SOURCES) +DIST_SOURCES = $(_volume_key_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) +am__pep3147_tweak = \ + sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|' +py_compile = $(top_srcdir)/admin/py-compile +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ + $(top_srcdir)/admin/py-compile +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = $(PYTHON3) +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +SWIG_FLAGS = -python -py3 -modern +SWIG_INCLUDES = -I$(top_srcdir) $(PYTHON3_INCLUDES) +py3exec_PYTHON = volume_key.py +py3exec_LTLIBRARIES = _volume_key.la +_volume_key_la_SOURCES = volume_key_wrap.c +_volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON3_CFLAGS) +_volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) $(PYTHON3_LDFLAGS) +_volume_key_la_LIBADD = $(top_builddir)/lib/libvolume_key.la $(PYTHON3_LIBS) \ + $(glib_LIBS) $(nss_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/python3/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu python/python3/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-py3execLTLIBRARIES: $(py3exec_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(py3exec_LTLIBRARIES)'; test -n "$(py3execdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(py3execdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(py3execdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(py3execdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(py3execdir)"; \ + } + +uninstall-py3execLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(py3exec_LTLIBRARIES)'; test -n "$(py3execdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(py3execdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(py3execdir)/$$f"; \ + done + +clean-py3execLTLIBRARIES: + -test -z "$(py3exec_LTLIBRARIES)" || rm -f $(py3exec_LTLIBRARIES) + @list='$(py3exec_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +_volume_key.la: $(_volume_key_la_OBJECTS) $(_volume_key_la_DEPENDENCIES) $(EXTRA__volume_key_la_DEPENDENCIES) + $(AM_V_CCLD)$(_volume_key_la_LINK) -rpath $(py3execdir) $(_volume_key_la_OBJECTS) $(_volume_key_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_volume_key_la-volume_key_wrap.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +_volume_key_la-volume_key_wrap.lo: volume_key_wrap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_volume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _volume_key_la-volume_key_wrap.lo -MD -MP -MF $(DEPDIR)/_volume_key_la-volume_key_wrap.Tpo -c -o _volume_key_la-volume_key_wrap.lo `test -f 'volume_key_wrap.c' || echo '$(srcdir)/'`volume_key_wrap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_volume_key_la-volume_key_wrap.Tpo $(DEPDIR)/_volume_key_la-volume_key_wrap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='volume_key_wrap.c' object='_volume_key_la-volume_key_wrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_volume_key_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _volume_key_la-volume_key_wrap.lo `test -f 'volume_key_wrap.c' || echo '$(srcdir)/'`volume_key_wrap.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-py3execPYTHON: $(py3exec_PYTHON) + @$(NORMAL_INSTALL) + @list='$(py3exec_PYTHON)'; dlist=; list2=; test -n "$(py3execdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(py3execdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(py3execdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(py3execdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(py3execdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + $(am__py_compile) --destdir "$(DESTDIR)" \ + --basedir "$(py3execdir)" $$dlist; \ + else :; fi + +uninstall-py3execPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(py3exec_PYTHON)'; test -n "$(py3execdir)" || list=; \ + py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$py_files" || exit 0; \ + dir='$(DESTDIR)$(py3execdir)'; \ + pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ + pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ + py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ + echo "$$py_files_pep3147";\ + pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ + pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ + st=0; \ + for files in \ + "$$py_files" \ + "$$pyc_files" \ + "$$pyo_files" \ + "$$pyc_files_pep3147" \ + "$$pyo_files_pep3147" \ + ; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + exit $$st + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(py3execdir)" "$(DESTDIR)$(py3execdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-py3execLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-py3execLTLIBRARIES install-py3execPYTHON + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-py3execLTLIBRARIES uninstall-py3execPYTHON + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-py3execLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-py3execLTLIBRARIES \ + install-py3execPYTHON install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am \ + uninstall-py3execLTLIBRARIES uninstall-py3execPYTHON + +.PRECIOUS: Makefile + + +volume_key_wrap.c volume_key.py: ../volume_key.i + swig -Wall $(SWIG_FLAGS) $(SWIG_INCLUDES) -o volume_key_wrap.c \ + $(top_srcdir)/python/volume_key.i + +volume_key.py: volume_key_wrap.c + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/python/python3/volume_key.py volume-key-0.3.12/python/python3/volume_key.py --- volume-key-0.3.10/python/python3/volume_key.py 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python3/volume_key.py 2018-10-08 11:33:13.000000000 +0000 @@ -0,0 +1,235 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 3.0.12 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info >= (2, 7, 0): + def swig_import_helper(): + import importlib + pkg = __name__.rpartition('.')[0] + mname = '.'.join((pkg, '_volume_key')).lstrip('.') + try: + return importlib.import_module(mname) + except ImportError: + return importlib.import_module('_volume_key') + _volume_key = swig_import_helper() + del swig_import_helper +elif _swig_python_version_info >= (2, 6, 0): + def swig_import_helper(): + from os.path import dirname + import imp + fp = None + try: + fp, pathname, description = imp.find_module('_volume_key', [dirname(__file__)]) + except ImportError: + import _volume_key + return _volume_key + try: + _mod = imp.load_module('_volume_key', fp, pathname, description) + finally: + if fp is not None: + fp.close() + return _mod + _volume_key = swig_import_helper() + del swig_import_helper +else: + import _volume_key +del _swig_python_version_info + +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_setattr_nondynamic(self, class_type, name, value, static=1): + if (name == "thisown"): + return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'SwigPyObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name, None) + if method: + return method(self, value) + if (not static): + object.__setattr__(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + + +def _swig_setattr(self, class_type, name, value): + return _swig_setattr_nondynamic(self, class_type, name, value, 0) + + +def _swig_getattr(self, class_type, name): + if (name == "thisown"): + return self.this.own() + method = class_type.__swig_getmethods__.get(name, None) + if method: + return method(self) + raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) + + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_method(set): + def set_attr(self, name, value): + if (name == "thisown"): + return self.this.own(value) + if hasattr(self, name) or (name == "this"): + set(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + return set_attr + + +SECRET_DEFAULT = _volume_key.SECRET_DEFAULT +SECRET_DATA_ENCRYPTION_KEY = _volume_key.SECRET_DATA_ENCRYPTION_KEY +SECRET_PASSPHRASE = _volume_key.SECRET_PASSPHRASE +VP_IDENTIFICATION = _volume_key.VP_IDENTIFICATION +VP_CONFIGURATION = _volume_key.VP_CONFIGURATION +VP_SECRET = _volume_key.VP_SECRET +VOLUME_FORMAT_LUKS = _volume_key.VOLUME_FORMAT_LUKS +PACKET_FORMAT_UNKNOWN = _volume_key.PACKET_FORMAT_UNKNOWN +PACKET_FORMAT_CLEARTEXT = _volume_key.PACKET_FORMAT_CLEARTEXT +PACKET_FORMAT_ASYMMETRIC = _volume_key.PACKET_FORMAT_ASYMMETRIC +PACKET_FORMAT_ASSYMETRIC = _volume_key.PACKET_FORMAT_ASSYMETRIC +PACKET_FORMAT_PASSPHRASE = _volume_key.PACKET_FORMAT_PASSPHRASE +PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY +PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY +PACKET_MATCH_OK = _volume_key.PACKET_MATCH_OK +PACKET_MATCH_UNSURE = _volume_key.PACKET_MATCH_UNSURE +class UI(object): + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def __init__(self): + this = _volume_key.new_UI() + try: + self.this.append(this) + except __builtin__.Exception: + self.this = this + __swig_destroy__ = _volume_key.delete_UI + __del__ = lambda self: None + generic_cb = _swig_property(_volume_key.UI_generic_cb_get, _volume_key.UI_generic_cb_set) + passphrase_cb = _swig_property(_volume_key.UI_passphrase_cb_get, _volume_key.UI_passphrase_cb_set) + + def set_nss_pwfn_arg(self, data: 'void *') -> "void": + return _volume_key.UI_set_nss_pwfn_arg(self, data) +UI_swigregister = _volume_key.UI_swigregister +UI_swigregister(UI) + +class libvk_volume_property(object): + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + __swig_destroy__ = _volume_key.delete_libvk_volume_property + __del__ = lambda self: None + label = _swig_property(_volume_key.libvk_volume_property_label_get) + name = _swig_property(_volume_key.libvk_volume_property_name_get) + type = _swig_property(_volume_key.libvk_volume_property_type_get) + value = _swig_property(_volume_key.libvk_volume_property_value_get) +libvk_volume_property_swigregister = _volume_key.libvk_volume_property_swigregister +libvk_volume_property_swigregister(libvk_volume_property) + +class Volume(object): + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + __swig_destroy__ = _volume_key.delete_Volume + __del__ = lambda self: None + open = staticmethod(_volume_key.Volume_open) + hostname = _swig_property(_volume_key.Volume_hostname_get) + uuid = _swig_property(_volume_key.Volume_uuid_get) + label = _swig_property(_volume_key.Volume_label_get) + path = _swig_property(_volume_key.Volume_path_get) + format = _swig_property(_volume_key.Volume_format_get) + + def dump_properties(self, with_secrets: 'bool') -> "GSList *": + return _volume_key.Volume_dump_properties(self, with_secrets) + + def get_secret(self, secret_type: 'enum libvk_secret', ui: 'UI') -> "void": + return _volume_key.Volume_get_secret(self, secret_type, ui) + + def add_secret(self, secret_type: 'enum libvk_secret', secret: 'void const *') -> "void": + return _volume_key.Volume_add_secret(self, secret_type, secret) + + def load_packet(self, packet: 'Volume') -> "void": + return _volume_key.Volume_load_packet(self, packet) + + def apply_packet(self, packet: 'Volume', secret_type: 'enum libvk_secret', ui: 'UI') -> "void": + return _volume_key.Volume_apply_packet(self, packet, secret_type, ui) + + def open_with_packet(self, packet: 'Volume', name: 'char const *') -> "void": + return _volume_key.Volume_open_with_packet(self, packet, name) + + def create_packet_cleartext(self, secret_type: 'enum libvk_secret') -> "void *": + return _volume_key.Volume_create_packet_cleartext(self, secret_type) + + def create_packet_assymetric(self, secret_type: 'enum libvk_secret', cert: 'CERTCertificate *', ui: 'UI') -> "void *": + return _volume_key.Volume_create_packet_assymetric(self, secret_type, cert, ui) + + def create_packet_asymmetric(self, secret_type: 'enum libvk_secret', cert: 'CERTCertificate *', ui: 'UI') -> "void *": + return _volume_key.Volume_create_packet_asymmetric(self, secret_type, cert, ui) + + def create_packet_assymetric_from_cert_data(self, secret_type: 'enum libvk_secret', cert_data: 'void const *', ui: 'UI', format: 'enum libvk_packet_format'=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY) -> "void *": + return _volume_key.Volume_create_packet_assymetric_from_cert_data(self, secret_type, cert_data, ui, format) + + def create_packet_asymmetric_from_cert_data(self, secret_type: 'enum libvk_secret', cert_data: 'void const *', ui: 'UI', format: 'enum libvk_packet_format'=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY) -> "void *": + return _volume_key.Volume_create_packet_asymmetric_from_cert_data(self, secret_type, cert_data, ui, format) + + def create_packet_with_passphrase(self, secret_type: 'enum libvk_secret', passphrase: 'char const *') -> "void *": + return _volume_key.Volume_create_packet_with_passphrase(self, secret_type, passphrase) + + def packet_match_volume(self, vol: 'Volume') -> "enum libvk_packet_match_result": + return _volume_key.Volume_packet_match_volume(self, vol) +Volume_swigregister = _volume_key.Volume_swigregister +Volume_swigregister(Volume) + +def Volume_open(path: 'char const *') -> "GError **": + return _volume_key.Volume_open(path) +Volume_open = _volume_key.Volume_open + +class Packet(object): + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined") + __repr__ = _swig_repr + get_format = staticmethod(_volume_key.Packet_get_format) + open = staticmethod(_volume_key.Packet_open) + open_unencrypted = staticmethod(_volume_key.Packet_open_unencrypted) +Packet_swigregister = _volume_key.Packet_swigregister +Packet_swigregister(Packet) + +def Packet_get_format(packet: 'void const *') -> "GError **": + return _volume_key.Packet_get_format(packet) +Packet_get_format = _volume_key.Packet_get_format + +def Packet_open(packet: 'void const *', ui: 'UI') -> "struct libvk_ui *, GError **": + return _volume_key.Packet_open(packet, ui) +Packet_open = _volume_key.Packet_open + +def Packet_open_unencrypted(packet: 'void const *') -> "GError **": + return _volume_key.Packet_open_unencrypted(packet) +Packet_open_unencrypted = _volume_key.Packet_open_unencrypted + + + diff -Nru volume-key-0.3.10/python/python3/volume_key_wrap.c volume-key-0.3.12/python/python3/volume_key_wrap.c --- volume-key-0.3.10/python/python3/volume_key_wrap.c 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/python/python3/volume_key_wrap.c 2018-10-08 11:33:13.000000000 +0000 @@ -0,0 +1,6178 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.12 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGPYTHON +#define SWIGPYTHON +#endif + +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* Use debug wrappers with the Python release dll */ +# undef _DEBUG +# include +# define _DEBUG +#else +# include +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility macros for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) +#define PyString_Check(name) PyBytes_Check(name) +#define PyString_FromString(x) PyUnicode_FromString(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) +#define PyString_AsString(str) PyBytes_AsString(str) +#define PyString_Size(str) PyBytes_Size(str) +#define PyString_InternFromString(key) PyUnicode_InternFromString(key) +#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE +#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) +#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + + +/* Warning: This function will allocate a new string in Python 3, + * so please call SWIG_Python_str_DelForPy3(x) to free the space. + */ +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03000000 + char *cstr; + char *newstr; + Py_ssize_t len; + str = PyUnicode_AsUTF8String(str); + PyBytes_AsStringAndSize(str, &cstr, &len); + newstr = (char *) malloc(len+1); + memcpy(newstr, cstr, len+1); + Py_XDECREF(str); + return newstr; +#else + return PyString_AsString(str); +#endif +} + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#else +# define SWIG_Python_str_DelForPy3(x) +#endif + + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif + +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +typedef inquiry lenfunc; +typedef intargfunc ssizeargfunc; +typedef intintargfunc ssizessizeargfunc; +typedef intobjargproc ssizeobjargproc; +typedef intintobjargproc ssizessizeobjargproc; +typedef getreadbufferproc readbufferproc; +typedef getwritebufferproc writebufferproc; +typedef getsegcountproc segcountproc; +typedef getcharbufferproc charbufferproc; +static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) +{ + long result = 0; + PyObject *i = PyNumber_Int(x); + if (i) { + result = PyInt_AsLong(i); + Py_DECREF(i); + } + return result; +} +#endif + +#if PY_VERSION_HEX < 0x02050000 +#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) +#endif + +#if PY_VERSION_HEX < 0x02040000 +#define Py_VISIT(op) \ + do { \ + if (op) { \ + int vret = visit((op), arg); \ + if (vret) \ + return vret; \ + } \ + } while (0) +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef struct { + PyTypeObject type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + PyBufferProcs as_buffer; + PyObject *name, *slots; +} PyHeapTypeObject; +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef destructor freefunc; +#endif + +#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ + (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ + (PY_MAJOR_VERSION > 3)) +# define SWIGPY_USE_CAPSULE +# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) +#endif + +#if PY_VERSION_HEX < 0x03020000 +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +#if PY_VERSION_HEX >= 0x03000000 +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) +{ + return PyInstanceMethod_New(func); +} +#else +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) +{ + return NULL; +} +#endif + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) + +#ifdef SWIGPYTHON_BUILTIN +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) +#else +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) +#endif + +#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) + +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +#if defined(SWIGPYTHON_BUILTIN) + +SWIGINTERN void +SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { + PyObject *s = PyString_InternFromString(key); + PyList_Append(seq, s); + Py_DECREF(s); +} + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif + Py_DECREF(obj); + if (public_interface) + SwigPyBuiltin_AddPublicSymbol(public_interface, name); +} + +#else + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif + Py_DECREF(obj); +} + +#endif + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN Py_ssize_t +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + if (min <= 1 && max >= 1) { + Py_ssize_t i; + objs[0] = args; + for (i = 1; i < max; ++i) { + objs[i] = 0; + } + return 2; + } + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + Py_ssize_t i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) +#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) + +#ifdef __cplusplus +extern "C" { +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; + PyTypeObject *pytype; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + data->pytype = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData *data) { + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +#ifdef SWIGPYTHON_BUILTIN + PyObject *dict; +#endif +} SwigPyObject; + + +#ifdef SWIGPYTHON_BUILTIN + +SWIGRUNTIME PyObject * +SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + + if (!sobj->dict) + sobj->dict = PyDict_New(); + + Py_INCREF(sobj->dict); + return sobj->dict; +} + +#endif + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +SwigPyObject_repr(SwigPyObject *v) +#else +SwigPyObject_repr(SwigPyObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); + if (v->next) { +# ifdef METH_NOARGS + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +# else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +# endif +# if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +# else + PyString_ConcatAndDel(&repr,nrep); +# endif + } + return repr; +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, would it also be useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); + return res; +} + + +SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); + +#ifdef SWIGPYTHON_BUILTIN +static swig_type_info *SwigPyObject_stype = 0; +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + SwigPyClientData *cd; + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + assert(cd); + assert(cd->pytype); + return cd->pytype; +} +#else +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); + return type; +} +#endif + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { +#ifdef SWIGPYTHON_BUILTIN + PyTypeObject *target_tp = SwigPyObject_type(); + if (PyType_IsSubtype(op->ob_type, target_tp)) + return 1; + return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); +#else + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +#endif +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + + /* PyObject_CallFunction() has the potential to silently drop + the active active exception. In cases of unnamed temporary + variable or where we just finished iterating over a generator + StopIteration will be active right now, and this needs to + remain true upon return from SwigPyObject_dealloc. So save + and restore. */ + + PyObject *val = NULL, *type = NULL, *tb = NULL; + PyErr_Fetch(&val, &type, &tb); + + if (data->delargs) { + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + if (!res) + PyErr_WriteUnraisable(destroy); + + PyErr_Restore(val, type, tb); + + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +SwigPyObject_next(PyObject* v) +#else +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_disown(PyObject *v) +#else +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_acquire(PyObject *v) +#else +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#elif (PY_VERSION_HEX < 0x02050000) + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#else + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +SwigPyObject_getattr(SwigPyObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +SwigPyObject_TypeOnce(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_long, /*nb_long*/ +#else + 0, /*nb_reserved*/ +#endif + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ +#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + 0, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ +#else + (cmpfunc)SwigPyObject_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + swigpyobject_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpyobject_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpyobject_type) < 0) + return NULL; +#endif + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == SwigPyPacked_TypeOnce()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_TypeOnce(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + (printfunc)SwigPyPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX>=0x03000000 + 0, /* tp_reserved in 3.0.1 */ +#else + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + swigpypacked_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpypacked_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpypacked_type) < 0) + return NULL; +#endif + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} + +static PyObject *swig_this = NULL; + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + if (swig_this == NULL) + swig_this = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + PyObject *obj; + + if (SwigPyObject_Check(pyobj)) + return (SwigPyObject *) pyobj; + +#ifdef SWIGPYTHON_BUILTIN + (void)obj; +# ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + pyobj = PyWeakref_GET_OBJECT(pyobj); + if (pyobj && SwigPyObject_Check(pyobj)) + return (SwigPyObject*) pyobj; + } +# endif + return NULL; +#else + + obj = 0; + +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; +#endif +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + int res; + SwigPyObject *sobj; + int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; + + if (!obj) + return SWIG_ERROR; + if (obj == Py_None && !implicit_conv) { + if (ptr) + *ptr = 0; + return SWIG_OK; + } + + res = SWIG_ERROR; + + sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + res = SWIG_OK; + } else { + if (implicit_conv) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } + } + return res; +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) + return SWIG_ERROR; + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, without calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + if (inst) { + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } +#else + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } +#endif + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst = 0; + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { + SwigPyClientData *clientdata; + PyObject * robj; + int own; + + if (!ptr) + return SWIG_Py_Void(); + + clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + if (clientdata && clientdata->pytype) { + SwigPyObject *newobj; + if (flags & SWIG_BUILTIN_TP_INIT) { + newobj = (SwigPyObject*) self; + if (newobj->ptr) { + PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); + while (newobj->next) + newobj = (SwigPyObject *) newobj->next; + newobj->next = next_self; + newobj = (SwigPyObject *)next_self; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + } else { + newobj = PyObject_New(SwigPyObject, clientdata->pytype); +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + if (newobj) { + newobj->ptr = ptr; + newobj->ty = type; + newobj->own = own; + newobj->next = 0; + return (PyObject*) newobj; + } + return SWIG_Py_Void(); + } + + assert(!(flags & SWIG_BUILTIN_TP_INIT)); + + robj = SwigPyObject_New(ptr, type, own); + if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + Py_DECREF(robj); + robj = inst; + } + return robj; +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else +# ifdef SWIGPY_USE_CAPSULE + type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); +# else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); +# endif + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +#ifdef SWIGPY_USE_CAPSULE +SWIG_Python_DestroyModule(PyObject *obj) +#else +SWIG_Python_DestroyModule(void *vptr) +#endif +{ +#ifdef SWIGPY_USE_CAPSULE + swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); +#else + swig_module_info *swig_module = (swig_module_info *) vptr; +#endif + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); + swig_this = NULL; +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); +#endif +#ifdef SWIGPY_USE_CAPSULE + PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#else + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#endif +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { +#ifdef SWIGPY_USE_CAPSULE + descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); +#else + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); +#endif + } else { + swig_module_info *swig_module = SWIG_GetModule(0); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { +#ifdef SWIGPY_USE_CAPSULE + obj = PyCapsule_New((void*) descriptor, NULL, NULL); +#else + obj = PyCObject_FromVoidPtr(descriptor, NULL); +#endif + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); + } else { + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + } + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : ""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + SWIG_Python_str_DelForPy3(cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); +#if SWIG_POINTER_EXCEPTION + if (flags) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } +#endif + } + return result; +} + +#ifdef SWIGPYTHON_BUILTIN +SWIGRUNTIME int +SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { + PyTypeObject *tp = obj->ob_type; + PyObject *descr; + PyObject *encoded_name; + descrsetfunc f; + int res = -1; + +# ifdef Py_USING_UNICODE + if (PyString_Check(name)) { + name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); + if (!name) + return -1; + } else if (!PyUnicode_Check(name)) +# else + if (!PyString_Check(name)) +# endif + { + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); + return -1; + } else { + Py_INCREF(name); + } + + if (!tp->tp_dict) { + if (PyType_Ready(tp) < 0) + goto done; + } + + descr = _PyType_Lookup(tp, name); + f = NULL; + if (descr != NULL) + f = descr->ob_type->tp_descr_set; + if (!f) { + if (PyString_Check(name)) { + encoded_name = name; + Py_INCREF(name); + } else { + encoded_name = PyUnicode_AsUTF8String(name); + } + PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); + Py_DECREF(encoded_name); + } else { + res = f(descr, obj, value); + } + + done: + Py_DECREF(name); + return res; +} +#endif + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +#include + +#include + +#include +#include + +#include "../../lib/libvolume_key.h" + +#if PY_VERSION_HEX >= 0x03000000 +#undef PyString_AsStringAndSize +#undef PyString_FromStringAndSize +static int +PyString_AsStringAndSize(PyObject *obj, char **buffer, Py_ssize_t *length) +{ + const char *b = PyUnicode_AsUTF8AndSize(obj, length); + if (b == NULL) + return -1; + *buffer = b; + return 0; +} +#define PyString_FromStringAndSize(u, len) PyUnicode_FromStringAndSize(u, len) +#endif + +/* Drop a reference to a Python object. */ +static void +python_free_data (void *data) +{ + PyObject *o; + + o = data; + Py_DECREF (o); +} + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + + +static void * +libvk_volume_create_packet_asymmetric_from_cert_data + (struct libvk_volume *vol, size_t *size, enum libvk_secret secret_type, + const void *cert_data, size_t cert_size, const struct libvk_ui *ui, + GError **error, enum libvk_packet_format format) { + CERTCertificate *cert; + void *res; + + cert = CERT_DecodeCertFromPackage ((char *)cert_data, cert_size); + if (cert == NULL) + { + g_set_error (error, LIBVK_ERROR, LIBVK_ERROR_FAILED, + _("Error decoding certificate")); + return NULL; + } + res = libvk_volume_create_packet_asymmetric_with_format (vol, size, + secret_type, cert, + ui, format, error); + CERT_DestroyCertificate (cert); + return res; +} + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_CERTCertificate swig_types[0] +#define SWIGTYPE_p_GPtrArray swig_types[1] +#define SWIGTYPE_p_char swig_types[2] +#define SWIGTYPE_p_f_p_void__void swig_types[3] +#define SWIGTYPE_p_libvk_packet swig_types[4] +#define SWIGTYPE_p_libvk_ui swig_types[5] +#define SWIGTYPE_p_libvk_volume swig_types[6] +#define SWIGTYPE_p_libvk_volume_property swig_types[7] +#define SWIGTYPE_p_p_GError swig_types[8] +#define SWIGTYPE_p_size_t swig_types[9] +static swig_type_info *swig_types[11]; +static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#if (PY_VERSION_HEX <= 0x02000000) +# if !defined(SWIG_PYTHON_CLASSIC) +# error "This python version requires swig to be run with the '-classic' option" +# endif +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodern' option" +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodernargs' option" +#endif + +/*----------------------------------------------- + @(target):= _volume_key.so + ------------------------------------------------*/ +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_init PyInit__volume_key + +#else +# define SWIG_init init_volume_key + +#endif +#define SWIG_name "_volume_key" + +#define SWIGVERSION 0x030012 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); +} + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { +#if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); +#else +#if PY_VERSION_HEX >= 0x03010000 + return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); +#else + return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size)); +#endif +#endif +#else + return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); +#endif + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + +SWIGINTERN struct libvk_ui *new_libvk_ui(void){ + return libvk_ui_new (); + } +SWIGINTERN void delete_libvk_ui(struct libvk_ui *self){ + libvk_ui_free (self); + } + +/* Call a "generic callback" implemented in Python */ +static char * +python_generic_cb (void *data, const char *prompt, int echo) +{ + PyObject *fn, *res; + char *str; + + /* On exception this callback returns NULL, leaving the "top-level" function + wrapper to recognize the exception and return an error. In the unlikely + case the callback is called again after an error, just clear the error + state and start anew. */ + PyErr_Clear (); + fn = data; + res = PyObject_CallFunction (fn, (char *)"sN", prompt, + PyBool_FromLong (echo)); + if (res == NULL) + return NULL; + if (res == Py_None) + { + Py_DECREF (res); + return NULL; + } + str = PyString_AsString (res); + if (str == NULL) + { + Py_DECREF (res); + return NULL; + } + str = g_strdup (str); + Py_DECREF (res); + return str; +} + +/* Call a "passphrase callback" implemented in Python */ +static char * +python_passphrase_cb (void *data, const char *prompt, unsigned failed_attempts) +{ + PyObject *fn, *res; + char *str; + + /* On exception this callback returns NULL, leaving the "top-level" function + wrapper to recognize the exception and return an error. In the unlikely + case the callback is called again after an error, just clear the error + state and start anew. */ + PyErr_Clear (); + fn = data; + res = PyObject_CallFunction (fn, (char *)"sI", prompt, failed_attempts); + if (res == NULL) + return NULL; + if (res == Py_None) + { + Py_DECREF (res); + return NULL; + } + str = PyString_AsString (res); + if (str == NULL) + { + Py_DECREF (res); + return NULL; + } + str = g_strdup (str); + Py_DECREF (res); + return str; +} + +static PyObject * +libvk_ui_generic_cb_get (const struct libvk_ui *ui) +{ + (void)ui; + return NULL; +} + +static void +libvk_ui_generic_cb_set (struct libvk_ui *ui, PyObject *generic_cb) +{ + Py_INCREF (generic_cb); + libvk_ui_set_generic_cb (ui, python_generic_cb, generic_cb, python_free_data); +} + +static PyObject * +libvk_ui_passphrase_cb_get (const struct libvk_ui *ui) +{ + (void)ui; + return NULL; +} + +static void +libvk_ui_passphrase_cb_set (struct libvk_ui *ui, PyObject *passphrase_cb) +{ + Py_INCREF (passphrase_cb); + libvk_ui_set_passphrase_cb (ui, python_passphrase_cb, passphrase_cb, + python_free_data); +} + +SWIGINTERN void delete_libvk_volume_property(struct libvk_volume_property *self){ + libvk_vp_free (self); + } + +static char * +libvk_volume_property_label_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_label(prop); +} + +static char * +libvk_volume_property_name_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_name(prop); +} + +static enum libvk_vp_type +libvk_volume_property_type_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_type (prop); +} + +static char * +libvk_volume_property_value_get (const struct libvk_volume_property *prop) +{ + return libvk_vp_get_value(prop); +} + +SWIGINTERN void delete_libvk_volume(struct libvk_volume *self){ + libvk_volume_free (self); + } + +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else + if (PyUnicode_Check(obj)) +#endif +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; +#if PY_VERSION_HEX>=0x03000000 +#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if(alloc) *alloc = SWIG_NEWOBJ; +#endif + PyBytes_AsStringAndSize(obj, &cstr, &len); +#else + PyString_AsStringAndSize(obj, &cstr, &len); +#endif + if (cptr) { + if (alloc) { + /* + In python the user should not be able to modify the inner + string representation. To warranty that, if you define + SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string + buffer is always returned. + + The default behavior is just to return the pointer value, + so, be careful. + */ +#if defined(SWIG_PYTHON_SAFE_CSTRINGS) + if (*alloc != SWIG_OLDOBJ) +#else + if (*alloc == SWIG_NEWOBJ) +#endif + { + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + *alloc = SWIG_NEWOBJ; + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + *cptr = PyBytes_AsString(obj); +#else + assert(0); /* Should never reach here with Unicode strings in Python 3 */ +#endif +#else + *cptr = SWIG_Python_str_AsChar(obj); +#endif + } + } + if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + Py_XDECREF(obj); +#endif + return SWIG_OK; + } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + } + if (psize) *psize = len + 1; + + Py_XDECREF(obj); + return SWIG_OK; + } else { + Py_XDECREF(obj); + } + } +#endif +#endif + + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; +#if PY_VERSION_HEX < 0x03000000 + } else if (PyInt_Check(obj)) { + if (val) *val = (double) PyInt_AsLong(obj); + return SWIG_OK; +#endif + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else +#endif + if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + int r; + if (!PyBool_Check(obj)) + return SWIG_ERROR; + r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; +} + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else +#endif + if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + } +#endif + return res; +} + +SWIGINTERN void *libvk_volume_create_packet_assymetric_from_cert_data(struct libvk_volume *self,size_t *size,enum libvk_secret secret_type,void const *cert_data,size_t cert_size,struct libvk_ui const *ui,GError **error,enum libvk_packet_format format){ + return libvk_volume_create_packet_asymmetric_from_cert_data (self, size, + secret_type, + cert_data, + cert_size, ui, + error, format); + } +SWIGINTERN enum libvk_packet_match_result libvk_volume_packet_match_volume(struct libvk_volume *self,struct libvk_volume const *vol,GPtrArray *warnings,GError **error){ + return libvk_packet_match_volume (self, vol, warnings, error); + } + +static char * +libvk_volume_hostname_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_hostname (vol); +} + +static char * +libvk_volume_uuid_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_uuid (vol); +} + +static char * +libvk_volume_label_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_label (vol); +} + +static char * +libvk_volume_path_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_path (vol); +} + +static char * +libvk_volume_format_get (const struct libvk_volume *vol) +{ + return libvk_volume_get_format (vol); +} + +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_new_UI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"new_UI",0,0)) SWIG_fail; + result = (struct libvk_ui *)new_libvk_ui(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_ui, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"delete_UI",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UI" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + delete_libvk_ui(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_generic_cb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"UI_generic_cb_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_generic_cb_set" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + + if (!PyCallable_Check (obj1)) + SWIG_exception (SWIG_TypeError, "callback expected"); + arg2 = obj1; + + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_ui_generic_cb_set(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_generic_cb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"UI_generic_cb_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_generic_cb_get" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)libvk_ui_generic_cb_get(arg1); + + (void)result; + SWIG_exception (SWIG_AttributeError, "unreadable attribute"); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_passphrase_cb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"UI_passphrase_cb_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_passphrase_cb_set" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + + if (!PyCallable_Check (obj1)) + SWIG_exception (SWIG_TypeError, "callback expected"); + arg2 = obj1; + + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_ui_passphrase_cb_set(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_passphrase_cb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"UI_passphrase_cb_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_passphrase_cb_get" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)libvk_ui_passphrase_cb_get(arg1); + + (void)result; + SWIG_exception (SWIG_AttributeError, "unreadable attribute"); + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UI_set_nss_pwfn_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; + void *arg2 = (void *) 0 ; + void (*arg3)(void *) = (void (*)(void *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + arg3 = python_free_data; + if(!PyArg_UnpackTuple(args,(char *)"UI_set_nss_pwfn_arg",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_set_nss_pwfn_arg" "', argument " "1"" of type '" "struct libvk_ui *""'"); + } + arg1 = (struct libvk_ui *)(argp1); + arg2 = PyTuple_Pack (1, obj1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_ui_set_nss_pwfn_arg(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UI_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_ui, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_libvk_volume_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"delete_libvk_volume_property",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_libvk_volume_property" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + delete_libvk_volume_property(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_label_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"libvk_volume_property_label_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_label_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (char *)libvk_volume_property_label_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"libvk_volume_property_name_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_name_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (char *)libvk_volume_property_name_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + enum libvk_vp_type result; + + if(!PyArg_UnpackTuple(args,(char *)"libvk_volume_property_type_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_type_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (enum libvk_vp_type)libvk_volume_property_type_get(arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_libvk_volume_property_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"libvk_volume_property_value_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_value_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); + } + arg1 = (struct libvk_volume_property *)(argp1); + result = (char *)libvk_volume_property_value_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *libvk_volume_property_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_volume_property, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_Volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"delete_Volume",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Volume" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + delete_libvk_volume(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + GError **arg2 = (GError **) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + GError *err2 = NULL ; + PyObject * obj0 = 0 ; + struct libvk_volume *result = 0 ; + + arg2 = &err2; + if(!PyArg_UnpackTuple(args,(char *)"Volume_open",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_open" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (struct libvk_volume *)libvk_volume_open((char const *)arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, SWIG_POINTER_OWN | 0 ); + + if (err2 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err2->message); + g_error_free (err2); + } + + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_hostname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"Volume_hostname_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_hostname_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_hostname_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_uuid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"Volume_uuid_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_uuid_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_uuid_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_label_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"Volume_label_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_label_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_label_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"Volume_path_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_path_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_path_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_format_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"Volume_format_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_format_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (char *)libvk_volume_format_get(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + g_free (result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_dump_properties(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + GSList *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"Volume_dump_properties",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_dump_properties" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_dump_properties" "', argument " "2"" of type '" "bool""'"); + } + arg2 = (bool)(val2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (GSList *)libvk_volume_dump_properties(arg1,arg2); + + resultobj = PyList_New (0); + while (result != NULL) + { + GSList *next; + PyObject *p; + + p = SWIG_NewPointerObj(result->data, SWIGTYPE_p_libvk_volume_property, + SWIG_POINTER_OWN); + PyList_Append (resultobj, p); + next = result->next; + g_slist_free_1 (result); + result = next; + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_get_secret(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + enum libvk_secret arg2 ; + struct libvk_ui *arg3 = (struct libvk_ui *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + arg4 = &err4; + if(!PyArg_UnpackTuple(args,(char *)"Volume_get_secret",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_get_secret" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_get_secret" "', argument " "2"" of type '" "enum libvk_secret""'"); + } + arg2 = (enum libvk_secret)(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Volume_get_secret" "', argument " "3"" of type '" "struct libvk_ui const *""'"); + } + arg3 = (struct libvk_ui *)(argp3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg2 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_get_secret(arg1,arg2,(struct libvk_ui const *)arg3,arg4); + resultobj = SWIG_Py_Void(); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_add_secret(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + enum libvk_secret arg2 ; + void *arg3 = (void *) 0 ; + size_t arg4 ; + GError **arg5 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + GError *err5 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + arg5 = &err5; + if(!PyArg_UnpackTuple(args,(char *)"Volume_add_secret",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_add_secret" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_add_secret" "', argument " "2"" of type '" "enum libvk_secret""'"); + } + arg2 = (enum libvk_secret)(val2); + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(secret, size)"); + arg3 = buf; + arg4 = len; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg2 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + libvk_volume_add_secret(arg1,arg2,(void const *)arg3,arg4,arg5); + resultobj = SWIG_Py_Void(); + + if (err5 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err5->message); + g_error_free (err5); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_load_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + GError **arg3 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + GError *err3 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + arg3 = &err3; + if(!PyArg_UnpackTuple(args,(char *)"Volume_load_packet",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_load_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_load_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_load_packet(arg1,(struct libvk_volume const *)arg2,arg3); + resultobj = SWIG_Py_Void(); + + if (err3 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err3->message); + g_error_free (err3); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_apply_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + enum libvk_secret arg3 ; + struct libvk_ui *arg4 = (struct libvk_ui *) 0 ; + GError **arg5 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + GError *err5 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + arg5 = &err5; + if(!PyArg_UnpackTuple(args,(char *)"Volume_apply_packet",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_apply_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_apply_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_apply_packet" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_apply_packet" "', argument " "4"" of type '" "struct libvk_ui const *""'"); + } + arg4 = (struct libvk_ui *)(argp4); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_apply_packet(arg1,(struct libvk_volume const *)arg2,arg3,(struct libvk_ui const *)arg4,arg5); + resultobj = SWIG_Py_Void(); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err5 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err5->message); + g_error_free (err5); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_open_with_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + char *arg3 = (char *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + arg4 = &err4; + if(!PyArg_UnpackTuple(args,(char *)"Volume_open_with_packet",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_open_with_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_open_with_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Volume_open_with_packet" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + libvk_volume_open_with_packet(arg1,(struct libvk_volume const *)arg2,(char const *)arg3,arg4); + resultobj = SWIG_Py_Void(); + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_cleartext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg4 = &err4; + if(!PyArg_UnpackTuple(args,(char *)"Volume_create_packet_cleartext",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_cleartext" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_cleartext" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + result = (void *)libvk_volume_create_packet_cleartext(arg1,arg2,arg3,arg4); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_assymetric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + CERTCertificate *arg4 = (CERTCertificate *) 0 ; + struct libvk_ui *arg5 = (struct libvk_ui *) 0 ; + GError **arg6 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + GError *err6 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg6 = &err6; + if(!PyArg_UnpackTuple(args,(char *)"Volume_create_packet_assymetric",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_assymetric" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_assymetric" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_CERTCertificate, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_assymetric" "', argument " "4"" of type '" "CERTCertificate *""'"); + } + arg4 = (CERTCertificate *)(argp4); + res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Volume_create_packet_assymetric" "', argument " "5"" of type '" "struct libvk_ui const *""'"); + } + arg5 = (struct libvk_ui *)(argp5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg5) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (void *)libvk_volume_create_packet_assymetric(arg1,arg2,arg3,arg4,(struct libvk_ui const *)arg5,arg6); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err6 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err6->message); + g_error_free (err6); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_asymmetric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + CERTCertificate *arg4 = (CERTCertificate *) 0 ; + struct libvk_ui *arg5 = (struct libvk_ui *) 0 ; + GError **arg6 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + GError *err6 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg6 = &err6; + if(!PyArg_UnpackTuple(args,(char *)"Volume_create_packet_asymmetric",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_asymmetric" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_asymmetric" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_CERTCertificate, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_asymmetric" "', argument " "4"" of type '" "CERTCertificate *""'"); + } + arg4 = (CERTCertificate *)(argp4); + res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Volume_create_packet_asymmetric" "', argument " "5"" of type '" "struct libvk_ui const *""'"); + } + arg5 = (struct libvk_ui *)(argp5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg5) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (void *)libvk_volume_create_packet_asymmetric(arg1,arg2,arg3,arg4,(struct libvk_ui const *)arg5,arg6); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err6 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err6->message); + g_error_free (err6); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_assymetric_from_cert_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + void *arg4 = (void *) 0 ; + size_t arg5 ; + struct libvk_ui *arg6 = (struct libvk_ui *) 0 ; + GError **arg7 = (GError **) 0 ; + enum libvk_packet_format arg8 = (enum libvk_packet_format) LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + GError *err7 = NULL ; + int val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg7 = &err7; + if(!PyArg_UnpackTuple(args,(char *)"Volume_create_packet_assymetric_from_cert_data",4,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(cert_data, cert_size)"); + arg4 = buf; + arg5 = len; + } + res6 = SWIG_ConvertPtr(obj3, &argp6,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "6"" of type '" "struct libvk_ui const *""'"); + } + arg6 = (struct libvk_ui *)(argp6); + if (obj4) { + ecode8 = SWIG_AsVal_int(obj4, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "8"" of type '" "enum libvk_packet_format""'"); + } + arg8 = (enum libvk_packet_format)(val8); + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg6) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg8 >= LIBVK_PACKET_FORMAT_END__) + SWIG_exception (SWIG_ValueError, "invalid packet format"); + + result = (void *)libvk_volume_create_packet_assymetric_from_cert_data(arg1,arg2,arg3,(void const *)arg4,arg5,(struct libvk_ui const *)arg6,arg7,arg8); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err7 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err7->message); + g_error_free (err7); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_asymmetric_from_cert_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + void *arg4 = (void *) 0 ; + size_t arg5 ; + struct libvk_ui *arg6 = (struct libvk_ui *) 0 ; + GError **arg7 = (GError **) 0 ; + enum libvk_packet_format arg8 = (enum libvk_packet_format) LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + GError *err7 = NULL ; + int val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg7 = &err7; + if(!PyArg_UnpackTuple(args,(char *)"Volume_create_packet_asymmetric_from_cert_data",4,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(cert_data, cert_size)"); + arg4 = buf; + arg5 = len; + } + res6 = SWIG_ConvertPtr(obj3, &argp6,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "6"" of type '" "struct libvk_ui const *""'"); + } + arg6 = (struct libvk_ui *)(argp6); + if (obj4) { + ecode8 = SWIG_AsVal_int(obj4, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "8"" of type '" "enum libvk_packet_format""'"); + } + arg8 = (enum libvk_packet_format)(val8); + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg6) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg8 >= LIBVK_PACKET_FORMAT_END__) + SWIG_exception (SWIG_ValueError, "invalid packet format"); + + result = (void *)libvk_volume_create_packet_asymmetric_from_cert_data(arg1,arg2,arg3,(void const *)arg4,arg5,(struct libvk_ui const *)arg6,arg7,arg8); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err7 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err7->message); + g_error_free (err7); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_create_packet_with_passphrase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + size_t *arg2 = (size_t *) 0 ; + enum libvk_secret arg3 ; + char *arg4 = (char *) 0 ; + GError **arg5 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t sz2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + GError *err5 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + void *result = 0 ; + + arg2 = &sz2; + arg5 = &err5; + if(!PyArg_UnpackTuple(args,(char *)"Volume_create_packet_with_passphrase",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_with_passphrase" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + ecode3 = SWIG_AsVal_int(obj1, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_with_passphrase" "', argument " "3"" of type '" "enum libvk_secret""'"); + } + arg3 = (enum libvk_secret)(val3); + res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_with_passphrase" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = (char *)(buf4); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + + if ((unsigned)arg3 >= LIBVK_SECRET_END__) + SWIG_exception (SWIG_ValueError, "invalid secret type"); + + { + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (void *)libvk_volume_create_packet_with_passphrase(arg1,arg2,arg3,(char const *)arg4,arg5); + + resultobj = PyString_FromStringAndSize (result, sz2); + + if (err5 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err5->message); + g_error_free (err5); + } + + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Volume_packet_match_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; + struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; + GPtrArray *arg3 = (GPtrArray *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + enum libvk_packet_match_result result; + + arg3 = g_ptr_array_new (); + arg4 = &err4; + if(!PyArg_UnpackTuple(args,(char *)"Volume_packet_match_volume",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_packet_match_volume" "', argument " "1"" of type '" "struct libvk_volume *""'"); + } + arg1 = (struct libvk_volume *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_packet_match_volume" "', argument " "2"" of type '" "struct libvk_volume const *""'"); + } + arg2 = (struct libvk_volume *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (enum libvk_packet_match_result)libvk_volume_packet_match_volume(arg1,(struct libvk_volume const *)arg2,arg3,arg4); + resultobj = SWIG_From_int((int)(result)); + { + PyObject *warnings; + size_t i; + + warnings = PyList_New (arg3->len); + if (warnings == NULL) + SWIG_fail; + for (i = 0; i < arg3->len; i++) + PyList_SetItem (warnings, i, + PyString_FromString (g_ptr_array_index (arg3, i))); + resultobj = SWIG_Python_AppendOutput(resultobj, warnings); + } + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + { + size_t i; + + for (i = 0; i < arg3->len; i++) + g_free (g_ptr_array_index (arg3, i)); + g_ptr_array_free (arg3, TRUE); + } + return resultobj; +fail: + { + size_t i; + + for (i = 0; i < arg3->len; i++) + g_free (g_ptr_array_index (arg3, i)); + g_ptr_array_free (arg3, TRUE); + } + return NULL; +} + + +SWIGINTERN PyObject *Volume_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_volume, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Packet_get_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + void *arg1 = (void *) 0 ; + size_t arg2 ; + GError **arg3 = (GError **) 0 ; + GError *err3 = NULL ; + PyObject * obj0 = 0 ; + enum libvk_packet_format result; + + arg3 = &err3; + if(!PyArg_UnpackTuple(args,(char *)"Packet_get_format",1,1,&obj0)) SWIG_fail; + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(packet, size)"); + arg1 = buf; + arg2 = len; + } + result = (enum libvk_packet_format)libvk_packet_get_format((void const *)arg1,arg2,arg3); + resultobj = SWIG_From_int((int)(result)); + + if (err3 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err3->message); + g_error_free (err3); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Packet_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + void *arg1 = (void *) 0 ; + size_t arg2 ; + struct libvk_ui *arg3 = (struct libvk_ui *) 0 ; + GError **arg4 = (GError **) 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + GError *err4 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + struct libvk_volume *result = 0 ; + + arg4 = &err4; + if(!PyArg_UnpackTuple(args,(char *)"Packet_open",2,2,&obj0,&obj1)) SWIG_fail; + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(packet, size)"); + arg1 = buf; + arg2 = len; + } + res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_libvk_ui, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Packet_open" "', argument " "3"" of type '" "struct libvk_ui const *""'"); + } + arg3 = (struct libvk_ui *)(argp3); + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (struct libvk_volume *)libvk_packet_open((void const *)arg1,arg2,(struct libvk_ui const *)arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, 0 | 0 ); + + if (PyErr_Occurred()) { + Py_XDECREF (resultobj); + resultobj = NULL; + } + + + if (err4 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err4->message); + g_error_free (err4); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Packet_open_unencrypted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + void *arg1 = (void *) 0 ; + size_t arg2 ; + GError **arg3 = (GError **) 0 ; + GError *err3 = NULL ; + PyObject * obj0 = 0 ; + struct libvk_volume *result = 0 ; + + arg3 = &err3; + if(!PyArg_UnpackTuple(args,(char *)"Packet_open_unencrypted",1,1,&obj0)) SWIG_fail; + { + char *buf; + Py_ssize_t len; + + if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) + SWIG_exception (SWIG_TypeError, "(packet, size)"); + arg1 = buf; + arg2 = len; + } + result = (struct libvk_volume *)libvk_packet_open_unencrypted((void const *)arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, 0 | 0 ); + + if (err3 != NULL) + { + Py_XDECREF (resultobj); + resultobj = NULL; + SWIG_Error (SWIG_RuntimeError, err3->message); + g_error_free (err3); + } + + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Packet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_libvk_packet, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +static PyMethodDef SwigMethods[] = { + { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, + { (char *)"new_UI", _wrap_new_UI, METH_VARARGS, NULL}, + { (char *)"delete_UI", _wrap_delete_UI, METH_VARARGS, NULL}, + { (char *)"UI_generic_cb_set", _wrap_UI_generic_cb_set, METH_VARARGS, NULL}, + { (char *)"UI_generic_cb_get", _wrap_UI_generic_cb_get, METH_VARARGS, NULL}, + { (char *)"UI_passphrase_cb_set", _wrap_UI_passphrase_cb_set, METH_VARARGS, NULL}, + { (char *)"UI_passphrase_cb_get", _wrap_UI_passphrase_cb_get, METH_VARARGS, NULL}, + { (char *)"UI_set_nss_pwfn_arg", _wrap_UI_set_nss_pwfn_arg, METH_VARARGS, NULL}, + { (char *)"UI_swigregister", UI_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_libvk_volume_property", _wrap_delete_libvk_volume_property, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_label_get", _wrap_libvk_volume_property_label_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_name_get", _wrap_libvk_volume_property_name_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_type_get", _wrap_libvk_volume_property_type_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_value_get", _wrap_libvk_volume_property_value_get, METH_VARARGS, NULL}, + { (char *)"libvk_volume_property_swigregister", libvk_volume_property_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_Volume", _wrap_delete_Volume, METH_VARARGS, NULL}, + { (char *)"Volume_open", _wrap_Volume_open, METH_VARARGS, NULL}, + { (char *)"Volume_hostname_get", _wrap_Volume_hostname_get, METH_VARARGS, NULL}, + { (char *)"Volume_uuid_get", _wrap_Volume_uuid_get, METH_VARARGS, NULL}, + { (char *)"Volume_label_get", _wrap_Volume_label_get, METH_VARARGS, NULL}, + { (char *)"Volume_path_get", _wrap_Volume_path_get, METH_VARARGS, NULL}, + { (char *)"Volume_format_get", _wrap_Volume_format_get, METH_VARARGS, NULL}, + { (char *)"Volume_dump_properties", _wrap_Volume_dump_properties, METH_VARARGS, NULL}, + { (char *)"Volume_get_secret", _wrap_Volume_get_secret, METH_VARARGS, NULL}, + { (char *)"Volume_add_secret", _wrap_Volume_add_secret, METH_VARARGS, NULL}, + { (char *)"Volume_load_packet", _wrap_Volume_load_packet, METH_VARARGS, NULL}, + { (char *)"Volume_apply_packet", _wrap_Volume_apply_packet, METH_VARARGS, NULL}, + { (char *)"Volume_open_with_packet", _wrap_Volume_open_with_packet, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_cleartext", _wrap_Volume_create_packet_cleartext, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_assymetric", _wrap_Volume_create_packet_assymetric, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_asymmetric", _wrap_Volume_create_packet_asymmetric, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_assymetric_from_cert_data", _wrap_Volume_create_packet_assymetric_from_cert_data, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_asymmetric_from_cert_data", _wrap_Volume_create_packet_asymmetric_from_cert_data, METH_VARARGS, NULL}, + { (char *)"Volume_create_packet_with_passphrase", _wrap_Volume_create_packet_with_passphrase, METH_VARARGS, NULL}, + { (char *)"Volume_packet_match_volume", _wrap_Volume_packet_match_volume, METH_VARARGS, NULL}, + { (char *)"Volume_swigregister", Volume_swigregister, METH_VARARGS, NULL}, + { (char *)"Packet_get_format", _wrap_Packet_get_format, METH_VARARGS, NULL}, + { (char *)"Packet_open", _wrap_Packet_open, METH_VARARGS, NULL}, + { (char *)"Packet_open_unencrypted", _wrap_Packet_open_unencrypted, METH_VARARGS, NULL}, + { (char *)"Packet_swigregister", Packet_swigregister, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static swig_type_info _swigt__p_CERTCertificate = {"_p_CERTCertificate", "CERTCertificate *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_GPtrArray = {"_p_GPtrArray", "GPtrArray *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_packet = {"_p_libvk_packet", "libvk_packet *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_ui = {"_p_libvk_ui", "struct libvk_ui *|libvk_ui *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_volume = {"_p_libvk_volume", "struct libvk_volume *|libvk_volume *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_libvk_volume_property = {"_p_libvk_volume_property", "struct libvk_volume_property *|libvk_volume_property *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_GError = {"_p_p_GError", "GError **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_CERTCertificate, + &_swigt__p_GPtrArray, + &_swigt__p_char, + &_swigt__p_f_p_void__void, + &_swigt__p_libvk_packet, + &_swigt__p_libvk_ui, + &_swigt__p_libvk_volume, + &_swigt__p_libvk_volume_property, + &_swigt__p_p_GError, + &_swigt__p_size_t, +}; + +static swig_cast_info _swigc__p_CERTCertificate[] = { {&_swigt__p_CERTCertificate, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GPtrArray[] = { {&_swigt__p_GPtrArray, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_packet[] = { {&_swigt__p_libvk_packet, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_ui[] = { {&_swigt__p_libvk_ui, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_volume[] = { {&_swigt__p_libvk_volume, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_libvk_volume_property[] = { {&_swigt__p_libvk_volume_property, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_GError[] = { {&_swigt__p_p_GError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_CERTCertificate, + _swigc__p_GPtrArray, + _swigc__p_char, + _swigc__p_f_p_void__void, + _swigc__p_libvk_packet, + _swigc__p_libvk_ui, + _swigc__p_libvk_volume, + _swigc__p_libvk_volume_property, + _swigc__p_p_GError, + _swigc__p_size_t, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString(""); +#else + return PyString_FromString(""); +#endif + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; +#else + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif + return str; + } + + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + char *tmp; + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(str); + return 0; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ + (printfunc) swig_varlink_print, /* tp_print */ + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc) swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version_tag */ +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ +#if PY_VERSION_HEX >= 0x02050000 + 0, /* tp_prev */ +#endif + 0 /* tp_next */ +#endif + }; + varlink_type = tmp; + type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + varlink_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&varlink_type) < 0) + return NULL; +#endif + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (!c) continue; + c = strstr(c, "swig_ptr: "); + if (c) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif + +SWIGEXPORT +#if PY_VERSION_HEX >= 0x03000000 +PyObject* +#else +void +#endif +SWIG_init(void) { + PyObject *m, *d, *md; +#if PY_VERSION_HEX >= 0x03000000 + static struct PyModuleDef SWIG_module = { +# if PY_VERSION_HEX >= 0x03020000 + PyModuleDef_HEAD_INIT, +# else + { + PyObject_HEAD_INIT(NULL) + NULL, /* m_init */ + 0, /* m_index */ + NULL, /* m_copy */ + }, +# endif + (char *) SWIG_name, + NULL, + -1, + SwigMethods, + NULL, + NULL, + NULL, + NULL + }; +#endif + +#if defined(SWIGPYTHON_BUILTIN) + static SwigPyClientData SwigPyObject_clientdata = { + 0, 0, 0, 0, 0, 0, 0 + }; + static PyGetSetDef this_getset_def = { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { + (PyCFunction) SwigPyObject_own, + (PyCFunction) SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure + }; + PyTypeObject *builtin_pytype; + int builtin_base_count; + swig_type_info *builtin_basetype; + PyObject *tuple; + PyGetSetDescrObject *static_getset; + PyTypeObject *metatype; + PyTypeObject *swigpyobject; + SwigPyClientData *cd; + PyObject *public_interface, *public_symbol; + PyObject *this_descr; + PyObject *thisown_descr; + PyObject *self = 0; + int i; + + (void)builtin_pytype; + (void)builtin_base_count; + (void)builtin_basetype; + (void)tuple; + (void)static_getset; + (void)self; + + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); + assert(metatype); +#endif + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + +#if PY_VERSION_HEX >= 0x03000000 + m = PyModule_Create(&SWIG_module); +#else + m = Py_InitModule((char *) SWIG_name, SwigMethods); +#endif + + md = d = PyModule_GetDict(m); + (void)md; + + SWIG_InitializeModule(0); + +#ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + if (!cd) { + SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { + PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); +# if PY_VERSION_HEX >= 0x03000000 + return NULL; +# else + return; +# endif + } + + /* All objects have a 'this' attribute */ + this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); + (void)this_descr; + + /* All objects have a 'thisown' attribute */ + thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); + (void)thisown_descr; + + public_interface = PyList_New(0); + public_symbol = 0; + (void)public_symbol; + + PyDict_SetItemString(md, "__all__", public_interface); + Py_DECREF(public_interface); + for (i = 0; SwigMethods[i].ml_name != NULL; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); + for (i = 0; swig_const_table[i].name != 0; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); +#endif + + SWIG_InstallConstants(d,swig_const_table); + + + libvk_init (); + + SWIG_Python_SetConstant(d, "SECRET_DEFAULT",SWIG_From_int((int)(LIBVK_SECRET_DEFAULT))); + SWIG_Python_SetConstant(d, "SECRET_DATA_ENCRYPTION_KEY",SWIG_From_int((int)(LIBVK_SECRET_DATA_ENCRYPTION_KEY))); + SWIG_Python_SetConstant(d, "SECRET_PASSPHRASE",SWIG_From_int((int)(LIBVK_SECRET_PASSPHRASE))); + SWIG_Python_SetConstant(d, "VP_IDENTIFICATION",SWIG_From_int((int)(LIBVK_VP_IDENTIFICATION))); + SWIG_Python_SetConstant(d, "VP_CONFIGURATION",SWIG_From_int((int)(LIBVK_VP_CONFIGURATION))); + SWIG_Python_SetConstant(d, "VP_SECRET",SWIG_From_int((int)(LIBVK_VP_SECRET))); + SWIG_Python_SetConstant(d, "VOLUME_FORMAT_LUKS",SWIG_FromCharPtr("crypt_LUKS")); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_UNKNOWN",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_UNKNOWN))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_CLEARTEXT",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_CLEARTEXT))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASYMMETRIC",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASYMMETRIC))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASSYMETRIC",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASSYMETRIC))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_PASSPHRASE",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_PASSPHRASE))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY))); + SWIG_Python_SetConstant(d, "PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY))); + SWIG_Python_SetConstant(d, "PACKET_MATCH_OK",SWIG_From_int((int)(LIBVK_PACKET_MATCH_OK))); + SWIG_Python_SetConstant(d, "PACKET_MATCH_UNSURE",SWIG_From_int((int)(LIBVK_PACKET_MATCH_UNSURE))); +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else + return; +#endif +} + diff -Nru volume-key-0.3.10/python/volume_key.i volume-key-0.3.12/python/volume_key.i --- volume-key-0.3.10/python/volume_key.i 2018-04-19 12:58:50.000000000 +0000 +++ volume-key-0.3.12/python/volume_key.i 2018-10-04 08:28:37.000000000 +0000 @@ -27,7 +27,22 @@ #include #include -#include "lib/libvolume_key.h" +#include "../../lib/libvolume_key.h" + +#if PY_VERSION_HEX >= 0x03000000 +#undef PyString_AsStringAndSize +#undef PyString_FromStringAndSize +static int +PyString_AsStringAndSize(PyObject *obj, char **buffer, Py_ssize_t *length) +{ + const char *b = PyUnicode_AsUTF8AndSize(obj, length); + if (b == NULL) + return -1; + *buffer = b; + return 0; +} +#define PyString_FromStringAndSize(u, len) PyUnicode_FromStringAndSize(u, len) +#endif /* Drop a reference to a Python object. */ static void diff -Nru volume-key-0.3.10/python/volume_key.py volume-key-0.3.12/python/volume_key.py --- volume-key-0.3.10/python/volume_key.py 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/python/volume_key.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,283 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.12 -# -# Do not make changes to this file unless you know what you are doing--modify -# the SWIG interface file instead. - -from sys import version_info as _swig_python_version_info -if _swig_python_version_info >= (2, 7, 0): - def swig_import_helper(): - import importlib - pkg = __name__.rpartition('.')[0] - mname = '.'.join((pkg, '_volume_key')).lstrip('.') - try: - return importlib.import_module(mname) - except ImportError: - return importlib.import_module('_volume_key') - _volume_key = swig_import_helper() - del swig_import_helper -elif _swig_python_version_info >= (2, 6, 0): - def swig_import_helper(): - from os.path import dirname - import imp - fp = None - try: - fp, pathname, description = imp.find_module('_volume_key', [dirname(__file__)]) - except ImportError: - import _volume_key - return _volume_key - try: - _mod = imp.load_module('_volume_key', fp, pathname, description) - finally: - if fp is not None: - fp.close() - return _mod - _volume_key = swig_import_helper() - del swig_import_helper -else: - import _volume_key -del _swig_python_version_info - -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. - -try: - import builtins as __builtin__ -except ImportError: - import __builtin__ - -def _swig_setattr_nondynamic(self, class_type, name, value, static=1): - if (name == "thisown"): - return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'SwigPyObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name, None) - if method: - return method(self, value) - if (not static): - if _newclass: - object.__setattr__(self, name, value) - else: - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - - -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) - - -def _swig_getattr(self, class_type, name): - if (name == "thisown"): - return self.this.own() - method = class_type.__swig_getmethods__.get(name, None) - if method: - return method(self) - raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) - - -def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - -try: - _object = object - _newclass = 1 -except __builtin__.Exception: - class _object: - pass - _newclass = 0 - -SECRET_DEFAULT = _volume_key.SECRET_DEFAULT -SECRET_DATA_ENCRYPTION_KEY = _volume_key.SECRET_DATA_ENCRYPTION_KEY -SECRET_PASSPHRASE = _volume_key.SECRET_PASSPHRASE -VP_IDENTIFICATION = _volume_key.VP_IDENTIFICATION -VP_CONFIGURATION = _volume_key.VP_CONFIGURATION -VP_SECRET = _volume_key.VP_SECRET -VOLUME_FORMAT_LUKS = _volume_key.VOLUME_FORMAT_LUKS -PACKET_FORMAT_UNKNOWN = _volume_key.PACKET_FORMAT_UNKNOWN -PACKET_FORMAT_CLEARTEXT = _volume_key.PACKET_FORMAT_CLEARTEXT -PACKET_FORMAT_ASYMMETRIC = _volume_key.PACKET_FORMAT_ASYMMETRIC -PACKET_FORMAT_ASSYMETRIC = _volume_key.PACKET_FORMAT_ASSYMETRIC -PACKET_FORMAT_PASSPHRASE = _volume_key.PACKET_FORMAT_PASSPHRASE -PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY -PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY -PACKET_MATCH_OK = _volume_key.PACKET_MATCH_OK -PACKET_MATCH_UNSURE = _volume_key.PACKET_MATCH_UNSURE -class UI(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UI, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UI, name) - __repr__ = _swig_repr - - def __init__(self): - this = _volume_key.new_UI() - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - __swig_destroy__ = _volume_key.delete_UI - __del__ = lambda self: None - __swig_setmethods__["generic_cb"] = _volume_key.UI_generic_cb_set - __swig_getmethods__["generic_cb"] = _volume_key.UI_generic_cb_get - if _newclass: - generic_cb = _swig_property(_volume_key.UI_generic_cb_get, _volume_key.UI_generic_cb_set) - __swig_setmethods__["passphrase_cb"] = _volume_key.UI_passphrase_cb_set - __swig_getmethods__["passphrase_cb"] = _volume_key.UI_passphrase_cb_get - if _newclass: - passphrase_cb = _swig_property(_volume_key.UI_passphrase_cb_get, _volume_key.UI_passphrase_cb_set) - - def set_nss_pwfn_arg(self, data): - return _volume_key.UI_set_nss_pwfn_arg(self, data) -UI_swigregister = _volume_key.UI_swigregister -UI_swigregister(UI) - -class libvk_volume_property(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, libvk_volume_property, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, libvk_volume_property, name) - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - __swig_destroy__ = _volume_key.delete_libvk_volume_property - __del__ = lambda self: None - __swig_getmethods__["label"] = _volume_key.libvk_volume_property_label_get - if _newclass: - label = _swig_property(_volume_key.libvk_volume_property_label_get) - __swig_getmethods__["name"] = _volume_key.libvk_volume_property_name_get - if _newclass: - name = _swig_property(_volume_key.libvk_volume_property_name_get) - __swig_getmethods__["type"] = _volume_key.libvk_volume_property_type_get - if _newclass: - type = _swig_property(_volume_key.libvk_volume_property_type_get) - __swig_getmethods__["value"] = _volume_key.libvk_volume_property_value_get - if _newclass: - value = _swig_property(_volume_key.libvk_volume_property_value_get) -libvk_volume_property_swigregister = _volume_key.libvk_volume_property_swigregister -libvk_volume_property_swigregister(libvk_volume_property) - -class Volume(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Volume, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Volume, name) - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - __swig_destroy__ = _volume_key.delete_Volume - __del__ = lambda self: None - if _newclass: - open = staticmethod(_volume_key.Volume_open) - else: - open = _volume_key.Volume_open - __swig_getmethods__["hostname"] = _volume_key.Volume_hostname_get - if _newclass: - hostname = _swig_property(_volume_key.Volume_hostname_get) - __swig_getmethods__["uuid"] = _volume_key.Volume_uuid_get - if _newclass: - uuid = _swig_property(_volume_key.Volume_uuid_get) - __swig_getmethods__["label"] = _volume_key.Volume_label_get - if _newclass: - label = _swig_property(_volume_key.Volume_label_get) - __swig_getmethods__["path"] = _volume_key.Volume_path_get - if _newclass: - path = _swig_property(_volume_key.Volume_path_get) - __swig_getmethods__["format"] = _volume_key.Volume_format_get - if _newclass: - format = _swig_property(_volume_key.Volume_format_get) - - def dump_properties(self, with_secrets): - return _volume_key.Volume_dump_properties(self, with_secrets) - - def get_secret(self, secret_type, ui): - return _volume_key.Volume_get_secret(self, secret_type, ui) - - def add_secret(self, secret_type, secret): - return _volume_key.Volume_add_secret(self, secret_type, secret) - - def load_packet(self, packet): - return _volume_key.Volume_load_packet(self, packet) - - def apply_packet(self, packet, secret_type, ui): - return _volume_key.Volume_apply_packet(self, packet, secret_type, ui) - - def open_with_packet(self, packet, name): - return _volume_key.Volume_open_with_packet(self, packet, name) - - def create_packet_cleartext(self, secret_type): - return _volume_key.Volume_create_packet_cleartext(self, secret_type) - - def create_packet_assymetric(self, secret_type, cert, ui): - return _volume_key.Volume_create_packet_assymetric(self, secret_type, cert, ui) - - def create_packet_asymmetric(self, secret_type, cert, ui): - return _volume_key.Volume_create_packet_asymmetric(self, secret_type, cert, ui) - - def create_packet_assymetric_from_cert_data(self, secret_type, cert_data, ui, format=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY): - return _volume_key.Volume_create_packet_assymetric_from_cert_data(self, secret_type, cert_data, ui, format) - - def create_packet_asymmetric_from_cert_data(self, secret_type, cert_data, ui, format=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY): - return _volume_key.Volume_create_packet_asymmetric_from_cert_data(self, secret_type, cert_data, ui, format) - - def create_packet_with_passphrase(self, secret_type, passphrase): - return _volume_key.Volume_create_packet_with_passphrase(self, secret_type, passphrase) - - def packet_match_volume(self, vol): - return _volume_key.Volume_packet_match_volume(self, vol) -Volume_swigregister = _volume_key.Volume_swigregister -Volume_swigregister(Volume) - -def Volume_open(path): - return _volume_key.Volume_open(path) -Volume_open = _volume_key.Volume_open - -class Packet(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Packet, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Packet, name) - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") - __repr__ = _swig_repr - if _newclass: - get_format = staticmethod(_volume_key.Packet_get_format) - else: - get_format = _volume_key.Packet_get_format - if _newclass: - open = staticmethod(_volume_key.Packet_open) - else: - open = _volume_key.Packet_open - if _newclass: - open_unencrypted = staticmethod(_volume_key.Packet_open_unencrypted) - else: - open_unencrypted = _volume_key.Packet_open_unencrypted -Packet_swigregister = _volume_key.Packet_swigregister -Packet_swigregister(Packet) - -def Packet_get_format(packet): - return _volume_key.Packet_get_format(packet) -Packet_get_format = _volume_key.Packet_get_format - -def Packet_open(packet, ui): - return _volume_key.Packet_open(packet, ui) -Packet_open = _volume_key.Packet_open - -def Packet_open_unencrypted(packet): - return _volume_key.Packet_open_unencrypted(packet) -Packet_open_unencrypted = _volume_key.Packet_open_unencrypted - -# This file is compatible with both classic and new-style classes. - - diff -Nru volume-key-0.3.10/python/volume_key_wrap.c volume-key-0.3.12/python/volume_key_wrap.c --- volume-key-0.3.10/python/volume_key_wrap.c 2018-05-21 08:42:22.000000000 +0000 +++ volume-key-0.3.12/python/volume_key_wrap.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,6157 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - - -#ifndef SWIGPYTHON -#define SWIGPYTHON -#endif - -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - - -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG -#else -# include -#endif - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - size_t l = 0; - size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - const unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - char d = *(c++); - unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = (unsigned char)((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = (unsigned char)((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (unsigned char)(d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (unsigned char)(d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) -#define PyString_Check(name) PyBytes_Check(name) -#define PyString_FromString(x) PyUnicode_FromString(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) -#define PyString_AsString(str) PyBytes_AsString(str) -#define PyString_Size(str) PyBytes_Size(str) -#define PyString_InternFromString(key) PyUnicode_InternFromString(key) -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#define Py_hash_t long -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - -#ifdef __cplusplus -} -#endif - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) - -#ifdef SWIGPYTHON_BUILTIN -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) -#else -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) -#endif - -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) - -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -#if defined(SWIGPYTHON_BUILTIN) - -SWIGINTERN void -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { - PyObject *s = PyString_InternFromString(key); - PyList_Append(seq, s); - Py_DECREF(s); -} - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); - if (public_interface) - SwigPyBuiltin_AddPublicSymbol(public_interface, name); -} - -#else - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); -} - -#endif - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN Py_ssize_t -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - if (min <= 1 && max >= 1) { - Py_ssize_t i; - objs[0] = args; - for (i = 1; i < max; ++i) { - objs[i] = 0; - } - return 2; - } - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - Py_ssize_t i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) - -#ifdef __cplusplus -extern "C" { -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; - PyTypeObject *pytype; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - data->pytype = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -#ifdef SWIGPYTHON_BUILTIN - PyObject *dict; -#endif -} SwigPyObject; - - -#ifdef SWIGPYTHON_BUILTIN - -SWIGRUNTIME PyObject * -SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) -{ - SwigPyObject *sobj = (SwigPyObject *)v; - - if (!sobj->dict) - sobj->dict = PyDict_New(); - - Py_INCREF(sobj->dict); - return sobj->dict; -} - -#endif - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { -# ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif -# if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -# else - PyString_ConcatAndDel(&repr,nrep); -# endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); - return res; -} - - -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); - -#ifdef SWIGPYTHON_BUILTIN -static swig_type_info *SwigPyObject_stype = 0; -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - SwigPyClientData *cd; - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - assert(cd); - assert(cd->pytype); - return cd->pytype; -} -#else -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); - return type; -} -#endif - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { -#ifdef SWIGPYTHON_BUILTIN - PyTypeObject *target_tp = SwigPyObject_type(); - if (PyType_IsSubtype(op->ob_type, target_tp)) - return 1; - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); -#else - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -#endif -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - - /* PyObject_CallFunction() has the potential to silently drop - the active active exception. In cases of unnamed temporary - variable or where we just finished iterating over a generator - StopIteration will be active right now, and this needs to - remain true upon return from SwigPyObject_dealloc. So save - and restore. */ - - PyObject *val = NULL, *type = NULL, *tb = NULL; - PyErr_Fetch(&val, &type, &tb); - - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - if (!res) - PyErr_WriteUnraisable(destroy); - - PyErr_Restore(val, type, tb); - - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -SwigPyObject_TypeOnce(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ -#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - swigpyobject_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpyobject_type) < 0) - return NULL; -#endif - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == SwigPyPacked_TypeOnce()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_TypeOnce(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - swigpypacked_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpypacked_type) < 0) - return NULL; -#endif - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - PyObject *obj; - - if (SwigPyObject_Check(pyobj)) - return (SwigPyObject *) pyobj; - -#ifdef SWIGPYTHON_BUILTIN - (void)obj; -# ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - pyobj = PyWeakref_GET_OBJECT(pyobj); - if (pyobj && SwigPyObject_Check(pyobj)) - return (SwigPyObject*) pyobj; - } -# endif - return NULL; -#else - - obj = 0; - -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; -#endif -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - int res; - SwigPyObject *sobj; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; - - if (!obj) - return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { - if (ptr) - *ptr = 0; - return SWIG_OK; - } - - res = SWIG_ERROR; - - sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - res = SWIG_OK; - } else { - if (implicit_conv) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } - } - return res; -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } -#else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { - SwigPyClientData *clientdata; - PyObject * robj; - int own; - - if (!ptr) - return SWIG_Py_Void(); - - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - if (clientdata && clientdata->pytype) { - SwigPyObject *newobj; - if (flags & SWIG_BUILTIN_TP_INIT) { - newobj = (SwigPyObject*) self; - if (newobj->ptr) { - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); - while (newobj->next) - newobj = (SwigPyObject *) newobj->next; - newobj->next = next_self; - newobj = (SwigPyObject *)next_self; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - } else { - newobj = PyObject_New(SwigPyObject, clientdata->pytype); -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - if (newobj) { - newobj->ptr = ptr; - newobj->ty = type; - newobj->own = own; - newobj->next = 0; - return (PyObject*) newobj; - } - return SWIG_Py_Void(); - } - - assert(!(flags & SWIG_BUILTIN_TP_INIT)); - - robj = SwigPyObject_New(ptr, type, own); - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); - robj = inst; - } - return robj; -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else -# ifdef SWIGPY_USE_CAPSULE - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE -SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif -{ -#ifdef SWIGPY_USE_CAPSULE - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); - swig_this = NULL; -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); -#endif -#ifdef SWIGPY_USE_CAPSULE - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#endif -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { -#ifdef SWIGPY_USE_CAPSULE - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif - } else { - swig_module_info *swig_module = SWIG_GetModule(0); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE - obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : ""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - -#ifdef SWIGPYTHON_BUILTIN -SWIGRUNTIME int -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { - PyTypeObject *tp = obj->ob_type; - PyObject *descr; - PyObject *encoded_name; - descrsetfunc f; - int res = -1; - -# ifdef Py_USING_UNICODE - if (PyString_Check(name)) { - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); - if (!name) - return -1; - } else if (!PyUnicode_Check(name)) -# else - if (!PyString_Check(name)) -# endif - { - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); - return -1; - } else { - Py_INCREF(name); - } - - if (!tp->tp_dict) { - if (PyType_Ready(tp) < 0) - goto done; - } - - descr = _PyType_Lookup(tp, name); - f = NULL; - if (descr != NULL) - f = descr->ob_type->tp_descr_set; - if (!f) { - if (PyString_Check(name)) { - encoded_name = name; - Py_INCREF(name); - } else { - encoded_name = PyUnicode_AsUTF8String(name); - } - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); - } else { - res = f(descr, obj, value); - } - - done: - Py_DECREF(name); - return res; -} -#endif - - -#ifdef __cplusplus -} -#endif - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - -#include - -#include - -#include -#include - -#include "lib/libvolume_key.h" - -/* Drop a reference to a Python object. */ -static void -python_free_data (void *data) -{ - PyObject *o; - - o = data; - Py_DECREF (o); -} - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - -static void * -libvk_volume_create_packet_asymmetric_from_cert_data - (struct libvk_volume *vol, size_t *size, enum libvk_secret secret_type, - const void *cert_data, size_t cert_size, const struct libvk_ui *ui, - GError **error, enum libvk_packet_format format) { - CERTCertificate *cert; - void *res; - - cert = CERT_DecodeCertFromPackage ((char *)cert_data, cert_size); - if (cert == NULL) - { - g_set_error (error, LIBVK_ERROR, LIBVK_ERROR_FAILED, - _("Error decoding certificate")); - return NULL; - } - res = libvk_volume_create_packet_asymmetric_with_format (vol, size, - secret_type, cert, - ui, format, error); - CERT_DestroyCertificate (cert); - return res; -} - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_CERTCertificate swig_types[0] -#define SWIGTYPE_p_GPtrArray swig_types[1] -#define SWIGTYPE_p_char swig_types[2] -#define SWIGTYPE_p_f_p_void__void swig_types[3] -#define SWIGTYPE_p_libvk_packet swig_types[4] -#define SWIGTYPE_p_libvk_ui swig_types[5] -#define SWIGTYPE_p_libvk_volume swig_types[6] -#define SWIGTYPE_p_libvk_volume_property swig_types[7] -#define SWIGTYPE_p_p_GError swig_types[8] -#define SWIGTYPE_p_size_t swig_types[9] -static swig_type_info *swig_types[11]; -static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif -#endif - -/*----------------------------------------------- - @(target):= _volume_key.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__volume_key - -#else -# define SWIG_init init_volume_key - -#endif -#define SWIG_name "_volume_key" - -#define SWIGVERSION 0x030012 -#define SWIG_VERSION SWIGVERSION - - -#define SWIG_as_voidptr(a) (void *)((const void *)(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) - - -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} - - -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { -#if PY_VERSION_HEX >= 0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); -#else -#if PY_VERSION_HEX >= 0x03010000 - return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); -#else - return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size)); -#endif -#endif -#else - return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtr(const char *cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -} - -SWIGINTERN struct libvk_ui *new_libvk_ui(void){ - return libvk_ui_new (); - } -SWIGINTERN void delete_libvk_ui(struct libvk_ui *self){ - libvk_ui_free (self); - } - -/* Call a "generic callback" implemented in Python */ -static char * -python_generic_cb (void *data, const char *prompt, int echo) -{ - PyObject *fn, *res; - char *str; - - /* On exception this callback returns NULL, leaving the "top-level" function - wrapper to recognize the exception and return an error. In the unlikely - case the callback is called again after an error, just clear the error - state and start anew. */ - PyErr_Clear (); - fn = data; - res = PyObject_CallFunction (fn, (char *)"sN", prompt, - PyBool_FromLong (echo)); - if (res == NULL) - return NULL; - if (res == Py_None) - { - Py_DECREF (res); - return NULL; - } - str = PyString_AsString (res); - if (str == NULL) - { - Py_DECREF (res); - return NULL; - } - str = g_strdup (str); - Py_DECREF (res); - return str; -} - -/* Call a "passphrase callback" implemented in Python */ -static char * -python_passphrase_cb (void *data, const char *prompt, unsigned failed_attempts) -{ - PyObject *fn, *res; - char *str; - - /* On exception this callback returns NULL, leaving the "top-level" function - wrapper to recognize the exception and return an error. In the unlikely - case the callback is called again after an error, just clear the error - state and start anew. */ - PyErr_Clear (); - fn = data; - res = PyObject_CallFunction (fn, (char *)"sI", prompt, failed_attempts); - if (res == NULL) - return NULL; - if (res == Py_None) - { - Py_DECREF (res); - return NULL; - } - str = PyString_AsString (res); - if (str == NULL) - { - Py_DECREF (res); - return NULL; - } - str = g_strdup (str); - Py_DECREF (res); - return str; -} - -static PyObject * -libvk_ui_generic_cb_get (const struct libvk_ui *ui) -{ - (void)ui; - return NULL; -} - -static void -libvk_ui_generic_cb_set (struct libvk_ui *ui, PyObject *generic_cb) -{ - Py_INCREF (generic_cb); - libvk_ui_set_generic_cb (ui, python_generic_cb, generic_cb, python_free_data); -} - -static PyObject * -libvk_ui_passphrase_cb_get (const struct libvk_ui *ui) -{ - (void)ui; - return NULL; -} - -static void -libvk_ui_passphrase_cb_set (struct libvk_ui *ui, PyObject *passphrase_cb) -{ - Py_INCREF (passphrase_cb); - libvk_ui_set_passphrase_cb (ui, python_passphrase_cb, passphrase_cb, - python_free_data); -} - -SWIGINTERN void delete_libvk_volume_property(struct libvk_volume_property *self){ - libvk_vp_free (self); - } - -static char * -libvk_volume_property_label_get (const struct libvk_volume_property *prop) -{ - return libvk_vp_get_label(prop); -} - -static char * -libvk_volume_property_name_get (const struct libvk_volume_property *prop) -{ - return libvk_vp_get_name(prop); -} - -static enum libvk_vp_type -libvk_volume_property_type_get (const struct libvk_volume_property *prop) -{ - return libvk_vp_get_type (prop); -} - -static char * -libvk_volume_property_value_get (const struct libvk_volume_property *prop) -{ - return libvk_vp_get_value(prop); -} - -SWIGINTERN void delete_libvk_volume(struct libvk_volume *self){ - libvk_volume_free (self); - } - -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 -#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if(alloc) *alloc = SWIG_NEWOBJ; -#endif - PyBytes_AsStringAndSize(obj, &cstr, &len); -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); - *alloc = SWIG_NEWOBJ; - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - *cptr = PyBytes_AsString(obj); -#else - assert(0); /* Should never reach here with Unicode strings in Python 3 */ -#endif -#else - *cptr = SWIG_Python_str_AsChar(obj); -#endif - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - Py_XDECREF(obj); -#endif - return SWIG_OK; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); - } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - - - - -SWIGINTERN int -SWIG_AsVal_double (PyObject *obj, double *val) -{ - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) *val = PyFloat_AsDouble(obj); - return SWIG_OK; -#if PY_VERSION_HEX < 0x03000000 - } else if (PyInt_Check(obj)) { - if (val) *val = (double) PyInt_AsLong(obj); - return SWIG_OK; -#endif - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } -#endif - return res; -} - - -#include - - -#include - - -SWIGINTERNINLINE int -SWIG_CanCastAsInteger(double *d, double min, double max) { - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff/summ; - if (reps < 8*DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else -#endif - if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsVal_bool (PyObject *obj, bool *val) -{ - int r; - if (!PyBool_Check(obj)) - return SWIG_ERROR; - r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; -} - - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = (int)(v); - } - } - return res; -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) *val = (unsigned long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) -# define SWIG_LONG_LONG_AVAILABLE -#endif - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) -{ - int res = SWIG_TypeError; - if (PyLong_Check(obj)) { - unsigned long long v = PyLong_AsUnsignedLongLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - res = SWIG_OverflowError; - } - } else { - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj,&v); - if (SWIG_IsOK(res)) { - if (val) *val = v; - return res; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - const double mant_max = 1LL << DBL_MANT_DIG; - double d; - res = SWIG_AsVal_double (obj,&d); - if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) - return SWIG_OverflowError; - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { - if (val) *val = (unsigned long long)(d); - return SWIG_AddCast(res); - } - res = SWIG_TypeError; - } -#endif - return res; -} -#endif - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); - } -#endif - return res; -} - -SWIGINTERN void *libvk_volume_create_packet_assymetric_from_cert_data(struct libvk_volume *self,size_t *size,enum libvk_secret secret_type,void const *cert_data,size_t cert_size,struct libvk_ui const *ui,GError **error,enum libvk_packet_format format){ - return libvk_volume_create_packet_asymmetric_from_cert_data (self, size, - secret_type, - cert_data, - cert_size, ui, - error, format); - } -SWIGINTERN enum libvk_packet_match_result libvk_volume_packet_match_volume(struct libvk_volume *self,struct libvk_volume const *vol,GPtrArray *warnings,GError **error){ - return libvk_packet_match_volume (self, vol, warnings, error); - } - -static char * -libvk_volume_hostname_get (const struct libvk_volume *vol) -{ - return libvk_volume_get_hostname (vol); -} - -static char * -libvk_volume_uuid_get (const struct libvk_volume *vol) -{ - return libvk_volume_get_uuid (vol); -} - -static char * -libvk_volume_label_get (const struct libvk_volume *vol) -{ - return libvk_volume_get_label (vol); -} - -static char * -libvk_volume_path_get (const struct libvk_volume *vol) -{ - return libvk_volume_get_path (vol); -} - -static char * -libvk_volume_format_get (const struct libvk_volume *vol) -{ - return libvk_volume_get_format (vol); -} - -#ifdef __cplusplus -extern "C" { -#endif -SWIGINTERN PyObject *_wrap_new_UI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_ui *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_UI")) SWIG_fail; - result = (struct libvk_ui *)new_libvk_ui(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_ui, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_UI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_UI",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UI" "', argument " "1"" of type '" "struct libvk_ui *""'"); - } - arg1 = (struct libvk_ui *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - delete_libvk_ui(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_UI_generic_cb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:UI_generic_cb_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_generic_cb_set" "', argument " "1"" of type '" "struct libvk_ui *""'"); - } - arg1 = (struct libvk_ui *)(argp1); - - if (!PyCallable_Check (obj1)) - SWIG_exception (SWIG_TypeError, "callback expected"); - arg2 = obj1; - - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - libvk_ui_generic_cb_set(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_UI_generic_cb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:UI_generic_cb_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_generic_cb_get" "', argument " "1"" of type '" "struct libvk_ui *""'"); - } - arg1 = (struct libvk_ui *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)libvk_ui_generic_cb_get(arg1); - - (void)result; - SWIG_exception (SWIG_AttributeError, "unreadable attribute"); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_UI_passphrase_cb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:UI_passphrase_cb_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_passphrase_cb_set" "', argument " "1"" of type '" "struct libvk_ui *""'"); - } - arg1 = (struct libvk_ui *)(argp1); - - if (!PyCallable_Check (obj1)) - SWIG_exception (SWIG_TypeError, "callback expected"); - arg2 = obj1; - - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - libvk_ui_passphrase_cb_set(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_UI_passphrase_cb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:UI_passphrase_cb_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_passphrase_cb_get" "', argument " "1"" of type '" "struct libvk_ui *""'"); - } - arg1 = (struct libvk_ui *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)libvk_ui_passphrase_cb_get(arg1); - - (void)result; - SWIG_exception (SWIG_AttributeError, "unreadable attribute"); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_UI_set_nss_pwfn_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_ui *arg1 = (struct libvk_ui *) 0 ; - void *arg2 = (void *) 0 ; - void (*arg3)(void *) = (void (*)(void *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - arg3 = python_free_data; - if (!PyArg_ParseTuple(args,(char *)"OO:UI_set_nss_pwfn_arg",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UI_set_nss_pwfn_arg" "', argument " "1"" of type '" "struct libvk_ui *""'"); - } - arg1 = (struct libvk_ui *)(argp1); - arg2 = PyTuple_Pack (1, obj1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - libvk_ui_set_nss_pwfn_arg(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *UI_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_libvk_ui, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_libvk_volume_property(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_libvk_volume_property",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_libvk_volume_property" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); - } - arg1 = (struct libvk_volume_property *)(argp1); - delete_libvk_volume_property(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_libvk_volume_property_label_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_label_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_label_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); - } - arg1 = (struct libvk_volume_property *)(argp1); - result = (char *)libvk_volume_property_label_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_libvk_volume_property_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_name_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_name_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); - } - arg1 = (struct libvk_volume_property *)(argp1); - result = (char *)libvk_volume_property_name_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_libvk_volume_property_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - enum libvk_vp_type result; - - if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_type_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_type_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); - } - arg1 = (struct libvk_volume_property *)(argp1); - result = (enum libvk_vp_type)libvk_volume_property_type_get(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_libvk_volume_property_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume_property *arg1 = (struct libvk_volume_property *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:libvk_volume_property_value_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume_property, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "libvk_volume_property_value_get" "', argument " "1"" of type '" "struct libvk_volume_property *""'"); - } - arg1 = (struct libvk_volume_property *)(argp1); - result = (char *)libvk_volume_property_value_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *libvk_volume_property_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_libvk_volume_property, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_Volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Volume",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Volume" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - delete_libvk_volume(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - GError **arg2 = (GError **) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - GError *err2 = NULL ; - PyObject * obj0 = 0 ; - struct libvk_volume *result = 0 ; - - arg2 = &err2; - if (!PyArg_ParseTuple(args,(char *)"O:Volume_open",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_open" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (struct libvk_volume *)libvk_volume_open((char const *)arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, SWIG_POINTER_OWN | 0 ); - - if (err2 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err2->message); - g_error_free (err2); - } - - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_hostname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Volume_hostname_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_hostname_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (char *)libvk_volume_hostname_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_uuid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Volume_uuid_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_uuid_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (char *)libvk_volume_uuid_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_label_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Volume_label_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_label_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (char *)libvk_volume_label_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Volume_path_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_path_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (char *)libvk_volume_path_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_format_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Volume_format_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_format_get" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (char *)libvk_volume_format_get(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - g_free (result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_dump_properties(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - GSList *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Volume_dump_properties",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_dump_properties" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_dump_properties" "', argument " "2"" of type '" "bool""'"); - } - arg2 = (bool)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (GSList *)libvk_volume_dump_properties(arg1,arg2); - - resultobj = PyList_New (0); - while (result != NULL) - { - GSList *next; - PyObject *p; - - p = SWIG_NewPointerObj(result->data, SWIGTYPE_p_libvk_volume_property, - SWIG_POINTER_OWN); - PyList_Append (resultobj, p); - next = result->next; - g_slist_free_1 (result); - result = next; - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_get_secret(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - enum libvk_secret arg2 ; - struct libvk_ui *arg3 = (struct libvk_ui *) 0 ; - GError **arg4 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - GError *err4 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - arg4 = &err4; - if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_get_secret",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_get_secret" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_get_secret" "', argument " "2"" of type '" "enum libvk_secret""'"); - } - arg2 = (enum libvk_secret)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Volume_get_secret" "', argument " "3"" of type '" "struct libvk_ui const *""'"); - } - arg3 = (struct libvk_ui *)(argp3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg2 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - libvk_volume_get_secret(arg1,arg2,(struct libvk_ui const *)arg3,arg4); - resultobj = SWIG_Py_Void(); - - if (PyErr_Occurred()) { - Py_XDECREF (resultobj); - resultobj = NULL; - } - - - if (err4 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err4->message); - g_error_free (err4); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_add_secret(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - enum libvk_secret arg2 ; - void *arg3 = (void *) 0 ; - size_t arg4 ; - GError **arg5 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - GError *err5 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - arg5 = &err5; - if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_add_secret",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_add_secret" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Volume_add_secret" "', argument " "2"" of type '" "enum libvk_secret""'"); - } - arg2 = (enum libvk_secret)(val2); - { - char *buf; - Py_ssize_t len; - - if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) - SWIG_exception (SWIG_TypeError, "(secret, size)"); - arg3 = buf; - arg4 = len; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg2 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - libvk_volume_add_secret(arg1,arg2,(void const *)arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - - if (err5 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err5->message); - g_error_free (err5); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_load_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; - GError **arg3 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - GError *err3 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - arg3 = &err3; - if (!PyArg_ParseTuple(args,(char *)"OO:Volume_load_packet",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_load_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_load_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); - } - arg2 = (struct libvk_volume *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - libvk_volume_load_packet(arg1,(struct libvk_volume const *)arg2,arg3); - resultobj = SWIG_Py_Void(); - - if (err3 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err3->message); - g_error_free (err3); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_apply_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; - enum libvk_secret arg3 ; - struct libvk_ui *arg4 = (struct libvk_ui *) 0 ; - GError **arg5 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - GError *err5 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - arg5 = &err5; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Volume_apply_packet",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_apply_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_apply_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); - } - arg2 = (struct libvk_volume *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_apply_packet" "', argument " "3"" of type '" "enum libvk_secret""'"); - } - arg3 = (enum libvk_secret)(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_apply_packet" "', argument " "4"" of type '" "struct libvk_ui const *""'"); - } - arg4 = (struct libvk_ui *)(argp4); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg3 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - { - if (!arg4) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - libvk_volume_apply_packet(arg1,(struct libvk_volume const *)arg2,arg3,(struct libvk_ui const *)arg4,arg5); - resultobj = SWIG_Py_Void(); - - if (PyErr_Occurred()) { - Py_XDECREF (resultobj); - resultobj = NULL; - } - - - if (err5 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err5->message); - g_error_free (err5); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_open_with_packet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; - char *arg3 = (char *) 0 ; - GError **arg4 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - GError *err4 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - arg4 = &err4; - if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_open_with_packet",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_open_with_packet" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_open_with_packet" "', argument " "2"" of type '" "struct libvk_volume const *""'"); - } - arg2 = (struct libvk_volume *)(argp2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Volume_open_with_packet" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - libvk_volume_open_with_packet(arg1,(struct libvk_volume const *)arg2,(char const *)arg3,arg4); - resultobj = SWIG_Py_Void(); - - if (err4 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err4->message); - g_error_free (err4); - } - - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_create_packet_cleartext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - size_t *arg2 = (size_t *) 0 ; - enum libvk_secret arg3 ; - GError **arg4 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t sz2 = 0 ; - int val3 ; - int ecode3 = 0 ; - GError *err4 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - void *result = 0 ; - - arg2 = &sz2; - arg4 = &err4; - if (!PyArg_ParseTuple(args,(char *)"OO:Volume_create_packet_cleartext",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_cleartext" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode3 = SWIG_AsVal_int(obj1, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_cleartext" "', argument " "3"" of type '" "enum libvk_secret""'"); - } - arg3 = (enum libvk_secret)(val3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg3 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - result = (void *)libvk_volume_create_packet_cleartext(arg1,arg2,arg3,arg4); - - resultobj = PyString_FromStringAndSize (result, sz2); - - if (err4 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err4->message); - g_error_free (err4); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_create_packet_assymetric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - size_t *arg2 = (size_t *) 0 ; - enum libvk_secret arg3 ; - CERTCertificate *arg4 = (CERTCertificate *) 0 ; - struct libvk_ui *arg5 = (struct libvk_ui *) 0 ; - GError **arg6 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t sz2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - GError *err6 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - void *result = 0 ; - - arg2 = &sz2; - arg6 = &err6; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Volume_create_packet_assymetric",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_assymetric" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode3 = SWIG_AsVal_int(obj1, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_assymetric" "', argument " "3"" of type '" "enum libvk_secret""'"); - } - arg3 = (enum libvk_secret)(val3); - res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_CERTCertificate, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_assymetric" "', argument " "4"" of type '" "CERTCertificate *""'"); - } - arg4 = (CERTCertificate *)(argp4); - res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Volume_create_packet_assymetric" "', argument " "5"" of type '" "struct libvk_ui const *""'"); - } - arg5 = (struct libvk_ui *)(argp5); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg3 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - { - if (!arg5) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (void *)libvk_volume_create_packet_assymetric(arg1,arg2,arg3,arg4,(struct libvk_ui const *)arg5,arg6); - - resultobj = PyString_FromStringAndSize (result, sz2); - - if (PyErr_Occurred()) { - Py_XDECREF (resultobj); - resultobj = NULL; - } - - - if (err6 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err6->message); - g_error_free (err6); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_create_packet_asymmetric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - size_t *arg2 = (size_t *) 0 ; - enum libvk_secret arg3 ; - CERTCertificate *arg4 = (CERTCertificate *) 0 ; - struct libvk_ui *arg5 = (struct libvk_ui *) 0 ; - GError **arg6 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t sz2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - GError *err6 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - void *result = 0 ; - - arg2 = &sz2; - arg6 = &err6; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Volume_create_packet_asymmetric",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_asymmetric" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode3 = SWIG_AsVal_int(obj1, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_asymmetric" "', argument " "3"" of type '" "enum libvk_secret""'"); - } - arg3 = (enum libvk_secret)(val3); - res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_CERTCertificate, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_asymmetric" "', argument " "4"" of type '" "CERTCertificate *""'"); - } - arg4 = (CERTCertificate *)(argp4); - res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Volume_create_packet_asymmetric" "', argument " "5"" of type '" "struct libvk_ui const *""'"); - } - arg5 = (struct libvk_ui *)(argp5); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg3 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - { - if (!arg5) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (void *)libvk_volume_create_packet_asymmetric(arg1,arg2,arg3,arg4,(struct libvk_ui const *)arg5,arg6); - - resultobj = PyString_FromStringAndSize (result, sz2); - - if (PyErr_Occurred()) { - Py_XDECREF (resultobj); - resultobj = NULL; - } - - - if (err6 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err6->message); - g_error_free (err6); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_create_packet_assymetric_from_cert_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - size_t *arg2 = (size_t *) 0 ; - enum libvk_secret arg3 ; - void *arg4 = (void *) 0 ; - size_t arg5 ; - struct libvk_ui *arg6 = (struct libvk_ui *) 0 ; - GError **arg7 = (GError **) 0 ; - enum libvk_packet_format arg8 = (enum libvk_packet_format) LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t sz2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp6 = 0 ; - int res6 = 0 ; - GError *err7 = NULL ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - void *result = 0 ; - - arg2 = &sz2; - arg7 = &err7; - if (!PyArg_ParseTuple(args,(char *)"OOOO|O:Volume_create_packet_assymetric_from_cert_data",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode3 = SWIG_AsVal_int(obj1, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "3"" of type '" "enum libvk_secret""'"); - } - arg3 = (enum libvk_secret)(val3); - { - char *buf; - Py_ssize_t len; - - if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) - SWIG_exception (SWIG_TypeError, "(cert_data, cert_size)"); - arg4 = buf; - arg5 = len; - } - res6 = SWIG_ConvertPtr(obj3, &argp6,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "6"" of type '" "struct libvk_ui const *""'"); - } - arg6 = (struct libvk_ui *)(argp6); - if (obj4) { - ecode8 = SWIG_AsVal_int(obj4, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Volume_create_packet_assymetric_from_cert_data" "', argument " "8"" of type '" "enum libvk_packet_format""'"); - } - arg8 = (enum libvk_packet_format)(val8); - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg3 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - { - if (!arg6) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg8 >= LIBVK_PACKET_FORMAT_END__) - SWIG_exception (SWIG_ValueError, "invalid packet format"); - - result = (void *)libvk_volume_create_packet_assymetric_from_cert_data(arg1,arg2,arg3,(void const *)arg4,arg5,(struct libvk_ui const *)arg6,arg7,arg8); - - resultobj = PyString_FromStringAndSize (result, sz2); - - if (PyErr_Occurred()) { - Py_XDECREF (resultobj); - resultobj = NULL; - } - - - if (err7 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err7->message); - g_error_free (err7); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_create_packet_asymmetric_from_cert_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - size_t *arg2 = (size_t *) 0 ; - enum libvk_secret arg3 ; - void *arg4 = (void *) 0 ; - size_t arg5 ; - struct libvk_ui *arg6 = (struct libvk_ui *) 0 ; - GError **arg7 = (GError **) 0 ; - enum libvk_packet_format arg8 = (enum libvk_packet_format) LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t sz2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp6 = 0 ; - int res6 = 0 ; - GError *err7 = NULL ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - void *result = 0 ; - - arg2 = &sz2; - arg7 = &err7; - if (!PyArg_ParseTuple(args,(char *)"OOOO|O:Volume_create_packet_asymmetric_from_cert_data",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode3 = SWIG_AsVal_int(obj1, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "3"" of type '" "enum libvk_secret""'"); - } - arg3 = (enum libvk_secret)(val3); - { - char *buf; - Py_ssize_t len; - - if (PyString_AsStringAndSize (obj2, &buf, &len) != 0) - SWIG_exception (SWIG_TypeError, "(cert_data, cert_size)"); - arg4 = buf; - arg5 = len; - } - res6 = SWIG_ConvertPtr(obj3, &argp6,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "6"" of type '" "struct libvk_ui const *""'"); - } - arg6 = (struct libvk_ui *)(argp6); - if (obj4) { - ecode8 = SWIG_AsVal_int(obj4, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Volume_create_packet_asymmetric_from_cert_data" "', argument " "8"" of type '" "enum libvk_packet_format""'"); - } - arg8 = (enum libvk_packet_format)(val8); - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg3 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - { - if (!arg6) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg8 >= LIBVK_PACKET_FORMAT_END__) - SWIG_exception (SWIG_ValueError, "invalid packet format"); - - result = (void *)libvk_volume_create_packet_asymmetric_from_cert_data(arg1,arg2,arg3,(void const *)arg4,arg5,(struct libvk_ui const *)arg6,arg7,arg8); - - resultobj = PyString_FromStringAndSize (result, sz2); - - if (PyErr_Occurred()) { - Py_XDECREF (resultobj); - resultobj = NULL; - } - - - if (err7 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err7->message); - g_error_free (err7); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_create_packet_with_passphrase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - size_t *arg2 = (size_t *) 0 ; - enum libvk_secret arg3 ; - char *arg4 = (char *) 0 ; - GError **arg5 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t sz2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - int alloc4 = 0 ; - GError *err5 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - void *result = 0 ; - - arg2 = &sz2; - arg5 = &err5; - if (!PyArg_ParseTuple(args,(char *)"OOO:Volume_create_packet_with_passphrase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_create_packet_with_passphrase" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - ecode3 = SWIG_AsVal_int(obj1, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Volume_create_packet_with_passphrase" "', argument " "3"" of type '" "enum libvk_secret""'"); - } - arg3 = (enum libvk_secret)(val3); - res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Volume_create_packet_with_passphrase" "', argument " "4"" of type '" "char const *""'"); - } - arg4 = (char *)(buf4); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - - if ((unsigned)arg3 >= LIBVK_SECRET_END__) - SWIG_exception (SWIG_ValueError, "invalid secret type"); - - { - if (!arg4) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (void *)libvk_volume_create_packet_with_passphrase(arg1,arg2,arg3,(char const *)arg4,arg5); - - resultobj = PyString_FromStringAndSize (result, sz2); - - if (err5 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err5->message); - g_error_free (err5); - } - - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return resultobj; -fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Volume_packet_match_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct libvk_volume *arg1 = (struct libvk_volume *) 0 ; - struct libvk_volume *arg2 = (struct libvk_volume *) 0 ; - GPtrArray *arg3 = (GPtrArray *) 0 ; - GError **arg4 = (GError **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - GError *err4 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - enum libvk_packet_match_result result; - - arg3 = g_ptr_array_new (); - arg4 = &err4; - if (!PyArg_ParseTuple(args,(char *)"OO:Volume_packet_match_volume",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Volume_packet_match_volume" "', argument " "1"" of type '" "struct libvk_volume *""'"); - } - arg1 = (struct libvk_volume *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_libvk_volume, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Volume_packet_match_volume" "', argument " "2"" of type '" "struct libvk_volume const *""'"); - } - arg2 = (struct libvk_volume *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (enum libvk_packet_match_result)libvk_volume_packet_match_volume(arg1,(struct libvk_volume const *)arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); - { - PyObject *warnings; - size_t i; - - warnings = PyList_New (arg3->len); - if (warnings == NULL) - SWIG_fail; - for (i = 0; i < arg3->len; i++) - PyList_SetItem (warnings, i, - PyString_FromString (g_ptr_array_index (arg3, i))); - resultobj = SWIG_Python_AppendOutput(resultobj, warnings); - } - - if (err4 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err4->message); - g_error_free (err4); - } - - { - size_t i; - - for (i = 0; i < arg3->len; i++) - g_free (g_ptr_array_index (arg3, i)); - g_ptr_array_free (arg3, TRUE); - } - return resultobj; -fail: - { - size_t i; - - for (i = 0; i < arg3->len; i++) - g_free (g_ptr_array_index (arg3, i)); - g_ptr_array_free (arg3, TRUE); - } - return NULL; -} - - -SWIGINTERN PyObject *Volume_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_libvk_volume, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_Packet_get_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - void *arg1 = (void *) 0 ; - size_t arg2 ; - GError **arg3 = (GError **) 0 ; - GError *err3 = NULL ; - PyObject * obj0 = 0 ; - enum libvk_packet_format result; - - arg3 = &err3; - if (!PyArg_ParseTuple(args,(char *)"O:Packet_get_format",&obj0)) SWIG_fail; - { - char *buf; - Py_ssize_t len; - - if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) - SWIG_exception (SWIG_TypeError, "(packet, size)"); - arg1 = buf; - arg2 = len; - } - result = (enum libvk_packet_format)libvk_packet_get_format((void const *)arg1,arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - - if (err3 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err3->message); - g_error_free (err3); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Packet_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - void *arg1 = (void *) 0 ; - size_t arg2 ; - struct libvk_ui *arg3 = (struct libvk_ui *) 0 ; - GError **arg4 = (GError **) 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - GError *err4 = NULL ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - struct libvk_volume *result = 0 ; - - arg4 = &err4; - if (!PyArg_ParseTuple(args,(char *)"OO:Packet_open",&obj0,&obj1)) SWIG_fail; - { - char *buf; - Py_ssize_t len; - - if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) - SWIG_exception (SWIG_TypeError, "(packet, size)"); - arg1 = buf; - arg2 = len; - } - res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_libvk_ui, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Packet_open" "', argument " "3"" of type '" "struct libvk_ui const *""'"); - } - arg3 = (struct libvk_ui *)(argp3); - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (struct libvk_volume *)libvk_packet_open((void const *)arg1,arg2,(struct libvk_ui const *)arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, 0 | 0 ); - - if (PyErr_Occurred()) { - Py_XDECREF (resultobj); - resultobj = NULL; - } - - - if (err4 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err4->message); - g_error_free (err4); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Packet_open_unencrypted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - void *arg1 = (void *) 0 ; - size_t arg2 ; - GError **arg3 = (GError **) 0 ; - GError *err3 = NULL ; - PyObject * obj0 = 0 ; - struct libvk_volume *result = 0 ; - - arg3 = &err3; - if (!PyArg_ParseTuple(args,(char *)"O:Packet_open_unencrypted",&obj0)) SWIG_fail; - { - char *buf; - Py_ssize_t len; - - if (PyString_AsStringAndSize (obj0, &buf, &len) != 0) - SWIG_exception (SWIG_TypeError, "(packet, size)"); - arg1 = buf; - arg2 = len; - } - result = (struct libvk_volume *)libvk_packet_open_unencrypted((void const *)arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_libvk_volume, 0 | 0 ); - - if (err3 != NULL) - { - Py_XDECREF (resultobj); - resultobj = NULL; - SWIG_Error (SWIG_RuntimeError, err3->message); - g_error_free (err3); - } - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Packet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_libvk_packet, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"new_UI", _wrap_new_UI, METH_VARARGS, NULL}, - { (char *)"delete_UI", _wrap_delete_UI, METH_VARARGS, NULL}, - { (char *)"UI_generic_cb_set", _wrap_UI_generic_cb_set, METH_VARARGS, NULL}, - { (char *)"UI_generic_cb_get", _wrap_UI_generic_cb_get, METH_VARARGS, NULL}, - { (char *)"UI_passphrase_cb_set", _wrap_UI_passphrase_cb_set, METH_VARARGS, NULL}, - { (char *)"UI_passphrase_cb_get", _wrap_UI_passphrase_cb_get, METH_VARARGS, NULL}, - { (char *)"UI_set_nss_pwfn_arg", _wrap_UI_set_nss_pwfn_arg, METH_VARARGS, NULL}, - { (char *)"UI_swigregister", UI_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_libvk_volume_property", _wrap_delete_libvk_volume_property, METH_VARARGS, NULL}, - { (char *)"libvk_volume_property_label_get", _wrap_libvk_volume_property_label_get, METH_VARARGS, NULL}, - { (char *)"libvk_volume_property_name_get", _wrap_libvk_volume_property_name_get, METH_VARARGS, NULL}, - { (char *)"libvk_volume_property_type_get", _wrap_libvk_volume_property_type_get, METH_VARARGS, NULL}, - { (char *)"libvk_volume_property_value_get", _wrap_libvk_volume_property_value_get, METH_VARARGS, NULL}, - { (char *)"libvk_volume_property_swigregister", libvk_volume_property_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_Volume", _wrap_delete_Volume, METH_VARARGS, NULL}, - { (char *)"Volume_open", _wrap_Volume_open, METH_VARARGS, NULL}, - { (char *)"Volume_hostname_get", _wrap_Volume_hostname_get, METH_VARARGS, NULL}, - { (char *)"Volume_uuid_get", _wrap_Volume_uuid_get, METH_VARARGS, NULL}, - { (char *)"Volume_label_get", _wrap_Volume_label_get, METH_VARARGS, NULL}, - { (char *)"Volume_path_get", _wrap_Volume_path_get, METH_VARARGS, NULL}, - { (char *)"Volume_format_get", _wrap_Volume_format_get, METH_VARARGS, NULL}, - { (char *)"Volume_dump_properties", _wrap_Volume_dump_properties, METH_VARARGS, NULL}, - { (char *)"Volume_get_secret", _wrap_Volume_get_secret, METH_VARARGS, NULL}, - { (char *)"Volume_add_secret", _wrap_Volume_add_secret, METH_VARARGS, NULL}, - { (char *)"Volume_load_packet", _wrap_Volume_load_packet, METH_VARARGS, NULL}, - { (char *)"Volume_apply_packet", _wrap_Volume_apply_packet, METH_VARARGS, NULL}, - { (char *)"Volume_open_with_packet", _wrap_Volume_open_with_packet, METH_VARARGS, NULL}, - { (char *)"Volume_create_packet_cleartext", _wrap_Volume_create_packet_cleartext, METH_VARARGS, NULL}, - { (char *)"Volume_create_packet_assymetric", _wrap_Volume_create_packet_assymetric, METH_VARARGS, NULL}, - { (char *)"Volume_create_packet_asymmetric", _wrap_Volume_create_packet_asymmetric, METH_VARARGS, NULL}, - { (char *)"Volume_create_packet_assymetric_from_cert_data", _wrap_Volume_create_packet_assymetric_from_cert_data, METH_VARARGS, NULL}, - { (char *)"Volume_create_packet_asymmetric_from_cert_data", _wrap_Volume_create_packet_asymmetric_from_cert_data, METH_VARARGS, NULL}, - { (char *)"Volume_create_packet_with_passphrase", _wrap_Volume_create_packet_with_passphrase, METH_VARARGS, NULL}, - { (char *)"Volume_packet_match_volume", _wrap_Volume_packet_match_volume, METH_VARARGS, NULL}, - { (char *)"Volume_swigregister", Volume_swigregister, METH_VARARGS, NULL}, - { (char *)"Packet_get_format", _wrap_Packet_get_format, METH_VARARGS, NULL}, - { (char *)"Packet_open", _wrap_Packet_open, METH_VARARGS, NULL}, - { (char *)"Packet_open_unencrypted", _wrap_Packet_open_unencrypted, METH_VARARGS, NULL}, - { (char *)"Packet_swigregister", Packet_swigregister, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static swig_type_info _swigt__p_CERTCertificate = {"_p_CERTCertificate", "CERTCertificate *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_GPtrArray = {"_p_GPtrArray", "GPtrArray *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_libvk_packet = {"_p_libvk_packet", "libvk_packet *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_libvk_ui = {"_p_libvk_ui", "struct libvk_ui *|libvk_ui *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_libvk_volume = {"_p_libvk_volume", "struct libvk_volume *|libvk_volume *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_libvk_volume_property = {"_p_libvk_volume_property", "struct libvk_volume_property *|libvk_volume_property *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_p_GError = {"_p_p_GError", "GError **", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_CERTCertificate, - &_swigt__p_GPtrArray, - &_swigt__p_char, - &_swigt__p_f_p_void__void, - &_swigt__p_libvk_packet, - &_swigt__p_libvk_ui, - &_swigt__p_libvk_volume, - &_swigt__p_libvk_volume_property, - &_swigt__p_p_GError, - &_swigt__p_size_t, -}; - -static swig_cast_info _swigc__p_CERTCertificate[] = { {&_swigt__p_CERTCertificate, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_GPtrArray[] = { {&_swigt__p_GPtrArray, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_libvk_packet[] = { {&_swigt__p_libvk_packet, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_libvk_ui[] = { {&_swigt__p_libvk_ui, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_libvk_volume[] = { {&_swigt__p_libvk_volume, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_libvk_volume_property[] = { {&_swigt__p_libvk_volume_property, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_GError[] = { {&_swigt__p_p_GError, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_CERTCertificate, - _swigc__p_GPtrArray, - _swigc__p_char, - _swigc__p_f_p_void__void, - _swigc__p_libvk_packet, - _swigc__p_libvk_ui, - _swigc__p_libvk_volume, - _swigc__p_libvk_volume_property, - _swigc__p_p_GError, - _swigc__p_size_t, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -static swig_const_info swig_const_table[] = { -{0, 0, 0, 0.0, 0, 0}}; - -#ifdef __cplusplus -} -#endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned statically to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif - -#if 0 -#define SWIGRUNTIME_DEBUG -#endif - - -SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - iter=module_head; - do { - if (iter==&swig_module) { - /* Our module is already in the list, so there's nothing more to do. */ - return; - } - iter=iter->next; - } while (iter!= module_head); - - /* otherwise we must add our module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void -SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -#if 0 -{ - /* c-mode */ -#endif -} -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&varlink_type) < 0) - return NULL; -#endif - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - strncpy(gv->name,name,size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch(constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ - - SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (!c) continue; - c = strstr(c, "swig_ptr: "); - if (c) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, - strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - -#ifdef __cplusplus -} -#endif - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -#endif - -SWIGEXPORT -#if PY_VERSION_HEX >= 0x03000000 -PyObject* -#else -void -#endif -SWIG_init(void) { - PyObject *m, *d, *md; -#if PY_VERSION_HEX >= 0x03000000 - static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 - PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, - NULL, - -1, - SwigMethods, - NULL, - NULL, - NULL, - NULL - }; -#endif - -#if defined(SWIGPYTHON_BUILTIN) - static SwigPyClientData SwigPyObject_clientdata = { - 0, 0, 0, 0, 0, 0, 0 - }; - static PyGetSetDef this_getset_def = { - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL - }; - static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own - }; - static PyGetSetDef thisown_getset_def = { - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure - }; - PyTypeObject *builtin_pytype; - int builtin_base_count; - swig_type_info *builtin_basetype; - PyObject *tuple; - PyGetSetDescrObject *static_getset; - PyTypeObject *metatype; - PyTypeObject *swigpyobject; - SwigPyClientData *cd; - PyObject *public_interface, *public_symbol; - PyObject *this_descr; - PyObject *thisown_descr; - PyObject *self = 0; - int i; - - (void)builtin_pytype; - (void)builtin_base_count; - (void)builtin_basetype; - (void)tuple; - (void)static_getset; - (void)self; - - /* Metaclass is used to implement static member variables */ - metatype = SwigPyObjectType(); - assert(metatype); -#endif - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 - m = PyModule_Create(&SWIG_module); -#else - m = Py_InitModule((char *) SWIG_name, SwigMethods); -#endif - - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - swigpyobject = SwigPyObject_TypeOnce(); - - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - if (!cd) { - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = swigpyobject; - } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); -# if PY_VERSION_HEX >= 0x03000000 - return NULL; -# else - return; -# endif - } - - /* All objects have a 'this' attribute */ - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); - (void)this_descr; - - /* All objects have a 'thisown' attribute */ - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); - (void)thisown_descr; - - public_interface = PyList_New(0); - public_symbol = 0; - (void)public_symbol; - - PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); - for (i = 0; SwigMethods[i].ml_name != NULL; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); - for (i = 0; swig_const_table[i].name != 0; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); -#endif - - SWIG_InstallConstants(d,swig_const_table); - - - libvk_init (); - - SWIG_Python_SetConstant(d, "SECRET_DEFAULT",SWIG_From_int((int)(LIBVK_SECRET_DEFAULT))); - SWIG_Python_SetConstant(d, "SECRET_DATA_ENCRYPTION_KEY",SWIG_From_int((int)(LIBVK_SECRET_DATA_ENCRYPTION_KEY))); - SWIG_Python_SetConstant(d, "SECRET_PASSPHRASE",SWIG_From_int((int)(LIBVK_SECRET_PASSPHRASE))); - SWIG_Python_SetConstant(d, "VP_IDENTIFICATION",SWIG_From_int((int)(LIBVK_VP_IDENTIFICATION))); - SWIG_Python_SetConstant(d, "VP_CONFIGURATION",SWIG_From_int((int)(LIBVK_VP_CONFIGURATION))); - SWIG_Python_SetConstant(d, "VP_SECRET",SWIG_From_int((int)(LIBVK_VP_SECRET))); - SWIG_Python_SetConstant(d, "VOLUME_FORMAT_LUKS",SWIG_FromCharPtr("crypt_LUKS")); - SWIG_Python_SetConstant(d, "PACKET_FORMAT_UNKNOWN",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_UNKNOWN))); - SWIG_Python_SetConstant(d, "PACKET_FORMAT_CLEARTEXT",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_CLEARTEXT))); - SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASYMMETRIC",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASYMMETRIC))); - SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASSYMETRIC",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASSYMETRIC))); - SWIG_Python_SetConstant(d, "PACKET_FORMAT_PASSPHRASE",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_PASSPHRASE))); - SWIG_Python_SetConstant(d, "PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY))); - SWIG_Python_SetConstant(d, "PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY",SWIG_From_int((int)(LIBVK_PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY))); - SWIG_Python_SetConstant(d, "PACKET_MATCH_OK",SWIG_From_int((int)(LIBVK_PACKET_MATCH_OK))); - SWIG_Python_SetConstant(d, "PACKET_MATCH_UNSURE",SWIG_From_int((int)(LIBVK_PACKET_MATCH_UNSURE))); -#if PY_VERSION_HEX >= 0x03000000 - return m; -#else - return; -#endif -} - diff -Nru volume-key-0.3.10/src/Makefile.am volume-key-0.3.12/src/Makefile.am --- volume-key-0.3.10/src/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/src/Makefile.am 2018-09-18 15:28:17.000000000 +0000 @@ -0,0 +1,28 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +bin_PROGRAMS = volume_key + +volume_key_SOURCES = volume_key.c +volume_key_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) +volume_key_LDADD = $(top_builddir)/lib/libvolume_key.la \ + $(glib_LIBS) $(nss_LIBS) diff -Nru volume-key-0.3.10/src/Makefile.in volume-key-0.3.12/src/Makefile.in --- volume-key-0.3.10/src/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/src/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,732 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = volume_key$(EXEEXT) +subdir = src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_volume_key_OBJECTS = volume_key-volume_key.$(OBJEXT) +volume_key_OBJECTS = $(am_volume_key_OBJECTS) +am__DEPENDENCIES_1 = +volume_key_DEPENDENCIES = $(top_builddir)/lib/libvolume_key.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/admin/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(volume_key_SOURCES) +DIST_SOURCES = $(volume_key_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +volume_key_SOURCES = volume_key.c +volume_key_CPPFLAGS = $(AM_CPPFLAGS) $(LOCALEDIR_CPPFLAGS) +volume_key_LDADD = $(top_builddir)/lib/libvolume_key.la \ + $(glib_LIBS) $(nss_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +volume_key$(EXEEXT): $(volume_key_OBJECTS) $(volume_key_DEPENDENCIES) $(EXTRA_volume_key_DEPENDENCIES) + @rm -f volume_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(volume_key_OBJECTS) $(volume_key_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volume_key-volume_key.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +volume_key-volume_key.o: volume_key.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT volume_key-volume_key.o -MD -MP -MF $(DEPDIR)/volume_key-volume_key.Tpo -c -o volume_key-volume_key.o `test -f 'volume_key.c' || echo '$(srcdir)/'`volume_key.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/volume_key-volume_key.Tpo $(DEPDIR)/volume_key-volume_key.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='volume_key.c' object='volume_key-volume_key.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o volume_key-volume_key.o `test -f 'volume_key.c' || echo '$(srcdir)/'`volume_key.c + +volume_key-volume_key.obj: volume_key.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT volume_key-volume_key.obj -MD -MP -MF $(DEPDIR)/volume_key-volume_key.Tpo -c -o volume_key-volume_key.obj `if test -f 'volume_key.c'; then $(CYGPATH_W) 'volume_key.c'; else $(CYGPATH_W) '$(srcdir)/volume_key.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/volume_key-volume_key.Tpo $(DEPDIR)/volume_key-volume_key.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='volume_key.c' object='volume_key-volume_key.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(volume_key_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o volume_key-volume_key.obj `if test -f 'volume_key.c'; then $(CYGPATH_W) 'volume_key.c'; else $(CYGPATH_W) '$(srcdir)/volume_key.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/tests/Makefile.am volume-key-0.3.12/tests/Makefile.am --- volume-key-0.3.10/tests/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/tests/Makefile.am 2018-09-19 07:06:47.000000000 +0000 @@ -0,0 +1,32 @@ +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera + +## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' + +EXTRA_DIST = packet_roundtrips.sh packet_roundtrips_luks_passphrase \ + packet_roundtrips_luks_symmetric + +check_PROGRAMS = packet_roundtrips + +TESTS = packet_roundtrips.sh + +packet_roundtrips_SOURCES = packet_roundtrips.c +packet_roundtrips_LDADD = $(top_builddir)/lib/libvolume_key.la \ + $(glib_LIBS) $(nss_LIBS) diff -Nru volume-key-0.3.10/tests/Makefile.in volume-key-0.3.12/tests/Makefile.in --- volume-key-0.3.10/tests/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ volume-key-0.3.12/tests/Makefile.in 2018-10-08 11:32:22.000000000 +0000 @@ -0,0 +1,1049 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2009 - 2018 Red Hat, Inc. All rights reserved. +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the GNU +# General Public License v.2. + +# 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. + +# Author: Miloslav Trmač +# Jiří Kučera +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = packet_roundtrips$(EXEEXT) +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_packet_roundtrips_OBJECTS = packet_roundtrips.$(OBJEXT) +packet_roundtrips_OBJECTS = $(am_packet_roundtrips_OBJECTS) +am__DEPENDENCIES_1 = +packet_roundtrips_DEPENDENCIES = $(top_builddir)/lib/libvolume_key.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/admin/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(packet_roundtrips_SOURCES) +DIST_SOURCES = $(packet_roundtrips_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/admin/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/admin/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ + $(top_srcdir)/admin/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG = @GPG@ +GPGME_CFLAGS = @GPGME_CFLAGS@ +GPGME_CONFIG = @GPGME_CONFIG@ +GPGME_LIBS = @GPGME_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON3 = @PYTHON3@ +PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +PYTHON3_CONFIG = @PYTHON3_CONFIG@ +PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@ +PYTHON3_INCLUDES = @PYTHON3_INCLUDES@ +PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@ +PYTHON3_LIBS = @PYTHON3_LIBS@ +PYTHON3_PLATFORM = @PYTHON3_PLATFORM@ +PYTHON3_PREFIX = @PYTHON3_PREFIX@ +PYTHON3_VERSION = @PYTHON3_VERSION@ +PYTHON_CFLAGS = @PYTHON_CFLAGS@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +blkid_CFLAGS = @blkid_CFLAGS@ +blkid_LIBS = @blkid_LIBS@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +glib_CFLAGS = @glib_CFLAGS@ +glib_LIBS = @glib_LIBS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libcryptsetup_CFLAGS = @libcryptsetup_CFLAGS@ +libcryptsetup_LIBS = @libcryptsetup_LIBS@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +nss_CFLAGS = @nss_CFLAGS@ +nss_LIBS = @nss_LIBS@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpy3execdir = @pkgpy3execdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpython3dir = @pkgpython3dir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +py3execdir = @py3execdir@ +pyexecdir = @pyexecdir@ +python3dir = @python3dir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + +LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +EXTRA_DIST = packet_roundtrips.sh packet_roundtrips_luks_passphrase \ + packet_roundtrips_luks_symmetric + +TESTS = packet_roundtrips.sh +packet_roundtrips_SOURCES = packet_roundtrips.c +packet_roundtrips_LDADD = $(top_builddir)/lib/libvolume_key.la \ + $(glib_LIBS) $(nss_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +packet_roundtrips$(EXEEXT): $(packet_roundtrips_OBJECTS) $(packet_roundtrips_DEPENDENCIES) $(EXTRA_packet_roundtrips_DEPENDENCIES) + @rm -f packet_roundtrips$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(packet_roundtrips_OBJECTS) $(packet_roundtrips_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet_roundtrips.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +packet_roundtrips.sh.log: packet_roundtrips.sh + @p='packet_roundtrips.sh'; \ + b='packet_roundtrips.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru volume-key-0.3.10/tests/packet_roundtrips.c volume-key-0.3.12/tests/packet_roundtrips.c --- volume-key-0.3.10/tests/packet_roundtrips.c 2018-04-19 12:58:50.000000000 +0000 +++ volume-key-0.3.12/tests/packet_roundtrips.c 2018-10-02 19:33:17.000000000 +0000 @@ -111,7 +111,7 @@ size_t size2; error = NULL; - file_name = g_strconcat (getenv ("srcdir"), "/tests/", test_packet, NULL); + file_name = g_strconcat (getenv ("srcdir"), "/", test_packet, NULL); if (g_file_get_contents (file_name, &orig_packet, &orig_size, &error) == FALSE) { diff -Nru volume-key-0.3.10/tests/packet_roundtrips.sh volume-key-0.3.12/tests/packet_roundtrips.sh --- volume-key-0.3.10/tests/packet_roundtrips.sh 2018-04-19 12:58:50.000000000 +0000 +++ volume-key-0.3.12/tests/packet_roundtrips.sh 2018-10-02 19:33:17.000000000 +0000 @@ -35,4 +35,4 @@ -s 'CN=recipient' -t TCu,TCu,TCu -x < /dev/urandom certutil -d "$workdir/nss_db" -L -a -n my_cert > "$workdir/cert.pem" -(cd "$workdir"; ../tests/packet_roundtrips) \ No newline at end of file +(cd "$workdir"; ../packet_roundtrips)