diff options
Diffstat (limited to 'debian/pinentry-tqt/pinentry-tqt-1.2.1/tty')
3 files changed, 1319 insertions, 0 deletions
diff --git a/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/Makefile.am b/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/Makefile.am new file mode 100644 index 00000000..260ee390 --- /dev/null +++ b/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/Makefile.am @@ -0,0 +1,28 @@ +# Makefile.am - PIN entry tty frontend. +# Copyright (C) 2002, 2015 g10 Code GmbH +# +# This file is part of PINENTRY. +# +# PINENTRY 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. +# +# PINENTRY 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 <https://www.gnu.org/licenses/>. +# SPDX-License-Identifier: GPL-2.0+ + +## Process this file with automake to produce Makefile.in + +bin_PROGRAMS = pinentry-tty + +AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry +LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \ + $(COMMON_LIBS) $(LIBICONV) + +pinentry_tty_SOURCES = pinentry-tty.c diff --git a/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/Makefile.in b/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/Makefile.in new file mode 100644 index 00000000..2bb778f5 --- /dev/null +++ b/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/Makefile.in @@ -0,0 +1,679 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 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@ + +# Makefile.am - PIN entry tty frontend. +# Copyright (C) 2002, 2015 g10 Code GmbH +# +# This file is part of PINENTRY. +# +# PINENTRY 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. +# +# PINENTRY 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 <https://www.gnu.org/licenses/>. +# SPDX-License-Identifier: GPL-2.0+ + +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 = pinentry-tty$(EXEEXT) +subdir = tty +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/curses.m4 \ + $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/libassuan.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/m4/qt4.m4 \ + $(top_srcdir)/acinclude.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_pinentry_tty_OBJECTS = pinentry-tty.$(OBJEXT) +pinentry_tty_OBJECTS = $(am_pinentry_tty_OBJECTS) +pinentry_tty_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +pinentry_tty_DEPENDENCIES = ../pinentry/libpinentry.a \ + ../secmem/libsecmem.a $(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 +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)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/pinentry-tty.Po +am__mv = mv -f +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 = $(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 = $(pinentry_tty_SOURCES) +DIST_SOURCES = $(pinentry_tty_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)/build-aux/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMMON_CFLAGS = @COMMON_CFLAGS@ +COMMON_LIBS = @COMMON_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EFL_CFLAGS = @EFL_CFLAGS@ +EFL_LIBS = @EFL_LIBS@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FLTKCFLAGS = @FLTKCFLAGS@ +FLTKCXXFLAGS = @FLTKCXXFLAGS@ +FLTKLIBS = @FLTKLIBS@ +FLTK_CONFIG = @FLTK_CONFIG@ +GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ +GNOME3_CFLAGS = @GNOME3_CFLAGS@ +GNOME3_LIBS = @GNOME3_LIBS@ +GPGRT_CONFIG = @GPGRT_CONFIG@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ +GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KF5WAYLANDCLIENT_CFLAGS = @KF5WAYLANDCLIENT_CFLAGS@ +KF5WAYLANDCLIENT_LIBS = @KF5WAYLANDCLIENT_LIBS@ +LDFLAGS = @LDFLAGS@ +LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ +LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ +LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBCURSES = @LIBCURSES@ +LIBICONV = @LIBICONV@ +LIBNCURSES = @LIBNCURSES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSECRET_CFLAGS = @LIBSECRET_CFLAGS@ +LIBSECRET_LIBS = @LIBSECRET_LIBS@ +LIBTERMCAP = @LIBTERMCAP@ +LIBX11_CFLAGS = @LIBX11_CFLAGS@ +LIBX11_LIBS = @LIBX11_LIBS@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ +MOC4 = @MOC4@ +MOC42 = @MOC42@ +NCURSES_CFLAGS = @NCURSES_CFLAGS@ +NCURSES_INCLUDE = @NCURSES_INCLUDE@ +NCURSES_LIBS = @NCURSES_LIBS@ +OBJEXT = @OBJEXT@ +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@ +PINENTRY_DEFAULT = @PINENTRY_DEFAULT@ +PINENTRY_QT4_CFLAGS = @PINENTRY_QT4_CFLAGS@ +PINENTRY_QT4_LDFLAGS = @PINENTRY_QT4_LDFLAGS@ +PINENTRY_QT4_LIBS = @PINENTRY_QT4_LIBS@ +PINENTRY_QT_CFLAGS = @PINENTRY_QT_CFLAGS@ +PINENTRY_QT_LDFLAGS = @PINENTRY_QT_LDFLAGS@ +PINENTRY_QT_LIBS = @PINENTRY_QT_LIBS@ +PINENTRY_QT_REQUIRE_CPP11_CFLAGS = @PINENTRY_QT_REQUIRE_CPP11_CFLAGS@ +PINENTRY_QT_REQUIRE_CPP11_LIBS = @PINENTRY_QT_REQUIRE_CPP11_LIBS@ +PINENTRY_QT_X11_EXTRAS_CFLAGS = @PINENTRY_QT_X11_EXTRAS_CFLAGS@ +PINENTRY_QT_X11_EXTRAS_LIBS = @PINENTRY_QT_X11_EXTRAS_LIBS@ +PINENTRY_TQT_CFLAGS = @PINENTRY_TQT_CFLAGS@ +PINENTRY_TQT_LIBS = @PINENTRY_TQT_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +QTCHOOSER = @QTCHOOSER@ +RANLIB = @RANLIB@ +RCC = @RCC@ +RCC2 = @RCC2@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TQT_MOC = @TQT_MOC@ +VERSION = @VERSION@ +WINDRES = @WINDRES@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +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@ +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@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +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@ +AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry +LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \ + $(COMMON_LIBS) $(LIBICONV) + +pinentry_tty_SOURCES = pinentry-tty.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 tty/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tty/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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 \ + ; 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(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: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +pinentry-tty$(EXEEXT): $(pinentry_tty_OBJECTS) $(pinentry_tty_DEPENDENCIES) $(EXTRA_pinentry_tty_DEPENDENCIES) + @rm -f pinentry-tty$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pinentry_tty_OBJECTS) $(pinentry_tty_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pinentry-tty.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.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)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.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) '$<'` + +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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(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 mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/pinentry-tty.Po + -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 -f ./$(DEPDIR)/pinentry-tty.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +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 am--depfiles check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic 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 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 --git a/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/pinentry-tty.c b/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/pinentry-tty.c new file mode 100644 index 00000000..c4d85c60 --- /dev/null +++ b/debian/pinentry-tqt/pinentry-tqt-1.2.1/tty/pinentry-tty.c @@ -0,0 +1,612 @@ +/* pinentry-tty.c - A minimalist dumb terminal mechanism for PIN entry + * Copyright (C) 2014 Serge Voilokov + * Copyright (C) 2015 Daniel Kahn Gillmor <dkg@fifthhorseman.net> + * Copyright (C) 2015 g10 Code GmbH + * + * This file is part of PINENTRY. + * + * PINENTRY 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. + * + * PINENTRY 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 <https://www.gnu.org/licenses/>. + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif +#include <signal.h> +#include <fcntl.h> +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <time.h> +#include <termios.h> +#ifdef HAVE_UTIME_H +#include <utime.h> +#endif /*HAVE_UTIME_H*/ +#include <sys/types.h> +#include <sys/stat.h> +#include <ctype.h> +#include <gpg-error.h> + +#include "pinentry.h" +#include "memory.h" + +#ifndef HAVE_DOSISH_SYSTEM +static int timed_out; +#endif + +static struct termios n_term; +static struct termios o_term; + +static int +terminal_save (int fd) +{ + if ((tcgetattr (fd, &o_term)) == -1) + return -1; + return 0; +} + +static void +terminal_restore (int fd) +{ + tcsetattr (fd, TCSANOW, &o_term); +} + +static int +terminal_setup (int fd, int line_edit) +{ + n_term = o_term; + if (line_edit) + n_term.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); + else + { + n_term.c_lflag &= ~(ECHO|ICANON); + n_term.c_lflag |= ISIG; + n_term.c_cc[VMIN] = 1; + n_term.c_cc[VTIME]= 0; + } + if ((tcsetattr(fd, TCSAFLUSH, &n_term)) == -1) + return -1; + return 1; +} + +#define UNDERLINE_START "\033[4m" +/* Bold, red. */ +#define ALERT_START "\033[1;31m" +#define NORMAL_RESTORE "\033[0m" + +static void +fputs_highlighted (char *text, char *highlight, FILE *ttyfo) +{ + for (; *text; text ++) + { + /* Skip accelerator prefix. */ + if (*text == '_') + { + text ++; + if (! *text) + break; + } + + if (text == highlight) + fputs (UNDERLINE_START, ttyfo); + fputc (*text, ttyfo); + if (text == highlight) + fputs (NORMAL_RESTORE, ttyfo); + } +} + +static char +button (char *text, char *default_text, FILE *ttyfo) +{ + char *highlight; + int use_default = 0; + + if (! text) + return 0; + + /* Skip any leading white space. */ + while (*text == ' ') + text ++; + + highlight = text; + while ((highlight = strchr (highlight, '_'))) + { + highlight = highlight + 1; + if (*highlight == '_') + { + /* Escaped underscore. Skip both characters. */ + highlight++; + continue; + } + if (!isalnum (*highlight)) + /* Unusable accelerator. */ + continue; + break; + } + + if (! highlight) + /* Not accelerator. Take the first alpha-numeric character. */ + { + highlight = text; + while (*highlight && !isalnum (*highlight)) + highlight ++; + } + + if (! *highlight) + /* Hmm, no alpha-numeric characters. */ + { + if (! default_text) + return 0; + highlight = default_text; + use_default = 1; + } + + fputs (" ", ttyfo); + fputs_highlighted (text, highlight, ttyfo); + if (use_default) + { + fputs (" (", ttyfo); + fputs_highlighted (default_text, highlight, ttyfo); + fputc (')', ttyfo); + } + fputc ('\n', ttyfo); + + return tolower (*highlight); +} + +static void +dump_error_text (FILE *ttyfo, const char *text) +{ + int lines = 0; + + if (! text || ! *text) + return; + + for (;;) + { + const char *eol = strchr (text, '\n'); + if (! eol) + eol = text + strlen (text); + + lines ++; + + fwrite ("\n *** ", 6, 1, ttyfo); + fputs (ALERT_START, ttyfo); + fwrite (text, (size_t) (eol - text), 1, ttyfo); + fputs (NORMAL_RESTORE, ttyfo); + + if (! *eol) + break; + + text = eol + 1; + } + + if (lines > 1) + fputc ('\n', ttyfo); + else + fwrite (" ***\n", 5, 1, ttyfo); + + fputc ('\n', ttyfo); +} + +static int +confirm (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo) +{ + char *msg; + char *msgbuffer = NULL; + + char ok = 0; + char notok = 0; + char cancel = 0; + + int ret; + + dump_error_text (ttyfo, pinentry->error); + + msg = pinentry->description; + if (! msg) + { + /* If there is no description, fallback to the title. */ + msg = msgbuffer = pinentry_get_title (pinentry); + } + if (! msg) + msg = "Confirm:"; + + if (msg) + { + fputs (msg, ttyfo); + fputc ('\n', ttyfo); + } + free (msgbuffer); + + fflush (ttyfo); + + if (pinentry->ok) + ok = button (pinentry->ok, "OK", ttyfo); + else if (pinentry->default_ok) + ok = button (pinentry->default_ok, "OK", ttyfo); + else + ok = button ("OK", NULL, ttyfo); + + if (! pinentry->one_button) + { + if (pinentry->cancel) + cancel = button (pinentry->cancel, "Cancel", ttyfo); + else if (pinentry->default_cancel) + cancel = button (pinentry->default_cancel, "Cancel", ttyfo); + + if (pinentry->notok) + notok = button (pinentry->notok, "No", ttyfo); + } + + while (1) + { + int input; + + if (pinentry->one_button) + fprintf (ttyfo, "Press any key to continue."); + else + { + fputc ('[', ttyfo); + if (ok) + fputc (ok, ttyfo); + if (cancel) + fputc (cancel, ttyfo); + if (notok) + fputc (notok, ttyfo); + fputs("]? ", ttyfo); + } + fflush (ttyfo); + + input = fgetc (ttyfi); + + if (input == EOF) + { + pinentry->close_button = 1; + + pinentry->canceled = 1; + +#ifndef HAVE_DOSISH_SYSTEM + if (!timed_out && errno == EINTR) + pinentry->specific_err = gpg_error (GPG_ERR_FULLY_CANCELED); +#endif + + ret = 0; + break; + } + else + { + fprintf (ttyfo, "%c\n", input); + input = tolower (input); + } + + if (pinentry->one_button) + { + ret = 1; + break; + } + + if (cancel && input == cancel) + { + pinentry->canceled = 1; + ret = 0; + break; + } + else if (notok && input == notok) + { + ret = 0; + break; + } + else if (ok && input == ok) + { + ret = 1; + break; + } + else + { + fprintf (ttyfo, "Invalid selection.\n"); + } + } + +#ifndef HAVE_DOSISH_SYSTEM + if (timed_out) + pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT); +#endif + + return ret; +} + +static char * +read_password (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo) +{ + int done = 0; + int len = 128; + int count = 0; + char *buffer; + + (void) ttyfo; + + buffer = secmem_malloc (len); + if (! buffer) + return NULL; + + while (!done) + { + int c; + + if (count == len - 1) + /* Double the buffer's size. Note: we check if count is len - + 1 and not len so that we always have space for the NUL + character. */ + { + int new_len = 2 * len; + char *tmp = secmem_realloc (buffer, new_len); + if (! tmp) + { + secmem_free (tmp); + return NULL; + } + buffer = tmp; + len = new_len; + } + + c = fgetc (ttyfi); + switch (c) + { + case EOF: + done = -1; +#ifndef HAVE_DOSISH_SYSTEM + if (!timed_out && errno == EINTR) + pinentry->specific_err = gpg_error (GPG_ERR_FULLY_CANCELED); +#endif + break; + + case '\n': + done = 1; + break; + + default: + buffer[count ++] = c; + break; + } + } + buffer[count] = '\0'; + + if (done == -1) + { + secmem_free (buffer); + return NULL; + } + + return buffer; +} + + +static int +password (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo) +{ + char *msg; + char *msgbuffer = NULL; + int done = 0; + + msg = pinentry->description; + if (! msg) + msg = msgbuffer = pinentry_get_title (pinentry); + if (! msg) + msg = "Enter your passphrase."; + + dump_error_text (ttyfo, pinentry->error); + + fprintf (ttyfo, "%s\n", msg); + free (msgbuffer); + + while (! done) + { + char *passphrase; + + char *prompt = pinentry->prompt; + if (! prompt || !*prompt) + prompt = "PIN"; + + fprintf (ttyfo, "%s%s ", + prompt, + /* Make sure the prompt ends in a : or a question mark. */ + (prompt[strlen(prompt) - 1] == ':' + || prompt[strlen(prompt) - 1] == '?') ? "" : ":"); + fflush (ttyfo); + + passphrase = read_password (pinentry, ttyfi, ttyfo); + fputc ('\n', ttyfo); + if (! passphrase) + { + done = -1; + break; + } + + if (! pinentry->repeat_passphrase) + done = 1; + else + { + char *passphrase2; + + prompt = pinentry->repeat_passphrase; + fprintf (ttyfo, "%s%s ", + prompt, + /* Make sure the prompt ends in a : or a question mark. */ + (prompt[strlen(prompt) - 1] == ':' + || prompt[strlen(prompt) - 1] == '?') ? "" : ":"); + fflush (ttyfo); + + passphrase2 = read_password (pinentry, ttyfi, ttyfo); + fputc ('\n', ttyfo); + if (! passphrase2) + { + done = -1; + break; + } + + if (strcmp (passphrase, passphrase2) == 0) + { + pinentry->repeat_okay = 1; + done = 1; + } + else + dump_error_text (ttyfo, + pinentry->repeat_error_string + ?: "Passphrases don't match."); + + secmem_free (passphrase2); + } + + if (done == 1) + pinentry_setbuffer_use (pinentry, passphrase, 0); + else + secmem_free (passphrase); + } + +#ifndef HAVE_DOSISH_SYSTEM + if (timed_out) + pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT); +#endif + + return done; +} + + +/* If a touch has been registered, touch that file. */ +static void +do_touch_file(pinentry_t pinentry) +{ +#ifdef HAVE_UTIME_H + struct stat st; + time_t tim; + + if (!pinentry->touch_file || !*pinentry->touch_file) + return; + + if (stat(pinentry->touch_file, &st)) + return; /* Oops. */ + + /* Make sure that we actually update the mtime. */ + while ((tim = time(NULL)) == st.st_mtime) + sleep(1); + + /* Update but ignore errors as we can't do anything in that case. + Printing error messages may even clubber the display further. */ + utime (pinentry->touch_file, NULL); +#endif /*HAVE_UTIME_H*/ +} + +#ifndef HAVE_DOSISH_SYSTEM +static void +catchsig (int sig) +{ + if (sig == SIGALRM) + timed_out = 1; +} +#endif + +int +tty_cmd_handler (pinentry_t pinentry) +{ + int rc = 0; + FILE *ttyfi = stdin; + FILE *ttyfo = stdout; + int saved_errno = 0; + +#ifndef HAVE_DOSISH_SYSTEM + timed_out = 0; + + if (pinentry->timeout) + { + struct sigaction sa; + + memset (&sa, 0, sizeof(sa)); + sa.sa_handler = catchsig; + sigaction (SIGALRM, &sa, NULL); + sigaction (SIGINT, &sa, NULL); + alarm (pinentry->timeout); + } +#endif + + if (pinentry->ttyname) + { + ttyfi = fopen (pinentry->ttyname, "r"); + if (!ttyfi) + return -1; + + ttyfo = fopen (pinentry->ttyname, "w"); + if (!ttyfo) + { + saved_errno = errno; + fclose (ttyfi); + errno = saved_errno; + return -1; + } + } + + if (terminal_save (fileno (ttyfi)) < 0) + rc = -1; + else + { + if (terminal_setup (fileno (ttyfi), !!pinentry->pin) == -1) + { + saved_errno = errno; + fprintf (stderr, "terminal_setup failure, exiting\n"); + rc = -1; + } + else + { + if (pinentry->pin) + rc = password (pinentry, ttyfi, ttyfo); + else + rc = confirm (pinentry, ttyfi, ttyfo); + + terminal_restore (fileno (ttyfi)); + do_touch_file (pinentry); + } + } + + if (pinentry->ttyname) + { + fclose (ttyfi); + fclose (ttyfo); + } + + if (saved_errno) + errno = saved_errno; + + return rc; +} + + +pinentry_cmd_handler_t pinentry_cmd_handler = tty_cmd_handler; + + + +int +main (int argc, char *argv[]) +{ + pinentry_init ("pinentry-tty"); + + /* Consumes all arguments. */ + pinentry_parse_opts(argc, argv); + + if (pinentry_loop ()) + return 1; + + return 0; +} |