Imported Upstream version 2.15
Simon Josefsson
7 years ago
0 | 2015-11-12 Klas Lindfors <klas@yubico.com> | |
1 | ||
2 | * NEWS: NEWS for 2.15 | |
3 | ||
4 | 2015-11-11 Klas Lindfors <klali@avm.se> | |
5 | ||
6 | * : Merge pull request #36 from mikemn/master Add proxy support via Curl | |
7 | ||
8 | 2015-07-09 Klas Lindfors <klas@yubico.com> | |
9 | ||
10 | * ykclient.c: make sure there is always at least one handle found with clang scan-build | |
11 | ||
12 | 2015-07-05 Klas Lindfors <klas@yubico.com> | |
13 | ||
14 | * Makefile.am, configure.ac: add help2adoc for releases | |
15 | ||
16 | 2015-06-24 Klas Lindfors <klas@yubico.com> | |
17 | ||
18 | * configure.ac: bump libtool variables correctly since a symbol was | |
19 | added | |
20 | ||
21 | 2015-06-24 Klas Lindfors <klas@yubico.com> | |
22 | ||
23 | * tool.c: tool: use server response to print out more debug info | |
24 | ||
25 | 2015-06-24 Klas Lindfors <klas@yubico.com> | |
26 | ||
27 | * libykclient.map, ykclient.c, ykclient.h: add an interface to fetch | |
28 | the last server response | |
29 | ||
30 | 2015-06-24 Klas Lindfors <klas@yubico.com> | |
31 | ||
32 | * ykclient.c: add timestamp to the default query | |
33 | ||
34 | 2015-06-15 Klas Lindfors <klas@yubico.com> | |
35 | ||
36 | * tool.c: add --cai to commandline tool help | |
37 | ||
38 | 2015-03-05 Klas Lindfors <klas@yubico.com> | |
39 | ||
40 | * NEWS, configure.ac: bump versions | |
41 | ||
0 | 42 | 2015-03-05 Klas Lindfors <klas@yubico.com> |
1 | 43 | |
2 | 44 | * NEWS: NEWS for 2.14 |
133 | 133 | cd $(srcdir) && git tag -u $(KEYID) -m $(VERSION) $(PACKAGE)-$(VERSION) |
134 | 134 | cd $(srcdir) && git push --tags |
135 | 135 | $(YUBICO_WWW_REPO)/publish $(PROJECT) $(VERSION) $(PACKAGE)-$(VERSION).tar.gz* |
136 | $(HELP2ADOC) -e ./ykclient -n "YubiCloud One-Time-Password Validation Client" > ykclient.1.txt | |
137 | $(YUBICO_WWW_REPO)/save-mans $(PROJECT) ykclient.1.txt |
0 | # Makefile.in generated by automake 1.14.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.15 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
44 | 44 | |
45 | 45 | |
46 | 46 | VPATH = @srcdir@ |
47 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' | |
47 | am__is_gnu_make = { \ | |
48 | if test -z '$(MAKELEVEL)'; then \ | |
49 | false; \ | |
50 | elif test -n '$(MAKE_HOST)'; then \ | |
51 | true; \ | |
52 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ | |
53 | true; \ | |
54 | else \ | |
55 | false; \ | |
56 | fi; \ | |
57 | } | |
48 | 58 | am__make_running_with_option = \ |
49 | 59 | case $${target_option-} in \ |
50 | 60 | ?) ;; \ |
112 | 122 | bin_PROGRAMS = ykclient$(EXEEXT) |
113 | 123 | @ENABLE_COV_TRUE@am__append_3 = --coverage |
114 | 124 | subdir = . |
115 | DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ | |
116 | $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ | |
117 | $(top_srcdir)/configure $(am__configure_deps) \ | |
118 | $(srcdir)/ykclient_version.h.in \ | |
119 | $(top_srcdir)/build-aux/depcomp $(dist_man_MANS) \ | |
120 | $(include_HEADERS) COPYING build-aux/ar-lib build-aux/compile \ | |
121 | build-aux/config.guess build-aux/config.sub build-aux/depcomp \ | |
122 | build-aux/install-sh build-aux/missing build-aux/ltmain.sh \ | |
123 | $(top_srcdir)/build-aux/ar-lib $(top_srcdir)/build-aux/compile \ | |
124 | $(top_srcdir)/build-aux/config.guess \ | |
125 | $(top_srcdir)/build-aux/config.sub \ | |
126 | $(top_srcdir)/build-aux/install-sh \ | |
127 | $(top_srcdir)/build-aux/ltmain.sh \ | |
128 | $(top_srcdir)/build-aux/missing | |
129 | 125 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
130 | 126 | am__aclocal_m4_deps = $(top_srcdir)/m4/ld-version-script.m4 \ |
131 | 127 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ |
136 | 132 | $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac |
137 | 133 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
138 | 134 | $(ACLOCAL_M4) |
135 | DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ | |
136 | $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON) | |
139 | 137 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ |
140 | 138 | configure.lineno config.status.lineno |
141 | 139 | mkinstalldirs = $(install_sh) -d |
271 | 269 | CTAGS = ctags |
272 | 270 | CSCOPE = cscope |
273 | 271 | DIST_SUBDIRS = $(SUBDIRS) |
272 | am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ | |
273 | $(srcdir)/ykclient_version.h.in $(top_srcdir)/build-aux/ar-lib \ | |
274 | $(top_srcdir)/build-aux/compile \ | |
275 | $(top_srcdir)/build-aux/config.guess \ | |
276 | $(top_srcdir)/build-aux/config.sub \ | |
277 | $(top_srcdir)/build-aux/depcomp \ | |
278 | $(top_srcdir)/build-aux/install-sh \ | |
279 | $(top_srcdir)/build-aux/ltmain.sh \ | |
280 | $(top_srcdir)/build-aux/missing AUTHORS COPYING ChangeLog \ | |
281 | INSTALL NEWS README build-aux/ar-lib build-aux/compile \ | |
282 | build-aux/config.guess build-aux/config.sub build-aux/depcomp \ | |
283 | build-aux/install-sh build-aux/ltmain.sh build-aux/missing | |
274 | 284 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
275 | 285 | distdir = $(PACKAGE)-$(VERSION) |
276 | 286 | top_distdir = $(distdir) |
340 | 350 | EXEEXT = @EXEEXT@ |
341 | 351 | FGREP = @FGREP@ |
342 | 352 | GREP = @GREP@ |
353 | HELP2ADOC = @HELP2ADOC@ | |
343 | 354 | HELP2MAN = @HELP2MAN@ |
344 | 355 | INSTALL = @INSTALL@ |
345 | 356 | INSTALL_DATA = @INSTALL_DATA@ |
489 | 500 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ |
490 | 501 | $(am__cd) $(top_srcdir) && \ |
491 | 502 | $(AUTOMAKE) --gnu Makefile |
492 | .PRECIOUS: Makefile | |
493 | 503 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
494 | 504 | @case '$?' in \ |
495 | 505 | *config.status*) \ |
901 | 911 | $(am__post_remove_distdir) |
902 | 912 | |
903 | 913 | dist-tarZ: distdir |
904 | @echo WARNING: "Support for shar distribution archives is" \ | |
905 | "deprecated." >&2 | |
914 | @echo WARNING: "Support for distribution archives compressed with" \ | |
915 | "legacy program 'compress' is deprecated." >&2 | |
906 | 916 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 |
907 | 917 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z |
908 | 918 | $(am__post_remove_distdir) |
909 | 919 | |
910 | 920 | dist-shar: distdir |
911 | @echo WARNING: "Support for distribution archives compressed with" \ | |
912 | "legacy program 'compress' is deprecated." >&2 | |
921 | @echo WARNING: "Support for shar distribution archives is" \ | |
922 | "deprecated." >&2 | |
913 | 923 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 |
914 | 924 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz |
915 | 925 | $(am__post_remove_distdir) |
945 | 955 | esac |
946 | 956 | chmod -R a-w $(distdir) |
947 | 957 | chmod u+w $(distdir) |
948 | mkdir $(distdir)/_build $(distdir)/_inst | |
958 | mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst | |
949 | 959 | chmod a-w $(distdir) |
950 | 960 | test -d $(distdir)/_build || exit 0; \ |
951 | 961 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ |
952 | 962 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ |
953 | 963 | && am__cwd=`pwd` \ |
954 | && $(am__cd) $(distdir)/_build \ | |
955 | && ../configure \ | |
964 | && $(am__cd) $(distdir)/_build/sub \ | |
965 | && ../../configure \ | |
956 | 966 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ |
957 | 967 | $(DISTCHECK_CONFIGURE_FLAGS) \ |
958 | --srcdir=.. --prefix="$$dc_install_base" \ | |
968 | --srcdir=../.. --prefix="$$dc_install_base" \ | |
959 | 969 | && $(MAKE) $(AM_MAKEFLAGS) \ |
960 | 970 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ |
961 | 971 | && $(MAKE) $(AM_MAKEFLAGS) check \ |
1150 | 1160 | uninstall-binPROGRAMS uninstall-includeHEADERS \ |
1151 | 1161 | uninstall-libLTLIBRARIES uninstall-man uninstall-man1 |
1152 | 1162 | |
1163 | .PRECIOUS: Makefile | |
1164 | ||
1153 | 1165 | |
1154 | 1166 | ykclient.1: $(builddir)/ykclient $(srcdir)/tool.c $(srcdir)/configure.ac |
1155 | 1167 | $(HELP2MAN) \ |
1209 | 1221 | cd $(srcdir) && git tag -u $(KEYID) -m $(VERSION) $(PACKAGE)-$(VERSION) |
1210 | 1222 | cd $(srcdir) && git push --tags |
1211 | 1223 | $(YUBICO_WWW_REPO)/publish $(PROJECT) $(VERSION) $(PACKAGE)-$(VERSION).tar.gz* |
1224 | $(HELP2ADOC) -e ./ykclient -n "YubiCloud One-Time-Password Validation Client" > ykclient.1.txt | |
1225 | $(YUBICO_WWW_REPO)/save-mans $(PROJECT) ykclient.1.txt | |
1212 | 1226 | |
1213 | 1227 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
1214 | 1228 | # Otherwise a system limit (for SysV at least) may be exceeded. |
0 | 0 | Yubikey-c-client NEWS -- History of user-visible changes. -*- outline -*- |
1 | ||
2 | * Version 2.15 (released 2015-11-12) | |
3 | ||
4 | ** Add ykclient_get_server_response() to the library. | |
5 | ||
6 | ** Show more information from the commandline on debug. | |
7 | ||
8 | ** Add proxy support via Curl. | |
1 | 9 | |
2 | 10 | * Version 2.14 (released 2015-03-05) |
3 | 11 |
0 | # generated automatically by aclocal 1.14.1 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
0 | # generated automatically by aclocal 1.15 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
3 | 3 | |
4 | 4 | # This file is free software; the Free Software Foundation |
5 | 5 | # gives unlimited permission to copy and/or distribute it, |
19 | 19 | If you have problems, you may need to regenerate the build system entirely. |
20 | 20 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
21 | 21 | |
22 | # Copyright (C) 2002-2013 Free Software Foundation, Inc. | |
22 | # Copyright (C) 2002-2014 Free Software Foundation, Inc. | |
23 | 23 | # |
24 | 24 | # This file is free software; the Free Software Foundation |
25 | 25 | # gives unlimited permission to copy and/or distribute it, |
31 | 31 | # generated from the m4 files accompanying Automake X.Y. |
32 | 32 | # (This private macro should not be called outside this file.) |
33 | 33 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
34 | [am__api_version='1.14' | |
34 | [am__api_version='1.15' | |
35 | 35 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
36 | 36 | dnl require some minimum version. Point them to the right macro. |
37 | m4_if([$1], [1.14.1], [], | |
37 | m4_if([$1], [1.15], [], | |
38 | 38 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
39 | 39 | ]) |
40 | 40 | |
50 | 50 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
51 | 51 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
52 | 52 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
53 | [AM_AUTOMAKE_VERSION([1.14.1])dnl | |
53 | [AM_AUTOMAKE_VERSION([1.15])dnl | |
54 | 54 | m4_ifndef([AC_AUTOCONF_VERSION], |
55 | 55 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
56 | 56 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
57 | 57 | |
58 | # Copyright (C) 2011-2013 Free Software Foundation, Inc. | |
58 | # Copyright (C) 2011-2014 Free Software Foundation, Inc. | |
59 | 59 | # |
60 | 60 | # This file is free software; the Free Software Foundation |
61 | 61 | # gives unlimited permission to copy and/or distribute it, |
117 | 117 | |
118 | 118 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
119 | 119 | |
120 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
120 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
121 | 121 | # |
122 | 122 | # This file is free software; the Free Software Foundation |
123 | 123 | # gives unlimited permission to copy and/or distribute it, |
162 | 162 | # configured tree to be moved without reconfiguration. |
163 | 163 | |
164 | 164 | AC_DEFUN([AM_AUX_DIR_EXPAND], |
165 | [dnl Rely on autoconf to set up CDPATH properly. | |
166 | AC_PREREQ([2.50])dnl | |
167 | # expand $ac_aux_dir to an absolute path | |
168 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
165 | [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl | |
166 | # Expand $ac_aux_dir to an absolute path. | |
167 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
169 | 168 | ]) |
170 | 169 | |
171 | 170 | # AM_CONDITIONAL -*- Autoconf -*- |
172 | 171 | |
173 | # Copyright (C) 1997-2013 Free Software Foundation, Inc. | |
172 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | |
174 | 173 | # |
175 | 174 | # This file is free software; the Free Software Foundation |
176 | 175 | # gives unlimited permission to copy and/or distribute it, |
201 | 200 | Usually this means the macro was only invoked conditionally.]]) |
202 | 201 | fi])]) |
203 | 202 | |
204 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
203 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
205 | 204 | # |
206 | 205 | # This file is free software; the Free Software Foundation |
207 | 206 | # gives unlimited permission to copy and/or distribute it, |
392 | 391 | |
393 | 392 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
394 | 393 | |
395 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
394 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
396 | 395 | # |
397 | 396 | # This file is free software; the Free Software Foundation |
398 | 397 | # gives unlimited permission to copy and/or distribute it, |
468 | 467 | |
469 | 468 | # Do all the work for Automake. -*- Autoconf -*- |
470 | 469 | |
471 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
470 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
472 | 471 | # |
473 | 472 | # This file is free software; the Free Software Foundation |
474 | 473 | # gives unlimited permission to copy and/or distribute it, |
558 | 557 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> |
559 | 558 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> |
560 | 559 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) |
561 | # We need awk for the "check" target. The system "awk" is bad on | |
562 | # some platforms. | |
560 | # We need awk for the "check" target (and possibly the TAP driver). The | |
561 | # system "awk" is bad on some platforms. | |
563 | 562 | AC_REQUIRE([AC_PROG_AWK])dnl |
564 | 563 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
565 | 564 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
632 | 631 | END |
633 | 632 | AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) |
634 | 633 | fi |
635 | fi]) | |
634 | fi | |
635 | dnl The trailing newline in this macro's definition is deliberate, for | |
636 | dnl backward compatibility and to allow trailing 'dnl'-style comments | |
637 | dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. | |
638 | ]) | |
636 | 639 | |
637 | 640 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
638 | 641 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
661 | 664 | done |
662 | 665 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
663 | 666 | |
664 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
667 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
665 | 668 | # |
666 | 669 | # This file is free software; the Free Software Foundation |
667 | 670 | # gives unlimited permission to copy and/or distribute it, |
672 | 675 | # Define $install_sh. |
673 | 676 | AC_DEFUN([AM_PROG_INSTALL_SH], |
674 | 677 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
675 | if test x"${install_sh}" != xset; then | |
678 | if test x"${install_sh+set}" != xset; then | |
676 | 679 | case $am_aux_dir in |
677 | 680 | *\ * | *\ *) |
678 | 681 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
682 | 685 | fi |
683 | 686 | AC_SUBST([install_sh])]) |
684 | 687 | |
685 | # Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
688 | # Copyright (C) 2003-2014 Free Software Foundation, Inc. | |
686 | 689 | # |
687 | 690 | # This file is free software; the Free Software Foundation |
688 | 691 | # gives unlimited permission to copy and/or distribute it, |
703 | 706 | |
704 | 707 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
705 | 708 | |
706 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
709 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
707 | 710 | # |
708 | 711 | # This file is free software; the Free Software Foundation |
709 | 712 | # gives unlimited permission to copy and/or distribute it, |
753 | 756 | |
754 | 757 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
755 | 758 | |
756 | # Copyright (C) 1997-2013 Free Software Foundation, Inc. | |
759 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | |
757 | 760 | # |
758 | 761 | # This file is free software; the Free Software Foundation |
759 | 762 | # gives unlimited permission to copy and/or distribute it, |
792 | 795 | |
793 | 796 | # Helper functions for option handling. -*- Autoconf -*- |
794 | 797 | |
795 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
798 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
796 | 799 | # |
797 | 800 | # This file is free software; the Free Software Foundation |
798 | 801 | # gives unlimited permission to copy and/or distribute it, |
821 | 824 | AC_DEFUN([_AM_IF_OPTION], |
822 | 825 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
823 | 826 | |
824 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
827 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
825 | 828 | # |
826 | 829 | # This file is free software; the Free Software Foundation |
827 | 830 | # gives unlimited permission to copy and/or distribute it, |
868 | 871 | # For backward compatibility. |
869 | 872 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
870 | 873 | |
871 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
874 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
872 | 875 | # |
873 | 876 | # This file is free software; the Free Software Foundation |
874 | 877 | # gives unlimited permission to copy and/or distribute it, |
887 | 890 | |
888 | 891 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
889 | 892 | |
890 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
893 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
891 | 894 | # |
892 | 895 | # This file is free software; the Free Software Foundation |
893 | 896 | # gives unlimited permission to copy and/or distribute it, |
968 | 971 | rm -f conftest.file |
969 | 972 | ]) |
970 | 973 | |
971 | # Copyright (C) 2009-2013 Free Software Foundation, Inc. | |
974 | # Copyright (C) 2009-2014 Free Software Foundation, Inc. | |
972 | 975 | # |
973 | 976 | # This file is free software; the Free Software Foundation |
974 | 977 | # gives unlimited permission to copy and/or distribute it, |
1028 | 1031 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
1029 | 1032 | ]) |
1030 | 1033 | |
1031 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
1034 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1032 | 1035 | # |
1033 | 1036 | # This file is free software; the Free Software Foundation |
1034 | 1037 | # gives unlimited permission to copy and/or distribute it, |
1056 | 1059 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
1057 | 1060 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1058 | 1061 | |
1059 | # Copyright (C) 2006-2013 Free Software Foundation, Inc. | |
1062 | # Copyright (C) 2006-2014 Free Software Foundation, Inc. | |
1060 | 1063 | # |
1061 | 1064 | # This file is free software; the Free Software Foundation |
1062 | 1065 | # gives unlimited permission to copy and/or distribute it, |
1075 | 1078 | |
1076 | 1079 | # Check how to create a tarball. -*- Autoconf -*- |
1077 | 1080 | |
1078 | # Copyright (C) 2004-2013 Free Software Foundation, Inc. | |
1081 | # Copyright (C) 2004-2014 Free Software Foundation, Inc. | |
1079 | 1082 | # |
1080 | 1083 | # This file is free software; the Free Software Foundation |
1081 | 1084 | # gives unlimited permission to copy and/or distribute it, |
3 | 3 | me=ar-lib |
4 | 4 | scriptversion=2012-03-01.08; # UTC |
5 | 5 | |
6 | # Copyright (C) 2010-2013 Free Software Foundation, Inc. | |
6 | # Copyright (C) 2010-2014 Free Software Foundation, Inc. | |
7 | 7 | # Written by Peter Rosin <peda@lysator.liu.se>. |
8 | 8 | # |
9 | 9 | # This program is free software; you can redistribute it and/or modify |
2 | 2 | |
3 | 3 | scriptversion=2012-10-14.11; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
6 | 6 | # Written by Tom Tromey <tromey@cygnus.com>. |
7 | 7 | # |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
0 | 0 | #! /bin/sh |
1 | 1 | # Attempt to guess a canonical system name. |
2 | # Copyright 1992-2013 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2013-06-10' | |
2 | # Copyright 1992-2014 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2014-03-23' | |
5 | 5 | |
6 | 6 | # This file is free software; you can redistribute it and/or modify it |
7 | 7 | # under the terms of the GNU General Public License as published by |
49 | 49 | GNU config.guess ($timestamp) |
50 | 50 | |
51 | 51 | Originally written by Per Bothner. |
52 | Copyright 1992-2013 Free Software Foundation, Inc. | |
52 | Copyright 1992-2014 Free Software Foundation, Inc. | |
53 | 53 | |
54 | 54 | This is free software; see the source for copying conditions. There is NO |
55 | 55 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
148 | 148 | LIBC=gnu |
149 | 149 | #endif |
150 | 150 | EOF |
151 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | |
151 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` | |
152 | 152 | ;; |
153 | 153 | esac |
154 | 154 | |
825 | 825 | *:MINGW*:*) |
826 | 826 | echo ${UNAME_MACHINE}-pc-mingw32 |
827 | 827 | exit ;; |
828 | i*:MSYS*:*) | |
828 | *:MSYS*:*) | |
829 | 829 | echo ${UNAME_MACHINE}-pc-msys |
830 | 830 | exit ;; |
831 | 831 | i*:windows32*:*) |
968 | 968 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
969 | 969 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } |
970 | 970 | ;; |
971 | or1k:Linux:*:*) | |
972 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
973 | exit ;; | |
974 | or32:Linux:*:*) | |
971 | openrisc*:Linux:*:*) | |
972 | echo or1k-unknown-linux-${LIBC} | |
973 | exit ;; | |
974 | or32:Linux:*:* | or1k*:Linux:*:*) | |
975 | 975 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
976 | 976 | exit ;; |
977 | 977 | padre:Linux:*:*) |
1259 | 1259 | if test "$UNAME_PROCESSOR" = unknown ; then |
1260 | 1260 | UNAME_PROCESSOR=powerpc |
1261 | 1261 | fi |
1262 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
1263 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1264 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1265 | grep IS_64BIT_ARCH >/dev/null | |
1266 | then | |
1267 | case $UNAME_PROCESSOR in | |
1268 | i386) UNAME_PROCESSOR=x86_64 ;; | |
1269 | powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1270 | esac | |
1262 | if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then | |
1263 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
1264 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1265 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1266 | grep IS_64BIT_ARCH >/dev/null | |
1267 | then | |
1268 | case $UNAME_PROCESSOR in | |
1269 | i386) UNAME_PROCESSOR=x86_64 ;; | |
1270 | powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1271 | esac | |
1272 | fi | |
1271 | 1273 | fi |
1274 | elif test "$UNAME_PROCESSOR" = i386 ; then | |
1275 | # Avoid executing cc on OS X 10.9, as it ships with a stub | |
1276 | # that puts up a graphical alert prompting to install | |
1277 | # developer tools. Any system running Mac OS X 10.7 or | |
1278 | # later (Darwin 11 and later) is required to have a 64-bit | |
1279 | # processor. This is not true of the ARM version of Darwin | |
1280 | # that Apple uses in portable devices. | |
1281 | UNAME_PROCESSOR=x86_64 | |
1272 | 1282 | fi |
1273 | 1283 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1274 | 1284 | exit ;; |
1360 | 1370 | exit ;; |
1361 | 1371 | esac |
1362 | 1372 | |
1363 | eval $set_cc_for_build | |
1364 | cat >$dummy.c <<EOF | |
1365 | #ifdef _SEQUENT_ | |
1366 | # include <sys/types.h> | |
1367 | # include <sys/utsname.h> | |
1368 | #endif | |
1369 | main () | |
1370 | { | |
1371 | #if defined (sony) | |
1372 | #if defined (MIPSEB) | |
1373 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
1374 | I don't know.... */ | |
1375 | printf ("mips-sony-bsd\n"); exit (0); | |
1376 | #else | |
1377 | #include <sys/param.h> | |
1378 | printf ("m68k-sony-newsos%s\n", | |
1379 | #ifdef NEWSOS4 | |
1380 | "4" | |
1381 | #else | |
1382 | "" | |
1383 | #endif | |
1384 | ); exit (0); | |
1385 | #endif | |
1386 | #endif | |
1387 | ||
1388 | #if defined (__arm) && defined (__acorn) && defined (__unix) | |
1389 | printf ("arm-acorn-riscix\n"); exit (0); | |
1390 | #endif | |
1391 | ||
1392 | #if defined (hp300) && !defined (hpux) | |
1393 | printf ("m68k-hp-bsd\n"); exit (0); | |
1394 | #endif | |
1395 | ||
1396 | #if defined (NeXT) | |
1397 | #if !defined (__ARCHITECTURE__) | |
1398 | #define __ARCHITECTURE__ "m68k" | |
1399 | #endif | |
1400 | int version; | |
1401 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
1402 | if (version < 4) | |
1403 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1404 | else | |
1405 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
1406 | exit (0); | |
1407 | #endif | |
1408 | ||
1409 | #if defined (MULTIMAX) || defined (n16) | |
1410 | #if defined (UMAXV) | |
1411 | printf ("ns32k-encore-sysv\n"); exit (0); | |
1412 | #else | |
1413 | #if defined (CMU) | |
1414 | printf ("ns32k-encore-mach\n"); exit (0); | |
1415 | #else | |
1416 | printf ("ns32k-encore-bsd\n"); exit (0); | |
1417 | #endif | |
1418 | #endif | |
1419 | #endif | |
1420 | ||
1421 | #if defined (__386BSD__) | |
1422 | printf ("i386-pc-bsd\n"); exit (0); | |
1423 | #endif | |
1424 | ||
1425 | #if defined (sequent) | |
1426 | #if defined (i386) | |
1427 | printf ("i386-sequent-dynix\n"); exit (0); | |
1428 | #endif | |
1429 | #if defined (ns32000) | |
1430 | printf ("ns32k-sequent-dynix\n"); exit (0); | |
1431 | #endif | |
1432 | #endif | |
1433 | ||
1434 | #if defined (_SEQUENT_) | |
1435 | struct utsname un; | |
1436 | ||
1437 | uname(&un); | |
1438 | ||
1439 | if (strncmp(un.version, "V2", 2) == 0) { | |
1440 | printf ("i386-sequent-ptx2\n"); exit (0); | |
1441 | } | |
1442 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1443 | printf ("i386-sequent-ptx1\n"); exit (0); | |
1444 | } | |
1445 | printf ("i386-sequent-ptx\n"); exit (0); | |
1446 | ||
1447 | #endif | |
1448 | ||
1449 | #if defined (vax) | |
1450 | # if !defined (ultrix) | |
1451 | # include <sys/param.h> | |
1452 | # if defined (BSD) | |
1453 | # if BSD == 43 | |
1454 | printf ("vax-dec-bsd4.3\n"); exit (0); | |
1455 | # else | |
1456 | # if BSD == 199006 | |
1457 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1458 | # else | |
1459 | printf ("vax-dec-bsd\n"); exit (0); | |
1460 | # endif | |
1461 | # endif | |
1462 | # else | |
1463 | printf ("vax-dec-bsd\n"); exit (0); | |
1464 | # endif | |
1465 | # else | |
1466 | printf ("vax-dec-ultrix\n"); exit (0); | |
1467 | # endif | |
1468 | #endif | |
1469 | ||
1470 | #if defined (alliant) && defined (i860) | |
1471 | printf ("i860-alliant-bsd\n"); exit (0); | |
1472 | #endif | |
1473 | ||
1474 | exit (1); | |
1475 | } | |
1476 | EOF | |
1477 | ||
1478 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
1479 | { echo "$SYSTEM_NAME"; exit; } | |
1480 | ||
1481 | # Apollos put the system type in the environment. | |
1482 | ||
1483 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | |
1484 | ||
1485 | # Convex versions that predate uname can use getsysinfo(1) | |
1486 | ||
1487 | if [ -x /usr/convex/getsysinfo ] | |
1488 | then | |
1489 | case `getsysinfo -f cpu_type` in | |
1490 | c1*) | |
1491 | echo c1-convex-bsd | |
1492 | exit ;; | |
1493 | c2*) | |
1494 | if getsysinfo -f scalar_acc | |
1495 | then echo c32-convex-bsd | |
1496 | else echo c2-convex-bsd | |
1497 | fi | |
1498 | exit ;; | |
1499 | c34*) | |
1500 | echo c34-convex-bsd | |
1501 | exit ;; | |
1502 | c38*) | |
1503 | echo c38-convex-bsd | |
1504 | exit ;; | |
1505 | c4*) | |
1506 | echo c4-convex-bsd | |
1507 | exit ;; | |
1508 | esac | |
1509 | fi | |
1510 | ||
1511 | 1373 | cat >&2 <<EOF |
1512 | 1374 | $0: unable to guess system type |
1513 | 1375 |
0 | 0 | #! /bin/sh |
1 | 1 | # Configuration validation subroutine script. |
2 | # Copyright 1992-2013 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2013-08-10' | |
2 | # Copyright 1992-2014 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2014-09-11' | |
5 | 5 | |
6 | 6 | # This file is free software; you can redistribute it and/or modify it |
7 | 7 | # under the terms of the GNU General Public License as published by |
67 | 67 | version="\ |
68 | 68 | GNU config.sub ($timestamp) |
69 | 69 | |
70 | Copyright 1992-2013 Free Software Foundation, Inc. | |
70 | Copyright 1992-2014 Free Software Foundation, Inc. | |
71 | 71 | |
72 | 72 | This is free software; see the source for copying conditions. There is NO |
73 | 73 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
264 | 264 | | hexagon \ |
265 | 265 | | i370 | i860 | i960 | ia64 \ |
266 | 266 | | ip2k | iq2000 \ |
267 | | k1om \ | |
267 | 268 | | le32 | le64 \ |
268 | 269 | | lm32 \ |
269 | 270 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ |
281 | 282 | | mips64vr5900 | mips64vr5900el \ |
282 | 283 | | mipsisa32 | mipsisa32el \ |
283 | 284 | | mipsisa32r2 | mipsisa32r2el \ |
285 | | mipsisa32r6 | mipsisa32r6el \ | |
284 | 286 | | mipsisa64 | mipsisa64el \ |
285 | 287 | | mipsisa64r2 | mipsisa64r2el \ |
288 | | mipsisa64r6 | mipsisa64r6el \ | |
286 | 289 | | mipsisa64sb1 | mipsisa64sb1el \ |
287 | 290 | | mipsisa64sr71k | mipsisa64sr71kel \ |
288 | 291 | | mipsr5900 | mipsr5900el \ |
294 | 297 | | nds32 | nds32le | nds32be \ |
295 | 298 | | nios | nios2 | nios2eb | nios2el \ |
296 | 299 | | ns16k | ns32k \ |
297 | | open8 \ | |
298 | | or1k | or32 \ | |
300 | | open8 | or1k | or1knd | or32 \ | |
299 | 301 | | pdp10 | pdp11 | pj | pjl \ |
300 | 302 | | powerpc | powerpc64 | powerpc64le | powerpcle \ |
301 | 303 | | pyramid \ |
304 | | riscv32 | riscv64 \ | |
302 | 305 | | rl78 | rx \ |
303 | 306 | | score \ |
304 | 307 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
323 | 326 | c6x) |
324 | 327 | basic_machine=tic6x-unknown |
325 | 328 | ;; |
326 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) | |
329 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) | |
327 | 330 | basic_machine=$basic_machine-unknown |
328 | 331 | os=-none |
329 | 332 | ;; |
380 | 383 | | hexagon-* \ |
381 | 384 | | i*86-* | i860-* | i960-* | ia64-* \ |
382 | 385 | | ip2k-* | iq2000-* \ |
386 | | k1om-* \ | |
383 | 387 | | le32-* | le64-* \ |
384 | 388 | | lm32-* \ |
385 | 389 | | m32c-* | m32r-* | m32rle-* \ |
399 | 403 | | mips64vr5900-* | mips64vr5900el-* \ |
400 | 404 | | mipsisa32-* | mipsisa32el-* \ |
401 | 405 | | mipsisa32r2-* | mipsisa32r2el-* \ |
406 | | mipsisa32r6-* | mipsisa32r6el-* \ | |
402 | 407 | | mipsisa64-* | mipsisa64el-* \ |
403 | 408 | | mipsisa64r2-* | mipsisa64r2el-* \ |
409 | | mipsisa64r6-* | mipsisa64r6el-* \ | |
404 | 410 | | mipsisa64sb1-* | mipsisa64sb1el-* \ |
405 | 411 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
406 | 412 | | mipsr5900-* | mipsr5900el-* \ |
412 | 418 | | nios-* | nios2-* | nios2eb-* | nios2el-* \ |
413 | 419 | | none-* | np1-* | ns16k-* | ns32k-* \ |
414 | 420 | | open8-* \ |
421 | | or1k*-* \ | |
415 | 422 | | orion-* \ |
416 | 423 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
417 | 424 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ |
821 | 828 | basic_machine=powerpc-unknown |
822 | 829 | os=-morphos |
823 | 830 | ;; |
831 | moxiebox) | |
832 | basic_machine=moxie-unknown | |
833 | os=-moxiebox | |
834 | ;; | |
824 | 835 | msdos) |
825 | 836 | basic_machine=i386-pc |
826 | 837 | os=-msdos |
1366 | 1377 | | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
1367 | 1378 | | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ |
1368 | 1379 | | -linux-newlib* | -linux-musl* | -linux-uclibc* \ |
1369 | | -uxpv* | -beos* | -mpeix* | -udk* \ | |
1380 | | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | |
1370 | 1381 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
1371 | 1382 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
1372 | 1383 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
1373 | 1384 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
1374 | 1385 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
1375 | 1386 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
1376 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | |
1387 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) | |
1377 | 1388 | # Remember, each alternative MUST END IN *, to match a version number. |
1378 | 1389 | ;; |
1379 | 1390 | -qnx*) |
1591 | 1602 | mips*-*) |
1592 | 1603 | os=-elf |
1593 | 1604 | ;; |
1594 | or1k-*) | |
1595 | os=-elf | |
1596 | ;; | |
1597 | 1605 | or32-*) |
1598 | 1606 | os=-coff |
1599 | 1607 | ;; |
2 | 2 | |
3 | 3 | scriptversion=2013-05-30.07; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
6 | 6 | |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |
0 | 0 | #!/bin/sh |
1 | 1 | # install - install a program, script, or datafile |
2 | 2 | |
3 | scriptversion=2011-11-20.07; # UTC | |
3 | scriptversion=2013-12-25.23; # UTC | |
4 | 4 | |
5 | 5 | # This originates from X11R5 (mit/util/scripts/install.sh), which was |
6 | 6 | # later released in X11R6 (xc/config/util/install.sh) with the |
40 | 40 | # This script is compatible with the BSD install script, but was written |
41 | 41 | # from scratch. |
42 | 42 | |
43 | tab=' ' | |
43 | 44 | nl=' |
44 | 45 | ' |
45 | IFS=" "" $nl" | |
46 | ||
47 | # set DOITPROG to echo to test this script | |
48 | ||
49 | # Don't use :- since 4.3BSD and earlier shells don't like it. | |
46 | IFS=" $tab$nl" | |
47 | ||
48 | # Set DOITPROG to "echo" to test this script. | |
49 | ||
50 | 50 | doit=${DOITPROG-} |
51 | if test -z "$doit"; then | |
52 | doit_exec=exec | |
53 | else | |
54 | doit_exec=$doit | |
55 | fi | |
51 | doit_exec=${doit:-exec} | |
56 | 52 | |
57 | 53 | # Put in absolute file names if you don't have them in your path; |
58 | 54 | # or use environment vars. |
67 | 63 | rmprog=${RMPROG-rm} |
68 | 64 | stripprog=${STRIPPROG-strip} |
69 | 65 | |
70 | posix_glob='?' | |
71 | initialize_posix_glob=' | |
72 | test "$posix_glob" != "?" || { | |
73 | if (set -f) 2>/dev/null; then | |
74 | posix_glob= | |
75 | else | |
76 | posix_glob=: | |
77 | fi | |
78 | } | |
79 | ' | |
80 | ||
81 | 66 | posix_mkdir= |
82 | 67 | |
83 | 68 | # Desired mode of installed file. |
96 | 81 | dst_arg= |
97 | 82 | |
98 | 83 | copy_on_change=false |
99 | no_target_directory= | |
84 | is_target_a_directory=possibly | |
100 | 85 | |
101 | 86 | usage="\ |
102 | 87 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE |
136 | 121 | -d) dir_arg=true;; |
137 | 122 | |
138 | 123 | -g) chgrpcmd="$chgrpprog $2" |
139 | shift;; | |
124 | shift;; | |
140 | 125 | |
141 | 126 | --help) echo "$usage"; exit $?;; |
142 | 127 | |
143 | 128 | -m) mode=$2 |
144 | case $mode in | |
145 | *' '* | *' '* | *' | |
146 | '* | *'*'* | *'?'* | *'['*) | |
147 | echo "$0: invalid mode: $mode" >&2 | |
148 | exit 1;; | |
149 | esac | |
150 | shift;; | |
129 | case $mode in | |
130 | *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) | |
131 | echo "$0: invalid mode: $mode" >&2 | |
132 | exit 1;; | |
133 | esac | |
134 | shift;; | |
151 | 135 | |
152 | 136 | -o) chowncmd="$chownprog $2" |
153 | shift;; | |
137 | shift;; | |
154 | 138 | |
155 | 139 | -s) stripcmd=$stripprog;; |
156 | 140 | |
157 | -t) dst_arg=$2 | |
158 | # Protect names problematic for 'test' and other utilities. | |
159 | case $dst_arg in | |
160 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
161 | esac | |
162 | shift;; | |
163 | ||
164 | -T) no_target_directory=true;; | |
141 | -t) | |
142 | is_target_a_directory=always | |
143 | dst_arg=$2 | |
144 | # Protect names problematic for 'test' and other utilities. | |
145 | case $dst_arg in | |
146 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
147 | esac | |
148 | shift;; | |
149 | ||
150 | -T) is_target_a_directory=never;; | |
165 | 151 | |
166 | 152 | --version) echo "$0 $scriptversion"; exit $?;; |
167 | 153 | |
168 | --) shift | |
169 | break;; | |
170 | ||
171 | -*) echo "$0: invalid option: $1" >&2 | |
172 | exit 1;; | |
154 | --) shift | |
155 | break;; | |
156 | ||
157 | -*) echo "$0: invalid option: $1" >&2 | |
158 | exit 1;; | |
173 | 159 | |
174 | 160 | *) break;; |
175 | 161 | esac |
176 | 162 | shift |
177 | 163 | done |
164 | ||
165 | # We allow the use of options -d and -T together, by making -d | |
166 | # take the precedence; this is for compatibility with GNU install. | |
167 | ||
168 | if test -n "$dir_arg"; then | |
169 | if test -n "$dst_arg"; then | |
170 | echo "$0: target directory not allowed when installing a directory." >&2 | |
171 | exit 1 | |
172 | fi | |
173 | fi | |
178 | 174 | |
179 | 175 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then |
180 | 176 | # When -d is used, all remaining arguments are directories to create. |
207 | 203 | fi |
208 | 204 | |
209 | 205 | if test -z "$dir_arg"; then |
206 | if test $# -gt 1 || test "$is_target_a_directory" = always; then | |
207 | if test ! -d "$dst_arg"; then | |
208 | echo "$0: $dst_arg: Is not a directory." >&2 | |
209 | exit 1 | |
210 | fi | |
211 | fi | |
212 | fi | |
213 | ||
214 | if test -z "$dir_arg"; then | |
210 | 215 | do_exit='(exit $ret); exit $ret' |
211 | 216 | trap "ret=129; $do_exit" 1 |
212 | 217 | trap "ret=130; $do_exit" 2 |
222 | 227 | |
223 | 228 | *[0-7]) |
224 | 229 | if test -z "$stripcmd"; then |
225 | u_plus_rw= | |
230 | u_plus_rw= | |
226 | 231 | else |
227 | u_plus_rw='% 200' | |
232 | u_plus_rw='% 200' | |
228 | 233 | fi |
229 | 234 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; |
230 | 235 | *) |
231 | 236 | if test -z "$stripcmd"; then |
232 | u_plus_rw= | |
237 | u_plus_rw= | |
233 | 238 | else |
234 | u_plus_rw=,u+rw | |
239 | u_plus_rw=,u+rw | |
235 | 240 | fi |
236 | 241 | cp_umask=$mode$u_plus_rw;; |
237 | 242 | esac |
268 | 273 | # If destination is a directory, append the input filename; won't work |
269 | 274 | # if double slashes aren't ignored. |
270 | 275 | if test -d "$dst"; then |
271 | if test -n "$no_target_directory"; then | |
272 | echo "$0: $dst_arg: Is a directory" >&2 | |
273 | exit 1 | |
276 | if test "$is_target_a_directory" = never; then | |
277 | echo "$0: $dst_arg: Is a directory" >&2 | |
278 | exit 1 | |
274 | 279 | fi |
275 | 280 | dstdir=$dst |
276 | 281 | dst=$dstdir/`basename "$src"` |
277 | 282 | dstdir_status=0 |
278 | 283 | else |
279 | # Prefer dirname, but fall back on a substitute if dirname fails. | |
280 | dstdir=` | |
281 | (dirname "$dst") 2>/dev/null || | |
282 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
283 | X"$dst" : 'X\(//\)[^/]' \| \ | |
284 | X"$dst" : 'X\(//\)$' \| \ | |
285 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || | |
286 | echo X"$dst" | | |
287 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
288 | s//\1/ | |
289 | q | |
290 | } | |
291 | /^X\(\/\/\)[^/].*/{ | |
292 | s//\1/ | |
293 | q | |
294 | } | |
295 | /^X\(\/\/\)$/{ | |
296 | s//\1/ | |
297 | q | |
298 | } | |
299 | /^X\(\/\).*/{ | |
300 | s//\1/ | |
301 | q | |
302 | } | |
303 | s/.*/./; q' | |
304 | ` | |
305 | ||
284 | dstdir=`dirname "$dst"` | |
306 | 285 | test -d "$dstdir" |
307 | 286 | dstdir_status=$? |
308 | 287 | fi |
313 | 292 | if test $dstdir_status != 0; then |
314 | 293 | case $posix_mkdir in |
315 | 294 | '') |
316 | # Create intermediate dirs using mode 755 as modified by the umask. | |
317 | # This is like FreeBSD 'install' as of 1997-10-28. | |
318 | umask=`umask` | |
319 | case $stripcmd.$umask in | |
320 | # Optimize common cases. | |
321 | *[2367][2367]) mkdir_umask=$umask;; | |
322 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
323 | ||
324 | *[0-7]) | |
325 | mkdir_umask=`expr $umask + 22 \ | |
326 | - $umask % 100 % 40 + $umask % 20 \ | |
327 | - $umask % 10 % 4 + $umask % 2 | |
328 | `;; | |
329 | *) mkdir_umask=$umask,go-w;; | |
330 | esac | |
331 | ||
332 | # With -d, create the new directory with the user-specified mode. | |
333 | # Otherwise, rely on $mkdir_umask. | |
334 | if test -n "$dir_arg"; then | |
335 | mkdir_mode=-m$mode | |
336 | else | |
337 | mkdir_mode= | |
338 | fi | |
339 | ||
340 | posix_mkdir=false | |
341 | case $umask in | |
342 | *[123567][0-7][0-7]) | |
343 | # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
344 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
345 | ;; | |
346 | *) | |
347 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
348 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
349 | ||
350 | if (umask $mkdir_umask && | |
351 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 | |
352 | then | |
353 | if test -z "$dir_arg" || { | |
354 | # Check for POSIX incompatibilities with -m. | |
355 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
356 | # other-writable bit of parent directory when it shouldn't. | |
357 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
358 | ls_ld_tmpdir=`ls -ld "$tmpdir"` | |
359 | case $ls_ld_tmpdir in | |
360 | d????-?r-*) different_mode=700;; | |
361 | d????-?--*) different_mode=755;; | |
362 | *) false;; | |
363 | esac && | |
364 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { | |
365 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` | |
366 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
367 | } | |
368 | } | |
369 | then posix_mkdir=: | |
370 | fi | |
371 | rmdir "$tmpdir/d" "$tmpdir" | |
372 | else | |
373 | # Remove any dirs left behind by ancient mkdir implementations. | |
374 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null | |
375 | fi | |
376 | trap '' 0;; | |
377 | esac;; | |
295 | # Create intermediate dirs using mode 755 as modified by the umask. | |
296 | # This is like FreeBSD 'install' as of 1997-10-28. | |
297 | umask=`umask` | |
298 | case $stripcmd.$umask in | |
299 | # Optimize common cases. | |
300 | *[2367][2367]) mkdir_umask=$umask;; | |
301 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
302 | ||
303 | *[0-7]) | |
304 | mkdir_umask=`expr $umask + 22 \ | |
305 | - $umask % 100 % 40 + $umask % 20 \ | |
306 | - $umask % 10 % 4 + $umask % 2 | |
307 | `;; | |
308 | *) mkdir_umask=$umask,go-w;; | |
309 | esac | |
310 | ||
311 | # With -d, create the new directory with the user-specified mode. | |
312 | # Otherwise, rely on $mkdir_umask. | |
313 | if test -n "$dir_arg"; then | |
314 | mkdir_mode=-m$mode | |
315 | else | |
316 | mkdir_mode= | |
317 | fi | |
318 | ||
319 | posix_mkdir=false | |
320 | case $umask in | |
321 | *[123567][0-7][0-7]) | |
322 | # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
323 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
324 | ;; | |
325 | *) | |
326 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
327 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
328 | ||
329 | if (umask $mkdir_umask && | |
330 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 | |
331 | then | |
332 | if test -z "$dir_arg" || { | |
333 | # Check for POSIX incompatibilities with -m. | |
334 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
335 | # other-writable bit of parent directory when it shouldn't. | |
336 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
337 | ls_ld_tmpdir=`ls -ld "$tmpdir"` | |
338 | case $ls_ld_tmpdir in | |
339 | d????-?r-*) different_mode=700;; | |
340 | d????-?--*) different_mode=755;; | |
341 | *) false;; | |
342 | esac && | |
343 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { | |
344 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` | |
345 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
346 | } | |
347 | } | |
348 | then posix_mkdir=: | |
349 | fi | |
350 | rmdir "$tmpdir/d" "$tmpdir" | |
351 | else | |
352 | # Remove any dirs left behind by ancient mkdir implementations. | |
353 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null | |
354 | fi | |
355 | trap '' 0;; | |
356 | esac;; | |
378 | 357 | esac |
379 | 358 | |
380 | 359 | if |
381 | 360 | $posix_mkdir && ( |
382 | umask $mkdir_umask && | |
383 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" | |
361 | umask $mkdir_umask && | |
362 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" | |
384 | 363 | ) |
385 | 364 | then : |
386 | 365 | else |
390 | 369 | # directory the slow way, step by step, checking for races as we go. |
391 | 370 | |
392 | 371 | case $dstdir in |
393 | /*) prefix='/';; | |
394 | [-=\(\)!]*) prefix='./';; | |
395 | *) prefix='';; | |
372 | /*) prefix='/';; | |
373 | [-=\(\)!]*) prefix='./';; | |
374 | *) prefix='';; | |
396 | 375 | esac |
397 | ||
398 | eval "$initialize_posix_glob" | |
399 | 376 | |
400 | 377 | oIFS=$IFS |
401 | 378 | IFS=/ |
402 | $posix_glob set -f | |
379 | set -f | |
403 | 380 | set fnord $dstdir |
404 | 381 | shift |
405 | $posix_glob set +f | |
382 | set +f | |
406 | 383 | IFS=$oIFS |
407 | 384 | |
408 | 385 | prefixes= |
409 | 386 | |
410 | 387 | for d |
411 | 388 | do |
412 | test X"$d" = X && continue | |
413 | ||
414 | prefix=$prefix$d | |
415 | if test -d "$prefix"; then | |
416 | prefixes= | |
417 | else | |
418 | if $posix_mkdir; then | |
419 | (umask=$mkdir_umask && | |
420 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break | |
421 | # Don't fail if two instances are running concurrently. | |
422 | test -d "$prefix" || exit 1 | |
423 | else | |
424 | case $prefix in | |
425 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; | |
426 | *) qprefix=$prefix;; | |
427 | esac | |
428 | prefixes="$prefixes '$qprefix'" | |
429 | fi | |
430 | fi | |
431 | prefix=$prefix/ | |
389 | test X"$d" = X && continue | |
390 | ||
391 | prefix=$prefix$d | |
392 | if test -d "$prefix"; then | |
393 | prefixes= | |
394 | else | |
395 | if $posix_mkdir; then | |
396 | (umask=$mkdir_umask && | |
397 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break | |
398 | # Don't fail if two instances are running concurrently. | |
399 | test -d "$prefix" || exit 1 | |
400 | else | |
401 | case $prefix in | |
402 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; | |
403 | *) qprefix=$prefix;; | |
404 | esac | |
405 | prefixes="$prefixes '$qprefix'" | |
406 | fi | |
407 | fi | |
408 | prefix=$prefix/ | |
432 | 409 | done |
433 | 410 | |
434 | 411 | if test -n "$prefixes"; then |
435 | # Don't fail if two instances are running concurrently. | |
436 | (umask $mkdir_umask && | |
437 | eval "\$doit_exec \$mkdirprog $prefixes") || | |
438 | test -d "$dstdir" || exit 1 | |
439 | obsolete_mkdir_used=true | |
412 | # Don't fail if two instances are running concurrently. | |
413 | (umask $mkdir_umask && | |
414 | eval "\$doit_exec \$mkdirprog $prefixes") || | |
415 | test -d "$dstdir" || exit 1 | |
416 | obsolete_mkdir_used=true | |
440 | 417 | fi |
441 | 418 | fi |
442 | 419 | fi |
471 | 448 | |
472 | 449 | # If -C, don't bother to copy if it wouldn't change the file. |
473 | 450 | if $copy_on_change && |
474 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && | |
475 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && | |
476 | ||
477 | eval "$initialize_posix_glob" && | |
478 | $posix_glob set -f && | |
451 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && | |
452 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && | |
453 | set -f && | |
479 | 454 | set X $old && old=:$2:$4:$5:$6 && |
480 | 455 | set X $new && new=:$2:$4:$5:$6 && |
481 | $posix_glob set +f && | |
482 | ||
456 | set +f && | |
483 | 457 | test "$old" = "$new" && |
484 | 458 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 |
485 | 459 | then |
492 | 466 | # to itself, or perhaps because mv is so ancient that it does not |
493 | 467 | # support -f. |
494 | 468 | { |
495 | # Now remove or move aside any old file at destination location. | |
496 | # We try this two ways since rm can't unlink itself on some | |
497 | # systems and the destination file might be busy for other | |
498 | # reasons. In this case, the final cleanup might fail but the new | |
499 | # file should still install successfully. | |
500 | { | |
501 | test ! -f "$dst" || | |
502 | $doit $rmcmd -f "$dst" 2>/dev/null || | |
503 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && | |
504 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
505 | } || | |
506 | { echo "$0: cannot unlink or rename $dst" >&2 | |
507 | (exit 1); exit 1 | |
508 | } | |
509 | } && | |
510 | ||
511 | # Now rename the file to the real destination. | |
512 | $doit $mvcmd "$dsttmp" "$dst" | |
469 | # Now remove or move aside any old file at destination location. | |
470 | # We try this two ways since rm can't unlink itself on some | |
471 | # systems and the destination file might be busy for other | |
472 | # reasons. In this case, the final cleanup might fail but the new | |
473 | # file should still install successfully. | |
474 | { | |
475 | test ! -f "$dst" || | |
476 | $doit $rmcmd -f "$dst" 2>/dev/null || | |
477 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && | |
478 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
479 | } || | |
480 | { echo "$0: cannot unlink or rename $dst" >&2 | |
481 | (exit 1); exit 1 | |
482 | } | |
483 | } && | |
484 | ||
485 | # Now rename the file to the real destination. | |
486 | $doit $mvcmd "$dsttmp" "$dst" | |
513 | 487 | } |
514 | 488 | fi || exit 1 |
515 | 489 |
69 | 69 | # compiler: $LTCC |
70 | 70 | # compiler flags: $LTCFLAGS |
71 | 71 | # linker: $LD (gnu? $with_gnu_ld) |
72 | # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 | |
72 | # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 | |
73 | 73 | # automake: $automake_version |
74 | 74 | # autoconf: $autoconf_version |
75 | 75 | # |
79 | 79 | |
80 | 80 | PROGRAM=libtool |
81 | 81 | PACKAGE=libtool |
82 | VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1" | |
82 | VERSION="2.4.2 Debian-2.4.2-1.11" | |
83 | 83 | TIMESTAMP="" |
84 | 84 | package_revision=1.3337 |
85 | 85 |
2 | 2 | |
3 | 3 | scriptversion=2013-10-28.13; # UTC |
4 | 4 | |
5 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
6 | 6 | # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
7 | 7 | |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
2 | 2 | |
3 | 3 | scriptversion=2013-07-13.22; # UTC |
4 | 4 | |
5 | # Copyright (C) 2011-2013 Free Software Foundation, Inc. | |
5 | # Copyright (C) 2011-2014 Free Software Foundation, Inc. | |
6 | 6 | # |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |
105 | 105 | # Test script is run here. |
106 | 106 | "$@" >$log_file 2>&1 |
107 | 107 | estatus=$? |
108 | ||
108 | 109 | if test $enable_hard_errors = no && test $estatus -eq 99; then |
109 | estatus=1 | |
110 | tweaked_estatus=1 | |
111 | else | |
112 | tweaked_estatus=$estatus | |
110 | 113 | fi |
111 | 114 | |
112 | case $estatus:$expect_failure in | |
115 | case $tweaked_estatus:$expect_failure in | |
113 | 116 | 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; |
114 | 117 | 0:*) col=$grn res=PASS recheck=no gcopy=no;; |
115 | 118 | 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; |
117 | 120 | *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; |
118 | 121 | *:*) col=$red res=FAIL recheck=yes gcopy=yes;; |
119 | 122 | esac |
123 | ||
124 | # Report the test outcome and exit status in the logs, so that one can | |
125 | # know whether the test passed or failed simply by looking at the '.log' | |
126 | # file, without the need of also peaking into the corresponding '.trs' | |
127 | # file (automake bug#11814). | |
128 | echo "$res $test_name (exit status: $estatus)" >>$log_file | |
120 | 129 | |
121 | 130 | # Report outcome to console. |
122 | 131 | echo "${col}${res}${std}: $test_name" |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for ykclient 2.14. | |
2 | # Generated by GNU Autoconf 2.69 for ykclient 2.15. | |
3 | 3 | # |
4 | 4 | # Report bugs to <yubico-devel@googlegroups.com>. |
5 | 5 | # |
589 | 589 | # Identity of this package. |
590 | 590 | PACKAGE_NAME='ykclient' |
591 | 591 | PACKAGE_TARNAME='ykclient' |
592 | PACKAGE_VERSION='2.14' | |
593 | PACKAGE_STRING='ykclient 2.14' | |
592 | PACKAGE_VERSION='2.15' | |
593 | PACKAGE_STRING='ykclient 2.15' | |
594 | 594 | PACKAGE_BUGREPORT='yubico-devel@googlegroups.com' |
595 | 595 | PACKAGE_URL='' |
596 | 596 | |
678 | 678 | build_vendor |
679 | 679 | build_cpu |
680 | 680 | build |
681 | HELP2ADOC | |
681 | 682 | HELP2MAN |
682 | 683 | ac_ct_AR |
683 | 684 | AR |
1337 | 1338 | # Omit some internal or obsolete options to make the list less imposing. |
1338 | 1339 | # This message is too long to be a string in the A/UX 3.1 sh. |
1339 | 1340 | cat <<_ACEOF |
1340 | \`configure' configures ykclient 2.14 to adapt to many kinds of systems. | |
1341 | \`configure' configures ykclient 2.15 to adapt to many kinds of systems. | |
1341 | 1342 | |
1342 | 1343 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1343 | 1344 | |
1407 | 1408 | |
1408 | 1409 | if test -n "$ac_init_help"; then |
1409 | 1410 | case $ac_init_help in |
1410 | short | recursive ) echo "Configuration of ykclient 2.14:";; | |
1411 | short | recursive ) echo "Configuration of ykclient 2.15:";; | |
1411 | 1412 | esac |
1412 | 1413 | cat <<\_ACEOF |
1413 | 1414 | |
1527 | 1528 | test -n "$ac_init_help" && exit $ac_status |
1528 | 1529 | if $ac_init_version; then |
1529 | 1530 | cat <<\_ACEOF |
1530 | ykclient configure 2.14 | |
1531 | ykclient configure 2.15 | |
1531 | 1532 | generated by GNU Autoconf 2.69 |
1532 | 1533 | |
1533 | 1534 | Copyright (C) 2012 Free Software Foundation, Inc. |
1805 | 1806 | This file contains any messages produced by compilers while |
1806 | 1807 | running configure, to aid debugging if configure makes a mistake. |
1807 | 1808 | |
1808 | It was created by ykclient $as_me 2.14, which was | |
1809 | It was created by ykclient $as_me 2.15, which was | |
1809 | 1810 | generated by GNU Autoconf 2.69. Invocation command line was |
1810 | 1811 | |
1811 | 1812 | $ $0 $@ |
2188 | 2189 | # Interfaces changed/added/removed: CURRENT++ REVISION=0 |
2189 | 2190 | # Interfaces added: AGE++ |
2190 | 2191 | # Interfaces removed: AGE=0 |
2191 | LT_CURRENT=8 | |
2192 | ||
2193 | LT_REVISION=4 | |
2194 | ||
2195 | LT_AGE=5 | |
2196 | ||
2197 | ||
2198 | am__api_version='1.14' | |
2192 | LT_CURRENT=9 | |
2193 | ||
2194 | LT_REVISION=0 | |
2195 | ||
2196 | LT_AGE=6 | |
2197 | ||
2198 | ||
2199 | am__api_version='1.15' | |
2199 | 2200 | |
2200 | 2201 | # Find a good install program. We prefer a C program (faster), |
2201 | 2202 | # so one script is as good as another. But avoid the broken or |
2367 | 2368 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
2368 | 2369 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` |
2369 | 2370 | |
2370 | # expand $ac_aux_dir to an absolute path | |
2371 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2371 | # Expand $ac_aux_dir to an absolute path. | |
2372 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
2372 | 2373 | |
2373 | 2374 | if test x"${MISSING+set}" != xset; then |
2374 | 2375 | case $am_aux_dir in |
2387 | 2388 | $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} |
2388 | 2389 | fi |
2389 | 2390 | |
2390 | if test x"${install_sh}" != xset; then | |
2391 | if test x"${install_sh+set}" != xset; then | |
2391 | 2392 | case $am_aux_dir in |
2392 | 2393 | *\ * | *\ *) |
2393 | 2394 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
2681 | 2682 | |
2682 | 2683 | # Define the identity of the package. |
2683 | 2684 | PACKAGE='ykclient' |
2684 | VERSION='2.14' | |
2685 | VERSION='2.15' | |
2685 | 2686 | |
2686 | 2687 | |
2687 | 2688 | cat >>confdefs.h <<_ACEOF |
2715 | 2716 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> |
2716 | 2717 | mkdir_p='$(MKDIR_P)' |
2717 | 2718 | |
2718 | # We need awk for the "check" target. The system "awk" is bad on | |
2719 | # some platforms. | |
2719 | # We need awk for the "check" target (and possibly the TAP driver). The | |
2720 | # system "awk" is bad on some platforms. | |
2720 | 2721 | # Always define AMTAR for backward compatibility. Yes, it's still used |
2721 | 2722 | # in the wild :-( We should find a proper way to deprecate it ... |
2722 | 2723 | AMTAR='$${TAR-tar}' |
2773 | 2774 | as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 |
2774 | 2775 | fi |
2775 | 2776 | fi |
2777 | ||
2776 | 2778 | # Check whether --enable-silent-rules was given. |
2777 | 2779 | if test "${enable_silent_rules+set}" = set; then : |
2778 | 2780 | enableval=$enable_silent_rules; |
4027 | 4029 | |
4028 | 4030 | |
4029 | 4031 | HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} |
4032 | ||
4033 | ||
4034 | HELP2ADOC=${HELP2ADOC-"${am_missing_run}help2adoc"} | |
4030 | 4035 | |
4031 | 4036 | # Make sure we can run config.sub. |
4032 | 4037 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
13173 | 13178 | # report actual input values of CONFIG_FILES etc. instead of their |
13174 | 13179 | # values after options handling. |
13175 | 13180 | ac_log=" |
13176 | This file was extended by ykclient $as_me 2.14, which was | |
13181 | This file was extended by ykclient $as_me 2.15, which was | |
13177 | 13182 | generated by GNU Autoconf 2.69. Invocation command line was |
13178 | 13183 | |
13179 | 13184 | CONFIG_FILES = $CONFIG_FILES |
13230 | 13235 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
13231 | 13236 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
13232 | 13237 | ac_cs_version="\\ |
13233 | ykclient config.status 2.14 | |
13238 | ykclient config.status 2.15 | |
13234 | 13239 | configured by $0, generated by GNU Autoconf 2.69, |
13235 | 13240 | with options \\"\$ac_cs_config\\" |
13236 | 13241 |
25 | 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 | 26 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 | |
28 | AC_INIT([ykclient], [2.14], [yubico-devel@googlegroups.com]) | |
28 | AC_INIT([ykclient], [2.15], [yubico-devel@googlegroups.com]) | |
29 | 29 | AC_CONFIG_AUX_DIR([build-aux]) |
30 | 30 | AC_CONFIG_MACRO_DIR([m4]) |
31 | 31 | |
33 | 33 | # Interfaces changed/added/removed: CURRENT++ REVISION=0 |
34 | 34 | # Interfaces added: AGE++ |
35 | 35 | # Interfaces removed: AGE=0 |
36 | AC_SUBST(LT_CURRENT, 8) | |
37 | AC_SUBST(LT_REVISION, 4) | |
38 | AC_SUBST(LT_AGE, 5) | |
36 | AC_SUBST(LT_CURRENT, 9) | |
37 | AC_SUBST(LT_REVISION, 0) | |
38 | AC_SUBST(LT_AGE, 6) | |
39 | 39 | |
40 | 40 | AM_INIT_AUTOMAKE([1.11 -Wall -Werror]) |
41 | 41 | AM_SILENT_RULES([yes]) |
44 | 44 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
45 | 45 | |
46 | 46 | AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) |
47 | AM_MISSING_PROG(HELP2ADOC, help2adoc, $missing_dir) | |
47 | 48 | AC_LIBTOOL_WIN32_DLL |
48 | 49 | AC_PROG_LIBTOOL |
49 | 50 |
64 | 64 | ykclient_set_ca_info; |
65 | 65 | ykclient_set_url_bases; |
66 | 66 | } Base; |
67 | ||
68 | YKCLIENT_2.15 { | |
69 | global: | |
70 | ykclient_get_server_response; | |
71 | ykclient_set_proxy; | |
72 | } YKCLIENT_2.12; |
0 | # Makefile.in generated by automake 1.14.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.15 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
43 | 43 | |
44 | 44 | # Self tests. |
45 | 45 | VPATH = @srcdir@ |
46 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' | |
46 | am__is_gnu_make = { \ | |
47 | if test -z '$(MAKELEVEL)'; then \ | |
48 | false; \ | |
49 | elif test -n '$(MAKE_HOST)'; then \ | |
50 | true; \ | |
51 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ | |
52 | true; \ | |
53 | else \ | |
54 | false; \ | |
55 | fi; \ | |
56 | } | |
47 | 57 | am__make_running_with_option = \ |
48 | 58 | case $${target_option-} in \ |
49 | 59 | ?) ;; \ |
108 | 118 | host_triplet = @host@ |
109 | 119 | check_PROGRAMS = selftest$(EXEEXT) |
110 | 120 | subdir = tests |
111 | DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ | |
112 | $(top_srcdir)/build-aux/depcomp \ | |
113 | $(top_srcdir)/build-aux/test-driver | |
114 | 121 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
115 | 122 | am__aclocal_m4_deps = $(top_srcdir)/m4/ld-version-script.m4 \ |
116 | 123 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ |
121 | 128 | $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac |
122 | 129 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
123 | 130 | $(ACLOCAL_M4) |
131 | DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) | |
124 | 132 | mkinstalldirs = $(install_sh) -d |
125 | 133 | CONFIG_CLEAN_FILES = |
126 | 134 | CONFIG_CLEAN_VPATH_FILES = |
396 | 404 | TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver |
397 | 405 | TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ |
398 | 406 | $(TEST_LOG_FLAGS) |
407 | am__DIST_COMMON = $(srcdir)/Makefile.in \ | |
408 | $(top_srcdir)/build-aux/depcomp \ | |
409 | $(top_srcdir)/build-aux/test-driver | |
399 | 410 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
400 | 411 | ACLOCAL = @ACLOCAL@ |
401 | 412 | AMTAR = @AMTAR@ |
424 | 435 | EXEEXT = @EXEEXT@ |
425 | 436 | FGREP = @FGREP@ |
426 | 437 | GREP = @GREP@ |
438 | HELP2ADOC = @HELP2ADOC@ | |
427 | 439 | HELP2MAN = @HELP2MAN@ |
428 | 440 | INSTALL = @INSTALL@ |
429 | 441 | INSTALL_DATA = @INSTALL_DATA@ |
549 | 561 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ |
550 | 562 | $(am__cd) $(top_srcdir) && \ |
551 | 563 | $(AUTOMAKE) --gnu tests/Makefile |
552 | .PRECIOUS: Makefile | |
553 | 564 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
554 | 565 | @case '$?' in \ |
555 | 566 | *config.status*) \ |
698 | 709 | if test -n "$$am__remaking_logs"; then \ |
699 | 710 | echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ |
700 | 711 | "recursion detected" >&2; \ |
701 | else \ | |
712 | elif test -n "$$redo_logs"; then \ | |
702 | 713 | am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ |
703 | 714 | fi; \ |
704 | 715 | if $(am__make_dryrun); then :; else \ |
987 | 998 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ |
988 | 999 | recheck tags tags-am uninstall uninstall-am |
989 | 1000 | |
1001 | .PRECIOUS: Makefile | |
1002 | ||
990 | 1003 | |
991 | 1004 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
992 | 1005 | # Otherwise a system limit (for SysV at least) may be exceeded. |
52 | 52 | " \"http://api.yubico.com/wsapi/verify\"\n" |
53 | 53 | " --ca CADIR Path to directory containing Certificate Authoritity,\n" |
54 | 54 | " e.g., \"/usr/local/etc/CERTS\"\n" |
55 | " --cai CAFILE Path to a file holding one or more certificated to\n" | |
56 | " verify the peer with\n" | |
55 | 57 | " --apikey Key API key for HMAC validation of request/response\n" |
58 | " --proxy ip:port Connect to validation service through a proxy,\n" | |
59 | " e.g., \"socks5h://user:pass@127.0.0.1:1080\"\n" | |
56 | 60 | "\n" |
57 | 61 | "Exit status is 0 on success, 1 if there is a hard failure, 2 if the\n" |
58 | 62 | "OTP was replayed, 3 for other soft OTP-related failures.\n" |
63 | 67 | {"ca", 1, 0, 'c'}, |
64 | 68 | {"cai", 1, 0, 'i'}, |
65 | 69 | {"apikey", 1, 0, 'a'}, |
70 | {"proxy", 1, 0, 'p'}, | |
66 | 71 | {"debug", 0, 0, 'd'}, |
67 | 72 | {"help", 0, 0, 'h'}, |
68 | 73 | {"version", 0, 0, 'V'}, |
73 | 78 | static void |
74 | 79 | parse_args (int argc, char *argv[], |
75 | 80 | unsigned int *client_id, char **token, char **url, char **ca, |
76 | char **cai, char **api_key, int *debug) | |
81 | char **cai, char **api_key, char **proxy, int *debug) | |
77 | 82 | { |
78 | 83 | while (1) |
79 | 84 | { |
130 | 135 | *cai = optarg; |
131 | 136 | break; |
132 | 137 | |
138 | case 'p': | |
139 | if (strlen(optarg) < 1) | |
140 | { | |
141 | fprintf (stderr, "error: must give a valid proxy [scheme]://ip:port"); | |
142 | exit (EXIT_FAILURE); | |
143 | } | |
144 | *proxy = optarg; | |
145 | break; | |
146 | ||
133 | 147 | case 'h': |
134 | 148 | printf ("%s", usage); |
135 | 149 | exit (EXIT_SUCCESS); |
171 | 185 | main (int argc, char *argv[]) |
172 | 186 | { |
173 | 187 | unsigned int client_id; |
174 | char *token, *url = NULL, *ca = NULL, *api_key = NULL, *cai = NULL; | |
188 | char *token, *url = NULL, *ca = NULL, *api_key = NULL, *cai = NULL, *proxy = NULL; | |
175 | 189 | int debug = 0; |
176 | 190 | ykclient_rc ret; |
177 | 191 | ykclient_t *ykc = NULL; |
178 | 192 | |
179 | parse_args (argc, argv, &client_id, &token, &url, &ca, &cai, &api_key, | |
193 | parse_args (argc, argv, &client_id, &token, &url, &ca, &cai, &api_key, &proxy, | |
180 | 194 | &debug); |
181 | 195 | |
182 | if (ca || cai) | |
183 | { | |
184 | ret = ykclient_init (&ykc); | |
185 | if (ret != YKCLIENT_OK) | |
186 | return EXIT_FAILURE; | |
187 | } | |
196 | ret = ykclient_init (&ykc); | |
197 | if (ret != YKCLIENT_OK) | |
198 | return EXIT_FAILURE; | |
188 | 199 | |
189 | 200 | if (ca) |
190 | 201 | { |
194 | 205 | if (cai) |
195 | 206 | { |
196 | 207 | ykclient_set_ca_info (ykc, cai); |
208 | } | |
209 | if (proxy) | |
210 | { | |
211 | ykclient_set_proxy (ykc, proxy); | |
197 | 212 | } |
198 | 213 | |
199 | 214 | if (debug) |
209 | 224 | fprintf (stderr, " token: %s\n", token); |
210 | 225 | if (api_key != NULL) |
211 | 226 | fprintf (stderr, " api key: %s\n", api_key); |
227 | if (proxy != NULL) | |
228 | fprintf (stderr, "Using proxy: %s\n", proxy); | |
212 | 229 | } |
213 | 230 | |
214 | 231 | ret = ykclient_verify_otp_v2 (ykc, token, client_id, NULL, 1, |
215 | 232 | (const char **) &url, api_key); |
216 | 233 | |
217 | 234 | if (debug) |
218 | printf ("Verification output (%d): %s\n", ret, ykclient_strerror (ret)); | |
235 | { | |
236 | const ykclient_server_response_t *srv_response = ykclient_get_server_response (ykc); | |
237 | printf ("Response from: %s\n", ykclient_get_last_url (ykc)); | |
238 | printf ("Verification output (%d): %s\n", ret, ykclient_strerror (ret)); | |
239 | printf (" otp: %s\n", ykclient_server_response_get (srv_response, "otp")); | |
240 | printf (" nonce: %s\n", ykclient_server_response_get (srv_response, "nonce")); | |
241 | printf (" t: %s\n", ykclient_server_response_get (srv_response, "t")); | |
242 | printf (" timestamp: %s\n", ykclient_server_response_get (srv_response, "timestamp")); | |
243 | printf (" sessioncounter: %s\n", ykclient_server_response_get (srv_response, "sessioncounter")); | |
244 | printf (" sessionuse: %s\n", ykclient_server_response_get (srv_response, "sessionuse")); | |
245 | printf (" sl: %s\n", ykclient_server_response_get (srv_response, "sl")); | |
246 | printf (" status: %s\n", ykclient_server_response_get (srv_response, "status")); | |
247 | } | |
248 | ||
249 | ykclient_done(&ykc); | |
219 | 250 | |
220 | 251 | if (ret == YKCLIENT_REPLAYED_OTP) |
221 | 252 | return 2; |
0 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1. | |
1 | .TH YKCLIENT "1" "March 2015" "ykclient 2.14" "User Commands" | |
0 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.2. | |
1 | .TH YKCLIENT "1" "November 2015" "ykclient 2.15" "User Commands" | |
2 | 2 | .SH NAME |
3 | 3 | ykclient \- YubiCloud One-Time-Password Validation Client |
4 | 4 | .SH SYNOPSIS |
5 | 5 | .B ykclient |
6 | [\fIOPTION\fR]... \fICLIENTID YUBIKEYOTP\fR | |
6 | [\fI\,OPTION\/\fR]... \fI\,CLIENTID YUBIKEYOTP\/\fR | |
7 | 7 | .SH DESCRIPTION |
8 | 8 | Validate the YUBIKEYOTP one\-time\-password against the YubiCloud |
9 | 9 | using CLIENTID as the client identifier. |
27 | 27 | Path to directory containing Certificate Authoritity, |
28 | 28 | e.g., "/usr/local/etc/CERTS" |
29 | 29 | .TP |
30 | \fB\-\-cai\fR CAFILE | |
31 | Path to a file holding one or more certificated to | |
32 | verify the peer with | |
33 | .TP | |
30 | 34 | \fB\-\-apikey\fR Key |
31 | 35 | API key for HMAC validation of request/response |
36 | .TP | |
37 | \fB\-\-proxy\fR ip:port | |
38 | Connect to validation service through a proxy, | |
39 | e.g., "socks5h://user:pass@127.0.0.1:1080" | |
32 | 40 | .PP |
33 | 41 | Exit status is 0 on success, 1 if there is a hard failure, 2 if the |
34 | 42 | OTP was replayed, 3 for other soft OTP\-related failures. |
51 | 51 | #define ADD_OTP "&otp=" |
52 | 52 | #define ADD_HASH "&h=" |
53 | 53 | #define ADD_ID "?id=" |
54 | #define ADD_TS "×tamp=1" | |
54 | 55 | |
55 | 56 | #define TEMPLATE_FORMAT_OLD 1 |
56 | 57 | #define TEMPLATE_FORMAT_NEW 2 |
59 | 60 | { |
60 | 61 | const char *ca_path; |
61 | 62 | const char *ca_info; |
63 | const char *proxy; | |
62 | 64 | size_t num_templates; |
63 | 65 | char **url_templates; |
64 | 66 | int template_format; |
70 | 72 | char *nonce; |
71 | 73 | char nonce_supplied; |
72 | 74 | int verify_signature; |
75 | ykclient_server_response_t *srv_response; | |
73 | 76 | }; |
74 | 77 | |
75 | 78 | struct curl_data |
151 | 154 | |
152 | 155 | p->ca_path = NULL; |
153 | 156 | p->ca_info = NULL; |
157 | p->proxy = NULL; | |
154 | 158 | |
155 | 159 | p->key = NULL; |
156 | 160 | p->keylen = 0; |
160 | 164 | |
161 | 165 | p->nonce = NULL; |
162 | 166 | p->nonce_supplied = 0; |
167 | ||
168 | p->srv_response = NULL; | |
163 | 169 | |
164 | 170 | /* |
165 | 171 | * Verification of server signature can only be done if there is |
201 | 207 | free ((*ykc)->url_templates); |
202 | 208 | } |
203 | 209 | |
210 | if ((*ykc)->srv_response) | |
211 | { | |
212 | ykclient_server_response_free((*ykc)->srv_response); | |
213 | } | |
214 | ||
204 | 215 | free ((*ykc)->key_buf); |
205 | 216 | free (*ykc); |
206 | 217 | } |
319 | 330 | curl_easy_setopt (easy, CURLOPT_CAINFO, ykc->ca_info); |
320 | 331 | } |
321 | 332 | |
333 | if (ykc->proxy) | |
334 | { | |
335 | /* | |
336 | * The proxy string may be prefixed with [scheme]://ip:port to specify which kind of proxy is used. | |
337 | * Valid choices are: socks4://, socks4a://, socks5:// or socks5h:// | |
338 | * Use socks5h to ask the proxy to do the dns resolving. | |
339 | * If no scheme or port is specified HTTP proxy port 1080 will be used. | |
340 | */ | |
341 | curl_easy_setopt (easy, CURLOPT_PROXY, ykc->proxy); | |
342 | } | |
343 | ||
322 | 344 | curl_easy_setopt (easy, CURLOPT_WRITEDATA, (void *) data); |
323 | 345 | curl_easy_setopt (easy, CURLOPT_PRIVATE, (void *) data); |
324 | 346 | curl_easy_setopt (easy, CURLOPT_WRITEFUNCTION, curl_callback); |
327 | 349 | curl_multi_add_handle (p->multi, easy); |
328 | 350 | p->easy[p->num_easy] = easy; |
329 | 351 | } |
352 | ||
353 | if(p->num_easy == 0) { | |
354 | ykclient_handle_done (&p); | |
355 | return YKCLIENT_BAD_INPUT; | |
356 | } | |
330 | 357 | |
331 | 358 | /* Take this opportunity to allocate the array for expanded URLs */ |
332 | 359 | p->url_exp = malloc (sizeof (char *) * p->num_easy); |
561 | 588 | ykc->ca_info = ca_info; |
562 | 589 | } |
563 | 590 | |
591 | /** Set the proxy | |
592 | * | |
593 | * Must be called before creating handles. | |
594 | */ | |
595 | void | |
596 | ykclient_set_proxy (ykclient_t * ykc, const char *proxy) | |
597 | { | |
598 | ykc->proxy = proxy; | |
599 | } | |
600 | ||
601 | ||
564 | 602 | /** Set a single URL template |
565 | 603 | * |
566 | 604 | * @param ykc Yubikey client configuration. |
837 | 875 | { |
838 | 876 | size_t len = |
839 | 877 | strlen (template) + strlen (encoded_otp) + strlen (ADD_OTP) + |
840 | strlen (ADD_ID) + 1; | |
878 | strlen (ADD_ID) + strlen(ADD_TS) + 1; | |
841 | 879 | len += snprintf (NULL, 0, "%d", client_id); |
842 | 880 | |
843 | 881 | if (nonce) |
853 | 891 | |
854 | 892 | if (nonce) |
855 | 893 | { |
856 | snprintf (*url_exp, len, "%s" ADD_ID "%d" ADD_NONCE "%s" ADD_OTP "%s", | |
894 | snprintf (*url_exp, len, "%s" ADD_ID "%d" ADD_NONCE "%s" ADD_OTP "%s" ADD_TS, | |
857 | 895 | template, client_id, nonce, encoded_otp); |
858 | 896 | } |
859 | 897 | else |
860 | 898 | { |
861 | snprintf (*url_exp, len, "%s" ADD_ID "%d" ADD_OTP "%s", template, | |
899 | snprintf (*url_exp, len, "%s" ADD_ID "%d" ADD_OTP "%s" ADD_TS, template, | |
862 | 900 | client_id, encoded_otp); |
863 | 901 | } |
864 | 902 | return YKCLIENT_OK; |
1161 | 1199 | { |
1162 | 1200 | ykclient_rc out = YKCLIENT_OK; |
1163 | 1201 | int requests; |
1164 | ykclient_server_response_t *srv_response = NULL; | |
1165 | 1202 | |
1166 | 1203 | if (!ykc->num_templates) |
1167 | 1204 | { |
1267 | 1304 | curl_easy_getinfo (curl_easy, CURLINFO_EFFECTIVE_URL, &url_used); |
1268 | 1305 | strncpy (ykc->last_url, url_used, sizeof (ykc->last_url)); |
1269 | 1306 | |
1270 | srv_response = ykclient_server_response_init (); | |
1271 | if (srv_response == NULL) | |
1307 | if(ykc->srv_response) | |
1308 | { | |
1309 | ykclient_server_response_free (ykc->srv_response); | |
1310 | } | |
1311 | ||
1312 | ykc->srv_response = ykclient_server_response_init (); | |
1313 | if (ykc->srv_response == NULL) | |
1272 | 1314 | { |
1273 | 1315 | out = YKCLIENT_PARSE_ERROR; |
1274 | 1316 | goto finish; |
1275 | 1317 | } |
1276 | 1318 | |
1277 | 1319 | out = ykclient_server_response_parse (data->curl_chunk, |
1278 | srv_response); | |
1320 | ykc->srv_response); | |
1279 | 1321 | if (out != YKCLIENT_OK) |
1280 | 1322 | { |
1281 | 1323 | goto finish; |
1282 | 1324 | } |
1283 | 1325 | |
1284 | 1326 | if (ykc->verify_signature != 0 && |
1285 | ykclient_server_response_verify_signature (srv_response, | |
1327 | ykclient_server_response_verify_signature (ykc->srv_response, | |
1286 | 1328 | ykc->key, |
1287 | 1329 | ykc->keylen)) |
1288 | 1330 | { |
1290 | 1332 | goto finish; |
1291 | 1333 | } |
1292 | 1334 | |
1293 | status = ykclient_server_response_get (srv_response, "status"); | |
1335 | status = ykclient_server_response_get (ykc->srv_response, "status"); | |
1294 | 1336 | if (!status) |
1295 | 1337 | { |
1296 | 1338 | out = YKCLIENT_PARSE_ERROR; |
1313 | 1355 | if (nonce) |
1314 | 1356 | { |
1315 | 1357 | char *server_nonce = |
1316 | ykclient_server_response_get (srv_response, | |
1358 | ykclient_server_response_get (ykc->srv_response, | |
1317 | 1359 | "nonce"); |
1318 | 1360 | if (server_nonce == NULL || strcmp (nonce, server_nonce)) |
1319 | 1361 | { |
1322 | 1364 | } |
1323 | 1365 | } |
1324 | 1366 | |
1325 | server_otp = ykclient_server_response_get (srv_response, "otp"); | |
1367 | server_otp = ykclient_server_response_get (ykc->srv_response, "otp"); | |
1326 | 1368 | if (server_otp == NULL || strcmp (yubikey, server_otp)) |
1327 | 1369 | { |
1328 | 1370 | out = YKCLIENT_HMAC_ERROR; |
1336 | 1378 | goto finish; |
1337 | 1379 | } |
1338 | 1380 | |
1339 | ykclient_server_response_free (srv_response); | |
1340 | srv_response = NULL; | |
1381 | ykclient_server_response_free (ykc->srv_response); | |
1382 | ykc->srv_response = NULL; | |
1341 | 1383 | } |
1342 | 1384 | } |
1343 | 1385 | while (requests); |
1344 | 1386 | finish: |
1345 | if (srv_response) | |
1346 | { | |
1347 | ykclient_server_response_free (srv_response); | |
1348 | } | |
1349 | ||
1350 | 1387 | return out; |
1351 | 1388 | } |
1352 | 1389 | |
1505 | 1542 | yubikey_otp, |
1506 | 1543 | client_id, hexkey, 0, NULL, NULL); |
1507 | 1544 | } |
1545 | ||
1546 | /** | |
1547 | * Fetch out server response of last query | |
1548 | */ | |
1549 | const ykclient_server_response_t * | |
1550 | ykclient_get_server_response(ykclient_t *ykc) { | |
1551 | return ykc->srv_response; | |
1552 | } |
37 | 37 | |
38 | 38 | #include <ykclient_errors.h> |
39 | 39 | #include <ykclient_version.h> |
40 | #include <ykclient_server_response.h> | |
40 | 41 | |
41 | 42 | #ifdef __cplusplus |
42 | 43 | extern "C" |
95 | 96 | |
96 | 97 | extern void ykclient_set_ca_info (ykclient_t * ykc, const char *ca_info); |
97 | 98 | |
99 | extern void ykclient_set_proxy (ykclient_t * ykc, const char *proxy); | |
100 | ||
98 | 101 | /* |
99 | 102 | * Set the nonce. A default nonce is generated in ykclient_init(), but |
100 | 103 | * if you either want to specify your own nonce, or want to remove the |
128 | 131 | const char **urls, |
129 | 132 | const char *api_key); |
130 | 133 | |
134 | /* Fetch out the server response form the last query */ | |
135 | extern const ykclient_server_response_t *ykclient_get_server_response(ykclient_t *ykc); | |
131 | 136 | #ifdef __cplusplus |
132 | 137 | } |
133 | 138 | #endif |
41 | 41 | * version number. Used together with ykclient_check_version() to |
42 | 42 | * verify header file and run-time library consistency. |
43 | 43 | */ |
44 | #define YKCLIENT_VERSION_STRING "2.14" | |
44 | #define YKCLIENT_VERSION_STRING "2.15" | |
45 | 45 | |
46 | 46 | /** |
47 | 47 | * YKCLIENT_VERSION_NUMBER |
51 | 51 | * this symbol will have the value 0x01020300. The last two digits |
52 | 52 | * are only used between public releases, and will otherwise be 00. |
53 | 53 | */ |
54 | #define YKCLIENT_VERSION_NUMBER 0x020e00 | |
54 | #define YKCLIENT_VERSION_NUMBER 0x020f00 | |
55 | 55 | |
56 | 56 | /** |
57 | 57 | * YKCLIENT_VERSION_MAJOR |
69 | 69 | * level of the header file version number. For example, when the |
70 | 70 | * header version is 1.2.3 this symbol will be 2. |
71 | 71 | */ |
72 | #define YKCLIENT_VERSION_MINOR 14 | |
72 | #define YKCLIENT_VERSION_MINOR 15 | |
73 | 73 | |
74 | 74 | /** |
75 | 75 | * YKCLIENT_VERSION_PATCH |