diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-19 22:15:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-19 22:15:58 +0000 |
commit | 77d2929512ff62e421e9bfee659cc86973fc7df7 (patch) | |
tree | eaeaee2b6f7ef7498cc5aa12b340b11cb125638b /plugins/MirOTR/libgcrypt-1.4.6 | |
parent | 665935b0f99a4b9585f9afe9c9730931a3c94f85 (diff) |
files structure reorganization
git-svn-id: http://svn.miranda-ng.org/main/trunk@492 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/libgcrypt-1.4.6')
183 files changed, 18925 insertions, 21108 deletions
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/Makefile.am b/plugins/MirOTR/libgcrypt-1.4.6/cipher/Makefile.am new file mode 100644 index 0000000000..447043398e --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/Makefile.am @@ -0,0 +1,82 @@ +# Makefile for cipher modules +# Copyright (C) 1998, 1999, 2000, 2001, 2002, +# 2003, 2009 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see <http://www.gnu.org/licenses/>. + +# Process this file with automake to produce Makefile.in + +EXTRA_DIST = Manifest + +# Need to include ../src in addition to top_srcdir because gcrypt.h is +# a built header. +AM_CPPFLAGS = -I../src -I$(top_srcdir)/src +AM_CFLAGS = $(GPG_ERROR_CFLAGS) + + +noinst_LTLIBRARIES = libcipher.la + +GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@ + +libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES) +libcipher_la_LIBADD = $(GCRYPT_MODULES) + +libcipher_la_SOURCES = \ +cipher.c pubkey.c ac.c md.c \ +hmac-tests.c \ +bithelp.h \ +primegen.c \ +hash-common.c hash-common.h \ +rmd.h + +EXTRA_libcipher_la_SOURCES = \ +arcfour.c \ +blowfish.c \ +cast5.c \ +crc.c \ +des.c \ +dsa.c \ +elgamal.c \ +ecc.c \ +md4.c \ +md5.c \ +rijndael.c rijndael-tables.h \ +rmd160.c \ +rsa.c \ +seed.c \ +serpent.c \ +sha1.c \ +sha256.c \ +sha512.c \ +tiger.c \ +whirlpool.c \ +twofish.c \ +rfc2268.c \ +camellia.c camellia.h camellia-glue.c + +if ENABLE_O_FLAG_MUNGING +o_flag_munging = sed -e 's/-O[2-9s]*/-O1/g' +else +o_flag_munging = cat +endif + + +# We need to lower the optimization for this module. +tiger.o: $(srcdir)/tiger.c + `echo $(COMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` + +tiger.lo: $(srcdir)/tiger.c + `echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/Makefile.in b/plugins/MirOTR/libgcrypt-1.4.6/cipher/Makefile.in new file mode 100644 index 0000000000..d905cb8984 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/Makefile.in @@ -0,0 +1,572 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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 for cipher modules +# Copyright (C) 1998, 1999, 2000, 2001, 2002, +# 2003, 2009 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see <http://www.gnu.org/licenses/>. + +# Process this file with automake to produce Makefile.in + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = cipher +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \ + $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +am_libcipher_la_OBJECTS = cipher.lo pubkey.lo ac.lo md.lo \ + hmac-tests.lo primegen.lo hash-common.lo +libcipher_la_OBJECTS = $(am_libcipher_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libcipher_la_SOURCES) $(EXTRA_libcipher_la_SOURCES) +DIST_SOURCES = $(libcipher_la_SOURCES) $(EXTRA_libcipher_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@ +FFLAGS = @FFLAGS@ +GCRYPT_CIPHERS = @GCRYPT_CIPHERS@ +GCRYPT_DIGESTS = @GCRYPT_DIGESTS@ +GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@ +GCRYPT_RANDOM = @GCRYPT_RANDOM@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@ +LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@ +LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@ +LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@ +LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@ +LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@ +LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@ +LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@ +LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@ +LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_SFLAGS = @MPI_SFLAGS@ +NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@ +OBJDUMP = @OBJDUMP@ +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@ +PTH_CFLAGS = @PTH_CFLAGS@ +PTH_CONFIG = @PTH_CONFIG@ +PTH_LIBS = @PTH_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +VERSION = @VERSION@ +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@ +ac_ct_F77 = @ac_ct_F77@ +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@ +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@ +EXTRA_DIST = Manifest + +# Need to include ../src in addition to top_srcdir because gcrypt.h is +# a built header. +AM_CPPFLAGS = -I../src -I$(top_srcdir)/src +AM_CFLAGS = $(GPG_ERROR_CFLAGS) +noinst_LTLIBRARIES = libcipher.la +GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ @GCRYPT_DIGESTS@ +libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES) +libcipher_la_LIBADD = $(GCRYPT_MODULES) +libcipher_la_SOURCES = \ +cipher.c pubkey.c ac.c md.c \ +hmac-tests.c \ +bithelp.h \ +primegen.c \ +hash-common.c hash-common.h \ +rmd.h + +EXTRA_libcipher_la_SOURCES = \ +arcfour.c \ +blowfish.c \ +cast5.c \ +crc.c \ +des.c \ +dsa.c \ +elgamal.c \ +ecc.c \ +md4.c \ +md5.c \ +rijndael.c rijndael-tables.h \ +rmd160.c \ +rsa.c \ +seed.c \ +serpent.c \ +sha1.c \ +sha256.c \ +sha512.c \ +tiger.c \ +whirlpool.c \ +twofish.c \ +rfc2268.c \ +camellia.c camellia.h camellia-glue.c + +@ENABLE_O_FLAG_MUNGING_FALSE@o_flag_munging = cat +@ENABLE_O_FLAG_MUNGING_TRUE@o_flag_munging = sed -e 's/-O[2-9s]*/-O1/g' +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .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 cipher/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu cipher/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @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 + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libcipher.la: $(libcipher_la_OBJECTS) $(libcipher_la_DEPENDENCIES) + $(LINK) $(libcipher_la_OBJECTS) $(libcipher_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arcfour.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blowfish.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camellia-glue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camellia.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cast5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/des.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elgamal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac-tests.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primegen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pubkey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc2268.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rijndael.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmd160.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serpent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twofish.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/whirlpool.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +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 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# We need to lower the optimization for this module. +tiger.o: $(srcdir)/tiger.c + `echo $(COMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` + +tiger.lo: $(srcdir)/tiger.c + `echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` +# 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/plugins/MirOTR/libgcrypt-1.4.6/cipher/arcfour.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/arcfour.c index eab52a4714..6bb0555c60 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/arcfour.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/arcfour.c @@ -84,13 +84,13 @@ do_arcfour_setkey (void *context, const byte *key, unsigned int keylen) { initialized = 1; selftest_failed = selftest(); - if ( selftest_failed ) + if( selftest_failed ) log_error ("ARCFOUR selftest failed (%s)\n", selftest_failed ); } - if ( selftest_failed ) + if( selftest_failed ) return GPG_ERR_SELFTEST_FAILED; - if ( keylen < 40/8 ) /* we want at least 40 bits */ + if( keylen < 40/8 ) /* we want at least 40 bits */ return GPG_ERR_INV_KEYLEN; ctx->idx_i = ctx->idx_j = 0; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/blowfish.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/blowfish.c index de89b59271..6ef68e371d 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/blowfish.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/blowfish.c @@ -475,18 +475,18 @@ selftest(void) bf_setkey( (void *) &c, (const unsigned char*)"abcdefghijklmnopqrstuvwxyz", 26 ); encrypt_block( (void *) &c, buffer, plain ); - if ( memcmp( buffer, "\x32\x4E\xD0\xFE\xF4\x13\xA2\x03", 8 ) ) + if( memcmp( buffer, "\x32\x4E\xD0\xFE\xF4\x13\xA2\x03", 8 ) ) return "Blowfish selftest failed (1)."; decrypt_block( (void *) &c, buffer, buffer ); - if ( memcmp( buffer, plain, 8 ) ) + if( memcmp( buffer, plain, 8 ) ) return "Blowfish selftest failed (2)."; bf_setkey( (void *) &c, key3, 8 ); encrypt_block( (void *) &c, buffer, plain3 ); - if ( memcmp( buffer, cipher3, 8 ) ) + if( memcmp( buffer, cipher3, 8 ) ) return "Blowfish selftest failed (3)."; decrypt_block( (void *) &c, buffer, buffer ); - if ( memcmp( buffer, plain3, 8 ) ) + if( memcmp( buffer, plain3, 8 ) ) return "Blowfish selftest failed (4)."; return NULL; } @@ -501,14 +501,14 @@ do_bf_setkey (BLOWFISH_context *c, const byte *key, unsigned keylen) static int initialized; static const char *selftest_failed; - if ( !initialized ) + if( !initialized ) { initialized = 1; selftest_failed = selftest(); - if ( selftest_failed ) + if( selftest_failed ) log_error ("%s\n", selftest_failed ); } - if ( selftest_failed ) + if( selftest_failed ) return GPG_ERR_SELFTEST_FAILED; for(i=0; i < BLOWFISH_ROUNDS+2; i++ ) @@ -575,9 +575,9 @@ do_bf_setkey (BLOWFISH_context *c, const byte *key, unsigned keylen) the P-array (here c) occurs more than once per table. */ for(i=0; i < 255; i++ ) { - for ( j=i+1; j < 256; j++) + for( j=i+1; j < 256; j++) { - if ( (c->s0[i] == c->s0[j]) || (c->s1[i] == c->s1[j]) || + if( (c->s0[i] == c->s0[j]) || (c->s1[i] == c->s1[j]) || (c->s2[i] == c->s2[j]) || (c->s3[i] == c->s3[j]) ) return GPG_ERR_WEAK_KEY; } diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/camellia-glue.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/camellia-glue.c index 99174c55f1..067af85bca 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/camellia-glue.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/camellia-glue.c @@ -81,7 +81,7 @@ camellia_setkey(void *c, const byte *key, unsigned keylen) if(keylen!=16 && keylen!=24 && keylen!=32) return GPG_ERR_INV_KEYLEN; - if (!initialized) + if(!initialized) { initialized=1; selftest_failed=selftest(); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/cast5.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/cast5.c index a532acfd4d..333d55e91f 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/cast5.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/cast5.c @@ -476,10 +476,10 @@ selftest(void) cast_setkey( &c, key, 16 ); encrypt_block( &c, buffer, plain ); - if ( memcmp( buffer, cipher, 8 ) ) + if( memcmp( buffer, cipher, 8 ) ) return "1"; decrypt_block( &c, buffer, buffer ); - if ( memcmp( buffer, plain, 8 ) ) + if( memcmp( buffer, plain, 8 ) ) return "2"; #if 0 /* full maintenance test */ @@ -502,7 +502,7 @@ selftest(void) encrypt_block( &c, b0, b0 ); encrypt_block( &c, b0+8, b0+8 ); } - if ( memcmp( a0, a1, 16 ) || memcmp( b0, b1, 16 ) ) + if( memcmp( a0, a1, 16 ) || memcmp( b0, b1, 16 ) ) return "3"; } @@ -569,17 +569,17 @@ do_cast_setkey( CAST5_context *c, const byte *key, unsigned keylen ) u32 z[4]; u32 k[16]; - if ( !initialized ) + if( !initialized ) { initialized = 1; selftest_failed = selftest(); - if ( selftest_failed ) + if( selftest_failed ) log_error ("CAST5 selftest failed (%s).\n", selftest_failed ); } - if ( selftest_failed ) + if( selftest_failed ) return GPG_ERR_SELFTEST_FAILED; - if ( keylen != 16 ) + if( keylen != 16 ) return GPG_ERR_INV_KEYLEN; x[0] = key[0] << 24 | key[1] << 16 | key[2] << 8 | key[3]; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/cipher.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/cipher.c index 7594ee593a..8cfe54fce1 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/cipher.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/cipher.c @@ -1294,7 +1294,7 @@ do_ofb_encrypt( gcry_cipher_hd_t c, return; } - if ( c->unused ) + if( c->unused ) { nbytes -= c->unused; for(ivp=c->u_iv.iv+blocksize - c->unused; c->unused; c->unused-- ) @@ -1331,7 +1331,7 @@ do_ofb_decrypt( gcry_cipher_hd_t c, byte *ivp; size_t blocksize = c->cipher->blocksize; - if ( nbytes <= c->unused ) + if( nbytes <= c->unused ) { /* Short enough to be encoded by the remaining XOR mask. */ for (ivp=c->u_iv.iv+blocksize - c->unused; nbytes; nbytes--,c->unused--) @@ -1874,7 +1874,7 @@ gcry_cipher_ctl( gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen) case GCRYCTL_DISABLE_ALGO: /* This command expects NULL for H and BUFFER to point to an integer with the algo number. */ - if ( h || !buffer || buflen != sizeof(int) ) + if( h || !buffer || buflen != sizeof(int) ) return gcry_error (GPG_ERR_CIPHER_ALGO); disable_cipher_algo( *(int*)buffer ); break; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/des.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/des.c index 3dfd27812e..f91df77713 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/des.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/des.c @@ -129,8 +129,8 @@ static int working_memcmp( const char *a, const char *b, size_t n ) { - for ( ; n; n--, a++, b++ ) - if ( *a != *b ) + for( ; n; n--, a++, b++ ) + if( *a != *b ) return (int)(*(byte*)a) - (int)(*(byte*)b); return 0; } @@ -1012,7 +1012,7 @@ do_tripledes_setkey ( void *context, const byte *key, unsigned keylen ) { struct _tripledes_ctx *ctx = (struct _tripledes_ctx *) context; - if ( keylen != 24 ) + if( keylen != 24 ) return GPG_ERR_INV_KEYLEN; tripledes_set3keys ( ctx, key, key+8, key+16); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/dsa.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/dsa.c index 24e07b59ab..ceb94965c5 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/dsa.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/dsa.c @@ -145,7 +145,7 @@ gen_k( gcry_mpi_t q ) log_debug("choosing a random k "); for (;;) { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('.'); if ( !rndbuf || nbits < 32 ) @@ -171,22 +171,22 @@ gen_k( gcry_mpi_t q ) mpi_clear_bit( k, nbits-1 ); } - if ( !(mpi_cmp( k, q ) < 0) ) /* check: k < q */ + if( !(mpi_cmp( k, q ) < 0) ) /* check: k < q */ { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('+'); continue; /* no */ } - if ( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */ + if( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */ { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('-'); continue; /* no */ } break; /* okay */ } gcry_free(rndbuf); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('\n'); return k; @@ -332,9 +332,9 @@ generate (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits, rndbuf = NULL; do { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('.'); - if ( !rndbuf ) + if( !rndbuf ) rndbuf = gcry_random_bytes_secure ((qbits+7)/8, random_level); else { /* Change only some of the higher bits (= 2 bytes)*/ @@ -355,7 +355,7 @@ generate (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits, y = mpi_alloc( mpi_get_nlimbs(p) ); gcry_mpi_powm( y, g, x, p ); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) { progress('\n'); log_mpidump("dsa p", p ); @@ -508,7 +508,7 @@ generate_fips186 (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits, value_x = gcry_mpi_snew (qbits); do { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('.'); gcry_mpi_randomize (value_x, qbits, GCRY_VERY_STRONG_RANDOM); mpi_clear_highbit (value_x, qbits+1); @@ -634,9 +634,9 @@ verify (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t hash, DSA_public_key *pkey ) gcry_mpi_t base[3]; gcry_mpi_t ex[3]; - if ( !(mpi_cmp_ui( r, 0 ) > 0 && mpi_cmp( r, pkey->q ) < 0) ) + if( !(mpi_cmp_ui( r, 0 ) > 0 && mpi_cmp( r, pkey->q ) < 0) ) return 0; /* assertion 0 < r < q failed */ - if ( !(mpi_cmp_ui( s, 0 ) > 0 && mpi_cmp( s, pkey->q ) < 0) ) + if( !(mpi_cmp_ui( s, 0 ) > 0 && mpi_cmp( s, pkey->q ) < 0) ) return 0; /* assertion 0 < s < q failed */ w = mpi_alloc( mpi_get_nlimbs(pkey->q) ); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/ecc.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/ecc.c index fec7e86ee6..fcbd8e3a9d 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/ecc.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/ecc.c @@ -760,9 +760,9 @@ verify (gcry_mpi_t input, ECC_public_key *pkey, gcry_mpi_t r, gcry_mpi_t s) mpi_point_t Q, Q1, Q2; mpi_ec_t ctx; - if ( !(mpi_cmp_ui (r, 0) > 0 && mpi_cmp (r, pkey->E.n) < 0) ) + if( !(mpi_cmp_ui (r, 0) > 0 && mpi_cmp (r, pkey->E.n) < 0) ) return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < r < n failed. */ - if ( !(mpi_cmp_ui (s, 0) > 0 && mpi_cmp (s, pkey->E.n) < 0) ) + if( !(mpi_cmp_ui (s, 0) > 0 && mpi_cmp (s, pkey->E.n) < 0) ) return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < s < n failed. */ h = mpi_alloc (0); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/elgamal.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/elgamal.c index 776d7a52c2..0b0c07cb4b 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/elgamal.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/elgamal.c @@ -117,7 +117,7 @@ wiener_map( unsigned int n ) for(i=0; t[i].p_n; i++ ) { - if ( n <= t[i].p_n ) + if( n <= t[i].p_n ) return t[i].q_n; } /* Not in table - use an arbitrary high number. */ @@ -188,7 +188,7 @@ gen_k( gcry_mpi_t p, int small_k ) * it greatly improves the encryption performance. We use * Wiener's table and add a large safety margin. */ nbits = wiener_map( orig_nbits ) * 3 / 2; - if ( nbits >= orig_nbits ) + if( nbits >= orig_nbits ) BUG(); } else @@ -196,12 +196,12 @@ gen_k( gcry_mpi_t p, int small_k ) nbytes = (nbits+7)/8; - if ( DBG_CIPHER ) + if( DBG_CIPHER ) log_debug("choosing a random k "); mpi_sub_ui( p_1, p, 1); - for (;;) + for(;;) { - if ( !rndbuf || nbits < 32 ) + if( !rndbuf || nbits < 32 ) { gcry_free(rndbuf); rndbuf = gcry_random_bytes_secure( nbytes, GCRY_STRONG_RANDOM ); @@ -219,30 +219,30 @@ gen_k( gcry_mpi_t p, int small_k ) } _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 ); - for (;;) + for(;;) { - if ( !(mpi_cmp( k, p_1 ) < 0) ) /* check: k < (p-1) */ + if( !(mpi_cmp( k, p_1 ) < 0) ) /* check: k < (p-1) */ { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('+'); break; /* no */ } - if ( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */ + if( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */ { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('-'); break; /* no */ } if (gcry_mpi_gcd( temp, k, p_1 )) goto found; /* okay, k is relative prime to (p-1) */ mpi_add_ui( k, k, 1 ); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('.'); } } found: gcry_free(rndbuf); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('\n'); mpi_free(p_1); mpi_free(temp); @@ -269,7 +269,7 @@ generate ( ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t **ret_factors ) p_min1 = gcry_mpi_new ( nbits ); qbits = wiener_map( nbits ); - if ( qbits & 1 ) /* better have a even one */ + if( qbits & 1 ) /* better have a even one */ qbits++; g = mpi_alloc(1); p = _gcry_generate_elg_prime( 0, nbits, qbits, g, ret_factors ); @@ -288,19 +288,19 @@ generate ( ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t **ret_factors ) * will be much faster with such an x. */ xbits = qbits * 3 / 2; - if ( xbits >= nbits ) + if( xbits >= nbits ) BUG(); x = gcry_mpi_snew ( xbits ); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) log_debug("choosing a random x of size %u", xbits ); rndbuf = NULL; do { - if ( DBG_CIPHER ) + if( DBG_CIPHER ) progress('.'); - if ( rndbuf ) + if( rndbuf ) { /* Change only some of the higher bits */ - if ( xbits < 16 ) /* should never happen ... */ + if( xbits < 16 ) /* should never happen ... */ { gcry_free(rndbuf); rndbuf = gcry_random_bytes_secure( (xbits+7)/8, @@ -328,7 +328,7 @@ generate ( ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t **ret_factors ) y = gcry_mpi_new (nbits); gcry_mpi_powm( y, g, x, p ); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) { progress('\n'); log_mpidump("elg p= ", p ); @@ -467,7 +467,7 @@ do_encrypt(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey ) gcry_mpi_powm( b, pkey->y, k, pkey->p ); gcry_mpi_mulm( b, b, input, pkey->p ); #if 0 - if ( DBG_CIPHER ) + if( DBG_CIPHER ) { log_mpidump("elg encrypted y= ", pkey->y); log_mpidump("elg encrypted p= ", pkey->p); @@ -493,7 +493,7 @@ decrypt(gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b, ELG_secret_key *skey ) mpi_invm( t1, t1, skey->p ); mpi_mulm( output, b, t1, skey->p ); #if 0 - if ( DBG_CIPHER ) + if( DBG_CIPHER ) { log_mpidump("elg decrypted x= ", skey->x); log_mpidump("elg decrypted p= ", skey->p); @@ -533,7 +533,7 @@ sign(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_secret_key *skey ) mpi_mulm(b, t, inv, p_1 ); #if 0 - if ( DBG_CIPHER ) + if( DBG_CIPHER ) { log_mpidump("elg sign p= ", skey->p); log_mpidump("elg sign g= ", skey->g); @@ -564,7 +564,7 @@ verify(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey ) gcry_mpi_t base[4]; gcry_mpi_t ex[4]; - if ( !(mpi_cmp_ui( a, 0 ) > 0 && mpi_cmp( a, pkey->p ) < 0) ) + if( !(mpi_cmp_ui( a, 0 ) > 0 && mpi_cmp( a, pkey->p ) < 0) ) return 0; /* assertion 0 < a < p failed */ t1 = mpi_alloc( mpi_get_nlimbs(a) ); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/md4.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/md4.c index ce277fa4f5..680cf87f5d 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/md4.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/md4.c @@ -197,22 +197,22 @@ md4_write ( void *context, const void *inbuf_arg, size_t inlen) const unsigned char *inbuf = inbuf_arg; MD4_CONTEXT *hd = context; - if ( hd->count == 64 ) /* flush the buffer */ + if( hd->count == 64 ) /* flush the buffer */ { transform( hd, hd->buf ); _gcry_burn_stack (80+6*sizeof(void*)); hd->count = 0; hd->nblocks++; } - if ( !inbuf ) + if( !inbuf ) return; - if ( hd->count ) + if( hd->count ) { - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; md4_write( hd, NULL, 0 ); - if ( !inlen ) + if( !inlen ) return; } _gcry_burn_stack (80+6*sizeof(void*)); @@ -225,7 +225,7 @@ md4_write ( void *context, const void *inbuf_arg, size_t inlen) inlen -= 64; inbuf += 64; } - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; } @@ -252,7 +252,7 @@ md4_final( void *context ) msb = t >> 26; /* add the count */ t = lsb; - if ( (lsb += hd->count) < t ) + if( (lsb += hd->count) < t ) msb++; /* multiply by 8 to make a bit count */ t = lsb; @@ -260,7 +260,7 @@ md4_final( void *context ) msb <<= 3; msb |= t >> 29; - if ( hd->count < 56 ) /* enough room */ + if( hd->count < 56 ) /* enough room */ { hd->buf[hd->count++] = 0x80; /* pad */ while( hd->count < 56 ) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/md5.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/md5.c index d57a6b7838..899dce89ad 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/md5.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/md5.c @@ -222,22 +222,22 @@ md5_write( void *context, const void *inbuf_arg , size_t inlen) const unsigned char *inbuf = inbuf_arg; MD5_CONTEXT *hd = context; - if ( hd->count == 64 ) /* flush the buffer */ + if( hd->count == 64 ) /* flush the buffer */ { transform( hd, hd->buf ); _gcry_burn_stack (80+6*sizeof(void*)); hd->count = 0; hd->nblocks++; } - if ( !inbuf ) + if( !inbuf ) return; - if ( hd->count ) + if( hd->count ) { - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; md5_write( hd, NULL, 0 ); - if ( !inlen ) + if( !inlen ) return; } _gcry_burn_stack (80+6*sizeof(void*)); @@ -250,7 +250,7 @@ md5_write( void *context, const void *inbuf_arg , size_t inlen) inlen -= 64; inbuf += 64; } - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; } @@ -278,7 +278,7 @@ md5_final( void *context) msb = t >> 26; /* add the count */ t = lsb; - if ( (lsb += hd->count) < t ) + if( (lsb += hd->count) < t ) msb++; /* multiply by 8 to make a bit count */ t = lsb; @@ -286,7 +286,7 @@ md5_final( void *context) msb <<= 3; msb |= t >> 29; - if ( hd->count < 56 ) /* enough room */ + if( hd->count < 56 ) /* enough room */ { hd->buf[hd->count++] = 0x80; /* pad */ while( hd->count < 56 ) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/primegen.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/primegen.c index c9b5414501..b869bee839 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/primegen.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/primegen.c @@ -936,7 +936,7 @@ is_prime (gcry_mpi_t n, int steps, unsigned int *count) for (i=0 ; i < steps; i++ ) { ++*count; - if ( !i ) + if( !i ) { mpi_set_ui( x, 2 ); } @@ -963,7 +963,7 @@ is_prime (gcry_mpi_t n, int steps, unsigned int *count) for ( j=1; j < k && mpi_cmp( y, nminus1 ); j++ ) { gcry_mpi_powm(y, y, a2, n); - if ( !mpi_cmp_ui( y, 1 ) ) + if( !mpi_cmp_ui( y, 1 ) ) goto leave; /* Not a prime. */ } if (mpi_cmp( y, nminus1 ) ) @@ -1005,18 +1005,18 @@ m_out_of_n ( char *array, int m, int n ) { int i=0, i1=0, j=0, jp=0, j1=0, k1=0, k2=0; - if ( !m || m >= n ) + if( !m || m >= n ) return; /* Need to handle this simple case separately. */ - if ( m == 1 ) + if( m == 1 ) { for (i=0; i < n; i++ ) { if ( array[i] ) { array[i++] = 0; - if ( i >= n ) + if( i >= n ) i = 0; array[i] = 1; return; @@ -1037,25 +1037,25 @@ m_out_of_n ( char *array, int m, int n ) if ( (m & 1) ) { /* M is odd. */ - if ( array[n-1] ) + if( array[n-1] ) { - if ( j1 & 1 ) + if( j1 & 1 ) { k1 = n - j1; k2 = k1+2; - if ( k2 > n ) + if( k2 > n ) k2 = n; goto leave; } goto scan; } k2 = n - j1 - 1; - if ( k2 == 0 ) + if( k2 == 0 ) { k1 = i; k2 = n - j1; } - else if ( array[k2] && array[k2-1] ) + else if( array[k2] && array[k2-1] ) k1 = n; else k1 = k2 + 1; @@ -1063,18 +1063,18 @@ m_out_of_n ( char *array, int m, int n ) else { /* M is even. */ - if ( !array[n-1] ) + if( !array[n-1] ) { k1 = n - j1; k2 = k1 + 1; goto leave; } - if ( !(j1 & 1) ) + if( !(j1 & 1) ) { k1 = n - j1; k2 = k1+2; - if ( k2 > n ) + if( k2 > n ) k2 = n; goto leave; } @@ -1083,9 +1083,9 @@ m_out_of_n ( char *array, int m, int n ) for (i=1; i <= jp; i++ ) { i1 = jp + 2 - i; - if ( array[i1-1] ) + if( array[i1-1] ) { - if ( array[i1-2] ) + if( array[i1-2] ) { k1 = i1 - 1; k2 = n - j1; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/pubkey.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/pubkey.c index b888d4b936..08abcbfdec 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/pubkey.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/pubkey.c @@ -1518,7 +1518,7 @@ sexp_data_to_mpi (gcry_sexp_t input, unsigned int nbits, gcry_mpi_t *ret_mpi, the given algorithm. */ rc = GPG_ERR_CONFLICT; } - else if ( !dlen || dlen + asnlen + 4 > nframe) + else if( !dlen || dlen + asnlen + 4 > nframe) { /* Can't encode an DLEN byte digest MD into a NFRAME byte frame. */ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/rijndael.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/rijndael.c index 0c092f78aa..d43b349b41 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/rijndael.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/rijndael.c @@ -134,7 +134,7 @@ do_setkey (RIJNDAEL_context *ctx, const byte *key, const unsigned keylen) ctx->use_padlock = 0; #endif - if ( keylen == 128/8 ) + if( keylen == 128/8 ) { ROUNDS = 10; KC = 4; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/rmd160.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/rmd160.c index 6e3dc68ee6..7805bf53b0 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/rmd160.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/rmd160.c @@ -406,21 +406,21 @@ rmd160_write ( void *context, const void *inbuf_arg, size_t inlen) const unsigned char *inbuf = inbuf_arg; RMD160_CONTEXT *hd = context; - if ( hd->count == 64 ) /* flush the buffer */ + if( hd->count == 64 ) /* flush the buffer */ { transform( hd, hd->buf ); _gcry_burn_stack (108+5*sizeof(void*)); hd->count = 0; hd->nblocks++; } - if ( !inbuf ) + if( !inbuf ) return; - if ( hd->count ) + if( hd->count ) { - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; rmd160_write( hd, NULL, 0 ); - if ( !inlen ) + if( !inlen ) return; } @@ -433,7 +433,7 @@ rmd160_write ( void *context, const void *inbuf_arg, size_t inlen) inbuf += 64; } _gcry_burn_stack (108+5*sizeof(void*)); - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; } @@ -477,7 +477,7 @@ rmd160_final( void *context ) msb = t >> 26; /* add the count */ t = lsb; - if ( (lsb += hd->count) < t ) + if( (lsb += hd->count) < t ) msb++; /* multiply by 8 to make a bit count */ t = lsb; @@ -485,7 +485,7 @@ rmd160_final( void *context ) msb <<= 3; msb |= t >> 29; - if ( hd->count < 56 ) /* enough room */ + if( hd->count < 56 ) /* enough room */ { hd->buf[hd->count++] = 0x80; /* pad */ while( hd->count < 56 ) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/rsa.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/rsa.c index a6b225e0f0..cf278c2532 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/rsa.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/rsa.c @@ -285,7 +285,7 @@ generate_std (RSA_secret_key *sk, unsigned int nbits, unsigned long use_e, u = gcry_mpi_snew ( nbits ); mpi_invm(u, p, q ); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) { log_mpidump(" p= ", p ); log_mpidump(" q= ", q ); @@ -534,7 +534,7 @@ generate_x931 (RSA_secret_key *sk, unsigned int nbits, unsigned long e_value, u = f; f = NULL; mpi_invm (u, p, q ); - if ( DBG_CIPHER ) + if( DBG_CIPHER ) { if (*swapped) log_debug ("p and q are swapped\n"); @@ -599,7 +599,7 @@ check_secret_key( RSA_secret_key *sk ) static void public(gcry_mpi_t output, gcry_mpi_t input, RSA_public_key *pkey ) { - if ( output == input ) /* powm doesn't like output and input the same */ + if( output == input ) /* powm doesn't like output and input the same */ { gcry_mpi_t x = mpi_alloc( mpi_get_nlimbs(input)*2 ); mpi_powm( x, input, pkey->e, pkey->n ); @@ -625,7 +625,7 @@ stronger_key_check ( RSA_secret_key *skey ) log_info ( "RSA Oops: n != p * q\n" ); /* check that p is less than q */ - if ( mpi_cmp( skey->p, skey->q ) > 0 ) + if( mpi_cmp( skey->p, skey->q ) > 0 ) { log_info ("RSA Oops: p >= q - fixed\n"); _gcry_mpi_swap ( skey->p, skey->q); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/seed.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/seed.c index f1e921148f..b0980d61ec 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/seed.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/seed.c @@ -273,7 +273,7 @@ do_setkey (SEED_context *ctx, const byte *key, const unsigned keylen) { initialized = 1; selftest_failed = selftest (); - if ( selftest_failed ) + if( selftest_failed ) log_error ("%s\n", selftest_failed ); } if (selftest_failed) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/sha1.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/sha1.c index c7f697c7bb..8862c64b0a 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/sha1.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/sha1.c @@ -300,7 +300,7 @@ sha1_final(void *context) msb = t >> 26; /* add the count */ t = lsb; - if ( (lsb += hd->count) < t ) + if( (lsb += hd->count) < t ) msb++; /* multiply by 8 to make a bit count */ t = lsb; @@ -308,7 +308,7 @@ sha1_final(void *context) msb <<= 3; msb |= t >> 29; - if ( hd->count < 56 ) /* enough room */ + if( hd->count < 56 ) /* enough room */ { hd->buf[hd->count++] = 0x80; /* pad */ while( hd->count < 56 ) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/tiger.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/tiger.c index afc756d50e..a6feb316c2 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/tiger.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/tiger.c @@ -743,21 +743,21 @@ tiger_write ( void *context, const void *inbuf_arg, size_t inlen) const unsigned char *inbuf = inbuf_arg; TIGER_CONTEXT *hd = context; - if ( hd->count == 64 ) /* flush the buffer */ + if( hd->count == 64 ) /* flush the buffer */ { transform( hd, hd->buf ); _gcry_burn_stack (21*8+11*sizeof(void*)); hd->count = 0; hd->nblocks++; } - if ( !inbuf ) + if( !inbuf ) return; - if ( hd->count ) + if( hd->count ) { - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; tiger_write( hd, NULL, 0 ); - if ( !inlen ) + if( !inlen ) return; } @@ -770,7 +770,7 @@ tiger_write ( void *context, const void *inbuf_arg, size_t inlen) inbuf += 64; } _gcry_burn_stack (21*8+11*sizeof(void*)); - for ( ; inlen && hd->count < 64; inlen-- ) + for( ; inlen && hd->count < 64; inlen-- ) hd->buf[hd->count++] = *inbuf++; } @@ -794,7 +794,7 @@ tiger_final( void *context ) msb = t >> 26; /* add the count */ t = lsb; - if ( (lsb += hd->count) < t ) + if( (lsb += hd->count) < t ) msb++; /* multiply by 8 to make a bit count */ t = lsb; @@ -802,7 +802,7 @@ tiger_final( void *context ) msb <<= 3; msb |= t >> 29; - if ( hd->count < 56 ) /* enough room */ + if( hd->count < 56 ) /* enough room */ { hd->buf[hd->count++] = pad; while( hd->count < 56 ) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/cipher/twofish.c b/plugins/MirOTR/libgcrypt-1.4.6/cipher/twofish.c index 2183aa0b7b..5274c4001d 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/cipher/twofish.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/cipher/twofish.c @@ -584,7 +584,7 @@ do_twofish_setkey (TWOFISH_context *ctx, const byte *key, const unsigned keylen) static const char *selftest_failed=0; /* Check key length. */ - if ( ( ( keylen - 16 ) | 16 ) != 16 ) + if( ( ( keylen - 16 ) | 16 ) != 16 ) return GPG_ERR_INV_KEYLEN; /* Do self-test if necessary. */ @@ -592,10 +592,10 @@ do_twofish_setkey (TWOFISH_context *ctx, const byte *key, const unsigned keylen) { initialized = 1; selftest_failed = selftest (); - if ( selftest_failed ) + if( selftest_failed ) log_error("%s\n", selftest_failed ); } - if ( selftest_failed ) + if( selftest_failed ) return GPG_ERR_SELFTEST_FAILED; /* Compute the first two words of the S vector. The magic numbers are diff --git a/plugins/MirOTR/libgcrypt-1.4.6/custom/config.h b/plugins/MirOTR/libgcrypt-1.4.6/custom/config.h new file mode 100644 index 0000000000..bdc5407dfc --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/custom/config.h @@ -0,0 +1,437 @@ +/* config.h.in. Generated from configure.ac by autoheader. */
+
+
+#ifndef _GCRYPT_CONFIG_H_INCLUDED
+#define _GCRYPT_CONFIG_H_INCLUDED
+/* need this, because some autoconf tests rely on this (e.g. stpcpy)
+ * and it should be used for new programs */
+#define _GNU_SOURCE 1
+
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* Subversion revision used to build this package */
+#undef BUILD_REVISION
+
+/* configure did not test for endianess */
+#undef DISABLED_ENDIAN_CHECK
+
+/* Define if you don't want the default EGD socket name. For details see
+ cipher/rndegd.c */
+#undef EGD_SOCKET_NAME
+
+/* Define to support an HMAC based integrity check */
+#undef ENABLE_HMAC_BINARY_CHECK
+
+/* Enable support for the PadLock engine. */
+#undef ENABLE_PADLOCK_SUPPORT
+
+/* Define to use the GNU C visibility attribute. */
+#undef GCRY_USE_VISIBILITY
+
+/* The default error source for libgcrypt. */
+#undef GPG_ERR_SOURCE_DEFAULT
+
+/* Define to 1 if you have the `atexit' function. */
+#define HAVE_ATEXIT 1
+
+/* Defined if the mlock() call does not work */
+#undef HAVE_BROKEN_MLOCK
+
+/* Defined if a `byte' is typedef'd */
+#undef HAVE_BYTE_TYPEDEF
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
+ don't. */
+#define HAVE_DECL_SYS_SIGLIST 0
+
+/* defined if the system supports a random device */
+#undef HAVE_DEV_RANDOM
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* defined if we run on some of the PCDOS like systems (DOS, Windoze. OS/2)
+ with special properties like no file modes */
+#define HAVE_DOSISH_SYSTEM
+
+/* defined if we must run on a stupid file system */
+#define HAVE_DRIVE_LETTERS
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `gethrtime' function. */
+#undef HAVE_GETHRTIME
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getrusage' function. */
+#undef HAVE_GETRUSAGE
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+#undef HAVE_LIBRT
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Defined if the system supports an mlock() call */
+#undef HAVE_MLOCK
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Defined if the GNU Pth is available */
+#undef HAVE_PTH
+
+/* Define to 1 if you have the `raise' function. */
+#define HAVE_RAISE 1
+
+/* Define to 1 if you have the `rand' function. */
+#define HAVE_RAND 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `stricmp' function. */
+#define HAVE_STRICMP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the `syslog' function. */
+#undef HAVE_SYSLOG
+
+/* Define to 1 if you have the <sys/capability.h> header file. */
+#undef HAVE_SYS_CAPABILITY_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Defined if a `u16' is typedef'd */
+#undef HAVE_U16_TYPEDEF
+
+/* Defined if a `u32' is typedef'd */
+#undef HAVE_U32_TYPEDEF
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#undef HAVE_UINTPTR_T
+
+/* Defined if a `ulong' is typedef'd */
+#undef HAVE_ULONG_TYPEDEF
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Defined if a `ushort' is typedef'd */
+#undef HAVE_USHORT_TYPEDEF
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Defined if we run on a W32 API based system */
+#define HAVE_W32_SYSTEM 1
+
+/* Define to 1 if you have the `wait4' function. */
+#undef HAVE_WAIT4
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#define HAVE_WINSOCK2_H 1
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+#define HAVE_WS2TCPIP_H 1
+
+/* Defined if this is not a regular release */
+#undef IS_DEVELOPMENT_VERSION
+
+/* List of available cipher algorithms */
+#define LIBGCRYPT_CIPHERS "arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia"
+
+/* List of available digest algorithms */
+#define LIBGCRYPT_DIGESTS "dsa:elgamal:rsa:ecc"
+
+/* List of available public key cipher algorithms */
+#define LIBGCRYPT_PUBKEY_CIPHERS "crc:md4:md5:rmd160:sha1:sha256:sha512:tiger:whirlpool"
+
+/* Define to use the (obsolete) malloc guarding feature */
+#undef M_GUARD
+
+/* defined to the name of the strong random device */
+#undef NAME_OF_DEV_RANDOM
+
+/* defined to the name of the weaker random device */
+#undef NAME_OF_DEV_URANDOM
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of this package */
+#define PACKAGE "libgcrypt-1.4.6.vs"
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libgcrypt-1.4.6 built with Visual Studio"
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.9"
+
+/* A human readable text with the name of the OS */
+#define PRINTABLE_OS_NAME "Win32"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* The size of a `unsigned int', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_INT 4
+
+/* The size of a `unsigned long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG 4
+
+/* The size of a `unsigned long long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG
+
+/* The size of a `unsigned short', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_SHORT 2
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Defined if this module should be included */
+#define USE_AES 1
+
+/* Defined if this module should be included */
+#define USE_ARCFOUR 1
+
+/* Defined if this module should be included */
+#define USE_BLOWFISH 1
+
+/* Defined if this module should be included */
+#undef USE_CAMELLIA
+
+/* define if capabilities should be used */
+#undef USE_CAPABILITIES
+
+/* Defined if this module should be included */
+#define USE_CAST5 1
+
+
+/* Defined if this module should be included */
+#define USE_CRC 1
+
+/* Defined if this module should be included */
+#define USE_DES 1
+
+/* Defined if this module should be included */
+#define USE_DSA 1
+
+/* Defined if this module should be included */
+#define USE_ECC 1
+
+/* Defined if this module should be included */
+#define USE_ELGAMAL 1
+
+/* Defined if the GNU Portable Thread Library should be used */
+#undef USE_GNU_PTH
+
+/* Defined if this module should be included */
+#define USE_MD4 1
+
+/* Defined if this module should be included */
+#define USE_MD5 1
+
+/* set this to limit filenames to the 8.3 format */
+#undef USE_ONLY_8DOT3
+
+/* Define to support the experimental random daemon */
+#undef USE_RANDOM_DAEMON
+
+/* Defined if this module should be included */
+#define USE_RFC2268 1
+
+/* Defined if this module should be included */
+#define USE_RMD160 1
+
+/* Defined if the EGD based RNG should be used. */
+#undef USE_RNDEGD
+
+/* Defined if the /dev/random based RNG should be used. */
+#undef USE_RNDLINUX
+
+/* Defined if the default Unix RNG should be used. */
+#undef USE_RNDUNIX
+
+/* Defined if the Windows specific RNG should be used. */
+#define USE_RNDW32 1
+
+/* Defined if this module should be included */
+#define USE_RSA 1
+
+/* Defined if this module should be included */
+#define USE_SEED 1
+
+/* Defined if this module should be included */
+#define USE_SERPENT 1
+
+/* Defined if this module should be included */
+#define USE_SHA1 1
+
+/* Defined if this module should be included */
+#define USE_SHA256 1
+
+/* Defined if this module should be included */
+#define USE_SHA512 1
+
+/* Defined if this module should be included */
+#undef USE_TIGER
+
+/* Defined if this module should be included */
+#define USE_TWOFISH 1
+
+/* Defined if this module should be included */
+#define USE_WHIRLPOOL 1
+
+/* Version of this package */
+#define VERSION "1.4.6"
+
+/* Defined if compiled symbols have a leading underscore */
+#define WITH_SYMBOL_UNDERSCORE 1
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* To allow the use of Libgcrypt in multithreaded programs we have to use
+ special features from the library. */
+#ifndef _REENTRANT
+# define _REENTRANT 1
+#endif
+
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#define const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+//#undef inline
+#define inline __inline
+#endif
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+// #undef size_t
+
+/* Define to `int' if unavailable. */
+// #define socklen_t int
+/* Define to the type of an unsigned integer type wide enough to hold a
+ pointer, if such a type exists, and if the system does not define it. */
+#undef uintptr_t
+
+// !s0rr0w!
+#define SIZEOF_UINT64_T 8
+#define UINT64_C(C) (C)
+typedef unsigned __int64 uint64_t;
+
+#define _GCRYPT_IN_LIBGCRYPT 1
+
+/* If the configure check for endianness has been disabled, get it from
+ OS macros. This is intended for making fat binary builds on OS X. */
+#ifdef DISABLED_ENDIAN_CHECK
+# if defined(__BIG_ENDIAN__)
+# define WORDS_BIGENDIAN 1
+# elif defined(__LITTLE_ENDIAN__)
+# undef WORDS_BIGENDIAN
+# else
+# error "No endianness found"
+# endif
+#endif /*DISABLED_ENDIAN_CHECK*/
+
+/* We basically use the original Camellia source. Make sure the symbols
+ properly prefixed. */
+#define CAMELLIA_EXT_SYM_PREFIX _gcry_
+
+/* This error code is only available with gpg-error 1.7. Thus
+ we define it here with the usual gcry prefix. */
+#define GCRY_GPG_ERR_NOT_OPERATIONAL 176
+
+#define snprintf(a,b,c, ...) \
+ _snprintf (a,b,c, ## __VA_ARGS__)
+
+#define F_OK 0
+
+#endif /*_GCRYPT_CONFIG_H_INCLUDED*/
+
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/custom/config.h.bak b/plugins/MirOTR/libgcrypt-1.4.6/custom/config.h.bak new file mode 100644 index 0000000000..4d5d22f548 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/custom/config.h.bak @@ -0,0 +1,390 @@ +/* config.h.in. Generated from configure.ac by autoheader. */
+
+
+#ifndef _GCRYPT_CONFIG_H_INCLUDED
+#define _GCRYPT_CONFIG_H_INCLUDED
+/* need this, because some autoconf tests rely on this (e.g. stpcpy)
+ * and it should be used for new programs */
+#define _GNU_SOURCE 1
+
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* Subversion revision used to build this package */
+#undef BUILD_REVISION
+
+/* configure did not test for endianess */
+#undef DISABLED_ENDIAN_CHECK
+
+/* Define if you don't want the default EGD socket name. For details see
+ cipher/rndegd.c */
+#undef EGD_SOCKET_NAME
+
+/* Define to support an HMAC based integrity check */
+#undef ENABLE_HMAC_BINARY_CHECK
+
+/* Enable support for the PadLock engine. */
+#undef ENABLE_PADLOCK_SUPPORT
+
+/* Define to use the GNU C visibility attribute. */
+#undef GCRY_USE_VISIBILITY
+
+/* The default error source for libgcrypt. */
+#undef GPG_ERR_SOURCE_DEFAULT
+
+/* Define to 1 if you have the `atexit' function. */
+#define HAVE_ATEXIT 1
+
+/* Defined if the mlock() call does not work */
+#undef HAVE_BROKEN_MLOCK
+
+/* Defined if a `byte' is typedef'd */
+#undef HAVE_BYTE_TYPEDEF
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
+ don't. */
+#define HAVE_DECL_SYS_SIGLIST 0
+
+/* defined if the system supports a random device */
+#undef HAVE_DEV_RANDOM
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* defined if we run on some of the PCDOS like systems (DOS, Windoze. OS/2)
+ with special properties like no file modes */
+#define HAVE_DOSISH_SYSTEM
+
+/* defined if we must run on a stupid file system */
+#define HAVE_DRIVE_LETTERS
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `gethrtime' function. */
+#undef HAVE_GETHRTIME
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getrusage' function. */
+#undef HAVE_GETRUSAGE
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+#undef HAVE_LIBRT
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Defined if the system supports an mlock() call */
+#undef HAVE_MLOCK
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Defined if the GNU Pth is available */
+#undef HAVE_PTH
+
+/* Define to 1 if you have the `raise' function. */
+#define HAVE_RAISE 1
+
+/* Define to 1 if you have the `rand' function. */
+#define HAVE_RAND 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `stricmp' function. */
+#define HAVE_STRICMP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the `syslog' function. */
+#undef HAVE_SYSLOG
+
+/* Define to 1 if you have the <sys/capability.h> header file. */
+#undef HAVE_SYS_CAPABILITY_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Defined if a `u16' is typedef'd */
+#undef HAVE_U16_TYPEDEF
+
+/* Defined if a `u32' is typedef'd */
+#undef HAVE_U32_TYPEDEF
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#undef HAVE_UINTPTR_T
+
+/* Defined if a `ulong' is typedef'd */
+#undef HAVE_ULONG_TYPEDEF
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Defined if a `ushort' is typedef'd */
+#undef HAVE_USHORT_TYPEDEF
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Defined if we run on a W32 API based system */
+#define HAVE_W32_SYSTEM
+
+/* Define to 1 if you have the `wait4' function. */
+#undef HAVE_WAIT4
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#define HAVE_WINSOCK2_H 1
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+#define HAVE_WS2TCPIP_H 1
+
+/* Defined if this is not a regular release */
+#undef IS_DEVELOPMENT_VERSION
+
+/* List of available cipher algorithms */
+#define LIBGCRYPT_CIPHERS "arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia"
+
+/* List of available digest algorithms */
+#define LIBGCRYPT_DIGESTS "dsa:elgamal:rsa:ecc"
+
+/* List of available public key cipher algorithms */
+#define LIBGCRYPT_PUBKEY_CIPHERS "crc:md4:md5:rmd160:sha1:sha256:sha512:tiger:whirlpool"
+
+/* Define to use the (obsolete) malloc guarding feature */
+#undef M_GUARD
+
+/* defined to the name of the strong random device */
+#undef NAME_OF_DEV_RANDOM
+
+/* defined to the name of the weaker random device */
+#undef NAME_OF_DEV_URANDOM
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of this package */
+#define PACKAGE "libgcrypt-1.4.6.vs"
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libgcrypt-1.4.6 built with Visual Studio"
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* A human readable text with the name of the OS */
+#define PRINTABLE_OS_NAME "Win32"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* The size of a `unsigned int', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_INT 4
+
+/* The size of a `unsigned long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG 4
+
+/* The size of a `unsigned long long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG
+
+/* The size of a `unsigned short', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_SHORT 2
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Defined if this module should be included */
+#define USE_AES 1
+
+/* Defined if this module should be included */
+#define USE_ARCFOUR 1
+
+/* Defined if this module should be included */
+#define USE_BLOWFISH 1
+
+/* Defined if this module should be included */
+#undef USE_CAMELLIA
+
+/* define if capabilities should be used */
+#undef USE_CAPABILITIES
+
+/* Defined if this module should be included */
+#define USE_CAST5 1
+
+
+/* Defined if this module should be included */
+#define USE_CRC 1
+
+/* Defined if this module should be included */
+#define USE_DES 1
+
+/* Defined if this module should be included */
+#define USE_DSA 1
+
+/* Defined if this module should be included */
+#define USE_ECC 1
+
+/* Defined if this module should be included */
+#define USE_ELGAMAL 1
+
+/* Defined if this module should be included */
+#define USE_MD4 1
+
+/* Defined if this module should be included */
+#define USE_MD5 1
+
+/* set this to limit filenames to the 8.3 format */
+#undef USE_ONLY_8DOT3
+
+/* Defined if this module should be included */
+#define USE_RFC2268 1
+
+/* Defined if this module should be included */
+#define USE_RMD160 1
+
+/* Defined if the EGD based RNG should be used. */
+#undef USE_RNDEGD
+
+/* Defined if the /dev/random based RNG should be used. */
+#undef USE_RNDLINUX
+
+/* Defined if the default Unix RNG should be used. */
+#undef USE_RNDUNIX
+
+/* Defined if the Windows specific RNG should be used. */
+#define USE_RNDW32 1
+
+/* Defined if this module should be included */
+#define USE_RSA 1
+
+/* Defined if this module should be included */
+#define USE_SERPENT 1
+
+/* Defined if this module should be included */
+#define USE_SHA1 1
+
+/* Defined if this module should be included */
+#define USE_SHA256 1
+
+/* Defined if this module should be included */
+#define USE_SHA512 1
+
+/* Defined if this module should be included */
+#undef USE_TIGER
+
+/* Defined if this module should be included */
+#define USE_TWOFISH 1
+
+/* Version of this package */
+#define VERSION "1.2.2"
+
+/* Defined if compiled symbols have a leading underscore */
+#define WITH_SYMBOL_UNDERSCORE 1
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+#define LIBCRYPT_CIPHERS "arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia"
+#define LIBGCRYPT_PUBKEY_CIPHERS "dsa:elgamal:rsa:ecc"
+#define LIBCRYPT_DIGESTS "crc:md4:md5:rmd160:sha1:sha256:sha512:tiger:whirlpool"
+
+/* To allow the use of Libgcrypt in multithreaded programs we have to use
+ special features from the library. */
+#ifndef _REENTRANT
+# define _REENTRANT 1
+#endif
+
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#define const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+// #undef size_t
+
+/* Define to `int' if unavailable. */
+// #define socklen_t int
+
+// !s0rr0w!
+#define SIZEOF_UINT64_T 8
+#define UINT64_C(C) (C)
+typedef unsigned __int64 uint64_t;
+
+#define _GCRYPT_IN_LIBGCRYPT 1
+
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/config.h.in b/plugins/MirOTR/libgcrypt-1.4.6/custom/config2.h index 25c1c83533..25c1c83533 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/config.h.in +++ b/plugins/MirOTR/libgcrypt-1.4.6/custom/config2.h diff --git a/plugins/MirOTR/libgcrypt-1.4.6/custom/libgcrypt-1.2.2.def b/plugins/MirOTR/libgcrypt-1.4.6/custom/libgcrypt-1.2.2.def new file mode 100644 index 0000000000..f149e99d7d --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/custom/libgcrypt-1.2.2.def @@ -0,0 +1,183 @@ +
+LIBRARY libgcrypt
+
+EXPORTS
+ gcry_ac_close @1
+ gcry_ac_data_clear @2
+ gcry_ac_data_copy @3
+ gcry_ac_data_decrypt @4
+ gcry_ac_data_destroy @5
+ gcry_ac_data_encrypt @6
+ gcry_ac_data_get_index @7
+ gcry_ac_data_get_name @8
+ gcry_ac_data_length @9
+ gcry_ac_data_new @10
+ gcry_ac_data_set @11
+ gcry_ac_data_sign @12
+ gcry_ac_data_verify @13
+ gcry_ac_flags @14
+ gcry_ac_id_to_name @15
+ gcry_ac_key_data_get @16
+ gcry_ac_key_destroy @17
+ gcry_ac_key_generate_specs @18
+ gcry_ac_key_get_grip @19
+ gcry_ac_key_get_nbits @20
+ gcry_ac_key_init @21
+ gcry_ac_key_pair_destroy @22
+ gcry_ac_key_pair_extract @23
+ gcry_ac_key_pair_generate @24
+ gcry_ac_key_test @25
+ gcry_ac_name_to_id @26
+ gcry_ac_open @27
+ gcry_calloc @28
+ gcry_calloc_secure @29
+ gcry_check_version @30
+ gcry_cipher_algo_info @31
+ gcry_cipher_algo_name @32
+ gcry_cipher_close @33
+ gcry_cipher_ctl @34
+ gcry_cipher_decrypt @35
+ gcry_cipher_encrypt @36
+ gcry_cipher_get_algo_blklen @37
+ gcry_cipher_get_algo_keylen @38
+ gcry_cipher_info @39
+ gcry_cipher_list @40
+ gcry_cipher_map_name @41
+ gcry_cipher_mode_from_oid @42
+ gcry_cipher_open @43
+ gcry_cipher_register @44
+ gcry_cipher_unregister @45
+ gcry_control @46
+ gcry_create_nonce @47
+ gcry_err_code_from_errno @48
+ gcry_err_code_to_errno @49
+ gcry_err_make_from_errno @50
+ gcry_error_from_errno @51
+ gcry_free @52
+ gcry_is_secure @53
+ gcry_malloc @54
+ gcry_malloc_secure @55
+ gcry_md_algo_info @56
+ gcry_md_algo_name @57
+ gcry_md_close @58
+ gcry_md_copy @59
+ gcry_md_ctl @60
+ gcry_md_enable @61
+ gcry_md_get @62
+ gcry_md_get_algo @63
+ gcry_md_get_algo_dlen @64
+ gcry_md_hash_buffer @65
+ gcry_md_info @66
+ gcry_md_is_enabled @67
+ gcry_md_is_secure @68
+ gcry_md_list @69
+ gcry_md_map_name @70
+ gcry_md_open @71
+ gcry_md_read @72
+ gcry_md_register @73
+ gcry_md_reset @74
+ gcry_md_setkey @75
+ gcry_md_unregister @76
+ gcry_md_write @77
+ gcry_mpi_add @78
+ gcry_mpi_add_ui @79
+ gcry_mpi_addm @80
+ gcry_mpi_aprint @81
+ gcry_mpi_clear_bit @82
+ gcry_mpi_clear_flag @83
+ gcry_mpi_clear_highbit @84
+ gcry_mpi_cmp @85
+ gcry_mpi_cmp_ui @86
+ gcry_mpi_copy @87
+ gcry_mpi_div @88
+ gcry_mpi_dump @89
+ gcry_mpi_gcd @90
+ gcry_mpi_get_flag @91
+ gcry_mpi_get_nbits @92
+ gcry_mpi_get_opaque @93
+ gcry_mpi_invm @94
+ gcry_mpi_mod @95
+ gcry_mpi_mul @96
+ gcry_mpi_mul_2exp @97
+ gcry_mpi_mul_ui @98
+ gcry_mpi_mulm @99
+ gcry_mpi_new @100
+ gcry_mpi_powm @101
+ gcry_mpi_print @102
+ gcry_mpi_randomize @103
+ gcry_mpi_release @104
+ gcry_mpi_rshift @105
+ gcry_mpi_scan @106
+ gcry_mpi_set @107
+ gcry_mpi_set_bit @108
+ gcry_mpi_set_flag @109
+ gcry_mpi_set_highbit @110
+ gcry_mpi_set_opaque @111
+ gcry_mpi_set_ui @112
+ gcry_mpi_snew @113
+ gcry_mpi_sub @114
+ gcry_mpi_sub_ui @115
+ gcry_mpi_subm @116
+ gcry_mpi_swap @117
+ gcry_mpi_test_bit @118
+ gcry_pk_algo_info @119
+ gcry_pk_algo_name @120
+ gcry_pk_ctl @121
+ gcry_pk_decrypt @122
+ gcry_pk_encrypt @123
+ gcry_pk_genkey @124
+ gcry_pk_get_keygrip @125
+ gcry_pk_get_nbits @126
+ gcry_pk_list @127
+ gcry_pk_map_name @128
+ gcry_pk_register @129
+ gcry_pk_sign @130
+ gcry_pk_testkey @131
+ gcry_pk_unregister @132
+ gcry_pk_verify @133
+ gcry_prime_check @134
+ gcry_prime_generate @135
+ gcry_prime_group_generator @136
+ gcry_prime_release_factors @137
+ gcry_random_add_bytes @138
+ gcry_random_bytes @139
+ gcry_random_bytes_secure @140
+ gcry_randomize @141
+ gcry_realloc @142
+ gcry_set_allocation_handler @143
+ gcry_set_fatalerror_handler @144
+ gcry_set_gettext_handler @145
+ gcry_set_log_handler @146
+ gcry_set_outofcore_handler @147
+ gcry_set_progress_handler @148
+ gcry_sexp_alist @149
+ gcry_sexp_append @150
+ gcry_sexp_build @151
+ gcry_sexp_build_array @152
+ gcry_sexp_cadr @153
+ gcry_sexp_canon_len @154
+ gcry_sexp_car @155
+ gcry_sexp_cdr @156
+ gcry_sexp_cons @157
+ gcry_sexp_create @158
+ gcry_sexp_dump @159
+ gcry_sexp_find_token @160
+ gcry_sexp_length @161
+ gcry_sexp_new @162
+ gcry_sexp_nth @163
+ gcry_sexp_nth_data @164
+ gcry_sexp_nth_mpi @165
+ gcry_sexp_prepend @166
+ gcry_sexp_release @167
+ gcry_sexp_sprint @168
+ gcry_sexp_sscan @169
+ gcry_sexp_vlist @170
+ gcry_strdup @171
+ gcry_strerror @172
+ gcry_strsource @173
+ gcry_xcalloc @174
+ gcry_xcalloc_secure @175
+ gcry_xmalloc @176
+ gcry_xmalloc_secure @177
+ gcry_xrealloc @178
+ gcry_xstrdup @179
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/doc/Makefile.am b/plugins/MirOTR/libgcrypt-1.4.6/doc/Makefile.am new file mode 100644 index 0000000000..f25106438e --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/doc/Makefile.am @@ -0,0 +1,71 @@ +## Process this file with automake to create Makefile.in +# Copyright (C) 2002 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +EXTRA_DIST = README.apichanges HACKING \ + libgcrypt-modules.eps fips-fsm.eps \ + libgcrypt-modules.png fips-fsm.png \ + libgcrypt-modules.pdf fips-fsm.pdf + +DISTCLEANFILES = gcrypt.cps + +BUILT_SOURCES = libgcrypt-modules.eps fips-fsm.eps \ + libgcrypt-modules.png fips-fsm.png \ + libgcrypt-modules.pdf fips-fsm.pdf + +info_TEXINFOS = gcrypt.texi +gcrypt_TEXINFOS = lgpl.texi gpl.texi libgcrypt-modules.fig fips-fsm.fig + + +.fig.png: + fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@ + +.fig.jpg: + fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@ + +.fig.eps: + fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@ + +.fig.pdf: + fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@ + + +# Make sure that gcrypt.texi is touched if any other source file has +# been modified. This is required so that the version.texi magic +# updates the release date. +gnupg.texi : $(gcrypt_TEXINFOS) + touch $(srcdir)/gcrypt.texi + +online: gcrypt.html gcrypt.pdf gcrypt.info + set -e; \ + echo "Uploading current manuals to www.gnupg.org ..."; \ + cp libgcrypt-modules.png gcrypt.html/; \ + cp fips-fsm.png gcrypt.html/; \ + user=werner ; dashdevel="" ; \ + if echo "@PACKAGE_VERSION@" | grep -- "-svn" >/dev/null; then \ + dashdevel="-devel" ; \ + cp gcrypt.pdf gcrypt.html/; \ + cp gcrypt.info gcrypt.html/; \ + else \ + rsync -v gcrypt.pdf gcrypt.info \ + $${user}@trithemius.gnupg.org:webspace/manuals/ ; \ + fi ; \ + cd gcrypt.html ; \ + rsync -vr --exclude='.svn' . \ + $${user}@trithemius.gnupg.org:webspace/manuals/gcrypt$${dashdevel}/ + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/doc/Makefile.in b/plugins/MirOTR/libgcrypt-1.4.6/doc/Makefile.in new file mode 100644 index 0000000000..56acfbe4e2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/doc/Makefile.in @@ -0,0 +1,699 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2002 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(gcrypt_TEXINFOS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ + $(srcdir)/version.texi ChangeLog mdate-sh texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \ + $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/gcrypt.info +am__TEXINFO_TEX_DIR = $(srcdir) +DVIS = gcrypt.dvi +PDFS = gcrypt.pdf +PSS = gcrypt.ps +HTMLS = gcrypt.html +TEXINFOS = gcrypt.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@ +FFLAGS = @FFLAGS@ +GCRYPT_CIPHERS = @GCRYPT_CIPHERS@ +GCRYPT_DIGESTS = @GCRYPT_DIGESTS@ +GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@ +GCRYPT_RANDOM = @GCRYPT_RANDOM@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@ +LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@ +LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@ +LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@ +LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@ +LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@ +LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@ +LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@ +LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@ +LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_SFLAGS = @MPI_SFLAGS@ +NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@ +OBJDUMP = @OBJDUMP@ +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@ +PTH_CFLAGS = @PTH_CFLAGS@ +PTH_CONFIG = @PTH_CONFIG@ +PTH_LIBS = @PTH_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +VERSION = @VERSION@ +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@ +ac_ct_F77 = @ac_ct_F77@ +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@ +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@ +EXTRA_DIST = README.apichanges HACKING \ + libgcrypt-modules.eps fips-fsm.eps \ + libgcrypt-modules.png fips-fsm.png \ + libgcrypt-modules.pdf fips-fsm.pdf + +DISTCLEANFILES = gcrypt.cps +BUILT_SOURCES = libgcrypt-modules.eps fips-fsm.eps \ + libgcrypt-modules.png fips-fsm.png \ + libgcrypt-modules.pdf fips-fsm.pdf + +info_TEXINFOS = gcrypt.texi +gcrypt_TEXINFOS = lgpl.texi gpl.texi libgcrypt-modules.fig fips-fsm.fig +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .dvi .eps .fig .html .info .jpg .pdf .png .ps .texi +$(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 doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @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 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +.texi.info: + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && cd $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + cd $(srcdir); \ + else \ + rc=$$?; \ + cd $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + +.texi.dvi: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $< + +.texi.pdf: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $< + +.texi.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/gcrypt.info: gcrypt.texi $(srcdir)/version.texi $(gcrypt_TEXINFOS) +gcrypt.dvi: gcrypt.texi $(srcdir)/version.texi $(gcrypt_TEXINFOS) +gcrypt.pdf: gcrypt.texi $(srcdir)/version.texi $(gcrypt_TEXINFOS) +gcrypt.html: gcrypt.texi $(srcdir)/version.texi $(gcrypt_TEXINFOS) +$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti +$(srcdir)/stamp-vti: gcrypt.texi $(top_srcdir)/configure + @(dir=.; test -f ./gcrypt.texi || dir=$(srcdir); \ + set `$(SHELL) $(srcdir)/mdate-sh $$dir/gcrypt.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + @cp $(srcdir)/version.texi $@ + +mostlyclean-vti: + -rm -f vti.tmp + +maintainer-clean-vti: +@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +.dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + done; \ + else :; fi + @$(NORMAL_UNINSTALL) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + +dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f $(distdir)/$$relfile || \ + cp -p $$file $(distdir)/$$relfile; \ + else :; fi; \ + done; \ + done + +mostlyclean-aminfo: + -rm -rf gcrypt.aux gcrypt.cp gcrypt.cps gcrypt.fn gcrypt.fns gcrypt.ky \ + gcrypt.kys gcrypt.log gcrypt.pg gcrypt.tmp gcrypt.toc \ + gcrypt.tp gcrypt.vr gcrypt.vrs gcrypt.dvi gcrypt.pdf \ + gcrypt.ps gcrypt.html + +maintainer-clean-aminfo: + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(INFO_DEPS) +installdirs: + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am + +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \ + done +install-exec-am: + +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ + else \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ + fi; \ + done +install-info: install-info-am + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ + echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ + $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \ + done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-libtool mostlyclean-vti + +pdf: pdf-am + +pdf-am: $(PDFS) + +ps: ps-am + +ps-am: $(PSS) + +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + dist-info distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti mostlyclean \ + mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool \ + mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + + +.fig.png: + fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@ + +.fig.jpg: + fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@ + +.fig.eps: + fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@ + +.fig.pdf: + fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@ + +# Make sure that gcrypt.texi is touched if any other source file has +# been modified. This is required so that the version.texi magic +# updates the release date. +gnupg.texi : $(gcrypt_TEXINFOS) + touch $(srcdir)/gcrypt.texi + +online: gcrypt.html gcrypt.pdf gcrypt.info + set -e; \ + echo "Uploading current manuals to www.gnupg.org ..."; \ + cp libgcrypt-modules.png gcrypt.html/; \ + cp fips-fsm.png gcrypt.html/; \ + user=werner ; dashdevel="" ; \ + if echo "@PACKAGE_VERSION@" | grep -- "-svn" >/dev/null; then \ + dashdevel="-devel" ; \ + cp gcrypt.pdf gcrypt.html/; \ + cp gcrypt.info gcrypt.html/; \ + else \ + rsync -v gcrypt.pdf gcrypt.info \ + $${user}@trithemius.gnupg.org:webspace/manuals/ ; \ + fi ; \ + cd gcrypt.html ; \ + rsync -vr --exclude='.svn' . \ + $${user}@trithemius.gnupg.org:webspace/manuals/gcrypt$${dashdevel}/ +# 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/plugins/MirOTR/libgcrypt-1.4.6/doc/authors.txt b/plugins/MirOTR/libgcrypt-1.4.6/doc/authors.txt new file mode 100644 index 0000000000..5eef49c084 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/doc/authors.txt @@ -0,0 +1,7 @@ +gpgvs
+building gnupg related projects with Visual Studio
+
+Authors:
+ Francesco Picasso
+ mr.s0rr0w@gmail.com
+ www.s0rr0w.net
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/doc/gpgvs.aim.txt b/plugins/MirOTR/libgcrypt-1.4.6/doc/gpgvs.aim.txt new file mode 100644 index 0000000000..c7cbd9272d --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/doc/gpgvs.aim.txt @@ -0,0 +1,22 @@ +~~~
+AIM
+~~~
+the aim of *.vs projects is to provide a well organized
+and not invasive way to build target open source projects
+using visual studio (vs.6 and vs.net)
+
+~~~~~~
+REASON
+~~~~~~
+In many situations I was obliged to use visual studio in
+writing projects, and writing windows software is best suited
+using this ide.
+When I had need to use these great open source projects in
+my applications, I had to use the binaries provided (if) for
+the win32 environment: but, I think, if it can run in win32,
+it could also be built using win32 compiler/linker.
+I know you have to pay for visual studio, but why don't give
+the opportunity to build using this tool too?
+Moreover I think that providing these projects could increment
+the number of coworker programmers.
+So I decided to provide these visual studio projects.
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/doc/gpgvs.architecture.txt b/plugins/MirOTR/libgcrypt-1.4.6/doc/gpgvs.architecture.txt new file mode 100644 index 0000000000..4a2c2511f9 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/doc/gpgvs.architecture.txt @@ -0,0 +1,108 @@ +~~~~~~~~~~~~
+ARCHITECTURE
+~~~~~~~~~~~~
+I admit that architecture meaning is too much for this project,
+but with this document I explain how is built and
+how to use these projects.
+First of all you should respect the directory structure otherwise
+projects will not compile, but obviously you can change it:
+rembember to change vs workspace relativ paths too.
+Regarding workspaces compile flags: I decided to not provide particular
+building flags, so if you have to optimize (or anything else) you
+have to change settings.
+
+
+~~~~~~~~~~~
+DIRECTORIES
+~~~~~~~~~~~
+As said in “aim” document, I do not want to get inside original
+source code, less than it is not forced:
+so the first step is to look at directories structure (not whole)
+
+
+[anywhwere]\
+ \libgcrypt-1.2.1\
+ \libgcrypt-1.2.1\
+ \[...]
+ \gpg.vs\bin.vs\
+ \inc.vs\
+ \libgcrypt-1.2.1.vs\
+ \libgpg-error-1.1.vs\custom\
+ \libgpg_error_1_1.dsp
+ \libgpg_error_1_1.dsw
+
+There is a "root" directory, use whatever you want:
+inside this directory extract the original package, like
+libgcrypt-1.2.1, libgcrypt-1.2.1 and so on.
+Inside the "root" download/extract gpg.vs (otr.vs) project:
+you should have at least the same directories structure just shown.
+Inside you have "[original.package.name].vs" and all tools to be
+able to build original packages with visual studio.
+
+
+~~~~~~
+bin.vs
+~~~~~~
+here we'll go binaries created by visual studio, as
+\bin.vs\libgpg-error-1.1\debug\static\...
+\bin.vs\libgpg-error-1.1\release\static\...
+\bin.vs\libgpg-error-1.1\release\dll\...
+
+
+~~~~~~
+inc.vs
+~~~~~~
+this folder contains include files needed to build original packages
+without changing their code, like empty "socket.h" headers;
+and you will find "hooked" includes (like stddef.h) useful to declare
+definition that visual studio misses (like pid_t)
+
+
+~~~~~~~~~~~~~~~~~
+package.vs.custom
+~~~~~~~~~~~~~~~~~
+here you'll always find package->"config.h" header, made "by hand".
+You will find some others files that under *nix are automatically
+created, and I provide them in a "custom" way
+
+
+~~~~~~~
+EXAMPLE
+~~~~~~~
+You want to compile with vs libgpg-error-1.1.: choose your parent directory,
+in my case “gnu”
+
+\gnu\
+
+download and extract here the libgpg-error-1.1, so now I have
+
+\gnu\libgpg-error-1.1\libgpg-error\[source code]
+
+basically extract always in libgpg-error directory and the
+closest parent is libgpg-error-version, to have
+
+\gnu\libgpg-error-1.0\libgpg-error\[source code]
+\gnu\libgpg-error-1.1\libgpg-error\[source code]
+
+Now download gpg.vs project (or take it from cvs), which includes
+vs project for libgpg-error, and extract it in the directory
+you have choosen (gnu in my case),
+
+\gnu\gpg.vs\
+
+In gpg.vs directory find the libgpg-error-1.1.vs
+(appending .vs at the end of package name is the “standard” for this project)
+
+\gnu\gpg.vs\ libgpg-error-1.1.vs\
+
+And inside find the dsw/dsp of the project
+
+libgpg_error_1_1.dsw
+libgpg_error_1_1.dsp
+
+Note: the little change to names is due to vs limitations.
+You have only to build it.
+The binaries files will be created in
+
+\gnu\gpg.vs\bin.vs\libgpg-error.1.1\debug
+\gnu\gpg.vs\bin.vs\libgpg-error.1.1\release
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/doc/readme.txt b/plugins/MirOTR/libgcrypt-1.4.6/doc/readme.txt new file mode 100644 index 0000000000..fd10f94900 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/doc/readme.txt @@ -0,0 +1,6 @@ +gpgvs
+building gnupg related projects with Visual Studio
+
+for documents check them on sourceforge project site
+
+http://sourceforge.net/projects/gpgvs/
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/pwd.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/pwd.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/pwd.h diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/errno.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/errno.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/errno.h diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/ipc.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/ipc.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/ipc.h diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/socket.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/socket.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/socket.h diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/time.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/time.h new file mode 100644 index 0000000000..038cf1f387 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/time.h @@ -0,0 +1,2 @@ +
+#include <time.h>
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/types.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/types.h new file mode 100644 index 0000000000..5a3e51c4a9 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/types.h @@ -0,0 +1,49 @@ +
+#pragma once
+
+#include "..\unistd.h"
+
+
+#ifndef _TIME_T_DEFINED
+typedef long time_t;
+#define _TIME_T_DEFINED
+#endif
+
+
+#ifndef _INO_T_DEFINED
+
+typedef unsigned short _ino_t; /* i-node number (not used on DOS) */
+
+#if !__STDC__
+/* Non-ANSI name for compatibility */
+typedef unsigned short ino_t;
+#endif
+
+#define _INO_T_DEFINED
+#endif
+
+
+#ifndef _DEV_T_DEFINED
+
+typedef unsigned int _dev_t; /* device code */
+
+#if !__STDC__
+/* Non-ANSI name for compatibility */
+typedef unsigned int dev_t;
+#endif
+
+#define _DEV_T_DEFINED
+#endif
+
+
+#ifndef _OFF_T_DEFINED
+
+typedef long _off_t; /* file offset value */
+
+#if !__STDC__
+/* Non-ANSI name for compatibility */
+typedef long off_t;
+#endif
+
+#define _OFF_T_DEFINED
+#endif
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/un.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/un.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/un.h diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/wait.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/wait.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/sys/wait.h diff --git a/plugins/MirOTR/libgcrypt-1.4.6/inc/unistd.h b/plugins/MirOTR/libgcrypt-1.4.6/inc/unistd.h new file mode 100644 index 0000000000..c16a44c798 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/inc/unistd.h @@ -0,0 +1,48 @@ +
+#pragma once
+
+#include <basetsd.h>
+#include <stddef.h>
+#include <errno.h>
+
+#ifndef S_IWUSR
+#define S_IWUSR _S_IWRITE
+#endif
+
+#ifndef S_IRUSR
+#define S_IRUSR _S_IREAD
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(A) (1)
+#endif
+
+#ifndef _SIZE_T_DEFINED
+typedef unsigned int size_t;
+#define _SIZE_T_DEFINED
+#endif
+
+#ifndef _SSIZE_T_DEFINED
+typedef signed int ssize_t;
+#define _SSIZE_T_DEFINED
+#endif
+
+#ifndef _PID_T_DEFINED
+typedef int pid_t;
+#define _PID_T_DEFINED
+#endif
+
+#ifndef offsetof
+#define offsetof(type, member) ((size_t) &((type *)0)->member)
+#endif
+
+/* Define to `int' if unavailable. */
+#ifndef socklen_t
+//#define socklen_t int
+#endif
+
+// !s0rr0w!
+#define SIZEOF_UINT64_T 8
+#define UINT64_C(C) (C)
+typedef unsigned __int64 uint64_t;
+
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgcrypt146lib.vcxproj b/plugins/MirOTR/libgcrypt-1.4.6/libgcrypt146lib.vcxproj new file mode 100644 index 0000000000..66620fd4b1 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgcrypt146lib.vcxproj @@ -0,0 +1,239 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{40FE7861-E54E-4DA9-BE4D-A5178014E477}</ProjectGuid>
+ <ProjectName>libgcrypt</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\Libs\Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\Libs\Release64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\Libs\Debug\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\Libs\Debug64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <AdditionalIncludeDirectories>custom;inc;cipher;mpi;mpi\generic;src;libgpg-error-1.9;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <AdditionalIncludeDirectories>custom;inc;cipher;mpi;mpi\generic;src;libgpg-error-1.9;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>custom;inc;cipher;mpi;mpi\generic;src;libgpg-error-1.9;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>custom;inc;cipher;mpi;mpi\generic;src;libgpg-error-1.9;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="cipher\ac.c" />
+ <ClCompile Include="cipher\arcfour.c" />
+ <ClCompile Include="cipher\blowfish.c" />
+ <ClCompile Include="cipher\camellia-glue.c" />
+ <ClCompile Include="cipher\camellia.c" />
+ <ClCompile Include="cipher\cast5.c" />
+ <ClCompile Include="cipher\cipher.c" />
+ <ClCompile Include="cipher\crc.c" />
+ <ClCompile Include="cipher\des.c" />
+ <ClCompile Include="cipher\dsa.c" />
+ <ClCompile Include="cipher\ecc.c" />
+ <ClCompile Include="cipher\elgamal.c" />
+ <ClCompile Include="cipher\hash-common.c" />
+ <ClCompile Include="cipher\hmac-tests.c" />
+ <ClCompile Include="cipher\md.c" />
+ <ClCompile Include="cipher\md4.c" />
+ <ClCompile Include="cipher\md5.c" />
+ <ClCompile Include="cipher\primegen.c" />
+ <ClCompile Include="cipher\pubkey.c" />
+ <ClCompile Include="cipher\rfc2268.c" />
+ <ClCompile Include="cipher\rijndael.c" />
+ <ClCompile Include="cipher\rmd160.c" />
+ <ClCompile Include="cipher\rsa.c" />
+ <ClCompile Include="cipher\seed.c" />
+ <ClCompile Include="cipher\serpent.c" />
+ <ClCompile Include="cipher\sha1.c" />
+ <ClCompile Include="cipher\sha256.c" />
+ <ClCompile Include="cipher\sha512.c" />
+ <ClCompile Include="cipher\twofish.c" />
+ <ClCompile Include="cipher\whirlpool.c" />
+ <ClCompile Include="mpi\ec.c" />
+ <ClCompile Include="mpi\mpi-add.c" />
+ <ClCompile Include="mpi\mpi-bit.c" />
+ <ClCompile Include="mpi\mpi-cmp.c" />
+ <ClCompile Include="mpi\mpi-div.c" />
+ <ClCompile Include="mpi\mpi-gcd.c" />
+ <ClCompile Include="mpi\mpi-inline.c" />
+ <ClCompile Include="mpi\mpi-inv.c" />
+ <ClCompile Include="mpi\mpi-mod.c" />
+ <ClCompile Include="mpi\mpi-mpow.c" />
+ <ClCompile Include="mpi\mpi-mul.c" />
+ <ClCompile Include="mpi\mpi-pow.c" />
+ <ClCompile Include="mpi\mpi-scan.c" />
+ <ClCompile Include="mpi\mpicoder.c" />
+ <ClCompile Include="mpi\mpih-div.c" />
+ <ClCompile Include="mpi\mpih-mul.c" />
+ <ClCompile Include="mpi\mpiutil.c" />
+ <ClCompile Include="mpi\generic\mpih-add1.c" />
+ <ClCompile Include="mpi\generic\mpih-lshift.c" />
+ <ClCompile Include="mpi\generic\mpih-mul1.c" />
+ <ClCompile Include="mpi\generic\mpih-mul2.c" />
+ <ClCompile Include="mpi\generic\mpih-mul3.c" />
+ <ClCompile Include="mpi\generic\mpih-rshift.c" />
+ <ClCompile Include="mpi\generic\mpih-sub1.c" />
+ <ClCompile Include="mpi\generic\udiv-w-sdiv.c" />
+ <ClCompile Include="src\ath.c" />
+ <ClCompile Include="src\fips.c" />
+ <ClCompile Include="src\global.c" />
+ <ClCompile Include="src\hmac256.c" />
+ <ClCompile Include="src\hwfeatures.c" />
+ <ClCompile Include="src\misc.c" />
+ <ClCompile Include="src\missing-string.c" />
+ <ClCompile Include="src\module.c" />
+ <ClCompile Include="src\secmem.c" />
+ <ClCompile Include="src\sexp.c" />
+ <ClCompile Include="src\stdmem.c" />
+ <ClCompile Include="src\visibility.c" />
+ <ClCompile Include="random\random-csprng.c" />
+ <ClCompile Include="random\random-fips.c" />
+ <ClCompile Include="random\random.c" />
+ <ClCompile Include="random\rndhw.c" />
+ <ClCompile Include="random\rndw32.c" />
+ <ClCompile Include="libgpg-error-1.9\code-from-errno.c" />
+ <ClCompile Include="libgpg-error-1.9\code-to-errno.c" />
+ <ClCompile Include="libgpg-error-1.9\init.c" />
+ <ClCompile Include="libgpg-error-1.9\mkerrcodes.c" />
+ <ClCompile Include="libgpg-error-1.9\strerror-sym.c" />
+ <ClCompile Include="libgpg-error-1.9\strerror.c" />
+ <ClCompile Include="libgpg-error-1.9\strsource-sym.c" />
+ <ClCompile Include="libgpg-error-1.9\strsource.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="cipher\bithelp.h" />
+ <ClInclude Include="cipher\camellia.h" />
+ <ClInclude Include="cipher\hash-common.h" />
+ <ClInclude Include="cipher\rijndael-tables.h" />
+ <ClInclude Include="cipher\rmd.h" />
+ <ClInclude Include="mpi\longlong.h" />
+ <ClInclude Include="mpi\mod-source-info.h" />
+ <ClInclude Include="mpi\mpi-asm-defs.h" />
+ <ClInclude Include="mpi\mpi-inline.h" />
+ <ClInclude Include="mpi\mpi-internal.h" />
+ <ClInclude Include="mpi\generic\mpi-asm-defs.h" />
+ <ClInclude Include="src\ath.h" />
+ <ClInclude Include="src\cipher-proto.h" />
+ <ClInclude Include="src\cipher.h" />
+ <ClInclude Include="src\g10lib.h" />
+ <ClInclude Include="src\gcrypt-module.h" />
+ <ClInclude Include="src\gcrypt.h" />
+ <ClInclude Include="src\hmac256.h" />
+ <ClInclude Include="src\mpi.h" />
+ <ClInclude Include="src\secmem.h" />
+ <ClInclude Include="src\stdmem.h" />
+ <ClInclude Include="src\types.h" />
+ <ClInclude Include="src\visibility.h" />
+ <ClInclude Include="custom\config.h" />
+ <ClInclude Include="random\rand-internal.h" />
+ <ClInclude Include="random\random.h" />
+ <ClInclude Include="libgpg-error-1.9\code-from-errno.h" />
+ <ClInclude Include="libgpg-error-1.9\code-to-errno.h" />
+ <ClInclude Include="libgpg-error-1.9\err-codes-sym.h" />
+ <ClInclude Include="libgpg-error-1.9\err-codes.h" />
+ <ClInclude Include="libgpg-error-1.9\err-sources-sym.h" />
+ <ClInclude Include="libgpg-error-1.9\err-sources.h" />
+ <ClInclude Include="libgpg-error-1.9\errnos-sym.h" />
+ <ClInclude Include="libgpg-error-1.9\gettext.h" />
+ <ClInclude Include="libgpg-error-1.9\gpg-error.h" />
+ <ClInclude Include="libgpg-error-1.9\init.h" />
+ <ClInclude Include="libgpg-error-1.9\mkerrcodes.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="src\libgcrypt.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgcrypt146lib.vcxproj.filters b/plugins/MirOTR/libgcrypt-1.4.6/libgcrypt146lib.vcxproj.filters new file mode 100644 index 0000000000..1e30f39c6f --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgcrypt146lib.vcxproj.filters @@ -0,0 +1,386 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="cipher">
+ <UniqueIdentifier>{0775b44c-fe4d-4330-9c89-2718336516b8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="mpi">
+ <UniqueIdentifier>{7c0c9bf1-f543-4601-bd84-942cc0bfe85d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="mpi\generic">
+ <UniqueIdentifier>{de34f5fd-6646-43e6-8293-03e55d9b59b8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{c7ee8192-9d63-4a85-a423-40373728e7f5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="custom">
+ <UniqueIdentifier>{9a4fc77e-6b4d-4277-9385-8101b650edfa}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="random">
+ <UniqueIdentifier>{5ba54782-b71a-4c1f-b2c8-b9de6456d734}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="error">
+ <UniqueIdentifier>{eebc872e-215c-4a47-bb49-c5ff18970074}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="cipher\ac.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\arcfour.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\blowfish.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\camellia-glue.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\camellia.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\cast5.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\cipher.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\crc.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\des.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\dsa.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\ecc.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\elgamal.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\hash-common.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\hmac-tests.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\md.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\md4.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\md5.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\primegen.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\pubkey.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\rfc2268.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\rijndael.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\rmd160.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\rsa.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\seed.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\serpent.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\sha1.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\sha256.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\sha512.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\twofish.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="cipher\whirlpool.c">
+ <Filter>cipher</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\ec.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-add.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-bit.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-cmp.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-div.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-gcd.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-inline.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-inv.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-mod.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-mpow.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-mul.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-pow.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpi-scan.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpicoder.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpih-div.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpih-mul.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\mpiutil.c">
+ <Filter>mpi</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\mpih-add1.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\mpih-lshift.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\mpih-mul1.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\mpih-mul2.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\mpih-mul3.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\mpih-rshift.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\mpih-sub1.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="mpi\generic\udiv-w-sdiv.c">
+ <Filter>mpi\generic</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ath.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\fips.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\global.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\hmac256.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\hwfeatures.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\misc.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\missing-string.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\module.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\secmem.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\sexp.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\stdmem.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\visibility.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="random\random-csprng.c">
+ <Filter>random</Filter>
+ </ClCompile>
+ <ClCompile Include="random\random-fips.c">
+ <Filter>random</Filter>
+ </ClCompile>
+ <ClCompile Include="random\random.c">
+ <Filter>random</Filter>
+ </ClCompile>
+ <ClCompile Include="random\rndhw.c">
+ <Filter>random</Filter>
+ </ClCompile>
+ <ClCompile Include="random\rndw32.c">
+ <Filter>random</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\code-from-errno.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\code-to-errno.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\init.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\mkerrcodes.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\strerror-sym.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\strerror.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\strsource-sym.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ <ClCompile Include="libgpg-error-1.9\strsource.c">
+ <Filter>error</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="cipher\bithelp.h">
+ <Filter>cipher</Filter>
+ </ClInclude>
+ <ClInclude Include="cipher\camellia.h">
+ <Filter>cipher</Filter>
+ </ClInclude>
+ <ClInclude Include="cipher\hash-common.h">
+ <Filter>cipher</Filter>
+ </ClInclude>
+ <ClInclude Include="cipher\rijndael-tables.h">
+ <Filter>cipher</Filter>
+ </ClInclude>
+ <ClInclude Include="cipher\rmd.h">
+ <Filter>cipher</Filter>
+ </ClInclude>
+ <ClInclude Include="mpi\longlong.h">
+ <Filter>mpi</Filter>
+ </ClInclude>
+ <ClInclude Include="mpi\mod-source-info.h">
+ <Filter>mpi</Filter>
+ </ClInclude>
+ <ClInclude Include="mpi\mpi-asm-defs.h">
+ <Filter>mpi</Filter>
+ </ClInclude>
+ <ClInclude Include="mpi\mpi-inline.h">
+ <Filter>mpi</Filter>
+ </ClInclude>
+ <ClInclude Include="mpi\mpi-internal.h">
+ <Filter>mpi</Filter>
+ </ClInclude>
+ <ClInclude Include="mpi\generic\mpi-asm-defs.h">
+ <Filter>mpi\generic</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ath.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\cipher-proto.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\cipher.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\g10lib.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\gcrypt-module.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\gcrypt.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\hmac256.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\mpi.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\secmem.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\stdmem.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\types.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="src\visibility.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="custom\config.h">
+ <Filter>custom</Filter>
+ </ClInclude>
+ <ClInclude Include="random\rand-internal.h">
+ <Filter>random</Filter>
+ </ClInclude>
+ <ClInclude Include="random\random.h">
+ <Filter>random</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\code-from-errno.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\code-to-errno.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\err-codes-sym.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\err-codes.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\err-sources-sym.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\err-sources.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\errnos-sym.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\gettext.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\gpg-error.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\init.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ <ClInclude Include="libgpg-error-1.9\mkerrcodes.h">
+ <Filter>error</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="src\libgcrypt.def">
+ <Filter>src</Filter>
+ </None>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile new file mode 100644 index 0000000000..59def0682b --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile @@ -0,0 +1,908 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# src/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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. + + + +# Makefile.am for libgpg-error. +# Copyright (C) 2003, 2004 g10 Code GmbH +# +# This file is part of libgpg-error. +# +# libgpg-error is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# libgpg-error 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +# We distribute the generated sources err-sources.h and err-codes.h, +# because they are needed to build the po directory, and they don't +# depend on the configuration anyway. + + + + + + +pkgdatadir = $(datadir)/libgpg-error +pkglibdir = $(libdir)/libgpg-error +pkgincludedir = $(includedir)/libgpg-error +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 = i686-pc-mingw32 +host_triplet = i686-pc-mingw32 +bin_PROGRAMS = gpg-error$(EXEEXT) +#libgpg_error_la_DEPENDENCIES = \ +# $(am__DEPENDENCIES_1) \ +# $(am__DEPENDENCIES_2) +subdir = src +DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/gpg-error-config.in \ + $(srcdir)/versioninfo.rc.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gpg-error-config versioninfo.rc +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" \ + "$(DESTDIR)$(includedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = versioninfo.lo +am__DEPENDENCIES_2 = +am__libgpg_error_la_SOURCES_DIST = gpg-error.h gettext.h w32-gettext.c \ + init.c init.h strsource.c strerror.c code-to-errno.c \ + code-from-errno.c +am__objects_1 = libgpg_error_la-w32-gettext.lo +am_libgpg_error_la_OBJECTS = $(am__objects_1) libgpg_error_la-init.lo \ + libgpg_error_la-strsource.lo libgpg_error_la-strerror.lo \ + libgpg_error_la-code-to-errno.lo \ + libgpg_error_la-code-from-errno.lo +libgpg_error_la_OBJECTS = $(am_libgpg_error_la_OBJECTS) +libgpg_error_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libgpg_error_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_gpg_error_OBJECTS = gpg_error-strsource-sym.$(OBJEXT) \ + gpg_error-strerror-sym.$(OBJEXT) gpg_error-gpg-error.$(OBJEXT) +gpg_error_OBJECTS = $(am_gpg_error_OBJECTS) +gpg_error_DEPENDENCIES = ./libgpg-error.la +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgpg_error_la_SOURCES) $(gpg_error_SOURCES) +DIST_SOURCES = $(am__libgpg_error_la_SOURCES_DIST) \ + $(gpg_error_SOURCES) +m4dataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(m4data_DATA) +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /z/missing --run aclocal-1.10 +AMTAR = ${SHELL} /z/missing --run tar +AR = ar +AS = as +AUTOCONF = ${SHELL} /z/missing --run autoconf +AUTOHEADER = ${SHELL} /z/missing --run autoheader +AUTOMAKE = ${SHELL} /z/missing --run automake-1.10 +AWK = gawk +BUILD_FILEVERSION = 1,9,0,2 +BUILD_TIMESTAMP = 2010-08-12T17:56+0000 +CC = gcc +CCDEPMODE = depmode=gcc3 +CC_FOR_BUILD = gcc +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = dlltool +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = .exe +FGREP = /bin/grep -F +GMSGFMT = /bin/msgfmt +GMSGFMT_015 = : +GPG_ERROR_CONFIG_CFLAGS = +GPG_ERROR_CONFIG_ISUBDIRAFTER = +GPG_ERROR_CONFIG_LIBS = -lgpg-error +GREP = /bin/grep +INSTALL = /bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLLIBS = +INTL_MACOSX_LIBS = +LD = C:/MinGW/mingw32/bin/ld.exe +LDFLAGS = +LIBGPG_ERROR_LT_AGE = 7 +LIBGPG_ERROR_LT_CURRENT = 7 +LIBGPG_ERROR_LT_REVISION = 0 +LIBICONV = +LIBINTL = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = cp -p +LTLIBICONV = +LTLIBINTL = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /z/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MSGFMT = /bin/msgfmt +MSGFMT_015 = : +MSGMERGE = /bin/msgmerge +NM = /mingw/bin/nm +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = libgpg-error +PACKAGE_BUGREPORT = bug-gnupg@gnupg.org +PACKAGE_NAME = libgpg-error +PACKAGE_STRING = libgpg-error 1.9 +PACKAGE_TARNAME = libgpg-error +PACKAGE_URL = +PACKAGE_VERSION = 1.9 +PATH_SEPARATOR = : +POSUB = +RANLIB = ranlib +RC = windres +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +USE_NLS = no +VERSION = 1.9 +XGETTEXT = : +XGETTEXT_015 = : +abs_builddir = /z/src +abs_srcdir = /z/src +abs_top_builddir = /z +abs_top_srcdir = /z +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-mingw32 +build_alias = +build_cpu = i686 +build_os = mingw32 +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-mingw32 +host_alias = +host_cpu = i686 +host_os = mingw32 +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /z/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +gpg_extra_headers = +#gpg_extra_headers = gpg-extra/errno.h +extra_cppflags = +#extra_cppflags = -idirafter gpg-extra +lib_LTLIBRARIES = libgpg-error.la +include_HEADERS = gpg-error.h +bin_SCRIPTS = gpg-error-config +m4datadir = $(datadir)/aclocal +m4data_DATA = gpg-error.m4 +EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ + mkerrnos.awk errnos.in README \ + mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ + mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ + err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \ + gpg-error.def.in versioninfo.rc.in + +BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ + err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \ + gpg-error.def extra-h.in mkw32errmap.map.c + +tmp_files = _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c +CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ + gpg-error.h mkerrcodes mkerrcodes.h gpg-error.def mkw32errmap.tab.h \ + mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \ + gpg-extra/errno.h extra-h.in $(tmp_files) + +#arch_sources = +arch_sources = w32-gettext.c +RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + -DLOCALEDIR=\"$(localedir)\" $(AM_CPPFLAGS) $(CPPFLAGS) + +LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE) +SUFFIXES = .rc .lo +#gpg_error_res = +gpg_error_res = versioninfo.lo +#no_undefined = +no_undefined = -no-undefined +#export_symbols = +export_symbols = -export-symbols gpg-error.def +libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def +#intllibs = +intllibs = +libgpg_error_la_LDFLAGS = -version-info \ + 7:0:7 \ + $(no_undefined) $(export_symbols) + +libgpg_error_la_SOURCES = gpg-error.h gettext.h $(arch_sources) \ + init.c init.h strsource.c strerror.c code-to-errno.c code-from-errno.c + + +# Note that RCCOMPILE needs the same defines as ..._la_CPPFLAGS but +# without the extra_cppflags because they may include am -idirafter +# which is not supported by the RC compiler. +libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags) +libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) +gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c +gpg_error_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags) +gpg_error_LDADD = ./libgpg-error.la +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .rc .lo .c .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +gpg-error-config: $(top_builddir)/config.status $(srcdir)/gpg-error-config.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +versioninfo.rc: $(top_builddir)/config.status $(srcdir)/versioninfo.rc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgpg-error.la: $(libgpg_error_la_OBJECTS) $(libgpg_error_la_DEPENDENCIES) + $(libgpg_error_la_LINK) -rpath $(libdir) $(libgpg_error_la_OBJECTS) $(libgpg_error_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +gpg-error$(EXEEXT): $(gpg_error_OBJECTS) $(gpg_error_DEPENDENCIES) + @rm -f gpg-error$(EXEEXT) + $(LINK) $(gpg_error_OBJECTS) $(gpg_error_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/gpg_error-gpg-error.Po +include ./$(DEPDIR)/gpg_error-strerror-sym.Po +include ./$(DEPDIR)/gpg_error-strsource-sym.Po +include ./$(DEPDIR)/libgpg_error_la-code-from-errno.Plo +include ./$(DEPDIR)/libgpg_error_la-code-to-errno.Plo +include ./$(DEPDIR)/libgpg_error_la-init.Plo +include ./$(DEPDIR)/libgpg_error_la-strerror.Plo +include ./$(DEPDIR)/libgpg_error_la-strsource.Plo +include ./$(DEPDIR)/libgpg_error_la-w32-gettext.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +libgpg_error_la-w32-gettext.lo: w32-gettext.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-w32-gettext.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-w32-gettext.Tpo -c -o libgpg_error_la-w32-gettext.lo `test -f 'w32-gettext.c' || echo '$(srcdir)/'`w32-gettext.c + mv -f $(DEPDIR)/libgpg_error_la-w32-gettext.Tpo $(DEPDIR)/libgpg_error_la-w32-gettext.Plo +# source='w32-gettext.c' object='libgpg_error_la-w32-gettext.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-w32-gettext.lo `test -f 'w32-gettext.c' || echo '$(srcdir)/'`w32-gettext.c + +libgpg_error_la-init.lo: init.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-init.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-init.Tpo -c -o libgpg_error_la-init.lo `test -f 'init.c' || echo '$(srcdir)/'`init.c + mv -f $(DEPDIR)/libgpg_error_la-init.Tpo $(DEPDIR)/libgpg_error_la-init.Plo +# source='init.c' object='libgpg_error_la-init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-init.lo `test -f 'init.c' || echo '$(srcdir)/'`init.c + +libgpg_error_la-strsource.lo: strsource.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-strsource.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-strsource.Tpo -c -o libgpg_error_la-strsource.lo `test -f 'strsource.c' || echo '$(srcdir)/'`strsource.c + mv -f $(DEPDIR)/libgpg_error_la-strsource.Tpo $(DEPDIR)/libgpg_error_la-strsource.Plo +# source='strsource.c' object='libgpg_error_la-strsource.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-strsource.lo `test -f 'strsource.c' || echo '$(srcdir)/'`strsource.c + +libgpg_error_la-strerror.lo: strerror.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-strerror.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-strerror.Tpo -c -o libgpg_error_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c + mv -f $(DEPDIR)/libgpg_error_la-strerror.Tpo $(DEPDIR)/libgpg_error_la-strerror.Plo +# source='strerror.c' object='libgpg_error_la-strerror.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c + +libgpg_error_la-code-to-errno.lo: code-to-errno.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-code-to-errno.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-code-to-errno.Tpo -c -o libgpg_error_la-code-to-errno.lo `test -f 'code-to-errno.c' || echo '$(srcdir)/'`code-to-errno.c + mv -f $(DEPDIR)/libgpg_error_la-code-to-errno.Tpo $(DEPDIR)/libgpg_error_la-code-to-errno.Plo +# source='code-to-errno.c' object='libgpg_error_la-code-to-errno.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-code-to-errno.lo `test -f 'code-to-errno.c' || echo '$(srcdir)/'`code-to-errno.c + +libgpg_error_la-code-from-errno.lo: code-from-errno.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-code-from-errno.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-code-from-errno.Tpo -c -o libgpg_error_la-code-from-errno.lo `test -f 'code-from-errno.c' || echo '$(srcdir)/'`code-from-errno.c + mv -f $(DEPDIR)/libgpg_error_la-code-from-errno.Tpo $(DEPDIR)/libgpg_error_la-code-from-errno.Plo +# source='code-from-errno.c' object='libgpg_error_la-code-from-errno.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-code-from-errno.lo `test -f 'code-from-errno.c' || echo '$(srcdir)/'`code-from-errno.c + +gpg_error-strsource-sym.o: strsource-sym.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strsource-sym.o -MD -MP -MF $(DEPDIR)/gpg_error-strsource-sym.Tpo -c -o gpg_error-strsource-sym.o `test -f 'strsource-sym.c' || echo '$(srcdir)/'`strsource-sym.c + mv -f $(DEPDIR)/gpg_error-strsource-sym.Tpo $(DEPDIR)/gpg_error-strsource-sym.Po +# source='strsource-sym.c' object='gpg_error-strsource-sym.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strsource-sym.o `test -f 'strsource-sym.c' || echo '$(srcdir)/'`strsource-sym.c + +gpg_error-strsource-sym.obj: strsource-sym.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strsource-sym.obj -MD -MP -MF $(DEPDIR)/gpg_error-strsource-sym.Tpo -c -o gpg_error-strsource-sym.obj `if test -f 'strsource-sym.c'; then $(CYGPATH_W) 'strsource-sym.c'; else $(CYGPATH_W) '$(srcdir)/strsource-sym.c'; fi` + mv -f $(DEPDIR)/gpg_error-strsource-sym.Tpo $(DEPDIR)/gpg_error-strsource-sym.Po +# source='strsource-sym.c' object='gpg_error-strsource-sym.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strsource-sym.obj `if test -f 'strsource-sym.c'; then $(CYGPATH_W) 'strsource-sym.c'; else $(CYGPATH_W) '$(srcdir)/strsource-sym.c'; fi` + +gpg_error-strerror-sym.o: strerror-sym.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strerror-sym.o -MD -MP -MF $(DEPDIR)/gpg_error-strerror-sym.Tpo -c -o gpg_error-strerror-sym.o `test -f 'strerror-sym.c' || echo '$(srcdir)/'`strerror-sym.c + mv -f $(DEPDIR)/gpg_error-strerror-sym.Tpo $(DEPDIR)/gpg_error-strerror-sym.Po +# source='strerror-sym.c' object='gpg_error-strerror-sym.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strerror-sym.o `test -f 'strerror-sym.c' || echo '$(srcdir)/'`strerror-sym.c + +gpg_error-strerror-sym.obj: strerror-sym.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strerror-sym.obj -MD -MP -MF $(DEPDIR)/gpg_error-strerror-sym.Tpo -c -o gpg_error-strerror-sym.obj `if test -f 'strerror-sym.c'; then $(CYGPATH_W) 'strerror-sym.c'; else $(CYGPATH_W) '$(srcdir)/strerror-sym.c'; fi` + mv -f $(DEPDIR)/gpg_error-strerror-sym.Tpo $(DEPDIR)/gpg_error-strerror-sym.Po +# source='strerror-sym.c' object='gpg_error-strerror-sym.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strerror-sym.obj `if test -f 'strerror-sym.c'; then $(CYGPATH_W) 'strerror-sym.c'; else $(CYGPATH_W) '$(srcdir)/strerror-sym.c'; fi` + +gpg_error-gpg-error.o: gpg-error.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-gpg-error.o -MD -MP -MF $(DEPDIR)/gpg_error-gpg-error.Tpo -c -o gpg_error-gpg-error.o `test -f 'gpg-error.c' || echo '$(srcdir)/'`gpg-error.c + mv -f $(DEPDIR)/gpg_error-gpg-error.Tpo $(DEPDIR)/gpg_error-gpg-error.Po +# source='gpg-error.c' object='gpg_error-gpg-error.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-gpg-error.o `test -f 'gpg-error.c' || echo '$(srcdir)/'`gpg-error.c + +gpg_error-gpg-error.obj: gpg-error.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-gpg-error.obj -MD -MP -MF $(DEPDIR)/gpg_error-gpg-error.Tpo -c -o gpg_error-gpg-error.obj `if test -f 'gpg-error.c'; then $(CYGPATH_W) 'gpg-error.c'; else $(CYGPATH_W) '$(srcdir)/gpg-error.c'; fi` + mv -f $(DEPDIR)/gpg_error-gpg-error.Tpo $(DEPDIR)/gpg_error-gpg-error.Po +# source='gpg-error.c' object='gpg_error-gpg-error.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-gpg-error.obj `if test -f 'gpg-error.c'; then $(CYGPATH_W) 'gpg-error.c'; else $(CYGPATH_W) '$(srcdir)/gpg-error.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-m4dataDATA: $(m4data_DATA) + @$(NORMAL_INSTALL) + test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" + @list='$(m4data_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \ + $(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \ + done + +uninstall-m4dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(m4data_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \ + rm -f "$(DESTDIR)$(m4datadir)/$$f"; \ + done +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ + $(HEADERS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-data-local install-includeHEADERS \ + install-m4dataDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-m4dataDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-m4dataDATA install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-m4dataDATA + + +.rc.lo: + $(LTRCCOMPILE) -i "$<" -o "$@" + +install-def-file: gpg-error.def + $(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpg-error.def + +uninstall-def-file: + -rm $(DESTDIR)$(libdir)/gpg-error.def +#install-def-file: +#uninstall-def-file: + +err-sources.h: Makefile mkstrtable.awk err-sources.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ + $(srcdir)/err-sources.h.in >$@ + +err-sources-sym.h: Makefile mkstrtable.awk err-sources.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + $(srcdir)/err-sources.h.in >$@ + +err-codes.h: Makefile mkstrtable.awk err-codes.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ + $(srcdir)/err-codes.h.in >$@ + +err-codes-sym.h: Makefile mkstrtable.awk err-codes.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + $(srcdir)/err-codes.h.in >$@ + +code-to-errno.h: Makefile mkerrnos.awk errnos.in + $(AWK) -f $(srcdir)/mkerrnos.awk $(srcdir)/errnos.in >$@ + +# It is correct to use $(CPP). We want the host's idea of the error codes. +mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers) + $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ + $(CPP) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ + $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ + -rm _$@ + +# It is correct to use $(CPP). We want the host's idea of the error codes. +#mkw32errmap.tab.h: Makefile mkw32errmap.c +# $(CPP) -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ +# grep '{&mkw32errmap_marker' >$@ +#mkw32errmap.map.c: mkw32errmap +# ./mkw32errmap --map > $@ +#gpg-extra/errno.h: mkw32errmap +# -$(MKDIR_P) gpg-extra +# ./mkw32errmap > $@ +mkw32errmap.map.c: + echo "/*dummy*/" > $@ + +# We use CC proper for preprocessing thus we have to convince it that +# the data is really to be preprocessed. +gpg-error.def: Makefile gpg-error.def.in + cat $(srcdir)/gpg-error.def.in >_$@.h + $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \ + grep -v '^#' >$@ + -rm _$@.h + +# It is correct to use $(CC_FOR_BUILD) here. We want to run the +# program at build time. +mkerrcodes: mkerrcodes.c mkerrcodes.h Makefile + $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkerrcodes.c + +# It is correct to use $(CC_FOR_BUILD) here. We want to run the +# program at build time. +#mkw32errmap: mkw32errmap.c mkw32errmap.tab.h Makefile +# $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkw32errmap.c + +code-from-errno.h: mkerrcodes Makefile + ./mkerrcodes | $(AWK) -f $(srcdir)/mkerrcodes2.awk >$@ + +errnos-sym.h: Makefile mkstrtable.awk errnos.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + -v prefix=GPG_ERR_ -v namespace=errnos_ \ + $(srcdir)/errnos.in >$@ + +extra-h.in: Makefile w32-add.h w32ce-add.h + -rm extra-h.in + cat $(srcdir)/w32-add.h >>extra-h.in +# cat $(srcdir)/w32ce-add.h >>extra-h.in + echo EOF >>extra-h.in + +gpg-error.h: Makefile mkheader.awk err-sources.h.in err-codes.h.in \ + errnos.in extra-h.in gpg-error.h.in + $(AWK) -f $(srcdir)/mkheader.awk \ + $(srcdir)/err-sources.h.in \ + $(srcdir)/err-codes.h.in \ + $(srcdir)/errnos.in \ + extra-h.in \ + $(srcdir)/gpg-error.h.in > $@ + +install-data-local: +# -$(MKDIR_P) "$(DESTDIR)$(includedir)/gpg-extra" +# $(INSTALL_DATA) gpg-extra/errno.h \ +# "$(DESTDIR)$(includedir)/gpg-extra/errno.h" + : +# 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/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile.am b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile.am new file mode 100644 index 0000000000..2295758de4 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile.am @@ -0,0 +1,210 @@ +# Makefile.am for libgpg-error. +# Copyright (C) 2003, 2004 g10 Code GmbH +# +# This file is part of libgpg-error. +# +# libgpg-error is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# libgpg-error 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +# We distribute the generated sources err-sources.h and err-codes.h, +# because they are needed to build the po directory, and they don't +# depend on the configuration anyway. + + +if HAVE_W32CE_SYSTEM +gpg_extra_headers = gpg-extra/errno.h +extra_cppflags = -idirafter gpg-extra +else +gpg_extra_headers = +extra_cppflags = +endif + +localedir = $(datadir)/locale +bin_PROGRAMS = gpg-error +lib_LTLIBRARIES = libgpg-error.la +include_HEADERS = gpg-error.h +bin_SCRIPTS = gpg-error-config +m4datadir = $(datadir)/aclocal +m4data_DATA = gpg-error.m4 + +EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ + mkerrnos.awk errnos.in README \ + mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ + mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ + err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \ + gpg-error.def.in versioninfo.rc.in + +BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ + err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \ + gpg-error.def extra-h.in mkw32errmap.map.c + +tmp_files = _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c + +CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ + gpg-error.h mkerrcodes mkerrcodes.h gpg-error.def mkw32errmap.tab.h \ + mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \ + gpg-extra/errno.h extra-h.in $(tmp_files) + +if HAVE_W32_SYSTEM +arch_sources = w32-gettext.c + +RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + -DLOCALEDIR=\"$(localedir)\" $(AM_CPPFLAGS) $(CPPFLAGS) +LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE) + +SUFFIXES = .rc .lo + +.rc.lo: + $(LTRCCOMPILE) -i "$<" -o "$@" + +gpg_error_res = versioninfo.lo +no_undefined = -no-undefined +export_symbols = -export-symbols gpg-error.def + +install-def-file: gpg-error.def + $(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpg-error.def + +uninstall-def-file: + -rm $(DESTDIR)$(libdir)/gpg-error.def + +libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def +intllibs = + +else +arch_sources = +gpg_error_res = +no_undefined = +export_symbols = +install-def-file: +uninstall-def-file: + +intllibs = @LTLIBINTL@ + +endif + + +libgpg_error_la_LDFLAGS = -version-info \ + @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ \ + $(no_undefined) $(export_symbols) + +libgpg_error_la_SOURCES = gpg-error.h gettext.h $(arch_sources) \ + init.c init.h strsource.c strerror.c code-to-errno.c code-from-errno.c + +# Note that RCCOMPILE needs the same defines as ..._la_CPPFLAGS but +# without the extra_cppflags because they may include am -idirafter +# which is not supported by the RC compiler. +libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags) +libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) + +gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c +gpg_error_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags) +gpg_error_LDADD = ./libgpg-error.la @LTLIBINTL@ + +err-sources.h: Makefile mkstrtable.awk err-sources.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ + $(srcdir)/err-sources.h.in >$@ + +err-sources-sym.h: Makefile mkstrtable.awk err-sources.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + $(srcdir)/err-sources.h.in >$@ + +err-codes.h: Makefile mkstrtable.awk err-codes.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ + $(srcdir)/err-codes.h.in >$@ + +err-codes-sym.h: Makefile mkstrtable.awk err-codes.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + $(srcdir)/err-codes.h.in >$@ + +code-to-errno.h: Makefile mkerrnos.awk errnos.in + $(AWK) -f $(srcdir)/mkerrnos.awk $(srcdir)/errnos.in >$@ + +# It is correct to use $(CPP). We want the host's idea of the error codes. +mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers) + $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ + $(CPP) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ + $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ + -rm _$@ + +if HAVE_W32CE_SYSTEM +# It is correct to use $(CPP). We want the host's idea of the error codes. +mkw32errmap.tab.h: Makefile mkw32errmap.c + $(CPP) -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ + grep '{&mkw32errmap_marker' >$@ +mkw32errmap.map.c: mkw32errmap + ./mkw32errmap --map > $@ +gpg-extra/errno.h: mkw32errmap + -$(MKDIR_P) gpg-extra + ./mkw32errmap > $@ +else +mkw32errmap.map.c: + echo "/*dummy*/" > $@ +endif + +# We use CC proper for preprocessing thus we have to convince it that +# the data is really to be preprocessed. +gpg-error.def: Makefile gpg-error.def.in + cat $(srcdir)/gpg-error.def.in >_$@.h + $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \ + grep -v '^#' >$@ + -rm _$@.h + +# It is correct to use $(CC_FOR_BUILD) here. We want to run the +# program at build time. +mkerrcodes: mkerrcodes.c mkerrcodes.h Makefile + $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkerrcodes.c + +if HAVE_W32CE_SYSTEM +# It is correct to use $(CC_FOR_BUILD) here. We want to run the +# program at build time. +mkw32errmap: mkw32errmap.c mkw32errmap.tab.h Makefile + $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkw32errmap.c +endif + +code-from-errno.h: mkerrcodes Makefile + ./mkerrcodes | $(AWK) -f $(srcdir)/mkerrcodes2.awk >$@ + +errnos-sym.h: Makefile mkstrtable.awk errnos.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + -v prefix=GPG_ERR_ -v namespace=errnos_ \ + $(srcdir)/errnos.in >$@ + +extra-h.in: Makefile w32-add.h w32ce-add.h + -rm extra-h.in +if HAVE_W32_SYSTEM + cat $(srcdir)/w32-add.h >>extra-h.in +endif +if HAVE_W32CE_SYSTEM + cat $(srcdir)/w32ce-add.h >>extra-h.in +endif + echo EOF >>extra-h.in + +gpg-error.h: Makefile mkheader.awk err-sources.h.in err-codes.h.in \ + errnos.in extra-h.in gpg-error.h.in + $(AWK) -f $(srcdir)/mkheader.awk \ + $(srcdir)/err-sources.h.in \ + $(srcdir)/err-codes.h.in \ + $(srcdir)/errnos.in \ + extra-h.in \ + $(srcdir)/gpg-error.h.in > $@ + + +install-data-local: +if HAVE_W32CE_SYSTEM + -$(MKDIR_P) "$(DESTDIR)$(includedir)/gpg-extra" + $(INSTALL_DATA) gpg-extra/errno.h \ + "$(DESTDIR)$(includedir)/gpg-extra/errno.h" +else + : +endif diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile.in new file mode 100644 index 0000000000..a66bf0781e --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/Makefile.in @@ -0,0 +1,908 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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 for libgpg-error. +# Copyright (C) 2003, 2004 g10 Code GmbH +# +# This file is part of libgpg-error. +# +# libgpg-error is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# libgpg-error 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +# We distribute the generated sources err-sources.h and err-codes.h, +# because they are needed to build the po directory, and they don't +# depend on the configuration anyway. + + + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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 = gpg-error$(EXEEXT) +@HAVE_W32_SYSTEM_FALSE@libgpg_error_la_DEPENDENCIES = \ +@HAVE_W32_SYSTEM_FALSE@ $(am__DEPENDENCIES_1) \ +@HAVE_W32_SYSTEM_FALSE@ $(am__DEPENDENCIES_2) +subdir = src +DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/gpg-error-config.in \ + $(srcdir)/versioninfo.rc.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gpg-error-config versioninfo.rc +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" \ + "$(DESTDIR)$(includedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +@HAVE_W32_SYSTEM_TRUE@am__DEPENDENCIES_1 = versioninfo.lo +am__DEPENDENCIES_2 = +am__libgpg_error_la_SOURCES_DIST = gpg-error.h gettext.h w32-gettext.c \ + init.c init.h strsource.c strerror.c code-to-errno.c \ + code-from-errno.c +@HAVE_W32_SYSTEM_TRUE@am__objects_1 = libgpg_error_la-w32-gettext.lo +am_libgpg_error_la_OBJECTS = $(am__objects_1) libgpg_error_la-init.lo \ + libgpg_error_la-strsource.lo libgpg_error_la-strerror.lo \ + libgpg_error_la-code-to-errno.lo \ + libgpg_error_la-code-from-errno.lo +libgpg_error_la_OBJECTS = $(am_libgpg_error_la_OBJECTS) +libgpg_error_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libgpg_error_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_gpg_error_OBJECTS = gpg_error-strsource-sym.$(OBJEXT) \ + gpg_error-strerror-sym.$(OBJEXT) gpg_error-gpg-error.$(OBJEXT) +gpg_error_OBJECTS = $(am_gpg_error_OBJECTS) +gpg_error_DEPENDENCIES = ./libgpg-error.la +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgpg_error_la_SOURCES) $(gpg_error_SOURCES) +DIST_SOURCES = $(am__libgpg_error_la_SOURCES_DIST) \ + $(gpg_error_SOURCES) +m4dataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(m4data_DATA) +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG_ERROR_CONFIG_CFLAGS = @GPG_ERROR_CONFIG_CFLAGS@ +GPG_ERROR_CONFIG_ISUBDIRAFTER = @GPG_ERROR_CONFIG_ISUBDIRAFTER@ +GPG_ERROR_CONFIG_LIBS = @GPG_ERROR_CONFIG_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGPG_ERROR_LT_AGE = @LIBGPG_ERROR_LT_AGE@ +LIBGPG_ERROR_LT_CURRENT = @LIBGPG_ERROR_LT_CURRENT@ +LIBGPG_ERROR_LT_REVISION = @LIBGPG_ERROR_LT_REVISION@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +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_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +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 = $(datadir)/locale +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +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@ +@HAVE_W32CE_SYSTEM_FALSE@gpg_extra_headers = +@HAVE_W32CE_SYSTEM_TRUE@gpg_extra_headers = gpg-extra/errno.h +@HAVE_W32CE_SYSTEM_FALSE@extra_cppflags = +@HAVE_W32CE_SYSTEM_TRUE@extra_cppflags = -idirafter gpg-extra +lib_LTLIBRARIES = libgpg-error.la +include_HEADERS = gpg-error.h +bin_SCRIPTS = gpg-error-config +m4datadir = $(datadir)/aclocal +m4data_DATA = gpg-error.m4 +EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ + mkerrnos.awk errnos.in README \ + mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ + mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ + err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \ + gpg-error.def.in versioninfo.rc.in + +BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ + err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \ + gpg-error.def extra-h.in mkw32errmap.map.c + +tmp_files = _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c +CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ + gpg-error.h mkerrcodes mkerrcodes.h gpg-error.def mkw32errmap.tab.h \ + mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \ + gpg-extra/errno.h extra-h.in $(tmp_files) + +@HAVE_W32_SYSTEM_FALSE@arch_sources = +@HAVE_W32_SYSTEM_TRUE@arch_sources = w32-gettext.c +@HAVE_W32_SYSTEM_TRUE@RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@HAVE_W32_SYSTEM_TRUE@ -DLOCALEDIR=\"$(localedir)\" $(AM_CPPFLAGS) $(CPPFLAGS) + +@HAVE_W32_SYSTEM_TRUE@LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE) +@HAVE_W32_SYSTEM_TRUE@SUFFIXES = .rc .lo +@HAVE_W32_SYSTEM_FALSE@gpg_error_res = +@HAVE_W32_SYSTEM_TRUE@gpg_error_res = versioninfo.lo +@HAVE_W32_SYSTEM_FALSE@no_undefined = +@HAVE_W32_SYSTEM_TRUE@no_undefined = -no-undefined +@HAVE_W32_SYSTEM_FALSE@export_symbols = +@HAVE_W32_SYSTEM_TRUE@export_symbols = -export-symbols gpg-error.def +@HAVE_W32_SYSTEM_TRUE@libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def +@HAVE_W32_SYSTEM_FALSE@intllibs = @LTLIBINTL@ +@HAVE_W32_SYSTEM_TRUE@intllibs = +libgpg_error_la_LDFLAGS = -version-info \ + @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ \ + $(no_undefined) $(export_symbols) + +libgpg_error_la_SOURCES = gpg-error.h gettext.h $(arch_sources) \ + init.c init.h strsource.c strerror.c code-to-errno.c code-from-errno.c + + +# Note that RCCOMPILE needs the same defines as ..._la_CPPFLAGS but +# without the extra_cppflags because they may include am -idirafter +# which is not supported by the RC compiler. +libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags) +libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) +gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c +gpg_error_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags) +gpg_error_LDADD = ./libgpg-error.la @LTLIBINTL@ +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .rc .lo .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 src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @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 +gpg-error-config: $(top_builddir)/config.status $(srcdir)/gpg-error-config.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +versioninfo.rc: $(top_builddir)/config.status $(srcdir)/versioninfo.rc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgpg-error.la: $(libgpg_error_la_OBJECTS) $(libgpg_error_la_DEPENDENCIES) + $(libgpg_error_la_LINK) -rpath $(libdir) $(libgpg_error_la_OBJECTS) $(libgpg_error_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +gpg-error$(EXEEXT): $(gpg_error_OBJECTS) $(gpg_error_DEPENDENCIES) + @rm -f gpg-error$(EXEEXT) + $(LINK) $(gpg_error_OBJECTS) $(gpg_error_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpg_error-gpg-error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpg_error-strerror-sym.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpg_error-strsource-sym.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgpg_error_la-code-from-errno.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgpg_error_la-code-to-errno.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgpg_error_la-init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgpg_error_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgpg_error_la-strsource.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgpg_error_la-w32-gettext.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libgpg_error_la-w32-gettext.lo: w32-gettext.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-w32-gettext.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-w32-gettext.Tpo -c -o libgpg_error_la-w32-gettext.lo `test -f 'w32-gettext.c' || echo '$(srcdir)/'`w32-gettext.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgpg_error_la-w32-gettext.Tpo $(DEPDIR)/libgpg_error_la-w32-gettext.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='w32-gettext.c' object='libgpg_error_la-w32-gettext.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-w32-gettext.lo `test -f 'w32-gettext.c' || echo '$(srcdir)/'`w32-gettext.c + +libgpg_error_la-init.lo: init.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-init.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-init.Tpo -c -o libgpg_error_la-init.lo `test -f 'init.c' || echo '$(srcdir)/'`init.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgpg_error_la-init.Tpo $(DEPDIR)/libgpg_error_la-init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='init.c' object='libgpg_error_la-init.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-init.lo `test -f 'init.c' || echo '$(srcdir)/'`init.c + +libgpg_error_la-strsource.lo: strsource.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-strsource.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-strsource.Tpo -c -o libgpg_error_la-strsource.lo `test -f 'strsource.c' || echo '$(srcdir)/'`strsource.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgpg_error_la-strsource.Tpo $(DEPDIR)/libgpg_error_la-strsource.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strsource.c' object='libgpg_error_la-strsource.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-strsource.lo `test -f 'strsource.c' || echo '$(srcdir)/'`strsource.c + +libgpg_error_la-strerror.lo: strerror.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-strerror.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-strerror.Tpo -c -o libgpg_error_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgpg_error_la-strerror.Tpo $(DEPDIR)/libgpg_error_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strerror.c' object='libgpg_error_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c + +libgpg_error_la-code-to-errno.lo: code-to-errno.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-code-to-errno.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-code-to-errno.Tpo -c -o libgpg_error_la-code-to-errno.lo `test -f 'code-to-errno.c' || echo '$(srcdir)/'`code-to-errno.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgpg_error_la-code-to-errno.Tpo $(DEPDIR)/libgpg_error_la-code-to-errno.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='code-to-errno.c' object='libgpg_error_la-code-to-errno.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-code-to-errno.lo `test -f 'code-to-errno.c' || echo '$(srcdir)/'`code-to-errno.c + +libgpg_error_la-code-from-errno.lo: code-from-errno.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgpg_error_la-code-from-errno.lo -MD -MP -MF $(DEPDIR)/libgpg_error_la-code-from-errno.Tpo -c -o libgpg_error_la-code-from-errno.lo `test -f 'code-from-errno.c' || echo '$(srcdir)/'`code-from-errno.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgpg_error_la-code-from-errno.Tpo $(DEPDIR)/libgpg_error_la-code-from-errno.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='code-from-errno.c' object='libgpg_error_la-code-from-errno.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgpg_error_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgpg_error_la-code-from-errno.lo `test -f 'code-from-errno.c' || echo '$(srcdir)/'`code-from-errno.c + +gpg_error-strsource-sym.o: strsource-sym.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strsource-sym.o -MD -MP -MF $(DEPDIR)/gpg_error-strsource-sym.Tpo -c -o gpg_error-strsource-sym.o `test -f 'strsource-sym.c' || echo '$(srcdir)/'`strsource-sym.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gpg_error-strsource-sym.Tpo $(DEPDIR)/gpg_error-strsource-sym.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strsource-sym.c' object='gpg_error-strsource-sym.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strsource-sym.o `test -f 'strsource-sym.c' || echo '$(srcdir)/'`strsource-sym.c + +gpg_error-strsource-sym.obj: strsource-sym.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strsource-sym.obj -MD -MP -MF $(DEPDIR)/gpg_error-strsource-sym.Tpo -c -o gpg_error-strsource-sym.obj `if test -f 'strsource-sym.c'; then $(CYGPATH_W) 'strsource-sym.c'; else $(CYGPATH_W) '$(srcdir)/strsource-sym.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gpg_error-strsource-sym.Tpo $(DEPDIR)/gpg_error-strsource-sym.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strsource-sym.c' object='gpg_error-strsource-sym.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strsource-sym.obj `if test -f 'strsource-sym.c'; then $(CYGPATH_W) 'strsource-sym.c'; else $(CYGPATH_W) '$(srcdir)/strsource-sym.c'; fi` + +gpg_error-strerror-sym.o: strerror-sym.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strerror-sym.o -MD -MP -MF $(DEPDIR)/gpg_error-strerror-sym.Tpo -c -o gpg_error-strerror-sym.o `test -f 'strerror-sym.c' || echo '$(srcdir)/'`strerror-sym.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gpg_error-strerror-sym.Tpo $(DEPDIR)/gpg_error-strerror-sym.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strerror-sym.c' object='gpg_error-strerror-sym.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strerror-sym.o `test -f 'strerror-sym.c' || echo '$(srcdir)/'`strerror-sym.c + +gpg_error-strerror-sym.obj: strerror-sym.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-strerror-sym.obj -MD -MP -MF $(DEPDIR)/gpg_error-strerror-sym.Tpo -c -o gpg_error-strerror-sym.obj `if test -f 'strerror-sym.c'; then $(CYGPATH_W) 'strerror-sym.c'; else $(CYGPATH_W) '$(srcdir)/strerror-sym.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gpg_error-strerror-sym.Tpo $(DEPDIR)/gpg_error-strerror-sym.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strerror-sym.c' object='gpg_error-strerror-sym.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-strerror-sym.obj `if test -f 'strerror-sym.c'; then $(CYGPATH_W) 'strerror-sym.c'; else $(CYGPATH_W) '$(srcdir)/strerror-sym.c'; fi` + +gpg_error-gpg-error.o: gpg-error.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-gpg-error.o -MD -MP -MF $(DEPDIR)/gpg_error-gpg-error.Tpo -c -o gpg_error-gpg-error.o `test -f 'gpg-error.c' || echo '$(srcdir)/'`gpg-error.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gpg_error-gpg-error.Tpo $(DEPDIR)/gpg_error-gpg-error.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpg-error.c' object='gpg_error-gpg-error.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-gpg-error.o `test -f 'gpg-error.c' || echo '$(srcdir)/'`gpg-error.c + +gpg_error-gpg-error.obj: gpg-error.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gpg_error-gpg-error.obj -MD -MP -MF $(DEPDIR)/gpg_error-gpg-error.Tpo -c -o gpg_error-gpg-error.obj `if test -f 'gpg-error.c'; then $(CYGPATH_W) 'gpg-error.c'; else $(CYGPATH_W) '$(srcdir)/gpg-error.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gpg_error-gpg-error.Tpo $(DEPDIR)/gpg_error-gpg-error.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpg-error.c' object='gpg_error-gpg-error.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gpg_error_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gpg_error-gpg-error.obj `if test -f 'gpg-error.c'; then $(CYGPATH_W) 'gpg-error.c'; else $(CYGPATH_W) '$(srcdir)/gpg-error.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-m4dataDATA: $(m4data_DATA) + @$(NORMAL_INSTALL) + test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" + @list='$(m4data_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \ + $(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \ + done + +uninstall-m4dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(m4data_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \ + rm -f "$(DESTDIR)$(m4datadir)/$$f"; \ + done +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ + $(HEADERS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-data-local install-includeHEADERS \ + install-m4dataDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-m4dataDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-m4dataDATA install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-m4dataDATA + + +@HAVE_W32_SYSTEM_TRUE@.rc.lo: +@HAVE_W32_SYSTEM_TRUE@ $(LTRCCOMPILE) -i "$<" -o "$@" + +@HAVE_W32_SYSTEM_TRUE@install-def-file: gpg-error.def +@HAVE_W32_SYSTEM_TRUE@ $(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpg-error.def + +@HAVE_W32_SYSTEM_TRUE@uninstall-def-file: +@HAVE_W32_SYSTEM_TRUE@ -rm $(DESTDIR)$(libdir)/gpg-error.def +@HAVE_W32_SYSTEM_FALSE@install-def-file: +@HAVE_W32_SYSTEM_FALSE@uninstall-def-file: + +err-sources.h: Makefile mkstrtable.awk err-sources.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ + $(srcdir)/err-sources.h.in >$@ + +err-sources-sym.h: Makefile mkstrtable.awk err-sources.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + $(srcdir)/err-sources.h.in >$@ + +err-codes.h: Makefile mkstrtable.awk err-codes.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ + $(srcdir)/err-codes.h.in >$@ + +err-codes-sym.h: Makefile mkstrtable.awk err-codes.h.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + $(srcdir)/err-codes.h.in >$@ + +code-to-errno.h: Makefile mkerrnos.awk errnos.in + $(AWK) -f $(srcdir)/mkerrnos.awk $(srcdir)/errnos.in >$@ + +# It is correct to use $(CPP). We want the host's idea of the error codes. +mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers) + $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ + $(CPP) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ + $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ + -rm _$@ + +# It is correct to use $(CPP). We want the host's idea of the error codes. +@HAVE_W32CE_SYSTEM_TRUE@mkw32errmap.tab.h: Makefile mkw32errmap.c +@HAVE_W32CE_SYSTEM_TRUE@ $(CPP) -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ +@HAVE_W32CE_SYSTEM_TRUE@ grep '{&mkw32errmap_marker' >$@ +@HAVE_W32CE_SYSTEM_TRUE@mkw32errmap.map.c: mkw32errmap +@HAVE_W32CE_SYSTEM_TRUE@ ./mkw32errmap --map > $@ +@HAVE_W32CE_SYSTEM_TRUE@gpg-extra/errno.h: mkw32errmap +@HAVE_W32CE_SYSTEM_TRUE@ -$(MKDIR_P) gpg-extra +@HAVE_W32CE_SYSTEM_TRUE@ ./mkw32errmap > $@ +@HAVE_W32CE_SYSTEM_FALSE@mkw32errmap.map.c: +@HAVE_W32CE_SYSTEM_FALSE@ echo "/*dummy*/" > $@ + +# We use CC proper for preprocessing thus we have to convince it that +# the data is really to be preprocessed. +gpg-error.def: Makefile gpg-error.def.in + cat $(srcdir)/gpg-error.def.in >_$@.h + $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \ + grep -v '^#' >$@ + -rm _$@.h + +# It is correct to use $(CC_FOR_BUILD) here. We want to run the +# program at build time. +mkerrcodes: mkerrcodes.c mkerrcodes.h Makefile + $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkerrcodes.c + +# It is correct to use $(CC_FOR_BUILD) here. We want to run the +# program at build time. +@HAVE_W32CE_SYSTEM_TRUE@mkw32errmap: mkw32errmap.c mkw32errmap.tab.h Makefile +@HAVE_W32CE_SYSTEM_TRUE@ $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkw32errmap.c + +code-from-errno.h: mkerrcodes Makefile + ./mkerrcodes | $(AWK) -f $(srcdir)/mkerrcodes2.awk >$@ + +errnos-sym.h: Makefile mkstrtable.awk errnos.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ + -v prefix=GPG_ERR_ -v namespace=errnos_ \ + $(srcdir)/errnos.in >$@ + +extra-h.in: Makefile w32-add.h w32ce-add.h + -rm extra-h.in +@HAVE_W32_SYSTEM_TRUE@ cat $(srcdir)/w32-add.h >>extra-h.in +@HAVE_W32CE_SYSTEM_TRUE@ cat $(srcdir)/w32ce-add.h >>extra-h.in + echo EOF >>extra-h.in + +gpg-error.h: Makefile mkheader.awk err-sources.h.in err-codes.h.in \ + errnos.in extra-h.in gpg-error.h.in + $(AWK) -f $(srcdir)/mkheader.awk \ + $(srcdir)/err-sources.h.in \ + $(srcdir)/err-codes.h.in \ + $(srcdir)/errnos.in \ + extra-h.in \ + $(srcdir)/gpg-error.h.in > $@ + +install-data-local: +@HAVE_W32CE_SYSTEM_TRUE@ -$(MKDIR_P) "$(DESTDIR)$(includedir)/gpg-extra" +@HAVE_W32CE_SYSTEM_TRUE@ $(INSTALL_DATA) gpg-extra/errno.h \ +@HAVE_W32CE_SYSTEM_TRUE@ "$(DESTDIR)$(includedir)/gpg-extra/errno.h" +@HAVE_W32CE_SYSTEM_FALSE@ : +# 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/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/README b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/README new file mode 100644 index 0000000000..c415983598 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/README @@ -0,0 +1,47 @@ +Notes on the source code +======================== + +The mechanism to generate the system error codes is delicate and +fragile, but it's the best I could come up with that supports +cross-compilation and dynamic self-configuration. Here is how it +works: + +1. Generate list of supported system error codes. + +mkerrcodes1.awk generates a list of supported system error codes from +errnos.in. Each entry in the list is protected with #ifdef/#endif, +and contains a GPG_ERR_* marker. The list is stored in "_mkerrcodes.h". + +2. The HOST cpp is run on _mkerrcodes.h. This evaluates the known +system error macros to something (may be a number, maybe a constant +expression as on the GNU/Hurd), suppressing the unknown ones. The +output is piped into step 3. + +3. The cpp output is filtered with grep for only those lines which +contain a GPG_ERR_* marker. The output is piped into step 4. + +4. The filtered output is processed by mkerrcodes.awk, which produces +a table of constant expressions plus GPG_ERR_* code string symbols in +a format suitable for the C program mkerrcodes.c. At this point we +are crossing our fingers that the constant expressions produced by the +system do not contain GPG_ERR_* markers. The output is stored in +mkerrcodes.h. + +5. The file mkerrcodes.h is included by mkerrcodes.c, which is +compiled to a binary executable on the BUILD system. At this point we +are crossing our fingers that the constant expressions produced by the +system do not depend on the build platform anymore. The output is +post-processed by mkerrcodes2.awk and stored in "code-from-errno.h", +which is subsequently used in the library. + +-- Marcus + + Copyright 2006 g10 Code GmbH + + This file is free software; as a special exception the author gives + unlimited permission to copy and/or distribute it, with or without + modifications, as long as this notice is preserved. + + This file 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. diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-from-errno.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-from-errno.c new file mode 100644 index 0000000000..96fcf20860 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-from-errno.c @@ -0,0 +1,69 @@ +/* code-from-errno.c - Mapping errnos to error codes. + Copyright (C) 2003 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <errno.h> + +#include <gpg-error.h> + +#include "code-from-errno.h" + +/* Retrieve the error code for the system error ERR. This returns + GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report + this). */ +gpg_err_code_t +gpg_err_code_from_errno (int err) +{ + int idx; + + if (!err) + return GPG_ERR_NO_ERROR; + + idx = errno_to_idx (err); + + if (idx < 0) + return GPG_ERR_UNKNOWN_ERRNO; + + return GPG_ERR_SYSTEM_ERROR | err_code_from_index[idx]; +} + + +/* Retrieve the error code directly from the ERRNO variable. This + returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped + (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ +gpg_err_code_t +gpg_err_code_from_syserror (void) +{ + int err = errno; + int idx; + + if (!err) + return GPG_ERR_MISSING_ERRNO; + + idx = errno_to_idx (err); + + if (idx < 0) + return GPG_ERR_UNKNOWN_ERRNO; + + return GPG_ERR_SYSTEM_ERROR | err_code_from_index[idx]; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-from-errno.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-from-errno.h new file mode 100644 index 0000000000..071d8ba17f --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-from-errno.h @@ -0,0 +1,120 @@ +/* Output of mkerrcodes2.awk. DO NOT EDIT. */ + +/* errnos.h - List of system error values.
+ Copyright (C) 2004 g10 Code GmbH
+ This file is part of libgpg-error.
+
+ libgpg-error is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ libgpg-error 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with libgpg-error; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+static const int err_code_from_index[] = { + GPG_ERR_EPERM
, + GPG_ERR_ENOENT
, + GPG_ERR_ESRCH
, + GPG_ERR_EINTR
, + GPG_ERR_EIO
, + GPG_ERR_ENXIO
, + GPG_ERR_E2BIG
, + GPG_ERR_ENOEXEC
, + GPG_ERR_EBADF
, + GPG_ERR_ECHILD
, + GPG_ERR_EAGAIN
, + GPG_ERR_ENOMEM
, + GPG_ERR_EACCES
, + GPG_ERR_EFAULT
, + GPG_ERR_EBUSY
, + GPG_ERR_EEXIST
, + GPG_ERR_EXDEV
, + GPG_ERR_ENODEV
, + GPG_ERR_ENOTDIR
, + GPG_ERR_EISDIR
, + GPG_ERR_EINVAL
, + GPG_ERR_ENFILE
, + GPG_ERR_EMFILE
, + GPG_ERR_ENOTTY
, + GPG_ERR_EFBIG
, + GPG_ERR_ENOSPC
, + GPG_ERR_ESPIPE
, + GPG_ERR_EROFS
, + GPG_ERR_EMLINK
, + GPG_ERR_EPIPE
, + GPG_ERR_EDOM
, + GPG_ERR_ERANGE
, + GPG_ERR_EDEADLK
, + GPG_ERR_EDEADLOCK
, + GPG_ERR_ENAMETOOLONG
, + GPG_ERR_ENOLCK
, + GPG_ERR_ENOSYS
, + GPG_ERR_ENOTEMPTY
, + GPG_ERR_EILSEQ
, + GPG_ERR_EINTR
, + GPG_ERR_EBADF
, + GPG_ERR_EACCES
, + GPG_ERR_EFAULT
, + GPG_ERR_EINVAL
, + GPG_ERR_EMFILE
, + GPG_ERR_EWOULDBLOCK
, + GPG_ERR_EINPROGRESS
, + GPG_ERR_EALREADY
, + GPG_ERR_ENOTSOCK
, + GPG_ERR_EDESTADDRREQ
, + GPG_ERR_EMSGSIZE
, + GPG_ERR_EPROTOTYPE
, + GPG_ERR_ENOPROTOOPT
, + GPG_ERR_EPROTONOSUPPORT
, + GPG_ERR_ESOCKTNOSUPPORT
, + GPG_ERR_EOPNOTSUPP
, + GPG_ERR_EPFNOSUPPORT
, + GPG_ERR_EAFNOSUPPORT
, + GPG_ERR_EADDRINUSE
, + GPG_ERR_EADDRNOTAVAIL
, + GPG_ERR_ENETDOWN
, + GPG_ERR_ENETUNREACH
, + GPG_ERR_ENETRESET
, + GPG_ERR_ECONNABORTED
, + GPG_ERR_ECONNRESET
, + GPG_ERR_ENOBUFS
, + GPG_ERR_EISCONN
, + GPG_ERR_ENOTCONN
, + GPG_ERR_ESHUTDOWN
, + GPG_ERR_ETOOMANYREFS
, + GPG_ERR_ETIMEDOUT
, + GPG_ERR_ECONNREFUSED
, + GPG_ERR_ELOOP
, + GPG_ERR_ENAMETOOLONG
, + GPG_ERR_EHOSTDOWN
, + GPG_ERR_EHOSTUNREACH
, + GPG_ERR_ENOTEMPTY
, + GPG_ERR_EPROCLIM
, + GPG_ERR_EUSERS
, + GPG_ERR_EDQUOT
, + GPG_ERR_ESTALE
, + GPG_ERR_EREMOTE
, +}; + +#define errno_to_idx(code) (0 ? -1 \ + : ((code >= 1) && (code <= 14)) ? (code - 1) \ + : ((code >= 16) && (code <= 25)) ? (code - 2) \ + : ((code >= 27) && (code <= 34)) ? (code - 3) \ + : ((code >= 36) && (code <= 36)) ? (code - 4) \ + : ((code >= 36) && (code <= 36)) ? (code - 3) \ + : ((code >= 38) && (code <= 42)) ? (code - 4) \ + : ((code >= 10004) && (code <= 10004)) ? (code - 9965) \ + : ((code >= 10009) && (code <= 10009)) ? (code - 9969) \ + : ((code >= 10013) && (code <= 10014)) ? (code - 9972) \ + : ((code >= 10022) && (code <= 10022)) ? (code - 9979) \ + : ((code >= 10024) && (code <= 10024)) ? (code - 9980) \ + : ((code >= 10035) && (code <= 10071)) ? (code - 9990) \ + : -1) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-to-errno.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-to-errno.c new file mode 100644 index 0000000000..5873aad633 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-to-errno.c @@ -0,0 +1,42 @@ +/* code-to-errno.c - Mapping error codes to errnos. + Copyright (C) 2003 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <gpg-error.h> + +#include "code-to-errno.h" + +/* Retrieve the system error for the error code CODE. This returns 0 + if CODE is not a system error code. */ +int +gpg_err_code_to_errno (gpg_err_code_t code) +{ + if (!(code & GPG_ERR_SYSTEM_ERROR)) + return 0; + code &= ~GPG_ERR_SYSTEM_ERROR; + + if (code < sizeof (err_code_to_errno) / sizeof (err_code_to_errno[0])) + return err_code_to_errno[code]; + else + return 0; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-to-errno.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-to-errno.h new file mode 100644 index 0000000000..114489f929 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/code-to-errno.h @@ -0,0 +1,1300 @@ +/* Output of mkerrnos.awk. DO NOT EDIT. */ + +/* errnos.h - List of system error values. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + + +#include <errno.h> +#ifdef _WIN32 +#include <winsock2.h> +#endif + +static const int err_code_to_errno [] = { +#ifdef E2BIG + E2BIG, +#else +#ifdef WSAE2BIG + WSAE2BIG, +#else + 0, +#endif +#endif +#ifdef EACCES + EACCES, +#else +#ifdef WSAEACCES + WSAEACCES, +#else + 0, +#endif +#endif +#ifdef EADDRINUSE + EADDRINUSE, +#else +#ifdef WSAEADDRINUSE + WSAEADDRINUSE, +#else + 0, +#endif +#endif +#ifdef EADDRNOTAVAIL + EADDRNOTAVAIL, +#else +#ifdef WSAEADDRNOTAVAIL + WSAEADDRNOTAVAIL, +#else + 0, +#endif +#endif +#ifdef EADV + EADV, +#else +#ifdef WSAEADV + WSAEADV, +#else + 0, +#endif +#endif +#ifdef EAFNOSUPPORT + EAFNOSUPPORT, +#else +#ifdef WSAEAFNOSUPPORT + WSAEAFNOSUPPORT, +#else + 0, +#endif +#endif +#ifdef EAGAIN + EAGAIN, +#else +#ifdef WSAEAGAIN + WSAEAGAIN, +#else + 0, +#endif +#endif +#ifdef EALREADY + EALREADY, +#else +#ifdef WSAEALREADY + WSAEALREADY, +#else + 0, +#endif +#endif +#ifdef EAUTH + EAUTH, +#else +#ifdef WSAEAUTH + WSAEAUTH, +#else + 0, +#endif +#endif +#ifdef EBACKGROUND + EBACKGROUND, +#else +#ifdef WSAEBACKGROUND + WSAEBACKGROUND, +#else + 0, +#endif +#endif +#ifdef EBADE + EBADE, +#else +#ifdef WSAEBADE + WSAEBADE, +#else + 0, +#endif +#endif +#ifdef EBADF + EBADF, +#else +#ifdef WSAEBADF + WSAEBADF, +#else + 0, +#endif +#endif +#ifdef EBADFD + EBADFD, +#else +#ifdef WSAEBADFD + WSAEBADFD, +#else + 0, +#endif +#endif +#ifdef EBADMSG + EBADMSG, +#else +#ifdef WSAEBADMSG + WSAEBADMSG, +#else + 0, +#endif +#endif +#ifdef EBADR + EBADR, +#else +#ifdef WSAEBADR + WSAEBADR, +#else + 0, +#endif +#endif +#ifdef EBADRPC + EBADRPC, +#else +#ifdef WSAEBADRPC + WSAEBADRPC, +#else + 0, +#endif +#endif +#ifdef EBADRQC + EBADRQC, +#else +#ifdef WSAEBADRQC + WSAEBADRQC, +#else + 0, +#endif +#endif +#ifdef EBADSLT + EBADSLT, +#else +#ifdef WSAEBADSLT + WSAEBADSLT, +#else + 0, +#endif +#endif +#ifdef EBFONT + EBFONT, +#else +#ifdef WSAEBFONT + WSAEBFONT, +#else + 0, +#endif +#endif +#ifdef EBUSY + EBUSY, +#else +#ifdef WSAEBUSY + WSAEBUSY, +#else + 0, +#endif +#endif +#ifdef ECANCELED + ECANCELED, +#else +#ifdef WSAECANCELED + WSAECANCELED, +#else + 0, +#endif +#endif +#ifdef ECHILD + ECHILD, +#else +#ifdef WSAECHILD + WSAECHILD, +#else + 0, +#endif +#endif +#ifdef ECHRNG + ECHRNG, +#else +#ifdef WSAECHRNG + WSAECHRNG, +#else + 0, +#endif +#endif +#ifdef ECOMM + ECOMM, +#else +#ifdef WSAECOMM + WSAECOMM, +#else + 0, +#endif +#endif +#ifdef ECONNABORTED + ECONNABORTED, +#else +#ifdef WSAECONNABORTED + WSAECONNABORTED, +#else + 0, +#endif +#endif +#ifdef ECONNREFUSED + ECONNREFUSED, +#else +#ifdef WSAECONNREFUSED + WSAECONNREFUSED, +#else + 0, +#endif +#endif +#ifdef ECONNRESET + ECONNRESET, +#else +#ifdef WSAECONNRESET + WSAECONNRESET, +#else + 0, +#endif +#endif +#ifdef ED + ED, +#else +#ifdef WSAED + WSAED, +#else + 0, +#endif +#endif +#ifdef EDEADLK + EDEADLK, +#else +#ifdef WSAEDEADLK + WSAEDEADLK, +#else + 0, +#endif +#endif +#ifdef EDEADLOCK + EDEADLOCK, +#else +#ifdef WSAEDEADLOCK + WSAEDEADLOCK, +#else + 0, +#endif +#endif +#ifdef EDESTADDRREQ + EDESTADDRREQ, +#else +#ifdef WSAEDESTADDRREQ + WSAEDESTADDRREQ, +#else + 0, +#endif +#endif +#ifdef EDIED + EDIED, +#else +#ifdef WSAEDIED + WSAEDIED, +#else + 0, +#endif +#endif +#ifdef EDOM + EDOM, +#else +#ifdef WSAEDOM + WSAEDOM, +#else + 0, +#endif +#endif +#ifdef EDOTDOT + EDOTDOT, +#else +#ifdef WSAEDOTDOT + WSAEDOTDOT, +#else + 0, +#endif +#endif +#ifdef EDQUOT + EDQUOT, +#else +#ifdef WSAEDQUOT + WSAEDQUOT, +#else + 0, +#endif +#endif +#ifdef EEXIST + EEXIST, +#else +#ifdef WSAEEXIST + WSAEEXIST, +#else + 0, +#endif +#endif +#ifdef EFAULT + EFAULT, +#else +#ifdef WSAEFAULT + WSAEFAULT, +#else + 0, +#endif +#endif +#ifdef EFBIG + EFBIG, +#else +#ifdef WSAEFBIG + WSAEFBIG, +#else + 0, +#endif +#endif +#ifdef EFTYPE + EFTYPE, +#else +#ifdef WSAEFTYPE + WSAEFTYPE, +#else + 0, +#endif +#endif +#ifdef EGRATUITOUS + EGRATUITOUS, +#else +#ifdef WSAEGRATUITOUS + WSAEGRATUITOUS, +#else + 0, +#endif +#endif +#ifdef EGREGIOUS + EGREGIOUS, +#else +#ifdef WSAEGREGIOUS + WSAEGREGIOUS, +#else + 0, +#endif +#endif +#ifdef EHOSTDOWN + EHOSTDOWN, +#else +#ifdef WSAEHOSTDOWN + WSAEHOSTDOWN, +#else + 0, +#endif +#endif +#ifdef EHOSTUNREACH + EHOSTUNREACH, +#else +#ifdef WSAEHOSTUNREACH + WSAEHOSTUNREACH, +#else + 0, +#endif +#endif +#ifdef EIDRM + EIDRM, +#else +#ifdef WSAEIDRM + WSAEIDRM, +#else + 0, +#endif +#endif +#ifdef EIEIO + EIEIO, +#else +#ifdef WSAEIEIO + WSAEIEIO, +#else + 0, +#endif +#endif +#ifdef EILSEQ + EILSEQ, +#else +#ifdef WSAEILSEQ + WSAEILSEQ, +#else + 0, +#endif +#endif +#ifdef EINPROGRESS + EINPROGRESS, +#else +#ifdef WSAEINPROGRESS + WSAEINPROGRESS, +#else + 0, +#endif +#endif +#ifdef EINTR + EINTR, +#else +#ifdef WSAEINTR + WSAEINTR, +#else + 0, +#endif +#endif +#ifdef EINVAL + EINVAL, +#else +#ifdef WSAEINVAL + WSAEINVAL, +#else + 0, +#endif +#endif +#ifdef EIO + EIO, +#else +#ifdef WSAEIO + WSAEIO, +#else + 0, +#endif +#endif +#ifdef EISCONN + EISCONN, +#else +#ifdef WSAEISCONN + WSAEISCONN, +#else + 0, +#endif +#endif +#ifdef EISDIR + EISDIR, +#else +#ifdef WSAEISDIR + WSAEISDIR, +#else + 0, +#endif +#endif +#ifdef EISNAM + EISNAM, +#else +#ifdef WSAEISNAM + WSAEISNAM, +#else + 0, +#endif +#endif +#ifdef EL2HLT + EL2HLT, +#else +#ifdef WSAEL2HLT + WSAEL2HLT, +#else + 0, +#endif +#endif +#ifdef EL2NSYNC + EL2NSYNC, +#else +#ifdef WSAEL2NSYNC + WSAEL2NSYNC, +#else + 0, +#endif +#endif +#ifdef EL3HLT + EL3HLT, +#else +#ifdef WSAEL3HLT + WSAEL3HLT, +#else + 0, +#endif +#endif +#ifdef EL3RST + EL3RST, +#else +#ifdef WSAEL3RST + WSAEL3RST, +#else + 0, +#endif +#endif +#ifdef ELIBACC + ELIBACC, +#else +#ifdef WSAELIBACC + WSAELIBACC, +#else + 0, +#endif +#endif +#ifdef ELIBBAD + ELIBBAD, +#else +#ifdef WSAELIBBAD + WSAELIBBAD, +#else + 0, +#endif +#endif +#ifdef ELIBEXEC + ELIBEXEC, +#else +#ifdef WSAELIBEXEC + WSAELIBEXEC, +#else + 0, +#endif +#endif +#ifdef ELIBMAX + ELIBMAX, +#else +#ifdef WSAELIBMAX + WSAELIBMAX, +#else + 0, +#endif +#endif +#ifdef ELIBSCN + ELIBSCN, +#else +#ifdef WSAELIBSCN + WSAELIBSCN, +#else + 0, +#endif +#endif +#ifdef ELNRNG + ELNRNG, +#else +#ifdef WSAELNRNG + WSAELNRNG, +#else + 0, +#endif +#endif +#ifdef ELOOP + ELOOP, +#else +#ifdef WSAELOOP + WSAELOOP, +#else + 0, +#endif +#endif +#ifdef EMEDIUMTYPE + EMEDIUMTYPE, +#else +#ifdef WSAEMEDIUMTYPE + WSAEMEDIUMTYPE, +#else + 0, +#endif +#endif +#ifdef EMFILE + EMFILE, +#else +#ifdef WSAEMFILE + WSAEMFILE, +#else + 0, +#endif +#endif +#ifdef EMLINK + EMLINK, +#else +#ifdef WSAEMLINK + WSAEMLINK, +#else + 0, +#endif +#endif +#ifdef EMSGSIZE + EMSGSIZE, +#else +#ifdef WSAEMSGSIZE + WSAEMSGSIZE, +#else + 0, +#endif +#endif +#ifdef EMULTIHOP + EMULTIHOP, +#else +#ifdef WSAEMULTIHOP + WSAEMULTIHOP, +#else + 0, +#endif +#endif +#ifdef ENAMETOOLONG + ENAMETOOLONG, +#else +#ifdef WSAENAMETOOLONG + WSAENAMETOOLONG, +#else + 0, +#endif +#endif +#ifdef ENAVAIL + ENAVAIL, +#else +#ifdef WSAENAVAIL + WSAENAVAIL, +#else + 0, +#endif +#endif +#ifdef ENEEDAUTH + ENEEDAUTH, +#else +#ifdef WSAENEEDAUTH + WSAENEEDAUTH, +#else + 0, +#endif +#endif +#ifdef ENETDOWN + ENETDOWN, +#else +#ifdef WSAENETDOWN + WSAENETDOWN, +#else + 0, +#endif +#endif +#ifdef ENETRESET + ENETRESET, +#else +#ifdef WSAENETRESET + WSAENETRESET, +#else + 0, +#endif +#endif +#ifdef ENETUNREACH + ENETUNREACH, +#else +#ifdef WSAENETUNREACH + WSAENETUNREACH, +#else + 0, +#endif +#endif +#ifdef ENFILE + ENFILE, +#else +#ifdef WSAENFILE + WSAENFILE, +#else + 0, +#endif +#endif +#ifdef ENOANO + ENOANO, +#else +#ifdef WSAENOANO + WSAENOANO, +#else + 0, +#endif +#endif +#ifdef ENOBUFS + ENOBUFS, +#else +#ifdef WSAENOBUFS + WSAENOBUFS, +#else + 0, +#endif +#endif +#ifdef ENOCSI + ENOCSI, +#else +#ifdef WSAENOCSI + WSAENOCSI, +#else + 0, +#endif +#endif +#ifdef ENODATA + ENODATA, +#else +#ifdef WSAENODATA + WSAENODATA, +#else + 0, +#endif +#endif +#ifdef ENODEV + ENODEV, +#else +#ifdef WSAENODEV + WSAENODEV, +#else + 0, +#endif +#endif +#ifdef ENOENT + ENOENT, +#else +#ifdef WSAENOENT + WSAENOENT, +#else + 0, +#endif +#endif +#ifdef ENOEXEC + ENOEXEC, +#else +#ifdef WSAENOEXEC + WSAENOEXEC, +#else + 0, +#endif +#endif +#ifdef ENOLCK + ENOLCK, +#else +#ifdef WSAENOLCK + WSAENOLCK, +#else + 0, +#endif +#endif +#ifdef ENOLINK + ENOLINK, +#else +#ifdef WSAENOLINK + WSAENOLINK, +#else + 0, +#endif +#endif +#ifdef ENOMEDIUM + ENOMEDIUM, +#else +#ifdef WSAENOMEDIUM + WSAENOMEDIUM, +#else + 0, +#endif +#endif +#ifdef ENOMEM + ENOMEM, +#else +#ifdef WSAENOMEM + WSAENOMEM, +#else + 0, +#endif +#endif +#ifdef ENOMSG + ENOMSG, +#else +#ifdef WSAENOMSG + WSAENOMSG, +#else + 0, +#endif +#endif +#ifdef ENONET + ENONET, +#else +#ifdef WSAENONET + WSAENONET, +#else + 0, +#endif +#endif +#ifdef ENOPKG + ENOPKG, +#else +#ifdef WSAENOPKG + WSAENOPKG, +#else + 0, +#endif +#endif +#ifdef ENOPROTOOPT + ENOPROTOOPT, +#else +#ifdef WSAENOPROTOOPT + WSAENOPROTOOPT, +#else + 0, +#endif +#endif +#ifdef ENOSPC + ENOSPC, +#else +#ifdef WSAENOSPC + WSAENOSPC, +#else + 0, +#endif +#endif +#ifdef ENOSR + ENOSR, +#else +#ifdef WSAENOSR + WSAENOSR, +#else + 0, +#endif +#endif +#ifdef ENOSTR + ENOSTR, +#else +#ifdef WSAENOSTR + WSAENOSTR, +#else + 0, +#endif +#endif +#ifdef ENOSYS + ENOSYS, +#else +#ifdef WSAENOSYS + WSAENOSYS, +#else + 0, +#endif +#endif +#ifdef ENOTBLK + ENOTBLK, +#else +#ifdef WSAENOTBLK + WSAENOTBLK, +#else + 0, +#endif +#endif +#ifdef ENOTCONN + ENOTCONN, +#else +#ifdef WSAENOTCONN + WSAENOTCONN, +#else + 0, +#endif +#endif +#ifdef ENOTDIR + ENOTDIR, +#else +#ifdef WSAENOTDIR + WSAENOTDIR, +#else + 0, +#endif +#endif +#ifdef ENOTEMPTY + ENOTEMPTY, +#else +#ifdef WSAENOTEMPTY + WSAENOTEMPTY, +#else + 0, +#endif +#endif +#ifdef ENOTNAM + ENOTNAM, +#else +#ifdef WSAENOTNAM + WSAENOTNAM, +#else + 0, +#endif +#endif +#ifdef ENOTSOCK + ENOTSOCK, +#else +#ifdef WSAENOTSOCK + WSAENOTSOCK, +#else + 0, +#endif +#endif +#ifdef ENOTSUP + ENOTSUP, +#else +#ifdef WSAENOTSUP + WSAENOTSUP, +#else + 0, +#endif +#endif +#ifdef ENOTTY + ENOTTY, +#else +#ifdef WSAENOTTY + WSAENOTTY, +#else + 0, +#endif +#endif +#ifdef ENOTUNIQ + ENOTUNIQ, +#else +#ifdef WSAENOTUNIQ + WSAENOTUNIQ, +#else + 0, +#endif +#endif +#ifdef ENXIO + ENXIO, +#else +#ifdef WSAENXIO + WSAENXIO, +#else + 0, +#endif +#endif +#ifdef EOPNOTSUPP + EOPNOTSUPP, +#else +#ifdef WSAEOPNOTSUPP + WSAEOPNOTSUPP, +#else + 0, +#endif +#endif +#ifdef EOVERFLOW + EOVERFLOW, +#else +#ifdef WSAEOVERFLOW + WSAEOVERFLOW, +#else + 0, +#endif +#endif +#ifdef EPERM + EPERM, +#else +#ifdef WSAEPERM + WSAEPERM, +#else + 0, +#endif +#endif +#ifdef EPFNOSUPPORT + EPFNOSUPPORT, +#else +#ifdef WSAEPFNOSUPPORT + WSAEPFNOSUPPORT, +#else + 0, +#endif +#endif +#ifdef EPIPE + EPIPE, +#else +#ifdef WSAEPIPE + WSAEPIPE, +#else + 0, +#endif +#endif +#ifdef EPROCLIM + EPROCLIM, +#else +#ifdef WSAEPROCLIM + WSAEPROCLIM, +#else + 0, +#endif +#endif +#ifdef EPROCUNAVAIL + EPROCUNAVAIL, +#else +#ifdef WSAEPROCUNAVAIL + WSAEPROCUNAVAIL, +#else + 0, +#endif +#endif +#ifdef EPROGMISMATCH + EPROGMISMATCH, +#else +#ifdef WSAEPROGMISMATCH + WSAEPROGMISMATCH, +#else + 0, +#endif +#endif +#ifdef EPROGUNAVAIL + EPROGUNAVAIL, +#else +#ifdef WSAEPROGUNAVAIL + WSAEPROGUNAVAIL, +#else + 0, +#endif +#endif +#ifdef EPROTO + EPROTO, +#else +#ifdef WSAEPROTO + WSAEPROTO, +#else + 0, +#endif +#endif +#ifdef EPROTONOSUPPORT + EPROTONOSUPPORT, +#else +#ifdef WSAEPROTONOSUPPORT + WSAEPROTONOSUPPORT, +#else + 0, +#endif +#endif +#ifdef EPROTOTYPE + EPROTOTYPE, +#else +#ifdef WSAEPROTOTYPE + WSAEPROTOTYPE, +#else + 0, +#endif +#endif +#ifdef ERANGE + ERANGE, +#else +#ifdef WSAERANGE + WSAERANGE, +#else + 0, +#endif +#endif +#ifdef EREMCHG + EREMCHG, +#else +#ifdef WSAEREMCHG + WSAEREMCHG, +#else + 0, +#endif +#endif +#ifdef EREMOTE + EREMOTE, +#else +#ifdef WSAEREMOTE + WSAEREMOTE, +#else + 0, +#endif +#endif +#ifdef EREMOTEIO + EREMOTEIO, +#else +#ifdef WSAEREMOTEIO + WSAEREMOTEIO, +#else + 0, +#endif +#endif +#ifdef ERESTART + ERESTART, +#else +#ifdef WSAERESTART + WSAERESTART, +#else + 0, +#endif +#endif +#ifdef EROFS + EROFS, +#else +#ifdef WSAEROFS + WSAEROFS, +#else + 0, +#endif +#endif +#ifdef ERPCMISMATCH + ERPCMISMATCH, +#else +#ifdef WSAERPCMISMATCH + WSAERPCMISMATCH, +#else + 0, +#endif +#endif +#ifdef ESHUTDOWN + ESHUTDOWN, +#else +#ifdef WSAESHUTDOWN + WSAESHUTDOWN, +#else + 0, +#endif +#endif +#ifdef ESOCKTNOSUPPORT + ESOCKTNOSUPPORT, +#else +#ifdef WSAESOCKTNOSUPPORT + WSAESOCKTNOSUPPORT, +#else + 0, +#endif +#endif +#ifdef ESPIPE + ESPIPE, +#else +#ifdef WSAESPIPE + WSAESPIPE, +#else + 0, +#endif +#endif +#ifdef ESRCH + ESRCH, +#else +#ifdef WSAESRCH + WSAESRCH, +#else + 0, +#endif +#endif +#ifdef ESRMNT + ESRMNT, +#else +#ifdef WSAESRMNT + WSAESRMNT, +#else + 0, +#endif +#endif +#ifdef ESTALE + ESTALE, +#else +#ifdef WSAESTALE + WSAESTALE, +#else + 0, +#endif +#endif +#ifdef ESTRPIPE + ESTRPIPE, +#else +#ifdef WSAESTRPIPE + WSAESTRPIPE, +#else + 0, +#endif +#endif +#ifdef ETIME + ETIME, +#else +#ifdef WSAETIME + WSAETIME, +#else + 0, +#endif +#endif +#ifdef ETIMEDOUT + ETIMEDOUT, +#else +#ifdef WSAETIMEDOUT + WSAETIMEDOUT, +#else + 0, +#endif +#endif +#ifdef ETOOMANYREFS + ETOOMANYREFS, +#else +#ifdef WSAETOOMANYREFS + WSAETOOMANYREFS, +#else + 0, +#endif +#endif +#ifdef ETXTBSY + ETXTBSY, +#else +#ifdef WSAETXTBSY + WSAETXTBSY, +#else + 0, +#endif +#endif +#ifdef EUCLEAN + EUCLEAN, +#else +#ifdef WSAEUCLEAN + WSAEUCLEAN, +#else + 0, +#endif +#endif +#ifdef EUNATCH + EUNATCH, +#else +#ifdef WSAEUNATCH + WSAEUNATCH, +#else + 0, +#endif +#endif +#ifdef EUSERS + EUSERS, +#else +#ifdef WSAEUSERS + WSAEUSERS, +#else + 0, +#endif +#endif +#ifdef EWOULDBLOCK + EWOULDBLOCK, +#else +#ifdef WSAEWOULDBLOCK + WSAEWOULDBLOCK, +#else + 0, +#endif +#endif +#ifdef EXDEV + EXDEV, +#else +#ifdef WSAEXDEV + WSAEXDEV, +#else + 0, +#endif +#endif +#ifdef EXFULL + EXFULL, +#else +#ifdef WSAEXFULL + WSAEXFULL, +#else + 0, +#endif +#endif +}; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes-sym.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes-sym.h new file mode 100644 index 0000000000..0ed5032eb0 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes-sym.h @@ -0,0 +1,530 @@ +/* Output of mkstrtable.awk. DO NOT EDIT. */ + +/* err-codes.h - List of error codes and their description. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + +/* The purpose of this complex string table is to produce + optimal code with a minimum of relocations. */ + +static const char msgstr[] = + "GPG_ERR_NO_ERROR" "\0" + "GPG_ERR_GENERAL" "\0" + "GPG_ERR_UNKNOWN_PACKET" "\0" + "GPG_ERR_UNKNOWN_VERSION" "\0" + "GPG_ERR_PUBKEY_ALGO" "\0" + "GPG_ERR_DIGEST_ALGO" "\0" + "GPG_ERR_BAD_PUBKEY" "\0" + "GPG_ERR_BAD_SECKEY" "\0" + "GPG_ERR_BAD_SIGNATURE" "\0" + "GPG_ERR_NO_PUBKEY" "\0" + "GPG_ERR_CHECKSUM" "\0" + "GPG_ERR_BAD_PASSPHRASE" "\0" + "GPG_ERR_CIPHER_ALGO" "\0" + "GPG_ERR_KEYRING_OPEN" "\0" + "GPG_ERR_INV_PACKET" "\0" + "GPG_ERR_INV_ARMOR" "\0" + "GPG_ERR_NO_USER_ID" "\0" + "GPG_ERR_NO_SECKEY" "\0" + "GPG_ERR_WRONG_SECKEY" "\0" + "GPG_ERR_BAD_KEY" "\0" + "GPG_ERR_COMPR_ALGO" "\0" + "GPG_ERR_NO_PRIME" "\0" + "GPG_ERR_NO_ENCODING_METHOD" "\0" + "GPG_ERR_NO_ENCRYPTION_SCHEME" "\0" + "GPG_ERR_NO_SIGNATURE_SCHEME" "\0" + "GPG_ERR_INV_ATTR" "\0" + "GPG_ERR_NO_VALUE" "\0" + "GPG_ERR_NOT_FOUND" "\0" + "GPG_ERR_VALUE_NOT_FOUND" "\0" + "GPG_ERR_SYNTAX" "\0" + "GPG_ERR_BAD_MPI" "\0" + "GPG_ERR_INV_PASSPHRASE" "\0" + "GPG_ERR_SIG_CLASS" "\0" + "GPG_ERR_RESOURCE_LIMIT" "\0" + "GPG_ERR_INV_KEYRING" "\0" + "GPG_ERR_TRUSTDB" "\0" + "GPG_ERR_BAD_CERT" "\0" + "GPG_ERR_INV_USER_ID" "\0" + "GPG_ERR_UNEXPECTED" "\0" + "GPG_ERR_TIME_CONFLICT" "\0" + "GPG_ERR_KEYSERVER" "\0" + "GPG_ERR_WRONG_PUBKEY_ALGO" "\0" + "GPG_ERR_TRIBUTE_TO_D_A" "\0" + "GPG_ERR_WEAK_KEY" "\0" + "GPG_ERR_INV_KEYLEN" "\0" + "GPG_ERR_INV_ARG" "\0" + "GPG_ERR_BAD_URI" "\0" + "GPG_ERR_INV_URI" "\0" + "GPG_ERR_NETWORK" "\0" + "GPG_ERR_UNKNOWN_HOST" "\0" + "GPG_ERR_SELFTEST_FAILED" "\0" + "GPG_ERR_NOT_ENCRYPTED" "\0" + "GPG_ERR_NOT_PROCESSED" "\0" + "GPG_ERR_UNUSABLE_PUBKEY" "\0" + "GPG_ERR_UNUSABLE_SECKEY" "\0" + "GPG_ERR_INV_VALUE" "\0" + "GPG_ERR_BAD_CERT_CHAIN" "\0" + "GPG_ERR_MISSING_CERT" "\0" + "GPG_ERR_NO_DATA" "\0" + "GPG_ERR_BUG" "\0" + "GPG_ERR_NOT_SUPPORTED" "\0" + "GPG_ERR_INV_OP" "\0" + "GPG_ERR_TIMEOUT" "\0" + "GPG_ERR_INTERNAL" "\0" + "GPG_ERR_EOF_GCRYPT" "\0" + "GPG_ERR_INV_OBJ" "\0" + "GPG_ERR_TOO_SHORT" "\0" + "GPG_ERR_TOO_LARGE" "\0" + "GPG_ERR_NO_OBJ" "\0" + "GPG_ERR_NOT_IMPLEMENTED" "\0" + "GPG_ERR_CONFLICT" "\0" + "GPG_ERR_INV_CIPHER_MODE" "\0" + "GPG_ERR_INV_FLAG" "\0" + "GPG_ERR_INV_HANDLE" "\0" + "GPG_ERR_TRUNCATED" "\0" + "GPG_ERR_INCOMPLETE_LINE" "\0" + "GPG_ERR_INV_RESPONSE" "\0" + "GPG_ERR_NO_AGENT" "\0" + "GPG_ERR_AGENT" "\0" + "GPG_ERR_INV_DATA" "\0" + "GPG_ERR_ASSUAN_SERVER_FAULT" "\0" + "GPG_ERR_ASSUAN" "\0" + "GPG_ERR_INV_SESSION_KEY" "\0" + "GPG_ERR_INV_SEXP" "\0" + "GPG_ERR_UNSUPPORTED_ALGORITHM" "\0" + "GPG_ERR_NO_PIN_ENTRY" "\0" + "GPG_ERR_PIN_ENTRY" "\0" + "GPG_ERR_BAD_PIN" "\0" + "GPG_ERR_INV_NAME" "\0" + "GPG_ERR_BAD_DATA" "\0" + "GPG_ERR_INV_PARAMETER" "\0" + "GPG_ERR_WRONG_CARD" "\0" + "GPG_ERR_NO_DIRMNGR" "\0" + "GPG_ERR_DIRMNGR" "\0" + "GPG_ERR_CERT_REVOKED" "\0" + "GPG_ERR_NO_CRL_KNOWN" "\0" + "GPG_ERR_CRL_TOO_OLD" "\0" + "GPG_ERR_LINE_TOO_LONG" "\0" + "GPG_ERR_NOT_TRUSTED" "\0" + "GPG_ERR_CANCELED" "\0" + "GPG_ERR_BAD_CA_CERT" "\0" + "GPG_ERR_CERT_EXPIRED" "\0" + "GPG_ERR_CERT_TOO_YOUNG" "\0" + "GPG_ERR_UNSUPPORTED_CERT" "\0" + "GPG_ERR_UNKNOWN_SEXP" "\0" + "GPG_ERR_UNSUPPORTED_PROTECTION" "\0" + "GPG_ERR_CORRUPTED_PROTECTION" "\0" + "GPG_ERR_AMBIGUOUS_NAME" "\0" + "GPG_ERR_CARD" "\0" + "GPG_ERR_CARD_RESET" "\0" + "GPG_ERR_CARD_REMOVED" "\0" + "GPG_ERR_INV_CARD" "\0" + "GPG_ERR_CARD_NOT_PRESENT" "\0" + "GPG_ERR_NO_PKCS15_APP" "\0" + "GPG_ERR_NOT_CONFIRMED" "\0" + "GPG_ERR_CONFIGURATION" "\0" + "GPG_ERR_NO_POLICY_MATCH" "\0" + "GPG_ERR_INV_INDEX" "\0" + "GPG_ERR_INV_ID" "\0" + "GPG_ERR_NO_SCDAEMON" "\0" + "GPG_ERR_SCDAEMON" "\0" + "GPG_ERR_UNSUPPORTED_PROTOCOL" "\0" + "GPG_ERR_BAD_PIN_METHOD" "\0" + "GPG_ERR_CARD_NOT_INITIALIZED" "\0" + "GPG_ERR_UNSUPPORTED_OPERATION" "\0" + "GPG_ERR_WRONG_KEY_USAGE" "\0" + "GPG_ERR_NOTHING_FOUND" "\0" + "GPG_ERR_WRONG_BLOB_TYPE" "\0" + "GPG_ERR_MISSING_VALUE" "\0" + "GPG_ERR_HARDWARE" "\0" + "GPG_ERR_PIN_BLOCKED" "\0" + "GPG_ERR_USE_CONDITIONS" "\0" + "GPG_ERR_PIN_NOT_SYNCED" "\0" + "GPG_ERR_INV_CRL" "\0" + "GPG_ERR_BAD_BER" "\0" + "GPG_ERR_INV_BER" "\0" + "GPG_ERR_ELEMENT_NOT_FOUND" "\0" + "GPG_ERR_IDENTIFIER_NOT_FOUND" "\0" + "GPG_ERR_INV_TAG" "\0" + "GPG_ERR_INV_LENGTH" "\0" + "GPG_ERR_INV_KEYINFO" "\0" + "GPG_ERR_UNEXPECTED_TAG" "\0" + "GPG_ERR_NOT_DER_ENCODED" "\0" + "GPG_ERR_NO_CMS_OBJ" "\0" + "GPG_ERR_INV_CMS_OBJ" "\0" + "GPG_ERR_UNKNOWN_CMS_OBJ" "\0" + "GPG_ERR_UNSUPPORTED_CMS_OBJ" "\0" + "GPG_ERR_UNSUPPORTED_ENCODING" "\0" + "GPG_ERR_UNSUPPORTED_CMS_VERSION" "\0" + "GPG_ERR_UNKNOWN_ALGORITHM" "\0" + "GPG_ERR_INV_ENGINE" "\0" + "GPG_ERR_PUBKEY_NOT_TRUSTED" "\0" + "GPG_ERR_DECRYPT_FAILED" "\0" + "GPG_ERR_KEY_EXPIRED" "\0" + "GPG_ERR_SIG_EXPIRED" "\0" + "GPG_ERR_ENCODING_PROBLEM" "\0" + "GPG_ERR_INV_STATE" "\0" + "GPG_ERR_DUP_VALUE" "\0" + "GPG_ERR_MISSING_ACTION" "\0" + "GPG_ERR_MODULE_NOT_FOUND" "\0" + "GPG_ERR_INV_OID_STRING" "\0" + "GPG_ERR_INV_TIME" "\0" + "GPG_ERR_INV_CRL_OBJ" "\0" + "GPG_ERR_UNSUPPORTED_CRL_VERSION" "\0" + "GPG_ERR_INV_CERT_OBJ" "\0" + "GPG_ERR_UNKNOWN_NAME" "\0" + "GPG_ERR_LOCALE_PROBLEM" "\0" + "GPG_ERR_NOT_LOCKED" "\0" + "GPG_ERR_PROTOCOL_VIOLATION" "\0" + "GPG_ERR_INV_MAC" "\0" + "GPG_ERR_INV_REQUEST" "\0" + "GPG_ERR_UNKNOWN_EXTN" "\0" + "GPG_ERR_UNKNOWN_CRIT_EXTN" "\0" + "GPG_ERR_LOCKED" "\0" + "GPG_ERR_UNKNOWN_OPTION" "\0" + "GPG_ERR_UNKNOWN_COMMAND" "\0" + "GPG_ERR_NOT_OPERATIONAL" "\0" + "GPG_ERR_NO_PASSPHRASE" "\0" + "GPG_ERR_NO_PIN" "\0" + "GPG_ERR_NOT_ENABLED" "\0" + "GPG_ERR_NO_ENGINE" "\0" + "GPG_ERR_MISSING_KEY" "\0" + "GPG_ERR_TOO_MANY" "\0" + "GPG_ERR_LIMIT_REACHED" "\0" + "GPG_ERR_UNFINISHED" "\0" + "GPG_ERR_BUFFER_TOO_SHORT" "\0" + "GPG_ERR_SEXP_INV_LEN_SPEC" "\0" + "GPG_ERR_SEXP_STRING_TOO_LONG" "\0" + "GPG_ERR_SEXP_UNMATCHED_PAREN" "\0" + "GPG_ERR_SEXP_NOT_CANONICAL" "\0" + "GPG_ERR_SEXP_BAD_CHARACTER" "\0" + "GPG_ERR_SEXP_BAD_QUOTATION" "\0" + "GPG_ERR_SEXP_ZERO_PREFIX" "\0" + "GPG_ERR_SEXP_NESTED_DH" "\0" + "GPG_ERR_SEXP_UNMATCHED_DH" "\0" + "GPG_ERR_SEXP_UNEXPECTED_PUNC" "\0" + "GPG_ERR_SEXP_BAD_HEX_CHAR" "\0" + "GPG_ERR_SEXP_ODD_HEX_NUMBERS" "\0" + "GPG_ERR_SEXP_BAD_OCT_CHAR" "\0" + "GPG_ERR_ASS_GENERAL" "\0" + "GPG_ERR_ASS_ACCEPT_FAILED" "\0" + "GPG_ERR_ASS_CONNECT_FAILED" "\0" + "GPG_ERR_ASS_INV_RESPONSE" "\0" + "GPG_ERR_ASS_INV_VALUE" "\0" + "GPG_ERR_ASS_INCOMPLETE_LINE" "\0" + "GPG_ERR_ASS_LINE_TOO_LONG" "\0" + "GPG_ERR_ASS_NESTED_COMMANDS" "\0" + "GPG_ERR_ASS_NO_DATA_CB" "\0" + "GPG_ERR_ASS_NO_INQUIRE_CB" "\0" + "GPG_ERR_ASS_NOT_A_SERVER" "\0" + "GPG_ERR_ASS_NOT_A_CLIENT" "\0" + "GPG_ERR_ASS_SERVER_START" "\0" + "GPG_ERR_ASS_READ_ERROR" "\0" + "GPG_ERR_ASS_WRITE_ERROR" "\0" + "GPG_ERR_ASS_TOO_MUCH_DATA" "\0" + "GPG_ERR_ASS_UNEXPECTED_CMD" "\0" + "GPG_ERR_ASS_UNKNOWN_CMD" "\0" + "GPG_ERR_ASS_SYNTAX" "\0" + "GPG_ERR_ASS_CANCELED" "\0" + "GPG_ERR_ASS_NO_INPUT" "\0" + "GPG_ERR_ASS_NO_OUTPUT" "\0" + "GPG_ERR_ASS_PARAMETER" "\0" + "GPG_ERR_ASS_UNKNOWN_INQUIRE" "\0" + "GPG_ERR_USER_1" "\0" + "GPG_ERR_USER_2" "\0" + "GPG_ERR_USER_3" "\0" + "GPG_ERR_USER_4" "\0" + "GPG_ERR_USER_5" "\0" + "GPG_ERR_USER_6" "\0" + "GPG_ERR_USER_7" "\0" + "GPG_ERR_USER_8" "\0" + "GPG_ERR_USER_9" "\0" + "GPG_ERR_USER_10" "\0" + "GPG_ERR_USER_11" "\0" + "GPG_ERR_USER_12" "\0" + "GPG_ERR_USER_13" "\0" + "GPG_ERR_USER_14" "\0" + "GPG_ERR_USER_15" "\0" + "GPG_ERR_USER_16" "\0" + "GPG_ERR_MISSING_ERRNO" "\0" + "GPG_ERR_UNKNOWN_ERRNO" "\0" + "GPG_ERR_EOF" "\0" + "GPG_ERR_CODE_DIM"; + +static const int msgidx[] = + { + 0, + 17, + 33, + 56, + 80, + 100, + 120, + 139, + 158, + 180, + 198, + 215, + 238, + 258, + 279, + 298, + 316, + 335, + 353, + 374, + 390, + 409, + 426, + 453, + 482, + 510, + 527, + 544, + 562, + 586, + 601, + 617, + 640, + 658, + 681, + 701, + 717, + 734, + 754, + 773, + 795, + 813, + 839, + 862, + 879, + 898, + 914, + 930, + 946, + 962, + 983, + 1007, + 1029, + 1051, + 1075, + 1099, + 1117, + 1140, + 1161, + 1177, + 1189, + 1211, + 1226, + 1242, + 1259, + 1278, + 1294, + 1312, + 1330, + 1345, + 1369, + 1386, + 1410, + 1427, + 1446, + 1464, + 1488, + 1509, + 1526, + 1540, + 1557, + 1585, + 1600, + 1624, + 1641, + 1671, + 1692, + 1710, + 1726, + 1743, + 1760, + 1782, + 1801, + 1820, + 1836, + 1857, + 1878, + 1898, + 1920, + 1940, + 1957, + 1977, + 1998, + 2021, + 2046, + 2067, + 2098, + 2127, + 2150, + 2163, + 2182, + 2203, + 2220, + 2245, + 2267, + 2289, + 2311, + 2335, + 2353, + 2368, + 2388, + 2405, + 2434, + 2457, + 2486, + 2516, + 2540, + 2562, + 2586, + 2608, + 2625, + 2645, + 2668, + 2691, + 2707, + 2723, + 2739, + 2765, + 2794, + 2810, + 2829, + 2849, + 2872, + 2896, + 2915, + 2935, + 2959, + 2987, + 3016, + 3048, + 3074, + 3093, + 3120, + 3143, + 3163, + 3183, + 3208, + 3226, + 3244, + 3267, + 3292, + 3315, + 3332, + 3352, + 3384, + 3405, + 3426, + 3449, + 3468, + 3495, + 3511, + 3531, + 3552, + 3578, + 3593, + 3616, + 3640, + 3664, + 3686, + 3701, + 3721, + 3739, + 3759, + 3776, + 3798, + 3817, + 3842, + 3868, + 3897, + 3926, + 3953, + 3980, + 4007, + 4032, + 4055, + 4081, + 4110, + 4136, + 4165, + 4191, + 4211, + 4237, + 4264, + 4289, + 4311, + 4339, + 4365, + 4393, + 4416, + 4442, + 4467, + 4492, + 4517, + 4540, + 4564, + 4590, + 4617, + 4641, + 4660, + 4681, + 4702, + 4724, + 4746, + 4774, + 4789, + 4804, + 4819, + 4834, + 4849, + 4864, + 4879, + 4894, + 4909, + 4925, + 4941, + 4957, + 4973, + 4989, + 5005, + 5021, + 5043, + 5065, + 5077 + }; + +static inline int +msgidxof (int code) +{ + return (0 ? 0 + : ((code >= 0) && (code <= 183)) ? (code - 0) + : ((code >= 199) && (code <= 213)) ? (code - 15) + : ((code >= 257) && (code <= 271)) ? (code - 58) + : ((code >= 273) && (code <= 281)) ? (code - 59) + : ((code >= 1024) && (code <= 1039)) ? (code - 801) + : ((code >= 16381) && (code <= 16383)) ? (code - 16142) + : 16384 - 16142); +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes.h new file mode 100644 index 0000000000..17ecc9c670 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes.h @@ -0,0 +1,530 @@ +/* Output of mkstrtable.awk. DO NOT EDIT. */ + +/* err-codes.h - List of error codes and their description. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + +/* The purpose of this complex string table is to produce + optimal code with a minimum of relocations. */ + +static const char msgstr[] = + gettext_noop ("Success") "\0" + gettext_noop ("General error") "\0" + gettext_noop ("Unknown packet") "\0" + gettext_noop ("Unknown version in packet") "\0" + gettext_noop ("Invalid public key algorithm") "\0" + gettext_noop ("Invalid digest algorithm") "\0" + gettext_noop ("Bad public key") "\0" + gettext_noop ("Bad secret key") "\0" + gettext_noop ("Bad signature") "\0" + gettext_noop ("No public key") "\0" + gettext_noop ("Checksum error") "\0" + gettext_noop ("Bad passphrase") "\0" + gettext_noop ("Invalid cipher algorithm") "\0" + gettext_noop ("Keyring open") "\0" + gettext_noop ("Invalid packet") "\0" + gettext_noop ("Invalid armor") "\0" + gettext_noop ("No user ID") "\0" + gettext_noop ("No secret key") "\0" + gettext_noop ("Wrong secret key used") "\0" + gettext_noop ("Bad session key") "\0" + gettext_noop ("Unknown compression algorithm") "\0" + gettext_noop ("Number is not prime") "\0" + gettext_noop ("Invalid encoding method") "\0" + gettext_noop ("Invalid encryption scheme") "\0" + gettext_noop ("Invalid signature scheme") "\0" + gettext_noop ("Invalid attribute") "\0" + gettext_noop ("No value") "\0" + gettext_noop ("Not found") "\0" + gettext_noop ("Value not found") "\0" + gettext_noop ("Syntax error") "\0" + gettext_noop ("Bad MPI value") "\0" + gettext_noop ("Invalid passphrase") "\0" + gettext_noop ("Invalid signature class") "\0" + gettext_noop ("Resources exhausted") "\0" + gettext_noop ("Invalid keyring") "\0" + gettext_noop ("Trust DB error") "\0" + gettext_noop ("Bad certificate") "\0" + gettext_noop ("Invalid user ID") "\0" + gettext_noop ("Unexpected error") "\0" + gettext_noop ("Time conflict") "\0" + gettext_noop ("Keyserver error") "\0" + gettext_noop ("Wrong public key algorithm") "\0" + gettext_noop ("Tribute to D. A.") "\0" + gettext_noop ("Weak encryption key") "\0" + gettext_noop ("Invalid key length") "\0" + gettext_noop ("Invalid argument") "\0" + gettext_noop ("Syntax error in URI") "\0" + gettext_noop ("Invalid URI") "\0" + gettext_noop ("Network error") "\0" + gettext_noop ("Unknown host") "\0" + gettext_noop ("Selftest failed") "\0" + gettext_noop ("Data not encrypted") "\0" + gettext_noop ("Data not processed") "\0" + gettext_noop ("Unusable public key") "\0" + gettext_noop ("Unusable secret key") "\0" + gettext_noop ("Invalid value") "\0" + gettext_noop ("Bad certificate chain") "\0" + gettext_noop ("Missing certificate") "\0" + gettext_noop ("No data") "\0" + gettext_noop ("Bug") "\0" + gettext_noop ("Not supported") "\0" + gettext_noop ("Invalid operation code") "\0" + gettext_noop ("Timeout") "\0" + gettext_noop ("Internal error") "\0" + gettext_noop ("EOF (gcrypt)") "\0" + gettext_noop ("Invalid object") "\0" + gettext_noop ("Provided object is too short") "\0" + gettext_noop ("Provided object is too large") "\0" + gettext_noop ("Missing item in object") "\0" + gettext_noop ("Not implemented") "\0" + gettext_noop ("Conflicting use") "\0" + gettext_noop ("Invalid cipher mode") "\0" + gettext_noop ("Invalid flag") "\0" + gettext_noop ("Invalid handle") "\0" + gettext_noop ("Result truncated") "\0" + gettext_noop ("Incomplete line") "\0" + gettext_noop ("Invalid response") "\0" + gettext_noop ("No agent running") "\0" + gettext_noop ("agent error") "\0" + gettext_noop ("Invalid data") "\0" + gettext_noop ("Unspecific Assuan server fault") "\0" + gettext_noop ("General Assuan error") "\0" + gettext_noop ("Invalid session key") "\0" + gettext_noop ("Invalid S-expression") "\0" + gettext_noop ("Unsupported algorithm") "\0" + gettext_noop ("No pinentry") "\0" + gettext_noop ("pinentry error") "\0" + gettext_noop ("Bad PIN") "\0" + gettext_noop ("Invalid name") "\0" + gettext_noop ("Bad data") "\0" + gettext_noop ("Invalid parameter") "\0" + gettext_noop ("Wrong card") "\0" + gettext_noop ("No dirmngr") "\0" + gettext_noop ("dirmngr error") "\0" + gettext_noop ("Certificate revoked") "\0" + gettext_noop ("No CRL known") "\0" + gettext_noop ("CRL too old") "\0" + gettext_noop ("Line too long") "\0" + gettext_noop ("Not trusted") "\0" + gettext_noop ("Operation cancelled") "\0" + gettext_noop ("Bad CA certificate") "\0" + gettext_noop ("Certificate expired") "\0" + gettext_noop ("Certificate too young") "\0" + gettext_noop ("Unsupported certificate") "\0" + gettext_noop ("Unknown S-expression") "\0" + gettext_noop ("Unsupported protection") "\0" + gettext_noop ("Corrupted protection") "\0" + gettext_noop ("Ambiguous name") "\0" + gettext_noop ("Card error") "\0" + gettext_noop ("Card reset required") "\0" + gettext_noop ("Card removed") "\0" + gettext_noop ("Invalid card") "\0" + gettext_noop ("Card not present") "\0" + gettext_noop ("No PKCS15 application") "\0" + gettext_noop ("Not confirmed") "\0" + gettext_noop ("Configuration error") "\0" + gettext_noop ("No policy match") "\0" + gettext_noop ("Invalid index") "\0" + gettext_noop ("Invalid ID") "\0" + gettext_noop ("No SmartCard daemon") "\0" + gettext_noop ("SmartCard daemon error") "\0" + gettext_noop ("Unsupported protocol") "\0" + gettext_noop ("Bad PIN method") "\0" + gettext_noop ("Card not initialized") "\0" + gettext_noop ("Unsupported operation") "\0" + gettext_noop ("Wrong key usage") "\0" + gettext_noop ("Nothing found") "\0" + gettext_noop ("Wrong blob type") "\0" + gettext_noop ("Missing value") "\0" + gettext_noop ("Hardware problem") "\0" + gettext_noop ("PIN blocked") "\0" + gettext_noop ("Conditions of use not satisfied") "\0" + gettext_noop ("PINs are not synced") "\0" + gettext_noop ("Invalid CRL") "\0" + gettext_noop ("BER error") "\0" + gettext_noop ("Invalid BER") "\0" + gettext_noop ("Element not found") "\0" + gettext_noop ("Identifier not found") "\0" + gettext_noop ("Invalid tag") "\0" + gettext_noop ("Invalid length") "\0" + gettext_noop ("Invalid key info") "\0" + gettext_noop ("Unexpected tag") "\0" + gettext_noop ("Not DER encoded") "\0" + gettext_noop ("No CMS object") "\0" + gettext_noop ("Invalid CMS object") "\0" + gettext_noop ("Unknown CMS object") "\0" + gettext_noop ("Unsupported CMS object") "\0" + gettext_noop ("Unsupported encoding") "\0" + gettext_noop ("Unsupported CMS version") "\0" + gettext_noop ("Unknown algorithm") "\0" + gettext_noop ("Invalid crypto engine") "\0" + gettext_noop ("Public key not trusted") "\0" + gettext_noop ("Decryption failed") "\0" + gettext_noop ("Key expired") "\0" + gettext_noop ("Signature expired") "\0" + gettext_noop ("Encoding problem") "\0" + gettext_noop ("Invalid state") "\0" + gettext_noop ("Duplicated value") "\0" + gettext_noop ("Missing action") "\0" + gettext_noop ("ASN.1 module not found") "\0" + gettext_noop ("Invalid OID string") "\0" + gettext_noop ("Invalid time") "\0" + gettext_noop ("Invalid CRL object") "\0" + gettext_noop ("Unsupported CRL version") "\0" + gettext_noop ("Invalid certificate object") "\0" + gettext_noop ("Unknown name") "\0" + gettext_noop ("A locale function failed") "\0" + gettext_noop ("Not locked") "\0" + gettext_noop ("Protocol violation") "\0" + gettext_noop ("Invalid MAC") "\0" + gettext_noop ("Invalid request") "\0" + gettext_noop ("Unknown extension") "\0" + gettext_noop ("Unknown critical extension") "\0" + gettext_noop ("Locked") "\0" + gettext_noop ("Unknown option") "\0" + gettext_noop ("Unknown command") "\0" + gettext_noop ("Not operational") "\0" + gettext_noop ("No passphrase given") "\0" + gettext_noop ("No PIN given") "\0" + gettext_noop ("Not enabled") "\0" + gettext_noop ("No crypto engine") "\0" + gettext_noop ("Missing key") "\0" + gettext_noop ("Too many objects") "\0" + gettext_noop ("Limit reached") "\0" + gettext_noop ("Operation not yet finished") "\0" + gettext_noop ("Buffer too short") "\0" + gettext_noop ("Invalid length specifier in S-expression") "\0" + gettext_noop ("String too long in S-expression") "\0" + gettext_noop ("Unmatched parentheses in S-expression") "\0" + gettext_noop ("S-expression not canonical") "\0" + gettext_noop ("Bad character in S-expression") "\0" + gettext_noop ("Bad quotation in S-expression") "\0" + gettext_noop ("Zero prefix in S-expression") "\0" + gettext_noop ("Nested display hints in S-expression") "\0" + gettext_noop ("Unmatched display hints") "\0" + gettext_noop ("Unexpected reserved punctuation in S-expression") "\0" + gettext_noop ("Bad hexadecimal character in S-expression") "\0" + gettext_noop ("Odd hexadecimal numbers in S-expression") "\0" + gettext_noop ("Bad octal character in S-expression") "\0" + gettext_noop ("General IPC error") "\0" + gettext_noop ("IPC accept call failed") "\0" + gettext_noop ("IPC connect call failed") "\0" + gettext_noop ("Invalid IPC response") "\0" + gettext_noop ("Invalid value passed to IPC") "\0" + gettext_noop ("Incomplete line passed to IPC") "\0" + gettext_noop ("Line passed to IPC too long") "\0" + gettext_noop ("Nested IPC commands") "\0" + gettext_noop ("No data callback in IPC") "\0" + gettext_noop ("No inquire callback in IPC") "\0" + gettext_noop ("Not an IPC server") "\0" + gettext_noop ("Not an IPC client") "\0" + gettext_noop ("Problem starting IPC server") "\0" + gettext_noop ("IPC read error") "\0" + gettext_noop ("IPC write error") "\0" + gettext_noop ("Too much data for IPC layer") "\0" + gettext_noop ("Unexpected IPC command") "\0" + gettext_noop ("Unknown IPC command") "\0" + gettext_noop ("IPC syntax error") "\0" + gettext_noop ("IPC call has been cancelled") "\0" + gettext_noop ("No input source for IPC") "\0" + gettext_noop ("No output source for IPC") "\0" + gettext_noop ("IPC parameter error") "\0" + gettext_noop ("Unknown IPC inquire") "\0" + gettext_noop ("User defined error code 1") "\0" + gettext_noop ("User defined error code 2") "\0" + gettext_noop ("User defined error code 3") "\0" + gettext_noop ("User defined error code 4") "\0" + gettext_noop ("User defined error code 5") "\0" + gettext_noop ("User defined error code 6") "\0" + gettext_noop ("User defined error code 7") "\0" + gettext_noop ("User defined error code 8") "\0" + gettext_noop ("User defined error code 9") "\0" + gettext_noop ("User defined error code 10") "\0" + gettext_noop ("User defined error code 11") "\0" + gettext_noop ("User defined error code 12") "\0" + gettext_noop ("User defined error code 13") "\0" + gettext_noop ("User defined error code 14") "\0" + gettext_noop ("User defined error code 15") "\0" + gettext_noop ("User defined error code 16") "\0" + gettext_noop ("System error w/o errno") "\0" + gettext_noop ("Unknown system error") "\0" + gettext_noop ("End of file") "\0" + gettext_noop ("Unknown error code"); + +static const int msgidx[] = + { + 0, + 8, + 22, + 37, + 63, + 92, + 117, + 132, + 147, + 161, + 175, + 190, + 205, + 230, + 243, + 258, + 272, + 283, + 297, + 319, + 335, + 365, + 385, + 409, + 435, + 460, + 478, + 487, + 497, + 513, + 526, + 540, + 559, + 583, + 603, + 619, + 634, + 650, + 666, + 683, + 697, + 713, + 740, + 757, + 777, + 796, + 813, + 833, + 845, + 859, + 872, + 888, + 907, + 926, + 946, + 966, + 980, + 1002, + 1022, + 1030, + 1034, + 1048, + 1071, + 1079, + 1094, + 1107, + 1122, + 1151, + 1180, + 1203, + 1219, + 1235, + 1255, + 1268, + 1283, + 1300, + 1316, + 1333, + 1350, + 1362, + 1375, + 1406, + 1427, + 1447, + 1468, + 1490, + 1502, + 1517, + 1525, + 1538, + 1547, + 1565, + 1576, + 1587, + 1601, + 1621, + 1634, + 1646, + 1660, + 1672, + 1692, + 1711, + 1731, + 1753, + 1777, + 1798, + 1821, + 1842, + 1857, + 1868, + 1888, + 1901, + 1914, + 1931, + 1953, + 1967, + 1987, + 2003, + 2017, + 2028, + 2048, + 2071, + 2092, + 2107, + 2128, + 2150, + 2166, + 2180, + 2196, + 2210, + 2227, + 2239, + 2271, + 2291, + 2303, + 2313, + 2325, + 2343, + 2364, + 2376, + 2391, + 2408, + 2423, + 2439, + 2453, + 2472, + 2491, + 2514, + 2535, + 2559, + 2577, + 2599, + 2622, + 2640, + 2652, + 2670, + 2687, + 2701, + 2718, + 2733, + 2756, + 2775, + 2788, + 2807, + 2831, + 2858, + 2871, + 2896, + 2907, + 2926, + 2938, + 2954, + 2972, + 2999, + 3006, + 3021, + 3037, + 3053, + 3073, + 3086, + 3098, + 3115, + 3127, + 3144, + 3158, + 3185, + 3202, + 3243, + 3275, + 3313, + 3340, + 3370, + 3400, + 3428, + 3465, + 3489, + 3537, + 3579, + 3619, + 3655, + 3673, + 3696, + 3720, + 3741, + 3769, + 3799, + 3827, + 3847, + 3871, + 3898, + 3916, + 3934, + 3962, + 3977, + 3993, + 4021, + 4044, + 4064, + 4081, + 4109, + 4133, + 4158, + 4178, + 4198, + 4224, + 4250, + 4276, + 4302, + 4328, + 4354, + 4380, + 4406, + 4432, + 4459, + 4486, + 4513, + 4540, + 4567, + 4594, + 4621, + 4644, + 4665, + 4677 + }; + +static inline int +msgidxof (int code) +{ + return (0 ? 0 + : ((code >= 0) && (code <= 183)) ? (code - 0) + : ((code >= 199) && (code <= 213)) ? (code - 15) + : ((code >= 257) && (code <= 271)) ? (code - 58) + : ((code >= 273) && (code <= 281)) ? (code - 59) + : ((code >= 1024) && (code <= 1039)) ? (code - 801) + : ((code >= 16381) && (code <= 16383)) ? (code - 16142) + : 16384 - 16142); +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes.h.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes.h.in new file mode 100644 index 0000000000..8b40861644 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-codes.h.in @@ -0,0 +1,298 @@ +# err-codes.h.in - List of error codes and their description input file. +/* err-codes.h - List of error codes and their description. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +# Everything up to the first line that starts with a number in the +# first column is copied into the output verbatim. Then, empty lines +# are ignored. Other lines must have an error code number, followed +# by one or more <tab> characters, followed by the error code symbol, +# followed by one or more <tab> characters, followed by the error +# message. Trailing whitespace is removed. The error codes should be +# sorted. The last line should not have a number, but only a <tab>, +# followed by a dummy field, followed by a <tab>, followed by a +# description for error codes that are not in the list. + +0 GPG_ERR_NO_ERROR Success +1 GPG_ERR_GENERAL General error +2 GPG_ERR_UNKNOWN_PACKET Unknown packet +3 GPG_ERR_UNKNOWN_VERSION Unknown version in packet +4 GPG_ERR_PUBKEY_ALGO Invalid public key algorithm +5 GPG_ERR_DIGEST_ALGO Invalid digest algorithm +6 GPG_ERR_BAD_PUBKEY Bad public key +7 GPG_ERR_BAD_SECKEY Bad secret key +8 GPG_ERR_BAD_SIGNATURE Bad signature +9 GPG_ERR_NO_PUBKEY No public key +10 GPG_ERR_CHECKSUM Checksum error +11 GPG_ERR_BAD_PASSPHRASE Bad passphrase +12 GPG_ERR_CIPHER_ALGO Invalid cipher algorithm +13 GPG_ERR_KEYRING_OPEN Keyring open +14 GPG_ERR_INV_PACKET Invalid packet +15 GPG_ERR_INV_ARMOR Invalid armor +16 GPG_ERR_NO_USER_ID No user ID +17 GPG_ERR_NO_SECKEY No secret key +18 GPG_ERR_WRONG_SECKEY Wrong secret key used +19 GPG_ERR_BAD_KEY Bad session key +20 GPG_ERR_COMPR_ALGO Unknown compression algorithm +21 GPG_ERR_NO_PRIME Number is not prime +22 GPG_ERR_NO_ENCODING_METHOD Invalid encoding method +23 GPG_ERR_NO_ENCRYPTION_SCHEME Invalid encryption scheme +24 GPG_ERR_NO_SIGNATURE_SCHEME Invalid signature scheme +25 GPG_ERR_INV_ATTR Invalid attribute +26 GPG_ERR_NO_VALUE No value +27 GPG_ERR_NOT_FOUND Not found +28 GPG_ERR_VALUE_NOT_FOUND Value not found +29 GPG_ERR_SYNTAX Syntax error +30 GPG_ERR_BAD_MPI Bad MPI value +31 GPG_ERR_INV_PASSPHRASE Invalid passphrase +32 GPG_ERR_SIG_CLASS Invalid signature class +33 GPG_ERR_RESOURCE_LIMIT Resources exhausted +34 GPG_ERR_INV_KEYRING Invalid keyring +35 GPG_ERR_TRUSTDB Trust DB error +36 GPG_ERR_BAD_CERT Bad certificate +37 GPG_ERR_INV_USER_ID Invalid user ID +38 GPG_ERR_UNEXPECTED Unexpected error +39 GPG_ERR_TIME_CONFLICT Time conflict +40 GPG_ERR_KEYSERVER Keyserver error +41 GPG_ERR_WRONG_PUBKEY_ALGO Wrong public key algorithm +42 GPG_ERR_TRIBUTE_TO_D_A Tribute to D. A. +43 GPG_ERR_WEAK_KEY Weak encryption key +44 GPG_ERR_INV_KEYLEN Invalid key length +45 GPG_ERR_INV_ARG Invalid argument +46 GPG_ERR_BAD_URI Syntax error in URI +47 GPG_ERR_INV_URI Invalid URI +48 GPG_ERR_NETWORK Network error +49 GPG_ERR_UNKNOWN_HOST Unknown host +50 GPG_ERR_SELFTEST_FAILED Selftest failed +51 GPG_ERR_NOT_ENCRYPTED Data not encrypted +52 GPG_ERR_NOT_PROCESSED Data not processed +53 GPG_ERR_UNUSABLE_PUBKEY Unusable public key +54 GPG_ERR_UNUSABLE_SECKEY Unusable secret key +55 GPG_ERR_INV_VALUE Invalid value +56 GPG_ERR_BAD_CERT_CHAIN Bad certificate chain +57 GPG_ERR_MISSING_CERT Missing certificate +58 GPG_ERR_NO_DATA No data +59 GPG_ERR_BUG Bug +60 GPG_ERR_NOT_SUPPORTED Not supported +61 GPG_ERR_INV_OP Invalid operation code +62 GPG_ERR_TIMEOUT Timeout +63 GPG_ERR_INTERNAL Internal error +64 GPG_ERR_EOF_GCRYPT EOF (gcrypt) +65 GPG_ERR_INV_OBJ Invalid object +66 GPG_ERR_TOO_SHORT Provided object is too short +67 GPG_ERR_TOO_LARGE Provided object is too large +68 GPG_ERR_NO_OBJ Missing item in object +69 GPG_ERR_NOT_IMPLEMENTED Not implemented +70 GPG_ERR_CONFLICT Conflicting use +71 GPG_ERR_INV_CIPHER_MODE Invalid cipher mode +72 GPG_ERR_INV_FLAG Invalid flag +73 GPG_ERR_INV_HANDLE Invalid handle +74 GPG_ERR_TRUNCATED Result truncated +75 GPG_ERR_INCOMPLETE_LINE Incomplete line +76 GPG_ERR_INV_RESPONSE Invalid response +77 GPG_ERR_NO_AGENT No agent running +78 GPG_ERR_AGENT agent error +79 GPG_ERR_INV_DATA Invalid data +80 GPG_ERR_ASSUAN_SERVER_FAULT Unspecific Assuan server fault +81 GPG_ERR_ASSUAN General Assuan error +82 GPG_ERR_INV_SESSION_KEY Invalid session key +83 GPG_ERR_INV_SEXP Invalid S-expression +84 GPG_ERR_UNSUPPORTED_ALGORITHM Unsupported algorithm +85 GPG_ERR_NO_PIN_ENTRY No pinentry +86 GPG_ERR_PIN_ENTRY pinentry error +87 GPG_ERR_BAD_PIN Bad PIN +88 GPG_ERR_INV_NAME Invalid name +89 GPG_ERR_BAD_DATA Bad data +90 GPG_ERR_INV_PARAMETER Invalid parameter +91 GPG_ERR_WRONG_CARD Wrong card +92 GPG_ERR_NO_DIRMNGR No dirmngr +93 GPG_ERR_DIRMNGR dirmngr error +94 GPG_ERR_CERT_REVOKED Certificate revoked +95 GPG_ERR_NO_CRL_KNOWN No CRL known +96 GPG_ERR_CRL_TOO_OLD CRL too old +97 GPG_ERR_LINE_TOO_LONG Line too long +98 GPG_ERR_NOT_TRUSTED Not trusted +99 GPG_ERR_CANCELED Operation cancelled +100 GPG_ERR_BAD_CA_CERT Bad CA certificate +101 GPG_ERR_CERT_EXPIRED Certificate expired +102 GPG_ERR_CERT_TOO_YOUNG Certificate too young +103 GPG_ERR_UNSUPPORTED_CERT Unsupported certificate +104 GPG_ERR_UNKNOWN_SEXP Unknown S-expression +105 GPG_ERR_UNSUPPORTED_PROTECTION Unsupported protection +106 GPG_ERR_CORRUPTED_PROTECTION Corrupted protection +107 GPG_ERR_AMBIGUOUS_NAME Ambiguous name +108 GPG_ERR_CARD Card error +109 GPG_ERR_CARD_RESET Card reset required +110 GPG_ERR_CARD_REMOVED Card removed +111 GPG_ERR_INV_CARD Invalid card +112 GPG_ERR_CARD_NOT_PRESENT Card not present +113 GPG_ERR_NO_PKCS15_APP No PKCS15 application +114 GPG_ERR_NOT_CONFIRMED Not confirmed +115 GPG_ERR_CONFIGURATION Configuration error +116 GPG_ERR_NO_POLICY_MATCH No policy match +117 GPG_ERR_INV_INDEX Invalid index +118 GPG_ERR_INV_ID Invalid ID +119 GPG_ERR_NO_SCDAEMON No SmartCard daemon +120 GPG_ERR_SCDAEMON SmartCard daemon error +121 GPG_ERR_UNSUPPORTED_PROTOCOL Unsupported protocol +122 GPG_ERR_BAD_PIN_METHOD Bad PIN method +123 GPG_ERR_CARD_NOT_INITIALIZED Card not initialized +124 GPG_ERR_UNSUPPORTED_OPERATION Unsupported operation +125 GPG_ERR_WRONG_KEY_USAGE Wrong key usage +126 GPG_ERR_NOTHING_FOUND Nothing found +127 GPG_ERR_WRONG_BLOB_TYPE Wrong blob type +128 GPG_ERR_MISSING_VALUE Missing value +129 GPG_ERR_HARDWARE Hardware problem +130 GPG_ERR_PIN_BLOCKED PIN blocked +131 GPG_ERR_USE_CONDITIONS Conditions of use not satisfied +132 GPG_ERR_PIN_NOT_SYNCED PINs are not synced +133 GPG_ERR_INV_CRL Invalid CRL +134 GPG_ERR_BAD_BER BER error +135 GPG_ERR_INV_BER Invalid BER +136 GPG_ERR_ELEMENT_NOT_FOUND Element not found +137 GPG_ERR_IDENTIFIER_NOT_FOUND Identifier not found +138 GPG_ERR_INV_TAG Invalid tag +139 GPG_ERR_INV_LENGTH Invalid length +140 GPG_ERR_INV_KEYINFO Invalid key info +141 GPG_ERR_UNEXPECTED_TAG Unexpected tag +142 GPG_ERR_NOT_DER_ENCODED Not DER encoded +143 GPG_ERR_NO_CMS_OBJ No CMS object +144 GPG_ERR_INV_CMS_OBJ Invalid CMS object +145 GPG_ERR_UNKNOWN_CMS_OBJ Unknown CMS object +146 GPG_ERR_UNSUPPORTED_CMS_OBJ Unsupported CMS object +147 GPG_ERR_UNSUPPORTED_ENCODING Unsupported encoding +148 GPG_ERR_UNSUPPORTED_CMS_VERSION Unsupported CMS version +149 GPG_ERR_UNKNOWN_ALGORITHM Unknown algorithm +150 GPG_ERR_INV_ENGINE Invalid crypto engine +151 GPG_ERR_PUBKEY_NOT_TRUSTED Public key not trusted +152 GPG_ERR_DECRYPT_FAILED Decryption failed +153 GPG_ERR_KEY_EXPIRED Key expired +154 GPG_ERR_SIG_EXPIRED Signature expired +155 GPG_ERR_ENCODING_PROBLEM Encoding problem +156 GPG_ERR_INV_STATE Invalid state +157 GPG_ERR_DUP_VALUE Duplicated value +158 GPG_ERR_MISSING_ACTION Missing action +159 GPG_ERR_MODULE_NOT_FOUND ASN.1 module not found +160 GPG_ERR_INV_OID_STRING Invalid OID string +161 GPG_ERR_INV_TIME Invalid time +162 GPG_ERR_INV_CRL_OBJ Invalid CRL object +163 GPG_ERR_UNSUPPORTED_CRL_VERSION Unsupported CRL version +164 GPG_ERR_INV_CERT_OBJ Invalid certificate object +165 GPG_ERR_UNKNOWN_NAME Unknown name +166 GPG_ERR_LOCALE_PROBLEM A locale function failed +167 GPG_ERR_NOT_LOCKED Not locked +168 GPG_ERR_PROTOCOL_VIOLATION Protocol violation +169 GPG_ERR_INV_MAC Invalid MAC +170 GPG_ERR_INV_REQUEST Invalid request +171 GPG_ERR_UNKNOWN_EXTN Unknown extension +172 GPG_ERR_UNKNOWN_CRIT_EXTN Unknown critical extension +173 GPG_ERR_LOCKED Locked +174 GPG_ERR_UNKNOWN_OPTION Unknown option +175 GPG_ERR_UNKNOWN_COMMAND Unknown command +176 GPG_ERR_NOT_OPERATIONAL Not operational +177 GPG_ERR_NO_PASSPHRASE No passphrase given +178 GPG_ERR_NO_PIN No PIN given +179 GPG_ERR_NOT_ENABLED Not enabled +180 GPG_ERR_NO_ENGINE No crypto engine +181 GPG_ERR_MISSING_KEY Missing key +182 GPG_ERR_TOO_MANY Too many objects +183 GPG_ERR_LIMIT_REACHED Limit reached +# 184 to 198 are free to be used. + +199 GPG_ERR_UNFINISHED Operation not yet finished +200 GPG_ERR_BUFFER_TOO_SHORT Buffer too short + +# Error codes pertaining to S-expressions. + +201 GPG_ERR_SEXP_INV_LEN_SPEC Invalid length specifier in S-expression +202 GPG_ERR_SEXP_STRING_TOO_LONG String too long in S-expression +203 GPG_ERR_SEXP_UNMATCHED_PAREN Unmatched parentheses in S-expression +204 GPG_ERR_SEXP_NOT_CANONICAL S-expression not canonical +205 GPG_ERR_SEXP_BAD_CHARACTER Bad character in S-expression +206 GPG_ERR_SEXP_BAD_QUOTATION Bad quotation in S-expression +207 GPG_ERR_SEXP_ZERO_PREFIX Zero prefix in S-expression +208 GPG_ERR_SEXP_NESTED_DH Nested display hints in S-expression +209 GPG_ERR_SEXP_UNMATCHED_DH Unmatched display hints +210 GPG_ERR_SEXP_UNEXPECTED_PUNC Unexpected reserved punctuation in S-expression +211 GPG_ERR_SEXP_BAD_HEX_CHAR Bad hexadecimal character in S-expression +212 GPG_ERR_SEXP_ODD_HEX_NUMBERS Odd hexadecimal numbers in S-expression +213 GPG_ERR_SEXP_BAD_OCT_CHAR Bad octal character in S-expression + +# 214 to 254 are free to be used. 255 and 256 are RFU. + +# Error codes pertaining to the Assuan IPC interface +257 GPG_ERR_ASS_GENERAL General IPC error +258 GPG_ERR_ASS_ACCEPT_FAILED IPC accept call failed +259 GPG_ERR_ASS_CONNECT_FAILED IPC connect call failed +260 GPG_ERR_ASS_INV_RESPONSE Invalid IPC response +261 GPG_ERR_ASS_INV_VALUE Invalid value passed to IPC +262 GPG_ERR_ASS_INCOMPLETE_LINE Incomplete line passed to IPC +263 GPG_ERR_ASS_LINE_TOO_LONG Line passed to IPC too long +264 GPG_ERR_ASS_NESTED_COMMANDS Nested IPC commands +265 GPG_ERR_ASS_NO_DATA_CB No data callback in IPC +266 GPG_ERR_ASS_NO_INQUIRE_CB No inquire callback in IPC +267 GPG_ERR_ASS_NOT_A_SERVER Not an IPC server +268 GPG_ERR_ASS_NOT_A_CLIENT Not an IPC client +269 GPG_ERR_ASS_SERVER_START Problem starting IPC server +270 GPG_ERR_ASS_READ_ERROR IPC read error +271 GPG_ERR_ASS_WRITE_ERROR IPC write error +# reserved +273 GPG_ERR_ASS_TOO_MUCH_DATA Too much data for IPC layer +274 GPG_ERR_ASS_UNEXPECTED_CMD Unexpected IPC command +275 GPG_ERR_ASS_UNKNOWN_CMD Unknown IPC command +276 GPG_ERR_ASS_SYNTAX IPC syntax error +277 GPG_ERR_ASS_CANCELED IPC call has been cancelled +278 GPG_ERR_ASS_NO_INPUT No input source for IPC +279 GPG_ERR_ASS_NO_OUTPUT No output source for IPC +280 GPG_ERR_ASS_PARAMETER IPC parameter error +281 GPG_ERR_ASS_UNKNOWN_INQUIRE Unknown IPC inquire + +# 282 to 299 are reserved for future assuan codes. + +# 300 to 1023 are free to be used. + +# For free use by non-GnuPG components. +1024 GPG_ERR_USER_1 User defined error code 1 +1025 GPG_ERR_USER_2 User defined error code 2 +1026 GPG_ERR_USER_3 User defined error code 3 +1027 GPG_ERR_USER_4 User defined error code 4 +1028 GPG_ERR_USER_5 User defined error code 5 +1029 GPG_ERR_USER_6 User defined error code 6 +1030 GPG_ERR_USER_7 User defined error code 7 +1031 GPG_ERR_USER_8 User defined error code 8 +1032 GPG_ERR_USER_9 User defined error code 9 +1033 GPG_ERR_USER_10 User defined error code 10 +1034 GPG_ERR_USER_11 User defined error code 11 +1035 GPG_ERR_USER_12 User defined error code 12 +1036 GPG_ERR_USER_13 User defined error code 13 +1037 GPG_ERR_USER_14 User defined error code 14 +1038 GPG_ERR_USER_15 User defined error code 15 +1039 GPG_ERR_USER_16 User defined error code 16 + +# 1040 to 16380 are free to be used. + +16381 GPG_ERR_MISSING_ERRNO System error w/o errno +16382 GPG_ERR_UNKNOWN_ERRNO Unknown system error +16383 GPG_ERR_EOF End of file + +# 16384 - 32767 are reserved for future extensions. + +# GPG_SYSTEM_ERROR | (141 to 32767) are to be used for system errors. + + GPG_ERR_CODE_DIM Unknown error code diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources-sym.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources-sym.h new file mode 100644 index 0000000000..62b8cb1618 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources-sym.h @@ -0,0 +1,82 @@ +/* Output of mkstrtable.awk. DO NOT EDIT. */ + +/* err-sources.h - List of error sources and their description. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + +/* The purpose of this complex string table is to produce + optimal code with a minimum of relocations. */ + +static const char msgstr[] = + "GPG_ERR_SOURCE_UNKNOWN" "\0" + "GPG_ERR_SOURCE_GCRYPT" "\0" + "GPG_ERR_SOURCE_GPG" "\0" + "GPG_ERR_SOURCE_GPGSM" "\0" + "GPG_ERR_SOURCE_GPGAGENT" "\0" + "GPG_ERR_SOURCE_PINENTRY" "\0" + "GPG_ERR_SOURCE_SCD" "\0" + "GPG_ERR_SOURCE_GPGME" "\0" + "GPG_ERR_SOURCE_KEYBOX" "\0" + "GPG_ERR_SOURCE_KSBA" "\0" + "GPG_ERR_SOURCE_DIRMNGR" "\0" + "GPG_ERR_SOURCE_GSTI" "\0" + "GPG_ERR_SOURCE_GPA" "\0" + "GPG_ERR_SOURCE_KLEO" "\0" + "GPG_ERR_SOURCE_G13" "\0" + "GPG_ERR_SOURCE_ANY" "\0" + "GPG_ERR_SOURCE_USER_1" "\0" + "GPG_ERR_SOURCE_USER_2" "\0" + "GPG_ERR_SOURCE_USER_3" "\0" + "GPG_ERR_SOURCE_USER_4" "\0" + "GPG_ERR_SOURCE_DIM"; + +static const int msgidx[] = + { + 0, + 23, + 45, + 64, + 85, + 109, + 133, + 152, + 173, + 195, + 215, + 238, + 258, + 277, + 297, + 316, + 335, + 357, + 379, + 401, + 423 + }; + +static inline int +msgidxof (int code) +{ + return (0 ? 0 + : ((code >= 0) && (code <= 14)) ? (code - 0) + : ((code >= 31) && (code <= 35)) ? (code - 16) + : 36 - 16); +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources.h new file mode 100644 index 0000000000..0fcc551e2c --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources.h @@ -0,0 +1,82 @@ +/* Output of mkstrtable.awk. DO NOT EDIT. */ + +/* err-sources.h - List of error sources and their description. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + +/* The purpose of this complex string table is to produce + optimal code with a minimum of relocations. */ + +static const char msgstr[] = + gettext_noop ("Unspecified source") "\0" + gettext_noop ("gcrypt") "\0" + gettext_noop ("GnuPG") "\0" + gettext_noop ("GpgSM") "\0" + gettext_noop ("GPG Agent") "\0" + gettext_noop ("Pinentry") "\0" + gettext_noop ("SCD") "\0" + gettext_noop ("GPGME") "\0" + gettext_noop ("Keybox") "\0" + gettext_noop ("KSBA") "\0" + gettext_noop ("Dirmngr") "\0" + gettext_noop ("GSTI") "\0" + gettext_noop ("GPA") "\0" + gettext_noop ("Kleopatra") "\0" + gettext_noop ("G13") "\0" + gettext_noop ("Any source") "\0" + gettext_noop ("User defined source 1") "\0" + gettext_noop ("User defined source 2") "\0" + gettext_noop ("User defined source 3") "\0" + gettext_noop ("User defined source 4") "\0" + gettext_noop ("Unknown source"); + +static const int msgidx[] = + { + 0, + 19, + 26, + 32, + 38, + 48, + 57, + 61, + 67, + 74, + 79, + 87, + 92, + 96, + 106, + 110, + 121, + 143, + 165, + 187, + 209 + }; + +static inline int +msgidxof (int code) +{ + return (0 ? 0 + : ((code >= 0) && (code <= 14)) ? (code - 0) + : ((code >= 31) && (code <= 35)) ? (code - 16) + : 36 - 16); +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources.h.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources.h.in new file mode 100644 index 0000000000..d200fc6c31 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/err-sources.h.in @@ -0,0 +1,58 @@ +# err-sources.h.in - List of error sources and their description input file. +/* err-sources.h - List of error sources and their description. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +# Everything up to the first line that starts with a number in the +# first column is copied into the output verbatim. Then, empty lines +# are ignored. Other lines must have an error source number, followed +# by one or more <tab> characters, followed by the error source +# symbol, followed by one or more <tab> characters, followed by the +# error source name. Trailing whitespace is removed. The error +# sources should be sorted. The last line should not have a number, +# but only a <tab>, followed by a description for error sources that +# are not in the list. + +0 GPG_ERR_SOURCE_UNKNOWN Unspecified source +1 GPG_ERR_SOURCE_GCRYPT gcrypt +2 GPG_ERR_SOURCE_GPG GnuPG +3 GPG_ERR_SOURCE_GPGSM GpgSM +4 GPG_ERR_SOURCE_GPGAGENT GPG Agent +5 GPG_ERR_SOURCE_PINENTRY Pinentry +6 GPG_ERR_SOURCE_SCD SCD +7 GPG_ERR_SOURCE_GPGME GPGME +8 GPG_ERR_SOURCE_KEYBOX Keybox +9 GPG_ERR_SOURCE_KSBA KSBA +10 GPG_ERR_SOURCE_DIRMNGR Dirmngr +11 GPG_ERR_SOURCE_GSTI GSTI +12 GPG_ERR_SOURCE_GPA GPA +13 GPG_ERR_SOURCE_KLEO Kleopatra +14 GPG_ERR_SOURCE_G13 G13 + +# 15 to 30 are free to be used. + +31 GPG_ERR_SOURCE_ANY Any source +32 GPG_ERR_SOURCE_USER_1 User defined source 1 +33 GPG_ERR_SOURCE_USER_2 User defined source 2 +34 GPG_ERR_SOURCE_USER_3 User defined source 3 +35 GPG_ERR_SOURCE_USER_4 User defined source 4 + +# 36 to 255 are free to be used. + + GPG_ERR_SOURCE_DIM Unknown source diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/errnos-sym.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/errnos-sym.h new file mode 100644 index 0000000000..8bcb8ed946 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/errnos-sym.h @@ -0,0 +1,323 @@ +/* Output of mkstrtable.awk. DO NOT EDIT. */ + +/* errnos.h - List of system error values. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + + + +/* The purpose of this complex string table is to produce + optimal code with a minimum of relocations. */ + +static const char errnos_msgstr[] = + "GPG_ERR_E2BIG" "\0" + "GPG_ERR_EACCES" "\0" + "GPG_ERR_EADDRINUSE" "\0" + "GPG_ERR_EADDRNOTAVAIL" "\0" + "GPG_ERR_EADV" "\0" + "GPG_ERR_EAFNOSUPPORT" "\0" + "GPG_ERR_EAGAIN" "\0" + "GPG_ERR_EALREADY" "\0" + "GPG_ERR_EAUTH" "\0" + "GPG_ERR_EBACKGROUND" "\0" + "GPG_ERR_EBADE" "\0" + "GPG_ERR_EBADF" "\0" + "GPG_ERR_EBADFD" "\0" + "GPG_ERR_EBADMSG" "\0" + "GPG_ERR_EBADR" "\0" + "GPG_ERR_EBADRPC" "\0" + "GPG_ERR_EBADRQC" "\0" + "GPG_ERR_EBADSLT" "\0" + "GPG_ERR_EBFONT" "\0" + "GPG_ERR_EBUSY" "\0" + "GPG_ERR_ECANCELED" "\0" + "GPG_ERR_ECHILD" "\0" + "GPG_ERR_ECHRNG" "\0" + "GPG_ERR_ECOMM" "\0" + "GPG_ERR_ECONNABORTED" "\0" + "GPG_ERR_ECONNREFUSED" "\0" + "GPG_ERR_ECONNRESET" "\0" + "GPG_ERR_ED" "\0" + "GPG_ERR_EDEADLK" "\0" + "GPG_ERR_EDEADLOCK" "\0" + "GPG_ERR_EDESTADDRREQ" "\0" + "GPG_ERR_EDIED" "\0" + "GPG_ERR_EDOM" "\0" + "GPG_ERR_EDOTDOT" "\0" + "GPG_ERR_EDQUOT" "\0" + "GPG_ERR_EEXIST" "\0" + "GPG_ERR_EFAULT" "\0" + "GPG_ERR_EFBIG" "\0" + "GPG_ERR_EFTYPE" "\0" + "GPG_ERR_EGRATUITOUS" "\0" + "GPG_ERR_EGREGIOUS" "\0" + "GPG_ERR_EHOSTDOWN" "\0" + "GPG_ERR_EHOSTUNREACH" "\0" + "GPG_ERR_EIDRM" "\0" + "GPG_ERR_EIEIO" "\0" + "GPG_ERR_EILSEQ" "\0" + "GPG_ERR_EINPROGRESS" "\0" + "GPG_ERR_EINTR" "\0" + "GPG_ERR_EINVAL" "\0" + "GPG_ERR_EIO" "\0" + "GPG_ERR_EISCONN" "\0" + "GPG_ERR_EISDIR" "\0" + "GPG_ERR_EISNAM" "\0" + "GPG_ERR_EL2HLT" "\0" + "GPG_ERR_EL2NSYNC" "\0" + "GPG_ERR_EL3HLT" "\0" + "GPG_ERR_EL3RST" "\0" + "GPG_ERR_ELIBACC" "\0" + "GPG_ERR_ELIBBAD" "\0" + "GPG_ERR_ELIBEXEC" "\0" + "GPG_ERR_ELIBMAX" "\0" + "GPG_ERR_ELIBSCN" "\0" + "GPG_ERR_ELNRNG" "\0" + "GPG_ERR_ELOOP" "\0" + "GPG_ERR_EMEDIUMTYPE" "\0" + "GPG_ERR_EMFILE" "\0" + "GPG_ERR_EMLINK" "\0" + "GPG_ERR_EMSGSIZE" "\0" + "GPG_ERR_EMULTIHOP" "\0" + "GPG_ERR_ENAMETOOLONG" "\0" + "GPG_ERR_ENAVAIL" "\0" + "GPG_ERR_ENEEDAUTH" "\0" + "GPG_ERR_ENETDOWN" "\0" + "GPG_ERR_ENETRESET" "\0" + "GPG_ERR_ENETUNREACH" "\0" + "GPG_ERR_ENFILE" "\0" + "GPG_ERR_ENOANO" "\0" + "GPG_ERR_ENOBUFS" "\0" + "GPG_ERR_ENOCSI" "\0" + "GPG_ERR_ENODATA" "\0" + "GPG_ERR_ENODEV" "\0" + "GPG_ERR_ENOENT" "\0" + "GPG_ERR_ENOEXEC" "\0" + "GPG_ERR_ENOLCK" "\0" + "GPG_ERR_ENOLINK" "\0" + "GPG_ERR_ENOMEDIUM" "\0" + "GPG_ERR_ENOMEM" "\0" + "GPG_ERR_ENOMSG" "\0" + "GPG_ERR_ENONET" "\0" + "GPG_ERR_ENOPKG" "\0" + "GPG_ERR_ENOPROTOOPT" "\0" + "GPG_ERR_ENOSPC" "\0" + "GPG_ERR_ENOSR" "\0" + "GPG_ERR_ENOSTR" "\0" + "GPG_ERR_ENOSYS" "\0" + "GPG_ERR_ENOTBLK" "\0" + "GPG_ERR_ENOTCONN" "\0" + "GPG_ERR_ENOTDIR" "\0" + "GPG_ERR_ENOTEMPTY" "\0" + "GPG_ERR_ENOTNAM" "\0" + "GPG_ERR_ENOTSOCK" "\0" + "GPG_ERR_ENOTSUP" "\0" + "GPG_ERR_ENOTTY" "\0" + "GPG_ERR_ENOTUNIQ" "\0" + "GPG_ERR_ENXIO" "\0" + "GPG_ERR_EOPNOTSUPP" "\0" + "GPG_ERR_EOVERFLOW" "\0" + "GPG_ERR_EPERM" "\0" + "GPG_ERR_EPFNOSUPPORT" "\0" + "GPG_ERR_EPIPE" "\0" + "GPG_ERR_EPROCLIM" "\0" + "GPG_ERR_EPROCUNAVAIL" "\0" + "GPG_ERR_EPROGMISMATCH" "\0" + "GPG_ERR_EPROGUNAVAIL" "\0" + "GPG_ERR_EPROTO" "\0" + "GPG_ERR_EPROTONOSUPPORT" "\0" + "GPG_ERR_EPROTOTYPE" "\0" + "GPG_ERR_ERANGE" "\0" + "GPG_ERR_EREMCHG" "\0" + "GPG_ERR_EREMOTE" "\0" + "GPG_ERR_EREMOTEIO" "\0" + "GPG_ERR_ERESTART" "\0" + "GPG_ERR_EROFS" "\0" + "GPG_ERR_ERPCMISMATCH" "\0" + "GPG_ERR_ESHUTDOWN" "\0" + "GPG_ERR_ESOCKTNOSUPPORT" "\0" + "GPG_ERR_ESPIPE" "\0" + "GPG_ERR_ESRCH" "\0" + "GPG_ERR_ESRMNT" "\0" + "GPG_ERR_ESTALE" "\0" + "GPG_ERR_ESTRPIPE" "\0" + "GPG_ERR_ETIME" "\0" + "GPG_ERR_ETIMEDOUT" "\0" + "GPG_ERR_ETOOMANYREFS" "\0" + "GPG_ERR_ETXTBSY" "\0" + "GPG_ERR_EUCLEAN" "\0" + "GPG_ERR_EUNATCH" "\0" + "GPG_ERR_EUSERS" "\0" + "GPG_ERR_EWOULDBLOCK" "\0" + "GPG_ERR_EXDEV" "\0" + "GPG_ERR_EXFULL"; + +static const int errnos_msgidx[] = + { + 0, + 14, + 29, + 48, + 70, + 83, + 104, + 119, + 136, + 150, + 170, + 184, + 198, + 213, + 229, + 243, + 259, + 275, + 291, + 306, + 320, + 338, + 353, + 368, + 382, + 403, + 424, + 443, + 454, + 470, + 488, + 509, + 523, + 536, + 552, + 567, + 582, + 597, + 611, + 626, + 646, + 664, + 682, + 703, + 717, + 731, + 746, + 766, + 780, + 795, + 807, + 823, + 838, + 853, + 868, + 885, + 900, + 915, + 931, + 947, + 964, + 980, + 996, + 1011, + 1025, + 1045, + 1060, + 1075, + 1092, + 1110, + 1131, + 1147, + 1165, + 1182, + 1200, + 1220, + 1235, + 1250, + 1266, + 1281, + 1297, + 1312, + 1327, + 1343, + 1358, + 1374, + 1392, + 1407, + 1422, + 1437, + 1452, + 1472, + 1487, + 1501, + 1516, + 1531, + 1547, + 1564, + 1580, + 1598, + 1614, + 1631, + 1647, + 1662, + 1679, + 1693, + 1712, + 1730, + 1744, + 1765, + 1779, + 1796, + 1817, + 1839, + 1860, + 1875, + 1899, + 1918, + 1933, + 1949, + 1965, + 1983, + 2000, + 2014, + 2035, + 2053, + 2077, + 2092, + 2106, + 2121, + 2136, + 2153, + 2167, + 2185, + 2206, + 2222, + 2238, + 2254, + 2269, + 2289, + 2303, + + }; + +static inline int +errnos_msgidxof (int code) +{ + return (0 ? 0 + : ((code >= 0) && (code <= 140)) ? (code - 0) + : -1); +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/errnos.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/errnos.in new file mode 100644 index 0000000000..0688047681 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/errnos.in @@ -0,0 +1,172 @@ +# errnos.h.in - List of system error values input file. +/* errnos.h - List of system error values. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +# Everything up to the first line that starts with a number in the +# first column is copied into the output verbatim. Then, empty lines +# are ignored. Other lines must have an error code number, followed +# by one or more <tab> characters, followed by the error name. +# +# IMPORTANT: For now, the numbering must be consecutive. Some of the +# scripts (notably mkerrnos.h) do not deal correctly with a numbering +# that is out of order or has gaps. + + +0 E2BIG +1 EACCES +2 EADDRINUSE +3 EADDRNOTAVAIL +4 EADV +5 EAFNOSUPPORT +6 EAGAIN +7 EALREADY +8 EAUTH +9 EBACKGROUND +10 EBADE +11 EBADF +12 EBADFD +13 EBADMSG +14 EBADR +15 EBADRPC +16 EBADRQC +17 EBADSLT +18 EBFONT +19 EBUSY +20 ECANCELED +21 ECHILD +22 ECHRNG +23 ECOMM +24 ECONNABORTED +25 ECONNREFUSED +26 ECONNRESET +27 ED +28 EDEADLK +29 EDEADLOCK +30 EDESTADDRREQ +31 EDIED +32 EDOM +33 EDOTDOT +34 EDQUOT +35 EEXIST +36 EFAULT +37 EFBIG +38 EFTYPE +39 EGRATUITOUS +40 EGREGIOUS +41 EHOSTDOWN +42 EHOSTUNREACH +43 EIDRM +44 EIEIO +45 EILSEQ +46 EINPROGRESS +47 EINTR +48 EINVAL +49 EIO +50 EISCONN +51 EISDIR +52 EISNAM +53 EL2HLT +54 EL2NSYNC +55 EL3HLT +56 EL3RST +57 ELIBACC +58 ELIBBAD +59 ELIBEXEC +60 ELIBMAX +61 ELIBSCN +62 ELNRNG +63 ELOOP +64 EMEDIUMTYPE +65 EMFILE +66 EMLINK +67 EMSGSIZE +68 EMULTIHOP +69 ENAMETOOLONG +70 ENAVAIL +71 ENEEDAUTH +72 ENETDOWN +73 ENETRESET +74 ENETUNREACH +75 ENFILE +76 ENOANO +77 ENOBUFS +78 ENOCSI +79 ENODATA +80 ENODEV +81 ENOENT +82 ENOEXEC +83 ENOLCK +84 ENOLINK +85 ENOMEDIUM +86 ENOMEM +87 ENOMSG +88 ENONET +89 ENOPKG +90 ENOPROTOOPT +91 ENOSPC +92 ENOSR +93 ENOSTR +94 ENOSYS +95 ENOTBLK +96 ENOTCONN +97 ENOTDIR +98 ENOTEMPTY +99 ENOTNAM +100 ENOTSOCK +101 ENOTSUP +102 ENOTTY +103 ENOTUNIQ +104 ENXIO +105 EOPNOTSUPP +106 EOVERFLOW +107 EPERM +108 EPFNOSUPPORT +109 EPIPE +110 EPROCLIM +111 EPROCUNAVAIL +112 EPROGMISMATCH +113 EPROGUNAVAIL +114 EPROTO +115 EPROTONOSUPPORT +116 EPROTOTYPE +117 ERANGE +118 EREMCHG +119 EREMOTE +120 EREMOTEIO +121 ERESTART +122 EROFS +123 ERPCMISMATCH +124 ESHUTDOWN +125 ESOCKTNOSUPPORT +126 ESPIPE +127 ESRCH +128 ESRMNT +129 ESTALE +130 ESTRPIPE +131 ETIME +132 ETIMEDOUT +133 ETOOMANYREFS +134 ETXTBSY +135 EUCLEAN +136 EUNATCH +137 EUSERS +138 EWOULDBLOCK +139 EXDEV +140 EXFULL
\ No newline at end of file diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/extra-h.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/extra-h.in new file mode 100644 index 0000000000..197ee272f8 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/extra-h.in @@ -0,0 +1,41 @@ +## w32-add.h - Snippet to be be included into gpg-error.h. +## Comments are indicated by a double hash mark. Due to a +## peculiarity of the script the first used line must not +## start with a hash mark. + +/* Decide whether to use the format_arg attribute. */ +#if _GPG_ERR_GCC_VERSION > 20800 +# define _GPG_ERR_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a))) +#else +# define _GPG_ERR_ATTR_FORMAT_ARG(a) +#endif + +/* A lean gettext implementation based on GNU style mo files which are + required to be encoded in UTF-8. There is a limit on 65534 entries + to save some RAM. Only Germanic plural rules are supported. */ +const char *_gpg_w32_bindtextdomain (const char *domainname, + const char *dirname); +const char *_gpg_w32_textdomain (const char *domainname); +const char *_gpg_w32_gettext (const char *msgid) + _GPG_ERR_ATTR_FORMAT_ARG (1); +const char *_gpg_w32_dgettext (const char *domainname, const char *msgid) + _GPG_ERR_ATTR_FORMAT_ARG (2); +const char *_gpg_w32_dngettext (const char *domainname, const char *msgid1, + const char *msgid2, unsigned long int n) + _GPG_ERR_ATTR_FORMAT_ARG (2) _GPG_ERR_ATTR_FORMAT_ARG (3); +const char *_gpg_w32_gettext_localename (void); +int _gpg_w32_gettext_use_utf8 (int value); + +#ifdef GPG_ERR_ENABLE_GETTEXT_MACROS +# define bindtextdomain(a,b) _gpg_w32_bindtextdomain ((a), (b)) +# define textdomain(a) _gpg_w32_textdomain ((a)) +# define gettext(a) _gpg_w32_gettext ((a)) +# define dgettext(a,b) _gpg_w32_dgettext ((a), (b)) +# define ngettext(a,b,c) _gpg_w32_dngettext (NULL, (a), (b), (c)) +# define dngettext(a,b,c,d) _gpg_w32_dngettext ((a), (b), (c), (d)) +# define gettext_localename() _gpg_w32_gettext_localename () +# define gettext_use_utf8(a) _gpg_w32_gettext_use_utf8 (a) +#endif /*GPG_ERR_ENABLE_GETTEXT_MACROS*/ + + +EOF diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gettext.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gettext.h new file mode 100644 index 0000000000..aba29db6dd --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gettext.h @@ -0,0 +1,76 @@ +/* Convenience header for conditional use of GNU <libintl.h>. + Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +#if HAVE_W32_SYSTEM + /* We have a gettext implementation in gpg-error.h which get + included anyway. */ +#else /*!HAVE_W32_SYSTEM*/ + /* Get declarations of GNU message catalog functions. */ +# include <libintl.h> +#endif /*!HAVE_W32_SYSTEM*/ + +#else /*!ENABLE_NLS*/ + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of <locale.h> a NOP. We don't include <libintl.h> + as well because people using "gettext.h" will not include <libintl.h>, + and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> + is OK. */ +#if defined(__sun) +# include <locale.h> +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# define gettext(Msgid) ((const char *) (Msgid)) +# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) +# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define textdomain(Domainname) ((const char *) (Domainname)) +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) +# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) + +#endif /*!ENABLE_NLS*/ + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + + + +#endif /* _LIBGETTEXT_H */ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error-config b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error-config new file mode 100644 index 0000000000..d4f88b22f5 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error-config @@ -0,0 +1,84 @@ +#!/bin/sh +# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file 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. + + +prefix=/usr/local +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib +isubdirafter="" + +output="" + +usage() +{ + cat <<EOF +Usage: gpg-error-config [OPTIONS] +Options: + [--prefix] + [--exec-prefix] + [--version] + [--libs] + [--cflags] +EOF + exit $1 +} + +if test $# -eq 0; then + usage 1 1>&2 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) + optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` + ;; + *) + optarg= + ;; + esac + + case $1 in + --prefix) + output="$output $prefix" + ;; + --exec-prefix) + output="$output $exec_prefix" + ;; + --version) + echo "1.9" + exit 0 + ;; + --cflags) + if test "x$includedir" != "x/usr/include" -a "x$includedir" != "x/include"; then + output="$output -I$includedir" + fi + # Note: -idirafter is a gcc extension. It is only used on + # systems where gcc is the only compiler we support. + for i in $isubdirafter; do + output="$output -idirafter ${includedir}/${i}" + done + output="$output " + ;; + --libs) + if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then + output="$output -L$libdir" + fi + output="$output -lgpg-error" + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +echo $output diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error-config.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error-config.in new file mode 100644 index 0000000000..4be034328a --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error-config.in @@ -0,0 +1,84 @@ +#!/bin/sh +# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file 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. + + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ +isubdirafter="@GPG_ERROR_CONFIG_ISUBDIRAFTER@" + +output="" + +usage() +{ + cat <<EOF +Usage: gpg-error-config [OPTIONS] +Options: + [--prefix] + [--exec-prefix] + [--version] + [--libs] + [--cflags] +EOF + exit $1 +} + +if test $# -eq 0; then + usage 1 1>&2 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) + optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` + ;; + *) + optarg= + ;; + esac + + case $1 in + --prefix) + output="$output $prefix" + ;; + --exec-prefix) + output="$output $exec_prefix" + ;; + --version) + echo "@VERSION@" + exit 0 + ;; + --cflags) + if test "x$includedir" != "x/usr/include" -a "x$includedir" != "x/include"; then + output="$output -I$includedir" + fi + # Note: -idirafter is a gcc extension. It is only used on + # systems where gcc is the only compiler we support. + for i in $isubdirafter; do + output="$output -idirafter ${includedir}/${i}" + done + output="$output @GPG_ERROR_CONFIG_CFLAGS@" + ;; + --libs) + if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then + output="$output -L$libdir" + fi + output="$output @GPG_ERROR_CONFIG_LIBS@" + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +echo $output diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.c new file mode 100644 index 0000000000..bed784994d --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.c @@ -0,0 +1,448 @@ +/* gpg-error.c - Determining gpg-error error codes. + Copyright (C) 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stddef.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <limits.h> +#include <stdio.h> + +#ifdef HAVE_LOCALE_H +# include <locale.h> +#endif +#ifdef ENABLE_NLS +#ifdef HAVE_W32_SYSTEM +# include "gettext.h" +#else +# include <libintl.h> +#endif +# define _(a) gettext (a) +# ifdef gettext_noop +# define N_(a) gettext_noop (a) +# else +# define N_(a) (a) +# endif +#else +# define _(a) (a) +# define N_(a) (a) +#endif + +#include <gpg-error.h> + + +#if HAVE_W32_SYSTEM +/* The implementation follows below. */ +static char *get_locale_dir (void); +static void drop_locale_dir (char *locale_dir); +#else +#define get_locale_dir() LOCALEDIR +#define drop_locale_dir(dir) +#endif + +static void +i18n_init (void) +{ +#ifdef ENABLE_NLS + char *locale_dir; + +#ifdef HAVE_LC_MESSAGES + setlocale (LC_TIME, ""); + setlocale (LC_MESSAGES, ""); +#else +# ifndef HAVE_W32_SYSTEM + setlocale (LC_ALL, "" ); +# endif +#endif + + /* Note that for this program we would only need the textdomain call + because libgpg-error already initializes itself to its locale dir + (via gpg_err_init or a constructor). However this is only done + for the static standard locale and thus if the above setlocale + calls select a different locale the bindtext below will do + something else. */ + + locale_dir = get_locale_dir (); + if (locale_dir) + { + bindtextdomain (PACKAGE, locale_dir); + drop_locale_dir (locale_dir); + } + textdomain (PACKAGE); +#endif +} + + +#ifdef HAVE_W32_SYSTEM + +#include <windows.h> + + +static char * +get_locale_dir (void) +{ + static wchar_t moddir[MAX_PATH+5]; + char *result, *p; + int nbytes; + + if (!GetModuleFileNameW (NULL, moddir, MAX_PATH)) + *moddir = 0; + +#define SLDIR "\\share\\locale" + if (*moddir) + { + nbytes = WideCharToMultiByte (CP_UTF8, 0, moddir, -1, NULL, 0, NULL, NULL); + if (nbytes < 0) + return NULL; + + result = malloc (nbytes + strlen (SLDIR) + 1); + if (result) + { + nbytes = WideCharToMultiByte (CP_UTF8, 0, moddir, -1, + result, nbytes, NULL, NULL); + if (nbytes < 0) + { + free (result); + result = NULL; + } + else + { + p = strrchr (result, '\\'); + if (p) + *p = 0; + strcat (result, SLDIR); + } + } + } + else /* Use the old default value. */ + { + result = malloc (10 + strlen (SLDIR) + 1); + if (result) + { + strcpy (result, "c:\\gnupg"); + strcat (result, SLDIR); + } + } +#undef SLDIR + return result; +} + + +static void +drop_locale_dir (char *locale_dir) +{ + free (locale_dir); +} + +#endif /* HAVE_W32_SYSTEM */ + + +const char *gpg_strerror_sym (gpg_error_t err); +const char *gpg_strsource_sym (gpg_error_t err); + + +static int +get_err_from_number (char *str, gpg_error_t *err) +{ + unsigned long nr; + char *tail; + + gpg_err_set_errno (0); + nr = strtoul (str, &tail, 0); + if (errno) + return 0; + + if (nr > UINT_MAX) + return 0; + + if (*tail) + { + unsigned long cnr = strtoul (tail + 1, &tail, 0); + if (errno || *tail) + return 0; + + if (nr >= GPG_ERR_SOURCE_DIM || cnr >= GPG_ERR_CODE_DIM) + return 0; + + nr = gpg_err_make (nr, cnr); + } + + *err = (unsigned int) nr; + return 1; +} + + +static int +get_err_from_symbol_one (char *str, gpg_error_t *err, + int *have_source, int *have_code) +{ + static const char src_prefix[] = "GPG_ERR_SOURCE_"; + static const char code_prefix[] = "GPG_ERR_"; + + if (!strncasecmp (src_prefix, str, sizeof (src_prefix) - 1)) + { + gpg_err_source_t src; + + if (*have_source) + return 0; + *have_source = 1; + str += sizeof (src_prefix) - 1; + + for (src = 0; src < GPG_ERR_SOURCE_DIM; src++) + { + const char *src_sym; + + src_sym = gpg_strsource_sym (src << GPG_ERR_SOURCE_SHIFT); + if (src_sym && !strcasecmp (str, src_sym + sizeof (src_prefix) - 1)) + { + *err |= src << GPG_ERR_SOURCE_SHIFT; + return 1; + } + } + } + else if (!strncasecmp (code_prefix, str, sizeof (code_prefix) - 1)) + { + gpg_err_code_t code; + + if (*have_code) + return 0; + *have_code = 1; + str += sizeof (code_prefix) - 1; + + for (code = 0; code < GPG_ERR_CODE_DIM; code++) + { + const char *code_sym = gpg_strerror_sym (code); + if (code_sym + && !strcasecmp (str, code_sym + sizeof (code_prefix) - 1)) + { + *err |= code; + return 1; + } + } + } + return 0; +} + + +static int +get_err_from_symbol (char *str, gpg_error_t *err) +{ + char *str2 = str; + int have_source = 0; + int have_code = 0; + int ret; + char *saved_pos = NULL; + char saved_char; + + *err = 0; + while (*str2 && ((*str2 >= 'A' && *str2 <= 'Z') + || (*str2 >= '0' && *str2 <= '9') + || *str2 == '_')) + str2++; + if (*str2) + { + saved_pos = str2; + saved_char = *str2; + *str2 = '\0'; + str2++; + } + else + str2 = NULL; + + ret = get_err_from_symbol_one (str, err, &have_source, &have_code); + if (ret && str2) + ret = get_err_from_symbol_one (str2, err, &have_source, &have_code); + + if (saved_pos) + *saved_pos = saved_char; + return ret; +} + + +static int +get_err_from_str_one (char *str, gpg_error_t *err, + int *have_source, int *have_code) +{ + gpg_err_source_t src; + gpg_err_code_t code; + + for (src = 0; src < GPG_ERR_SOURCE_DIM; src++) + { + const char *src_str = gpg_strsource (src << GPG_ERR_SOURCE_SHIFT); + if (src_str && !strcasecmp (str, src_str)) + { + if (*have_source) + return 0; + + *have_source = 1; + *err |= src << GPG_ERR_SOURCE_SHIFT; + return 1; + } + } + + for (code = 0; code < GPG_ERR_CODE_DIM; code++) + { + const char *code_str = gpg_strerror (code); + if (code_str && !strcasecmp (str, code_str)) + { + if (*have_code) + return 0; + + *have_code = 1; + *err |= code; + return 1; + } + } + + return 0; +} + + +static int +get_err_from_str (char *str, gpg_error_t *err) +{ + char *str2 = str; + int have_source = 0; + int have_code = 0; + int ret; + char *saved_pos = NULL; + char saved_char; + + *err = 0; + ret = get_err_from_str_one (str, err, &have_source, &have_code); + if (ret) + return ret; + + while (*str2 && ((*str2 >= 'A' && *str2 <= 'Z') + || (*str2 >= 'a' && *str2 <= 'z') + || (*str2 >= '0' && *str2 <= '9') + || *str2 == '_')) + str2++; + if (*str2) + { + saved_pos = str2; + saved_char = *str2; + *((char *) str2) = '\0'; + str2++; + while (*str2 && !((*str2 >= 'A' && *str2 <= 'Z') + || (*str2 >= 'a' && *str2 <= 'z') + || (*str2 >= '0' && *str2 <= '9') + || *str2 == '_')) + str2++; + } + else + str2 = NULL; + + ret = get_err_from_str_one (str, err, &have_source, &have_code); + if (ret && str2) + ret = get_err_from_str_one (str2, err, &have_source, &have_code); + + if (saved_pos) + *saved_pos = saved_char; + return ret; +} + + + +int +main (int argc, char *argv[]) +{ + int i = 1; + int listmode = 0; + const char *source_sym; + const char *error_sym; + gpg_error_t err; + +#ifndef GPG_ERR_INITIALIZED + gpg_err_init (); +#endif + + i18n_init (); + + + if (argc == 1) + { + fprintf (stderr, _("Usage: %s GPG-ERROR [...]\n"), + strrchr (argv[0],'/')? (strrchr (argv[0], '/')+1): argv[0]); + exit (1); + } + else if (argc == 2 && !strcmp (argv[1], "--version")) + { + fputs ( ("gpg-error ("PACKAGE_NAME") "PACKAGE_VERSION"\n") , stdout); + exit (0); + } + else if (argc == 2 && !strcmp (argv[1], "--list")) + { + listmode = 1; + } + + + if (listmode) + { + for (i=0; i < GPG_ERR_SOURCE_DIM; i++) + { + /* We use error code 1 because gpg_err_make requires a + non-zero error code. */ + err = gpg_err_make (i, 1); + err -= 1; + source_sym = gpg_strsource_sym (err); + if (source_sym) + printf ("%u = (%u, -) = (%s, -) = (%s, -)\n", + err, gpg_err_source (err), + source_sym, gpg_strsource (err)); + } + for (i=0; i < GPG_ERR_CODE_DIM; i++) + { + err = gpg_err_make (GPG_ERR_SOURCE_UNKNOWN, i); + error_sym = gpg_strerror_sym (err); + if (error_sym) + printf ("%u = (-, %u) = (-, %s) = (-, %s)\n", + err, gpg_err_code (err), + error_sym, gpg_strerror (err)); + } + + i = argc; /* Don't run the usual stuff. */ + } + while (i < argc) + { + if (get_err_from_number (argv[i], &err) + || get_err_from_symbol (argv[i], &err) + || get_err_from_str (argv[i], &err)) + { + source_sym = gpg_strsource_sym (err); + error_sym = gpg_strerror_sym (err); + + printf ("%u = (%u, %u) = (%s, %s) = (%s, %s)\n", + err, gpg_err_source (err), gpg_err_code (err), + source_sym ? source_sym : "-", error_sym ? error_sym : "-", + gpg_strsource (err), gpg_strerror (err)); + } + else + fprintf (stderr, _("%s: warning: could not recognize %s\n"), + argv[0], argv[i]); + i++; + } + + exit (0); +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.def b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.def new file mode 100644 index 0000000000..0e8c946ee6 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.def @@ -0,0 +1,28 @@ + + + + + +EXPORTS + gpg_strerror @1 + gpg_strerror_r @2 + gpg_strsource @3 + gpg_err_code_from_errno @4 + gpg_err_code_to_errno @5 + gpg_err_init @6 + gpg_err_code_from_syserror @7 + gpg_err_set_errno @8 + + + + + + _gpg_w32_bindtextdomain @11 + _gpg_w32_textdomain @12 + _gpg_w32_gettext @13 + _gpg_w32_dgettext @14 + _gpg_w32_dngettext @15 + _gpg_w32_gettext_localename @16 + _gpg_w32_gettext_use_utf8 @17 + + gpg_err_deinit @18 diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.def.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.def.in new file mode 100644 index 0000000000..cbabd57053 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.def.in @@ -0,0 +1,29 @@ +/* gpg-error.def.in - Exported symbols + * Needs to be processed by CPP. + */ + +#include <config.h> + +EXPORTS + gpg_strerror @1 + gpg_strerror_r @2 + gpg_strsource @3 + gpg_err_code_from_errno @4 + gpg_err_code_to_errno @5 + gpg_err_init @6 + gpg_err_code_from_syserror @7 + gpg_err_set_errno @8 +#ifdef HAVE_W32CE_SYSTEM + _gpg_w32ce_get_errno @9 + _gpg_w32ce_strerror @10 +#endif +#ifdef HAVE_W32_SYSTEM + _gpg_w32_bindtextdomain @11 + _gpg_w32_textdomain @12 + _gpg_w32_gettext @13 + _gpg_w32_dgettext @14 + _gpg_w32_dngettext @15 + _gpg_w32_gettext_localename @16 + _gpg_w32_gettext_use_utf8 @17 +#endif + gpg_err_deinit @18 diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.exe b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.exe Binary files differnew file mode 100644 index 0000000000..63968b7840 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.exe diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.h new file mode 100644 index 0000000000..c9e0346b4e --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.h @@ -0,0 +1,710 @@ +/* Output of mkheader.awk. DO NOT EDIT. -*- buffer-read-only: t -*- */ + +/* gpg-error.h - Public interface to libgpg-error. + Copyright (C) 2003, 2004, 2010 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef GPG_ERROR_H +#define GPG_ERROR_H 1 + +#include <stddef.h> + +#ifdef __GNUC__ +#define GPG_ERR_INLINE __inline__ +#elif __STDC_VERSION__ >= 199901L +#define GPG_ERR_INLINE inline +#else +#ifndef GPG_ERR_INLINE +#define GPG_ERR_INLINE +#endif +#endif + + +#ifdef __cplusplus +extern "C" { +#if 0 /* just to make Emacs auto-indent happy */ +} +#endif +#endif /* __cplusplus */ + +/* The GnuPG project consists of many components. Error codes are + exchanged between all components. The common error codes and their + user-presentable descriptions are kept into a shared library to + allow adding new error codes and components without recompiling any + of the other components. The interface will not change in a + backward incompatible way. + + An error code together with an error source build up an error + value. As the error value is been passed from one component to + another, it preserver the information about the source and nature + of the error. + + A component of the GnuPG project can define the following macros to + tune the behaviour of the library: + + GPG_ERR_SOURCE_DEFAULT: Define to an error source of type + gpg_err_source_t to make that source the default for gpg_error(). + Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default. + + GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the + internal gettext API to standard names. This has only an effect on + Windows platforms. */ + + +/* The error source type gpg_err_source_t. + + Where as the Poo out of a welle small + Taketh his firste springing and his sours. + --Chaucer. */ + +/* Only use free slots, never change or reorder the existing + entries. */ +typedef enum + { + GPG_ERR_SOURCE_UNKNOWN = 0, + GPG_ERR_SOURCE_GCRYPT = 1, + GPG_ERR_SOURCE_GPG = 2, + GPG_ERR_SOURCE_GPGSM = 3, + GPG_ERR_SOURCE_GPGAGENT = 4, + GPG_ERR_SOURCE_PINENTRY = 5, + GPG_ERR_SOURCE_SCD = 6, + GPG_ERR_SOURCE_GPGME = 7, + GPG_ERR_SOURCE_KEYBOX = 8, + GPG_ERR_SOURCE_KSBA = 9, + GPG_ERR_SOURCE_DIRMNGR = 10, + GPG_ERR_SOURCE_GSTI = 11, + GPG_ERR_SOURCE_GPA = 12, + GPG_ERR_SOURCE_KLEO = 13, + GPG_ERR_SOURCE_G13 = 14, + GPG_ERR_SOURCE_ANY = 31, + GPG_ERR_SOURCE_USER_1 = 32, + GPG_ERR_SOURCE_USER_2 = 33, + GPG_ERR_SOURCE_USER_3 = 34, + GPG_ERR_SOURCE_USER_4 = 35, + + /* This is one more than the largest allowed entry. */ + GPG_ERR_SOURCE_DIM = 128 + } gpg_err_source_t; + + +/* The error code type gpg_err_code_t. */ + +/* Only use free slots, never change or reorder the existing + entries. */ +typedef enum + { + GPG_ERR_NO_ERROR = 0, + GPG_ERR_GENERAL = 1, + GPG_ERR_UNKNOWN_PACKET = 2, + GPG_ERR_UNKNOWN_VERSION = 3, + GPG_ERR_PUBKEY_ALGO = 4, + GPG_ERR_DIGEST_ALGO = 5, + GPG_ERR_BAD_PUBKEY = 6, + GPG_ERR_BAD_SECKEY = 7, + GPG_ERR_BAD_SIGNATURE = 8, + GPG_ERR_NO_PUBKEY = 9, + GPG_ERR_CHECKSUM = 10, + GPG_ERR_BAD_PASSPHRASE = 11, + GPG_ERR_CIPHER_ALGO = 12, + GPG_ERR_KEYRING_OPEN = 13, + GPG_ERR_INV_PACKET = 14, + GPG_ERR_INV_ARMOR = 15, + GPG_ERR_NO_USER_ID = 16, + GPG_ERR_NO_SECKEY = 17, + GPG_ERR_WRONG_SECKEY = 18, + GPG_ERR_BAD_KEY = 19, + GPG_ERR_COMPR_ALGO = 20, + GPG_ERR_NO_PRIME = 21, + GPG_ERR_NO_ENCODING_METHOD = 22, + GPG_ERR_NO_ENCRYPTION_SCHEME = 23, + GPG_ERR_NO_SIGNATURE_SCHEME = 24, + GPG_ERR_INV_ATTR = 25, + GPG_ERR_NO_VALUE = 26, + GPG_ERR_NOT_FOUND = 27, + GPG_ERR_VALUE_NOT_FOUND = 28, + GPG_ERR_SYNTAX = 29, + GPG_ERR_BAD_MPI = 30, + GPG_ERR_INV_PASSPHRASE = 31, + GPG_ERR_SIG_CLASS = 32, + GPG_ERR_RESOURCE_LIMIT = 33, + GPG_ERR_INV_KEYRING = 34, + GPG_ERR_TRUSTDB = 35, + GPG_ERR_BAD_CERT = 36, + GPG_ERR_INV_USER_ID = 37, + GPG_ERR_UNEXPECTED = 38, + GPG_ERR_TIME_CONFLICT = 39, + GPG_ERR_KEYSERVER = 40, + GPG_ERR_WRONG_PUBKEY_ALGO = 41, + GPG_ERR_TRIBUTE_TO_D_A = 42, + GPG_ERR_WEAK_KEY = 43, + GPG_ERR_INV_KEYLEN = 44, + GPG_ERR_INV_ARG = 45, + GPG_ERR_BAD_URI = 46, + GPG_ERR_INV_URI = 47, + GPG_ERR_NETWORK = 48, + GPG_ERR_UNKNOWN_HOST = 49, + GPG_ERR_SELFTEST_FAILED = 50, + GPG_ERR_NOT_ENCRYPTED = 51, + GPG_ERR_NOT_PROCESSED = 52, + GPG_ERR_UNUSABLE_PUBKEY = 53, + GPG_ERR_UNUSABLE_SECKEY = 54, + GPG_ERR_INV_VALUE = 55, + GPG_ERR_BAD_CERT_CHAIN = 56, + GPG_ERR_MISSING_CERT = 57, + GPG_ERR_NO_DATA = 58, + GPG_ERR_BUG = 59, + GPG_ERR_NOT_SUPPORTED = 60, + GPG_ERR_INV_OP = 61, + GPG_ERR_TIMEOUT = 62, + GPG_ERR_INTERNAL = 63, + GPG_ERR_EOF_GCRYPT = 64, + GPG_ERR_INV_OBJ = 65, + GPG_ERR_TOO_SHORT = 66, + GPG_ERR_TOO_LARGE = 67, + GPG_ERR_NO_OBJ = 68, + GPG_ERR_NOT_IMPLEMENTED = 69, + GPG_ERR_CONFLICT = 70, + GPG_ERR_INV_CIPHER_MODE = 71, + GPG_ERR_INV_FLAG = 72, + GPG_ERR_INV_HANDLE = 73, + GPG_ERR_TRUNCATED = 74, + GPG_ERR_INCOMPLETE_LINE = 75, + GPG_ERR_INV_RESPONSE = 76, + GPG_ERR_NO_AGENT = 77, + GPG_ERR_AGENT = 78, + GPG_ERR_INV_DATA = 79, + GPG_ERR_ASSUAN_SERVER_FAULT = 80, + GPG_ERR_ASSUAN = 81, + GPG_ERR_INV_SESSION_KEY = 82, + GPG_ERR_INV_SEXP = 83, + GPG_ERR_UNSUPPORTED_ALGORITHM = 84, + GPG_ERR_NO_PIN_ENTRY = 85, + GPG_ERR_PIN_ENTRY = 86, + GPG_ERR_BAD_PIN = 87, + GPG_ERR_INV_NAME = 88, + GPG_ERR_BAD_DATA = 89, + GPG_ERR_INV_PARAMETER = 90, + GPG_ERR_WRONG_CARD = 91, + GPG_ERR_NO_DIRMNGR = 92, + GPG_ERR_DIRMNGR = 93, + GPG_ERR_CERT_REVOKED = 94, + GPG_ERR_NO_CRL_KNOWN = 95, + GPG_ERR_CRL_TOO_OLD = 96, + GPG_ERR_LINE_TOO_LONG = 97, + GPG_ERR_NOT_TRUSTED = 98, + GPG_ERR_CANCELED = 99, + GPG_ERR_BAD_CA_CERT = 100, + GPG_ERR_CERT_EXPIRED = 101, + GPG_ERR_CERT_TOO_YOUNG = 102, + GPG_ERR_UNSUPPORTED_CERT = 103, + GPG_ERR_UNKNOWN_SEXP = 104, + GPG_ERR_UNSUPPORTED_PROTECTION = 105, + GPG_ERR_CORRUPTED_PROTECTION = 106, + GPG_ERR_AMBIGUOUS_NAME = 107, + GPG_ERR_CARD = 108, + GPG_ERR_CARD_RESET = 109, + GPG_ERR_CARD_REMOVED = 110, + GPG_ERR_INV_CARD = 111, + GPG_ERR_CARD_NOT_PRESENT = 112, + GPG_ERR_NO_PKCS15_APP = 113, + GPG_ERR_NOT_CONFIRMED = 114, + GPG_ERR_CONFIGURATION = 115, + GPG_ERR_NO_POLICY_MATCH = 116, + GPG_ERR_INV_INDEX = 117, + GPG_ERR_INV_ID = 118, + GPG_ERR_NO_SCDAEMON = 119, + GPG_ERR_SCDAEMON = 120, + GPG_ERR_UNSUPPORTED_PROTOCOL = 121, + GPG_ERR_BAD_PIN_METHOD = 122, + GPG_ERR_CARD_NOT_INITIALIZED = 123, + GPG_ERR_UNSUPPORTED_OPERATION = 124, + GPG_ERR_WRONG_KEY_USAGE = 125, + GPG_ERR_NOTHING_FOUND = 126, + GPG_ERR_WRONG_BLOB_TYPE = 127, + GPG_ERR_MISSING_VALUE = 128, + GPG_ERR_HARDWARE = 129, + GPG_ERR_PIN_BLOCKED = 130, + GPG_ERR_USE_CONDITIONS = 131, + GPG_ERR_PIN_NOT_SYNCED = 132, + GPG_ERR_INV_CRL = 133, + GPG_ERR_BAD_BER = 134, + GPG_ERR_INV_BER = 135, + GPG_ERR_ELEMENT_NOT_FOUND = 136, + GPG_ERR_IDENTIFIER_NOT_FOUND = 137, + GPG_ERR_INV_TAG = 138, + GPG_ERR_INV_LENGTH = 139, + GPG_ERR_INV_KEYINFO = 140, + GPG_ERR_UNEXPECTED_TAG = 141, + GPG_ERR_NOT_DER_ENCODED = 142, + GPG_ERR_NO_CMS_OBJ = 143, + GPG_ERR_INV_CMS_OBJ = 144, + GPG_ERR_UNKNOWN_CMS_OBJ = 145, + GPG_ERR_UNSUPPORTED_CMS_OBJ = 146, + GPG_ERR_UNSUPPORTED_ENCODING = 147, + GPG_ERR_UNSUPPORTED_CMS_VERSION = 148, + GPG_ERR_UNKNOWN_ALGORITHM = 149, + GPG_ERR_INV_ENGINE = 150, + GPG_ERR_PUBKEY_NOT_TRUSTED = 151, + GPG_ERR_DECRYPT_FAILED = 152, + GPG_ERR_KEY_EXPIRED = 153, + GPG_ERR_SIG_EXPIRED = 154, + GPG_ERR_ENCODING_PROBLEM = 155, + GPG_ERR_INV_STATE = 156, + GPG_ERR_DUP_VALUE = 157, + GPG_ERR_MISSING_ACTION = 158, + GPG_ERR_MODULE_NOT_FOUND = 159, + GPG_ERR_INV_OID_STRING = 160, + GPG_ERR_INV_TIME = 161, + GPG_ERR_INV_CRL_OBJ = 162, + GPG_ERR_UNSUPPORTED_CRL_VERSION = 163, + GPG_ERR_INV_CERT_OBJ = 164, + GPG_ERR_UNKNOWN_NAME = 165, + GPG_ERR_LOCALE_PROBLEM = 166, + GPG_ERR_NOT_LOCKED = 167, + GPG_ERR_PROTOCOL_VIOLATION = 168, + GPG_ERR_INV_MAC = 169, + GPG_ERR_INV_REQUEST = 170, + GPG_ERR_UNKNOWN_EXTN = 171, + GPG_ERR_UNKNOWN_CRIT_EXTN = 172, + GPG_ERR_LOCKED = 173, + GPG_ERR_UNKNOWN_OPTION = 174, + GPG_ERR_UNKNOWN_COMMAND = 175, + GPG_ERR_NOT_OPERATIONAL = 176, + GPG_ERR_NO_PASSPHRASE = 177, + GPG_ERR_NO_PIN = 178, + GPG_ERR_NOT_ENABLED = 179, + GPG_ERR_NO_ENGINE = 180, + GPG_ERR_MISSING_KEY = 181, + GPG_ERR_TOO_MANY = 182, + GPG_ERR_LIMIT_REACHED = 183, + GPG_ERR_UNFINISHED = 199, + GPG_ERR_BUFFER_TOO_SHORT = 200, + GPG_ERR_SEXP_INV_LEN_SPEC = 201, + GPG_ERR_SEXP_STRING_TOO_LONG = 202, + GPG_ERR_SEXP_UNMATCHED_PAREN = 203, + GPG_ERR_SEXP_NOT_CANONICAL = 204, + GPG_ERR_SEXP_BAD_CHARACTER = 205, + GPG_ERR_SEXP_BAD_QUOTATION = 206, + GPG_ERR_SEXP_ZERO_PREFIX = 207, + GPG_ERR_SEXP_NESTED_DH = 208, + GPG_ERR_SEXP_UNMATCHED_DH = 209, + GPG_ERR_SEXP_UNEXPECTED_PUNC = 210, + GPG_ERR_SEXP_BAD_HEX_CHAR = 211, + GPG_ERR_SEXP_ODD_HEX_NUMBERS = 212, + GPG_ERR_SEXP_BAD_OCT_CHAR = 213, + GPG_ERR_ASS_GENERAL = 257, + GPG_ERR_ASS_ACCEPT_FAILED = 258, + GPG_ERR_ASS_CONNECT_FAILED = 259, + GPG_ERR_ASS_INV_RESPONSE = 260, + GPG_ERR_ASS_INV_VALUE = 261, + GPG_ERR_ASS_INCOMPLETE_LINE = 262, + GPG_ERR_ASS_LINE_TOO_LONG = 263, + GPG_ERR_ASS_NESTED_COMMANDS = 264, + GPG_ERR_ASS_NO_DATA_CB = 265, + GPG_ERR_ASS_NO_INQUIRE_CB = 266, + GPG_ERR_ASS_NOT_A_SERVER = 267, + GPG_ERR_ASS_NOT_A_CLIENT = 268, + GPG_ERR_ASS_SERVER_START = 269, + GPG_ERR_ASS_READ_ERROR = 270, + GPG_ERR_ASS_WRITE_ERROR = 271, + GPG_ERR_ASS_TOO_MUCH_DATA = 273, + GPG_ERR_ASS_UNEXPECTED_CMD = 274, + GPG_ERR_ASS_UNKNOWN_CMD = 275, + GPG_ERR_ASS_SYNTAX = 276, + GPG_ERR_ASS_CANCELED = 277, + GPG_ERR_ASS_NO_INPUT = 278, + GPG_ERR_ASS_NO_OUTPUT = 279, + GPG_ERR_ASS_PARAMETER = 280, + GPG_ERR_ASS_UNKNOWN_INQUIRE = 281, + GPG_ERR_USER_1 = 1024, + GPG_ERR_USER_2 = 1025, + GPG_ERR_USER_3 = 1026, + GPG_ERR_USER_4 = 1027, + GPG_ERR_USER_5 = 1028, + GPG_ERR_USER_6 = 1029, + GPG_ERR_USER_7 = 1030, + GPG_ERR_USER_8 = 1031, + GPG_ERR_USER_9 = 1032, + GPG_ERR_USER_10 = 1033, + GPG_ERR_USER_11 = 1034, + GPG_ERR_USER_12 = 1035, + GPG_ERR_USER_13 = 1036, + GPG_ERR_USER_14 = 1037, + GPG_ERR_USER_15 = 1038, + GPG_ERR_USER_16 = 1039, + GPG_ERR_MISSING_ERRNO = 16381, + GPG_ERR_UNKNOWN_ERRNO = 16382, + GPG_ERR_EOF = 16383, + + /* The following error codes are used to map system errors. */ +#define GPG_ERR_SYSTEM_ERROR (1 << 15) + GPG_ERR_E2BIG = GPG_ERR_SYSTEM_ERROR | 0, + GPG_ERR_EACCES = GPG_ERR_SYSTEM_ERROR | 1, + GPG_ERR_EADDRINUSE = GPG_ERR_SYSTEM_ERROR | 2, + GPG_ERR_EADDRNOTAVAIL = GPG_ERR_SYSTEM_ERROR | 3, + GPG_ERR_EADV = GPG_ERR_SYSTEM_ERROR | 4, + GPG_ERR_EAFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 5, + GPG_ERR_EAGAIN = GPG_ERR_SYSTEM_ERROR | 6, + GPG_ERR_EALREADY = GPG_ERR_SYSTEM_ERROR | 7, + GPG_ERR_EAUTH = GPG_ERR_SYSTEM_ERROR | 8, + GPG_ERR_EBACKGROUND = GPG_ERR_SYSTEM_ERROR | 9, + GPG_ERR_EBADE = GPG_ERR_SYSTEM_ERROR | 10, + GPG_ERR_EBADF = GPG_ERR_SYSTEM_ERROR | 11, + GPG_ERR_EBADFD = GPG_ERR_SYSTEM_ERROR | 12, + GPG_ERR_EBADMSG = GPG_ERR_SYSTEM_ERROR | 13, + GPG_ERR_EBADR = GPG_ERR_SYSTEM_ERROR | 14, + GPG_ERR_EBADRPC = GPG_ERR_SYSTEM_ERROR | 15, + GPG_ERR_EBADRQC = GPG_ERR_SYSTEM_ERROR | 16, + GPG_ERR_EBADSLT = GPG_ERR_SYSTEM_ERROR | 17, + GPG_ERR_EBFONT = GPG_ERR_SYSTEM_ERROR | 18, + GPG_ERR_EBUSY = GPG_ERR_SYSTEM_ERROR | 19, + GPG_ERR_ECANCELED = GPG_ERR_SYSTEM_ERROR | 20, + GPG_ERR_ECHILD = GPG_ERR_SYSTEM_ERROR | 21, + GPG_ERR_ECHRNG = GPG_ERR_SYSTEM_ERROR | 22, + GPG_ERR_ECOMM = GPG_ERR_SYSTEM_ERROR | 23, + GPG_ERR_ECONNABORTED = GPG_ERR_SYSTEM_ERROR | 24, + GPG_ERR_ECONNREFUSED = GPG_ERR_SYSTEM_ERROR | 25, + GPG_ERR_ECONNRESET = GPG_ERR_SYSTEM_ERROR | 26, + GPG_ERR_ED = GPG_ERR_SYSTEM_ERROR | 27, + GPG_ERR_EDEADLK = GPG_ERR_SYSTEM_ERROR | 28, + GPG_ERR_EDEADLOCK = GPG_ERR_SYSTEM_ERROR | 29, + GPG_ERR_EDESTADDRREQ = GPG_ERR_SYSTEM_ERROR | 30, + GPG_ERR_EDIED = GPG_ERR_SYSTEM_ERROR | 31, + GPG_ERR_EDOM = GPG_ERR_SYSTEM_ERROR | 32, + GPG_ERR_EDOTDOT = GPG_ERR_SYSTEM_ERROR | 33, + GPG_ERR_EDQUOT = GPG_ERR_SYSTEM_ERROR | 34, + GPG_ERR_EEXIST = GPG_ERR_SYSTEM_ERROR | 35, + GPG_ERR_EFAULT = GPG_ERR_SYSTEM_ERROR | 36, + GPG_ERR_EFBIG = GPG_ERR_SYSTEM_ERROR | 37, + GPG_ERR_EFTYPE = GPG_ERR_SYSTEM_ERROR | 38, + GPG_ERR_EGRATUITOUS = GPG_ERR_SYSTEM_ERROR | 39, + GPG_ERR_EGREGIOUS = GPG_ERR_SYSTEM_ERROR | 40, + GPG_ERR_EHOSTDOWN = GPG_ERR_SYSTEM_ERROR | 41, + GPG_ERR_EHOSTUNREACH = GPG_ERR_SYSTEM_ERROR | 42, + GPG_ERR_EIDRM = GPG_ERR_SYSTEM_ERROR | 43, + GPG_ERR_EIEIO = GPG_ERR_SYSTEM_ERROR | 44, + GPG_ERR_EILSEQ = GPG_ERR_SYSTEM_ERROR | 45, + GPG_ERR_EINPROGRESS = GPG_ERR_SYSTEM_ERROR | 46, + GPG_ERR_EINTR = GPG_ERR_SYSTEM_ERROR | 47, + GPG_ERR_EINVAL = GPG_ERR_SYSTEM_ERROR | 48, + GPG_ERR_EIO = GPG_ERR_SYSTEM_ERROR | 49, + GPG_ERR_EISCONN = GPG_ERR_SYSTEM_ERROR | 50, + GPG_ERR_EISDIR = GPG_ERR_SYSTEM_ERROR | 51, + GPG_ERR_EISNAM = GPG_ERR_SYSTEM_ERROR | 52, + GPG_ERR_EL2HLT = GPG_ERR_SYSTEM_ERROR | 53, + GPG_ERR_EL2NSYNC = GPG_ERR_SYSTEM_ERROR | 54, + GPG_ERR_EL3HLT = GPG_ERR_SYSTEM_ERROR | 55, + GPG_ERR_EL3RST = GPG_ERR_SYSTEM_ERROR | 56, + GPG_ERR_ELIBACC = GPG_ERR_SYSTEM_ERROR | 57, + GPG_ERR_ELIBBAD = GPG_ERR_SYSTEM_ERROR | 58, + GPG_ERR_ELIBEXEC = GPG_ERR_SYSTEM_ERROR | 59, + GPG_ERR_ELIBMAX = GPG_ERR_SYSTEM_ERROR | 60, + GPG_ERR_ELIBSCN = GPG_ERR_SYSTEM_ERROR | 61, + GPG_ERR_ELNRNG = GPG_ERR_SYSTEM_ERROR | 62, + GPG_ERR_ELOOP = GPG_ERR_SYSTEM_ERROR | 63, + GPG_ERR_EMEDIUMTYPE = GPG_ERR_SYSTEM_ERROR | 64, + GPG_ERR_EMFILE = GPG_ERR_SYSTEM_ERROR | 65, + GPG_ERR_EMLINK = GPG_ERR_SYSTEM_ERROR | 66, + GPG_ERR_EMSGSIZE = GPG_ERR_SYSTEM_ERROR | 67, + GPG_ERR_EMULTIHOP = GPG_ERR_SYSTEM_ERROR | 68, + GPG_ERR_ENAMETOOLONG = GPG_ERR_SYSTEM_ERROR | 69, + GPG_ERR_ENAVAIL = GPG_ERR_SYSTEM_ERROR | 70, + GPG_ERR_ENEEDAUTH = GPG_ERR_SYSTEM_ERROR | 71, + GPG_ERR_ENETDOWN = GPG_ERR_SYSTEM_ERROR | 72, + GPG_ERR_ENETRESET = GPG_ERR_SYSTEM_ERROR | 73, + GPG_ERR_ENETUNREACH = GPG_ERR_SYSTEM_ERROR | 74, + GPG_ERR_ENFILE = GPG_ERR_SYSTEM_ERROR | 75, + GPG_ERR_ENOANO = GPG_ERR_SYSTEM_ERROR | 76, + GPG_ERR_ENOBUFS = GPG_ERR_SYSTEM_ERROR | 77, + GPG_ERR_ENOCSI = GPG_ERR_SYSTEM_ERROR | 78, + GPG_ERR_ENODATA = GPG_ERR_SYSTEM_ERROR | 79, + GPG_ERR_ENODEV = GPG_ERR_SYSTEM_ERROR | 80, + GPG_ERR_ENOENT = GPG_ERR_SYSTEM_ERROR | 81, + GPG_ERR_ENOEXEC = GPG_ERR_SYSTEM_ERROR | 82, + GPG_ERR_ENOLCK = GPG_ERR_SYSTEM_ERROR | 83, + GPG_ERR_ENOLINK = GPG_ERR_SYSTEM_ERROR | 84, + GPG_ERR_ENOMEDIUM = GPG_ERR_SYSTEM_ERROR | 85, + GPG_ERR_ENOMEM = GPG_ERR_SYSTEM_ERROR | 86, + GPG_ERR_ENOMSG = GPG_ERR_SYSTEM_ERROR | 87, + GPG_ERR_ENONET = GPG_ERR_SYSTEM_ERROR | 88, + GPG_ERR_ENOPKG = GPG_ERR_SYSTEM_ERROR | 89, + GPG_ERR_ENOPROTOOPT = GPG_ERR_SYSTEM_ERROR | 90, + GPG_ERR_ENOSPC = GPG_ERR_SYSTEM_ERROR | 91, + GPG_ERR_ENOSR = GPG_ERR_SYSTEM_ERROR | 92, + GPG_ERR_ENOSTR = GPG_ERR_SYSTEM_ERROR | 93, + GPG_ERR_ENOSYS = GPG_ERR_SYSTEM_ERROR | 94, + GPG_ERR_ENOTBLK = GPG_ERR_SYSTEM_ERROR | 95, + GPG_ERR_ENOTCONN = GPG_ERR_SYSTEM_ERROR | 96, + GPG_ERR_ENOTDIR = GPG_ERR_SYSTEM_ERROR | 97, + GPG_ERR_ENOTEMPTY = GPG_ERR_SYSTEM_ERROR | 98, + GPG_ERR_ENOTNAM = GPG_ERR_SYSTEM_ERROR | 99, + GPG_ERR_ENOTSOCK = GPG_ERR_SYSTEM_ERROR | 100, + GPG_ERR_ENOTSUP = GPG_ERR_SYSTEM_ERROR | 101, + GPG_ERR_ENOTTY = GPG_ERR_SYSTEM_ERROR | 102, + GPG_ERR_ENOTUNIQ = GPG_ERR_SYSTEM_ERROR | 103, + GPG_ERR_ENXIO = GPG_ERR_SYSTEM_ERROR | 104, + GPG_ERR_EOPNOTSUPP = GPG_ERR_SYSTEM_ERROR | 105, + GPG_ERR_EOVERFLOW = GPG_ERR_SYSTEM_ERROR | 106, + GPG_ERR_EPERM = GPG_ERR_SYSTEM_ERROR | 107, + GPG_ERR_EPFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 108, + GPG_ERR_EPIPE = GPG_ERR_SYSTEM_ERROR | 109, + GPG_ERR_EPROCLIM = GPG_ERR_SYSTEM_ERROR | 110, + GPG_ERR_EPROCUNAVAIL = GPG_ERR_SYSTEM_ERROR | 111, + GPG_ERR_EPROGMISMATCH = GPG_ERR_SYSTEM_ERROR | 112, + GPG_ERR_EPROGUNAVAIL = GPG_ERR_SYSTEM_ERROR | 113, + GPG_ERR_EPROTO = GPG_ERR_SYSTEM_ERROR | 114, + GPG_ERR_EPROTONOSUPPORT = GPG_ERR_SYSTEM_ERROR | 115, + GPG_ERR_EPROTOTYPE = GPG_ERR_SYSTEM_ERROR | 116, + GPG_ERR_ERANGE = GPG_ERR_SYSTEM_ERROR | 117, + GPG_ERR_EREMCHG = GPG_ERR_SYSTEM_ERROR | 118, + GPG_ERR_EREMOTE = GPG_ERR_SYSTEM_ERROR | 119, + GPG_ERR_EREMOTEIO = GPG_ERR_SYSTEM_ERROR | 120, + GPG_ERR_ERESTART = GPG_ERR_SYSTEM_ERROR | 121, + GPG_ERR_EROFS = GPG_ERR_SYSTEM_ERROR | 122, + GPG_ERR_ERPCMISMATCH = GPG_ERR_SYSTEM_ERROR | 123, + GPG_ERR_ESHUTDOWN = GPG_ERR_SYSTEM_ERROR | 124, + GPG_ERR_ESOCKTNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 125, + GPG_ERR_ESPIPE = GPG_ERR_SYSTEM_ERROR | 126, + GPG_ERR_ESRCH = GPG_ERR_SYSTEM_ERROR | 127, + GPG_ERR_ESRMNT = GPG_ERR_SYSTEM_ERROR | 128, + GPG_ERR_ESTALE = GPG_ERR_SYSTEM_ERROR | 129, + GPG_ERR_ESTRPIPE = GPG_ERR_SYSTEM_ERROR | 130, + GPG_ERR_ETIME = GPG_ERR_SYSTEM_ERROR | 131, + GPG_ERR_ETIMEDOUT = GPG_ERR_SYSTEM_ERROR | 132, + GPG_ERR_ETOOMANYREFS = GPG_ERR_SYSTEM_ERROR | 133, + GPG_ERR_ETXTBSY = GPG_ERR_SYSTEM_ERROR | 134, + GPG_ERR_EUCLEAN = GPG_ERR_SYSTEM_ERROR | 135, + GPG_ERR_EUNATCH = GPG_ERR_SYSTEM_ERROR | 136, + GPG_ERR_EUSERS = GPG_ERR_SYSTEM_ERROR | 137, + GPG_ERR_EWOULDBLOCK = GPG_ERR_SYSTEM_ERROR | 138, + GPG_ERR_EXDEV = GPG_ERR_SYSTEM_ERROR | 139, + GPG_ERR_EXFULL = GPG_ERR_SYSTEM_ERROR | 140, + + /* This is one more than the largest allowed entry. */ + GPG_ERR_CODE_DIM = 65536 + } gpg_err_code_t; + + +/* The error value type gpg_error_t. */ + +/* We would really like to use bit-fields in a struct, but using + structs as return values can cause binary compatibility issues, in + particular if you want to do it effeciently (also see + -freg-struct-return option to GCC). */ +typedef unsigned int gpg_error_t; + +/* We use the lowest 16 bits of gpg_error_t for error codes. The 16th + bit indicates system errors. */ +#define GPG_ERR_CODE_MASK (GPG_ERR_CODE_DIM - 1) + +/* Bits 17 to 24 are reserved. */ + +/* We use the upper 7 bits of gpg_error_t for error sources. */ +#define GPG_ERR_SOURCE_MASK (GPG_ERR_SOURCE_DIM - 1) +#define GPG_ERR_SOURCE_SHIFT 24 + +/* The highest bit is reserved. It shouldn't be used to prevent + potential negative numbers when transmitting error values as + text. */ + + +/* GCC feature test. */ +#undef _GPG_ERR_HAVE_CONSTRUCTOR +#if __GNUC__ +#define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) + +#if _GPG_ERR_GCC_VERSION > 30100 +#define _GPG_ERR_CONSTRUCTOR __attribute__ ((__constructor__)) +#define _GPG_ERR_HAVE_CONSTRUCTOR +#endif +#endif + +#ifndef _GPG_ERR_CONSTRUCTOR +#define _GPG_ERR_CONSTRUCTOR +#endif + + +/* Initialization function. */ + +/* Initialize the library. This function should be run early. */ +gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR; + +/* If this is defined, the library is already initialized by the + constructor and does not need to be initialized explicitely. */ +#undef GPG_ERR_INITIALIZED +#ifdef _GPG_ERR_HAVE_CONSTRUCTOR +#define GPG_ERR_INITIALIZED 1 +#endif + +/* See the source on how to use the deinit function; it is usually not + required. */ +void gpg_err_deinit (int mode); + + +/* Constructor and accessor functions. */ + +/* Construct an error value from an error code and source. Within a + subsystem, use gpg_error. */ +static GPG_ERR_INLINE gpg_error_t +gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) +{ + return code == GPG_ERR_NO_ERROR ? GPG_ERR_NO_ERROR + : (((source & GPG_ERR_SOURCE_MASK) << GPG_ERR_SOURCE_SHIFT) + | (code & GPG_ERR_CODE_MASK)); +} + + +/* The user should define GPG_ERR_SOURCE_DEFAULT before including this + file to specify a default source for gpg_error. */ +#ifndef GPG_ERR_SOURCE_DEFAULT +#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_UNKNOWN +#endif + +static GPG_ERR_INLINE gpg_error_t +gpg_error (gpg_err_code_t code) +{ + return gpg_err_make (GPG_ERR_SOURCE_DEFAULT, code); +} + + +/* Retrieve the error code from an error value. */ +static GPG_ERR_INLINE gpg_err_code_t +gpg_err_code (gpg_error_t err) +{ + return (gpg_err_code_t) (err & GPG_ERR_CODE_MASK); +} + + +/* Retrieve the error source from an error value. */ +static GPG_ERR_INLINE gpg_err_source_t +gpg_err_source (gpg_error_t err) +{ + return (gpg_err_source_t) ((err >> GPG_ERR_SOURCE_SHIFT) + & GPG_ERR_SOURCE_MASK); +} + + +/* String functions. */ + +/* Return a pointer to a string containing a description of the error + code in the error value ERR. This function is not thread-safe. */ +const char *gpg_strerror (gpg_error_t err); + +/* Return the error string for ERR in the user-supplied buffer BUF of + size BUFLEN. This function is, in contrast to gpg_strerror, + thread-safe if a thread-safe strerror_r() function is provided by + the system. If the function succeeds, 0 is returned and BUF + contains the string describing the error. If the buffer was not + large enough, ERANGE is returned and BUF contains as much of the + beginning of the error string as fits into the buffer. */ +int gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen); + +/* Return a pointer to a string containing a description of the error + source in the error value ERR. */ +const char *gpg_strsource (gpg_error_t err); + + +/* Mapping of system errors (errno). */ + +/* Retrieve the error code for the system error ERR. This returns + GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report + this). */ +gpg_err_code_t gpg_err_code_from_errno (int err); + + +/* Retrieve the system error for the error code CODE. This returns 0 + if CODE is not a system error code. */ +int gpg_err_code_to_errno (gpg_err_code_t code); + + +/* Retrieve the error code directly from the ERRNO variable. This + returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped + (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ +gpg_err_code_t gpg_err_code_from_syserror (void); + + +/* Set the ERRNO variable. This function is the preferred way to set + ERRNO due to peculiarities on WindowsCE. */ +void gpg_err_set_errno (int err); + +/* Decide whether to use the format_arg attribute. */ +#if _GPG_ERR_GCC_VERSION > 20800 +# define _GPG_ERR_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a))) +#else +# define _GPG_ERR_ATTR_FORMAT_ARG(a) +#endif + +/* A lean gettext implementation based on GNU style mo files which are + required to be encoded in UTF-8. There is a limit on 65534 entries + to save some RAM. Only Germanic plural rules are supported. */ +const char *_gpg_w32_bindtextdomain (const char *domainname, + const char *dirname); +const char *_gpg_w32_textdomain (const char *domainname); +const char *_gpg_w32_gettext (const char *msgid) + _GPG_ERR_ATTR_FORMAT_ARG (1); +const char *_gpg_w32_dgettext (const char *domainname, const char *msgid) + _GPG_ERR_ATTR_FORMAT_ARG (2); +const char *_gpg_w32_dngettext (const char *domainname, const char *msgid1, + const char *msgid2, unsigned long int n) + _GPG_ERR_ATTR_FORMAT_ARG (2) _GPG_ERR_ATTR_FORMAT_ARG (3); +const char *_gpg_w32_gettext_localename (void); +int _gpg_w32_gettext_use_utf8 (int value); + +#ifdef GPG_ERR_ENABLE_GETTEXT_MACROS +# define bindtextdomain(a,b) _gpg_w32_bindtextdomain ((a), (b)) +# define textdomain(a) _gpg_w32_textdomain ((a)) +# define gettext(a) _gpg_w32_gettext ((a)) +# define dgettext(a,b) _gpg_w32_dgettext ((a), (b)) +# define ngettext(a,b,c) _gpg_w32_dngettext (NULL, (a), (b), (c)) +# define dngettext(a,b,c,d) _gpg_w32_dngettext ((a), (b), (c), (d)) +# define gettext_localename() _gpg_w32_gettext_localename () +# define gettext_use_utf8(a) _gpg_w32_gettext_use_utf8 (a) +#endif /*GPG_ERR_ENABLE_GETTEXT_MACROS*/ + + + +/* Self-documenting convenience functions. */ + +static GPG_ERR_INLINE gpg_error_t +gpg_err_make_from_errno (gpg_err_source_t source, int err) +{ + return gpg_err_make (source, gpg_err_code_from_errno (err)); +} + + +static GPG_ERR_INLINE gpg_error_t +gpg_error_from_errno (int err) +{ + return gpg_error (gpg_err_code_from_errno (err)); +} + +static GPG_ERR_INLINE gpg_error_t +gpg_error_from_syserror (void) +{ + return gpg_error (gpg_err_code_from_syserror ()); +} + +#ifdef __cplusplus +} +#endif + + +#endif /* GPG_ERROR_H */ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.h.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.h.in new file mode 100644 index 0000000000..ae1be21818 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.h.in @@ -0,0 +1,274 @@ +/* gpg-error.h - Public interface to libgpg-error. + Copyright (C) 2003, 2004, 2010 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef GPG_ERROR_H +#define GPG_ERROR_H 1 + +#include <stddef.h> + +#ifdef __GNUC__ +#define GPG_ERR_INLINE __inline__ +#elif __STDC_VERSION__ >= 199901L +#define GPG_ERR_INLINE inline +#else +#ifndef GPG_ERR_INLINE +#define GPG_ERR_INLINE +#endif +#endif + + +#ifdef __cplusplus +extern "C" { +#if 0 /* just to make Emacs auto-indent happy */ +} +#endif +#endif /* __cplusplus */ + +/* The GnuPG project consists of many components. Error codes are + exchanged between all components. The common error codes and their + user-presentable descriptions are kept into a shared library to + allow adding new error codes and components without recompiling any + of the other components. The interface will not change in a + backward incompatible way. + + An error code together with an error source build up an error + value. As the error value is been passed from one component to + another, it preserver the information about the source and nature + of the error. + + A component of the GnuPG project can define the following macros to + tune the behaviour of the library: + + GPG_ERR_SOURCE_DEFAULT: Define to an error source of type + gpg_err_source_t to make that source the default for gpg_error(). + Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default. + + GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the + internal gettext API to standard names. This has only an effect on + Windows platforms. */ + + +/* The error source type gpg_err_source_t. + + Where as the Poo out of a welle small + Taketh his firste springing and his sours. + --Chaucer. */ + +/* Only use free slots, never change or reorder the existing + entries. */ +typedef enum + { +@include err-sources.h.in + + /* This is one more than the largest allowed entry. */ + GPG_ERR_SOURCE_DIM = 128 + } gpg_err_source_t; + + +/* The error code type gpg_err_code_t. */ + +/* Only use free slots, never change or reorder the existing + entries. */ +typedef enum + { +@include err-codes.h.in + + /* The following error codes are used to map system errors. */ +#define GPG_ERR_SYSTEM_ERROR (1 << 15) +@include errnos.in + + /* This is one more than the largest allowed entry. */ + GPG_ERR_CODE_DIM = 65536 + } gpg_err_code_t; + + +/* The error value type gpg_error_t. */ + +/* We would really like to use bit-fields in a struct, but using + structs as return values can cause binary compatibility issues, in + particular if you want to do it effeciently (also see + -freg-struct-return option to GCC). */ +typedef unsigned int gpg_error_t; + +/* We use the lowest 16 bits of gpg_error_t for error codes. The 16th + bit indicates system errors. */ +#define GPG_ERR_CODE_MASK (GPG_ERR_CODE_DIM - 1) + +/* Bits 17 to 24 are reserved. */ + +/* We use the upper 7 bits of gpg_error_t for error sources. */ +#define GPG_ERR_SOURCE_MASK (GPG_ERR_SOURCE_DIM - 1) +#define GPG_ERR_SOURCE_SHIFT 24 + +/* The highest bit is reserved. It shouldn't be used to prevent + potential negative numbers when transmitting error values as + text. */ + + +/* GCC feature test. */ +#undef _GPG_ERR_HAVE_CONSTRUCTOR +#if __GNUC__ +#define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) + +#if _GPG_ERR_GCC_VERSION > 30100 +#define _GPG_ERR_CONSTRUCTOR __attribute__ ((__constructor__)) +#define _GPG_ERR_HAVE_CONSTRUCTOR +#endif +#endif + +#ifndef _GPG_ERR_CONSTRUCTOR +#define _GPG_ERR_CONSTRUCTOR +#endif + + +/* Initialization function. */ + +/* Initialize the library. This function should be run early. */ +gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR; + +/* If this is defined, the library is already initialized by the + constructor and does not need to be initialized explicitely. */ +#undef GPG_ERR_INITIALIZED +#ifdef _GPG_ERR_HAVE_CONSTRUCTOR +#define GPG_ERR_INITIALIZED 1 +#endif + +/* See the source on how to use the deinit function; it is usually not + required. */ +void gpg_err_deinit (int mode); + + +/* Constructor and accessor functions. */ + +/* Construct an error value from an error code and source. Within a + subsystem, use gpg_error. */ +static GPG_ERR_INLINE gpg_error_t +gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) +{ + return code == GPG_ERR_NO_ERROR ? GPG_ERR_NO_ERROR + : (((source & GPG_ERR_SOURCE_MASK) << GPG_ERR_SOURCE_SHIFT) + | (code & GPG_ERR_CODE_MASK)); +} + + +/* The user should define GPG_ERR_SOURCE_DEFAULT before including this + file to specify a default source for gpg_error. */ +#ifndef GPG_ERR_SOURCE_DEFAULT +#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_UNKNOWN +#endif + +static GPG_ERR_INLINE gpg_error_t +gpg_error (gpg_err_code_t code) +{ + return gpg_err_make (GPG_ERR_SOURCE_DEFAULT, code); +} + + +/* Retrieve the error code from an error value. */ +static GPG_ERR_INLINE gpg_err_code_t +gpg_err_code (gpg_error_t err) +{ + return (gpg_err_code_t) (err & GPG_ERR_CODE_MASK); +} + + +/* Retrieve the error source from an error value. */ +static GPG_ERR_INLINE gpg_err_source_t +gpg_err_source (gpg_error_t err) +{ + return (gpg_err_source_t) ((err >> GPG_ERR_SOURCE_SHIFT) + & GPG_ERR_SOURCE_MASK); +} + + +/* String functions. */ + +/* Return a pointer to a string containing a description of the error + code in the error value ERR. This function is not thread-safe. */ +const char *gpg_strerror (gpg_error_t err); + +/* Return the error string for ERR in the user-supplied buffer BUF of + size BUFLEN. This function is, in contrast to gpg_strerror, + thread-safe if a thread-safe strerror_r() function is provided by + the system. If the function succeeds, 0 is returned and BUF + contains the string describing the error. If the buffer was not + large enough, ERANGE is returned and BUF contains as much of the + beginning of the error string as fits into the buffer. */ +int gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen); + +/* Return a pointer to a string containing a description of the error + source in the error value ERR. */ +const char *gpg_strsource (gpg_error_t err); + + +/* Mapping of system errors (errno). */ + +/* Retrieve the error code for the system error ERR. This returns + GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report + this). */ +gpg_err_code_t gpg_err_code_from_errno (int err); + + +/* Retrieve the system error for the error code CODE. This returns 0 + if CODE is not a system error code. */ +int gpg_err_code_to_errno (gpg_err_code_t code); + + +/* Retrieve the error code directly from the ERRNO variable. This + returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped + (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ +gpg_err_code_t gpg_err_code_from_syserror (void); + + +/* Set the ERRNO variable. This function is the preferred way to set + ERRNO due to peculiarities on WindowsCE. */ +void gpg_err_set_errno (int err); + +@include extra-h.in + +/* Self-documenting convenience functions. */ + +static GPG_ERR_INLINE gpg_error_t +gpg_err_make_from_errno (gpg_err_source_t source, int err) +{ + return gpg_err_make (source, gpg_err_code_from_errno (err)); +} + + +static GPG_ERR_INLINE gpg_error_t +gpg_error_from_errno (int err) +{ + return gpg_error (gpg_err_code_from_errno (err)); +} + +static GPG_ERR_INLINE gpg_error_t +gpg_error_from_syserror (void) +{ + return gpg_error (gpg_err_code_from_syserror ()); +} + +#ifdef __cplusplus +} +#endif + + +#endif /* GPG_ERROR_H */ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.m4 b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.m4 new file mode 100644 index 0000000000..9d96d1675c --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/gpg-error.m4 @@ -0,0 +1,65 @@ +# gpg-error.m4 - autoconf macro to detect libgpg-error. +# Copyright (C) 2002, 2003, 2004 g10 Code GmbH +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file 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. + +dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) +dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS +dnl +AC_DEFUN([AM_PATH_GPG_ERROR], +[ AC_ARG_WITH(gpg-error-prefix, + AC_HELP_STRING([--with-gpg-error-prefix=PFX], + [prefix where GPG Error is installed (optional)]), + gpg_error_config_prefix="$withval", gpg_error_config_prefix="") + if test x$gpg_error_config_prefix != x ; then + if test x${GPG_ERROR_CONFIG+set} != xset ; then + GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config + fi + fi + + AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) + min_gpg_error_version=ifelse([$1], ,0.0,$1) + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) + ok=no + if test "$GPG_ERROR_CONFIG" != "no" ; then + req_major=`echo $min_gpg_error_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` + req_minor=`echo $min_gpg_error_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` + gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` + major=`echo $gpg_error_config_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` + minor=`echo $gpg_error_config_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` + if test "$major" -gt "$req_major"; then + ok=yes + else + if test "$major" -eq "$req_major"; then + if test "$minor" -ge "$req_minor"; then + ok=yes + fi + fi + fi + fi + if test $ok = yes; then + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` + AC_MSG_RESULT([yes ($gpg_error_config_version)]) + ifelse([$2], , :, [$2]) + else + GPG_ERROR_CFLAGS="" + GPG_ERROR_LIBS="" + AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GPG_ERROR_CFLAGS) + AC_SUBST(GPG_ERROR_LIBS) +]) + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/init.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/init.c new file mode 100644 index 0000000000..d30435a2ce --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/init.c @@ -0,0 +1,399 @@ +/* init.c - Initialize the GnuPG error library. + Copyright (C) 2005, 2010 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> + +#include <gpg-error.h> + +#include "gettext.h" +#include "init.h" + +#ifdef HAVE_W32CE_SYSTEM +# include "mkw32errmap.map.c" /* Generated map_w32codes () */ +#endif + + +/* Locale directory support. */ + +#if HAVE_W32_SYSTEM + +#include <windows.h> + +static int tls_index = TLS_OUT_OF_INDEXES; /* Index for the TLS functions. */ + +static char *get_locale_dir (void); +static void drop_locale_dir (char *locale_dir); + +#else /*!HAVE_W32_SYSTEM*/ + +#define get_locale_dir() LOCALEDIR +#define drop_locale_dir(dir) + +#endif /*!HAVE_W32_SYSTEM*/ + + +static void +real_init (void) +{ +#ifdef ENABLE_NLS + char *locale_dir; + + /* We only have to bind our locale directory to our text domain. */ + locale_dir = get_locale_dir (); + if (locale_dir) + { + bindtextdomain (PACKAGE, locale_dir); + drop_locale_dir (locale_dir); + } +#endif +} + +/* Initialize the library. This function should be run early. */ +gpg_error_t +gpg_err_init (void) +{ +#ifdef HAVE_W32_SYSTEM +# ifdef DLL_EXPORT + /* We always have a constructor and thus this function is called + automatically. Due to the way the C init code of mingw works, + the constructors are called before our DllMain function is + called. The problem with that is that the TLS has not been setup + and w32-gettext.c requires TLS. To solve this we do nothing here + but call the actual init code from our DllMain. */ +# else /*!DLL_EXPORT*/ + /* Note that if the TLS is actually used, we can't release the TLS + as there is no way to know when a thread terminates (i.e. no + thread-specific-atexit). You are really better off to use the + DLL! */ + if (tls_index == TLS_OUT_OF_INDEXES) + { + tls_index = TlsAlloc (); + if (tls_index == TLS_OUT_OF_INDEXES) + { + /* No way to continue - commit suicide. */ + abort (); + } + real_init (); + } +# endif /*!DLL_EXPORT*/ +#else + real_init (); +#endif + return 0; +} + + +/* Deinitialize libgpg-error. This function is only used in special + circumstances. No gpg-error function should be used after this + function has been called. A value of 0 passed for MODE + deinitializes the entire libgpg-error, a value of 1 releases + resources allocated for the current thread and only that thread may + not anymore access libgpg-error after such a call. Under Windows + this function may be called from the DllMain function of a DLL + which statically links to libgpg-error. */ +void +gpg_err_deinit (int mode) +{ +#if defined (HAVE_W32_SYSTEM) && !defined(DLL_EXPORT) + struct tls_space_s *tls; + + tls = TlsGetValue (tls_index); + if (tls) + { + TlsSetValue (tls_index, NULL); + LocalFree (tls); + } + + if (mode == 0) + { + TlsFree (tls_index); + tls_index = TLS_OUT_OF_INDEXES; + } +#else + (void)mode; +#endif +} + + + +#ifdef HAVE_W32_SYSTEM + +/* Return a malloced string encoded in UTF-8 from the wide char input + string STRING. Caller must free this value. Returns NULL on + failure. Caller may use GetLastError to get the actual error + number. The result of calling this function with STRING set to + NULL is not defined. */ +static char * +wchar_to_utf8 (const wchar_t *string) +{ + int n; + char *result; + + /* Note, that CP_UTF8 is not defined in Windows versions earlier + than NT. */ + n = WideCharToMultiByte (CP_UTF8, 0, string, -1, NULL, 0, NULL, NULL); + if (n < 0) + return NULL; + + result = malloc (n+1); + if (result) + { + n = WideCharToMultiByte (CP_UTF8, 0, string, -1, result, n, NULL, NULL); + if (n < 0) + { + free (result); + result = NULL; + } + } + return result; +} + + +/* Return a malloced wide char string from an UTF-8 encoded input + string STRING. Caller must free this value. Returns NULL on + failure. Caller may use GetLastError to get the actual error + number. The result of calling this function with STRING set to + NULL is not defined. */ +static wchar_t * +utf8_to_wchar (const char *string) +{ + int n; + wchar_t *result; + + n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); + if (n < 0) + return NULL; + + result = malloc ((n+1) * sizeof *result); + if (result) + { + n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); + if (n < 0) + { + free (result); + result = NULL; + } + return NULL; + } + return result; +} + + +static char * +get_locale_dir (void) +{ + static wchar_t moddir[MAX_PATH+5]; + char *result, *p; + int nbytes; + + if (!GetModuleFileNameW (NULL, moddir, MAX_PATH)) + *moddir = 0; + +#define SLDIR "\\share\\locale" + if (*moddir) + { + nbytes = WideCharToMultiByte (CP_UTF8, 0, moddir, -1, NULL, 0, NULL, NULL); + if (nbytes < 0) + return NULL; + + result = malloc (nbytes + strlen (SLDIR) + 1); + if (result) + { + nbytes = WideCharToMultiByte (CP_UTF8, 0, moddir, -1, + result, nbytes, NULL, NULL); + if (nbytes < 0) + { + free (result); + result = NULL; + } + else + { + p = strrchr (result, '\\'); + if (p) + *p = 0; + strcat (result, SLDIR); + } + } + } + else /* Use the old default value. */ + { + result = malloc (10 + strlen (SLDIR) + 1); + if (result) + { + strcpy (result, "c:\\gnupg"); + strcat (result, SLDIR); + } + } +#undef SLDIR + return result; +} + + +static void +drop_locale_dir (char *locale_dir) +{ + free (locale_dir); +} + + +/* Return the tls object. This function is guaranteed to return a + valid non-NULL object. */ +struct tls_space_s * +get_tls (void) +{ + struct tls_space_s *tls; + + tls = TlsGetValue (tls_index); + if (!tls) + { + /* Called by a thread which existed before this DLL was loaded. + Allocate the space. */ + tls = LocalAlloc (LPTR, sizeof *tls); + if (!tls) + { + /* No way to continue - commit suicide. */ + abort (); + } + tls->gt_use_utf8 = 0; + TlsSetValue (tls_index, tls); + } + + return tls; +} + + +/* Return the value of the ERRNO variable. This needs to be a + function so that we can have a per-thread ERRNO. This is used only + on WindowsCE because that OS misses an errno. */ +#ifdef HAVE_W32CE_SYSTEM +int +_gpg_w32ce_get_errno (void) +{ + return map_w32codes ( GetLastError () ); +} +#endif /*HAVE_W32CE_SYSTEM*/ + + +/* Replacement strerror function for WindowsCE. */ +#ifdef HAVE_W32CE_SYSTEM +char * +_gpg_w32ce_strerror (int err) +{ + struct tls_space_s *tls = get_tls (); + wchar_t tmpbuf[STRBUFFER_SIZE]; + int n; + + if (err == -1) + err = _gpg_w32ce_get_errno (); + if (FormatMessageW (FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, + MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), + tmpbuf, STRBUFFER_SIZE -1, + NULL)) + { + n = WideCharToMultiByte (CP_UTF8, 0, tmpbuf, -1, + tls->strerror_buffer, + sizeof tls->strerror_buffer -1, + NULL, NULL); + } + else + n = -1; + + if (n < 0) + snprintf (tls->strerror_buffer, sizeof tls->strerror_buffer -1, + "[w32err=%d]", err); + return tls->strerror_buffer; +} +#endif /*HAVE_W32CE_SYSTEM*/ + + +void +gpg_err_set_errno (int err) +{ +#ifdef HAVE_W32CE_SYSTEM + SetLastError (err); +#else /*!HAVE_W32CE_SYSTEM*/ + errno = err; +#endif /*!HAVE_W32CE_SYSTEM*/ +} + + +/* Entry point called by the DLL loader. */ +#ifdef DLL_EXPORT +int WINAPI +DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) +{ + struct tls_space_s *tls; + (void)reserved; + + switch (reason) + { + case DLL_PROCESS_ATTACH: + tls_index = TlsAlloc (); + if (tls_index == TLS_OUT_OF_INDEXES) + return FALSE; + /* falltru. */ + case DLL_THREAD_ATTACH: + tls = LocalAlloc (LPTR, sizeof *tls); + if (!tls) + return FALSE; + tls->gt_use_utf8 = 0; + TlsSetValue (tls_index, tls); + if (reason == DLL_PROCESS_ATTACH) + { + real_init (); + } + break; + + case DLL_THREAD_DETACH: + tls = TlsGetValue (tls_index); + if (tls) + LocalFree (tls); + break; + + case DLL_PROCESS_DETACH: + tls = TlsGetValue (tls_index); + if (tls) + LocalFree (tls); + TlsFree (tls_index); + break; + + default: + break; + } + + return TRUE; +} +#endif /*DLL_EXPORT*/ + +#else /*!HAVE_W32_SYSTEM*/ + +void +gpg_err_set_errno (int err) +{ + errno = err; +} + +#endif /*!HAVE_W32_SYSTEM*/ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/init.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/init.h new file mode 100644 index 0000000000..0fa27be4d2 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/init.h @@ -0,0 +1,65 @@ +/* init.h - Declarations for init.c + Copyright (C) 2010 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef INIT_H +#define INIT_H + +#if HAVE_W32_SYSTEM + +/* Forward declaration - defined in w32-gettext.c. */ +struct loaded_domain; + +/* An item for a linked list of loaded domains. */ +struct domainlist_s +{ + struct domainlist_s *next; + char *dname; /* Directory name for the mo file. */ + char *fname; /* File name for the MO file. */ + int load_failed; /* True if loading the domain failed. */ + struct loaded_domain *domain; /* NULL if not loaded. Never changed + once set to non-NULL. */ + char name[1]; /* Name of the domain. Never changed + once set. */ +}; + + + +/* 119 bytes for an error message should be enough. With this size we + can assume that the allocation does not take up more than 128 bytes + per thread. Note that this is only used for W32CE. */ +#define STRBUFFER_SIZE 120 + +/* The TLS space definition. */ +struct tls_space_s +{ + /* Flag used by w32-gettext. */ + int gt_use_utf8; + +#ifdef HAVE_W32CE_SYSTEM + char strerror_buffer[STRBUFFER_SIZE]; +#endif +}; + +/* Return the TLS. */ +struct tls_space_s *get_tls (void); + + +#endif /*HAVE_W32_SYSTEM*/ + +#endif /*INIT_H*/ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.awk b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.awk new file mode 100644 index 0000000000..46d436c6b0 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.awk @@ -0,0 +1,99 @@ +# mkerrcodes.awk +# Copyright (C) 2004, 2005 g10 Code GmbH +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# As a special exception, g10 Code GmbH gives unlimited permission to +# copy, distribute and modify the C source files that are the output +# of mkerrcodes.awk. You need not follow the terms of the GNU General +# Public License when using or distributing such scripts, even though +# portions of the text of mkerrcodes.awk appear in them. The GNU +# General Public License (GPL) does govern all other use of the material +# that constitutes the mkerrcodes.awk program. +# +# Certain portions of the mkerrcodes.awk source text are designed to be +# copied (in certain cases, depending on the input) into the output of +# mkerrcodes.awk. We call these the "data" portions. The rest of the +# mkerrcodes.awk source text consists of comments plus executable code +# that decides which of the data portions to output in any given case. +# We call these comments and executable code the "non-data" portions. +# mkerrcodes.h never copies any of the non-data portions into its output. +# +# This special exception to the GPL applies to versions of mkerrcodes.awk +# released by g10 Code GmbH. When you make and distribute a modified version +# of mkerrcodes.awk, you may extend this special exception to the GPL to +# apply to your modified version as well, *unless* your modified version +# has the potential to copy into its output some of the text that was the +# non-data portion of the version that you started with. (In other words, +# unless your change moves or copies text from the non-data portions to the +# data portions.) If your modification has such potential, you must delete +# any notice of this special exception to the GPL from your modified version. + +# This script outputs an intermediate file that contains the following output: +# static struct +# { +# int err; +# const char *err_sym; +# } err_table[] = +# { +# { 7, "GPG_ERR_E2BIG" }, +# [...] +# }; +# +# The input file is a list of possible system errors, followed by a GPG_ERR_* name: +# +# 7 GPG_ERR_E2BIG +# +# Comments (starting with # and ending at the end of the line) are removed, +# as is trailing whitespace. + +BEGIN { + FS="[ \t]+GPG_ERR_"; + print "/* Output of mkerrcodes.awk. DO NOT EDIT. */"; + print ""; + header = 1; +} + +/^#/ { next; } + +header { + if (! /^[ \t]*$/) + { + header = 0; + + print "static struct"; + print " {"; + print " int err;"; + print " const char *err_sym;"; + print " } err_table[] = "; + print "{"; + } + else + print; +} + +!header { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + + print " { " $1 ", \"GPG_ERR_" $2 "\" },"; +} + +END { + print "};"; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.c new file mode 100644 index 0000000000..29c1cc270b --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.c @@ -0,0 +1,78 @@ +/* mkerrcodes.c - Generate list of system error values. + Copyright (C) 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +/* This file must not include config.h, as that is for the host + system, while this file will be run on the build system. */ + +#include <stdio.h> + +#include "mkerrcodes.h" + +static const char header[] = +"/* errnos.h - List of system error values.\n" +" Copyright (C) 2004 g10 Code GmbH\n" +" This file is part of libgpg-error.\n" +"\n" +" libgpg-error is free software; you can redistribute it and/or\n" +" modify it under the terms of the GNU Lesser General Public License\n" +" as published by the Free Software Foundation; either version 2.1 of\n" +" the License, or (at your option) any later version.\n" +"\n" +" libgpg-error is distributed in the hope that it will be useful, but\n" +" WITHOUT ANY WARRANTY; without even the implied warranty of\n" +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" +" Lesser General Public License for more details.\n" +"\n" +" You should have received a copy of the GNU Lesser General Public\n" +" License along with libgpg-error; if not, write to the Free\n" +" Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\n" +" 02111-1307, USA. */\n" +"\n"; + +int +main (int argc, char **argv) +{ + int sorted; + int i; + + printf ("%s", header); + do + { + sorted = 1; + for (i = 0; i < sizeof (err_table) / sizeof (err_table[0]) - 1; i++) + if (err_table[i].err > err_table[i + 1].err) + { + int err = err_table[i].err; + const char *err_sym = err_table[i].err_sym; + + err_table[i].err = err_table[i + 1].err; + err_table[i].err_sym = err_table[i + 1].err_sym; + err_table[i + 1].err = err; + err_table[i + 1].err_sym = err_sym; + sorted = 0; + } + } + while (!sorted); + + for (i = 0; i < sizeof (err_table) / sizeof (err_table[0]); i++) + printf ("%i\t%s\n", err_table[i].err, err_table[i].err_sym); + + return 0; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.exe b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.exe Binary files differnew file mode 100644 index 0000000000..e8ea336f01 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.exe diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.h new file mode 100644 index 0000000000..b9bc07bbc5 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes.h @@ -0,0 +1,91 @@ +/* Output of mkerrcodes.awk. DO NOT EDIT. */ + +static struct + { + int err; + const char *err_sym; + } err_table[] = +{ + { 7, "GPG_ERR_E2BIG" }, + { 13, "GPG_ERR_EACCES" }, + { 10013L, "GPG_ERR_EACCES" }, + { 10048L, "GPG_ERR_EADDRINUSE" }, + { 10049L, "GPG_ERR_EADDRNOTAVAIL" }, + { 10047L, "GPG_ERR_EAFNOSUPPORT" }, + { 11, "GPG_ERR_EAGAIN" }, + { 10037L, "GPG_ERR_EALREADY" }, + { 9, "GPG_ERR_EBADF" }, + { 10009L, "GPG_ERR_EBADF" }, + { 16, "GPG_ERR_EBUSY" }, + { 10, "GPG_ERR_ECHILD" }, + { 10053L, "GPG_ERR_ECONNABORTED" }, + { 10061L, "GPG_ERR_ECONNREFUSED" }, + { 10054L, "GPG_ERR_ECONNRESET" }, + { 36, "GPG_ERR_EDEADLK" }, + { 36, "GPG_ERR_EDEADLOCK" }, + { 10039L, "GPG_ERR_EDESTADDRREQ" }, + { 33, "GPG_ERR_EDOM" }, + { 10069L, "GPG_ERR_EDQUOT" }, + { 17, "GPG_ERR_EEXIST" }, + { 14, "GPG_ERR_EFAULT" }, + { 10014L, "GPG_ERR_EFAULT" }, + { 27, "GPG_ERR_EFBIG" }, + { 10064L, "GPG_ERR_EHOSTDOWN" }, + { 10065L, "GPG_ERR_EHOSTUNREACH" }, + { 42, "GPG_ERR_EILSEQ" }, + { 10036L, "GPG_ERR_EINPROGRESS" }, + { 4, "GPG_ERR_EINTR" }, + { 10004L, "GPG_ERR_EINTR" }, + { 22, "GPG_ERR_EINVAL" }, + { 10022L, "GPG_ERR_EINVAL" }, + { 5, "GPG_ERR_EIO" }, + { 10056L, "GPG_ERR_EISCONN" }, + { 21, "GPG_ERR_EISDIR" }, + { 10062L, "GPG_ERR_ELOOP" }, + { 24, "GPG_ERR_EMFILE" }, + { 10024L, "GPG_ERR_EMFILE" }, + { 31, "GPG_ERR_EMLINK" }, + { 10040L, "GPG_ERR_EMSGSIZE" }, + { 38, "GPG_ERR_ENAMETOOLONG" }, + { 10063L, "GPG_ERR_ENAMETOOLONG" }, + { 10050L, "GPG_ERR_ENETDOWN" }, + { 10052L, "GPG_ERR_ENETRESET" }, + { 10051L, "GPG_ERR_ENETUNREACH" }, + { 23, "GPG_ERR_ENFILE" }, + { 10055L, "GPG_ERR_ENOBUFS" }, + { 19, "GPG_ERR_ENODEV" }, + { 2, "GPG_ERR_ENOENT" }, + { 8, "GPG_ERR_ENOEXEC" }, + { 39, "GPG_ERR_ENOLCK" }, + { 12, "GPG_ERR_ENOMEM" }, + { 10042L, "GPG_ERR_ENOPROTOOPT" }, + { 28, "GPG_ERR_ENOSPC" }, + { 40, "GPG_ERR_ENOSYS" }, + { 10057L, "GPG_ERR_ENOTCONN" }, + { 20, "GPG_ERR_ENOTDIR" }, + { 41, "GPG_ERR_ENOTEMPTY" }, + { 10066L, "GPG_ERR_ENOTEMPTY" }, + { 10038L, "GPG_ERR_ENOTSOCK" }, + { 25, "GPG_ERR_ENOTTY" }, + { 6, "GPG_ERR_ENXIO" }, + { 10045L, "GPG_ERR_EOPNOTSUPP" }, + { 1, "GPG_ERR_EPERM" }, + { 10046L, "GPG_ERR_EPFNOSUPPORT" }, + { 32, "GPG_ERR_EPIPE" }, + { 10067L, "GPG_ERR_EPROCLIM" }, + { 10043L, "GPG_ERR_EPROTONOSUPPORT" }, + { 10041L, "GPG_ERR_EPROTOTYPE" }, + { 34, "GPG_ERR_ERANGE" }, + { 10071L, "GPG_ERR_EREMOTE" }, + { 30, "GPG_ERR_EROFS" }, + { 10058L, "GPG_ERR_ESHUTDOWN" }, + { 10044L, "GPG_ERR_ESOCKTNOSUPPORT" }, + { 29, "GPG_ERR_ESPIPE" }, + { 3, "GPG_ERR_ESRCH" }, + { 10070L, "GPG_ERR_ESTALE" }, + { 10060L, "GPG_ERR_ETIMEDOUT" }, + { 10059L, "GPG_ERR_ETOOMANYREFS" }, + { 10068L, "GPG_ERR_EUSERS" }, + { 10035L, "GPG_ERR_EWOULDBLOCK" }, + { 18, "GPG_ERR_EXDEV" }, +}; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes1.awk b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes1.awk new file mode 100644 index 0000000000..a771a73602 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes1.awk @@ -0,0 +1,96 @@ +# mkerrcodes.awk +# Copyright (C) 2003, 2004 g10 Code GmbH +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# As a special exception, g10 Code GmbH gives unlimited permission to +# copy, distribute and modify the C source files that are the output +# of mkerrcodes.awk. You need not follow the terms of the GNU General +# Public License when using or distributing such scripts, even though +# portions of the text of mkerrcodes.awk appear in them. The GNU +# General Public License (GPL) does govern all other use of the material +# that constitutes the mkerrcodes.awk program. +# +# Certain portions of the mkerrcodes.awk source text are designed to be +# copied (in certain cases, depending on the input) into the output of +# mkerrcodes.awk. We call these the "data" portions. The rest of the +# mkerrcodes.awk source text consists of comments plus executable code +# that decides which of the data portions to output in any given case. +# We call these comments and executable code the "non-data" portions. +# mkerrcodes.h never copies any of the non-data portions into its output. +# +# This special exception to the GPL applies to versions of mkerrcodes.awk +# released by g10 Code GmbH. When you make and distribute a modified version +# of mkerrcodes.awk, you may extend this special exception to the GPL to +# apply to your modified version as well, *unless* your modified version +# has the potential to copy into its output some of the text that was the +# non-data portion of the version that you started with. (In other words, +# unless your change moves or copies text from the non-data portions to the +# data portions.) If your modification has such potential, you must delete +# any notice of this special exception to the GPL from your modified version. + +# This script outputs an intermediate file that contains the following block +# for each error value symbol in the input file (example for EINVAL): +# +# #ifdef EINVAL +# EINVAL GPG_ERR_EINVAL +# #endif +# +# The input file is a list of possible system errors in the column errnoidx +# (defaults to 2). +# +# Comments (starting with # and ending at the end of the line) are removed, +# as is trailing whitespace. + +BEGIN { + FS="[\t]+"; + header = 1; + if (errnoidx == 0) + errnoidx = 2; + + print "/* Output of mkerrcodes.awk. DO NOT EDIT. */"; + print ""; +} + +/^#/ { next; } + +header { + if ($1 ~ /^[0-9]/) + { + print "#include <errno.h>"; + print "#ifdef _WIN32"; + print "#include <winsock2.h>"; + print "#endif"; + print ""; + header = 0; + } + else + print; +} + +!header { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + + print "#ifdef " $errnoidx; + print $errnoidx "\tGPG_ERR_" $errnoidx; + print "#endif"; + print "#ifdef WSA" $errnoidx; + print "WSA" $errnoidx "\tGPG_ERR_" $errnoidx; + print "#endif"; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes2.awk b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes2.awk new file mode 100644 index 0000000000..ea5850341c --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrcodes2.awk @@ -0,0 +1,134 @@ +# mkstrtable.awk +# Copyright (C) 2003 g10 Code GmbH +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# As a special exception, g10 Code GmbH gives unlimited permission to +# copy, distribute and modify the C source files that are the output +# of mkerrcodes2.awk. You need not follow the terms of the GNU General +# Public License when using or distributing such scripts, even though +# portions of the text of mkerrcodes2.awk appear in them. The GNU +# General Public License (GPL) does govern all other use of the material +# that constitutes the mkerrcodes2.awk program. +# +# Certain portions of the mkerrcodes2.awk source text are designed to be +# copied (in certain cases, depending on the input) into the output of +# mkerrcodes2.awk. We call these the "data" portions. The rest of the +# mkerrcodes2.awk source text consists of comments plus executable code +# that decides which of the data portions to output in any given case. +# We call these comments and executable code the "non-data" portions. +# mkstrtable.h never copies any of the non-data portions into its output. +# +# This special exception to the GPL applies to versions of mkerrcodes2.awk +# released by g10 Code GmbH. When you make and distribute a modified version +# of mkerrcodes2.awk, you may extend this special exception to the GPL to +# apply to your modified version as well, *unless* your modified version +# has the potential to copy into its output some of the text that was the +# non-data portion of the version that you started with. (In other words, +# unless your change moves or copies text from the non-data portions to the +# data portions.) If your modification has such potential, you must delete +# any notice of this special exception to the GPL from your modified version. + +# This script outputs a source file that does define the following +# symbols: +# +# static const char msgstr[]; +# A string containing all messages in the list. +# +# static const int msgidx[]; +# A list of index numbers, one for each message, that points to the +# beginning of the string in msgstr. +# +# msgidxof (code); +# A macro that maps code numbers to idx numbers. If a DEFAULT MESSAGE +# is provided (see below), its index will be returned for unknown codes. +# Otherwise -1 is returned for codes that do not appear in the list. +# You can lookup the message with code CODE with: +# msgstr + msgidx[msgidxof (code)]. +# +# The input file has the following format: +# CODE1 MESSAGE1 (Code number, <tab>, message string) +# CODE2 MESSAGE2 (Code number, <tab>, message string) +# ... +# CODEn MESSAGEn (Code number, <tab>, message string) +# DEFAULT MESSAGE (<tab>, fall-back message string) +# +# Comments (starting with # and ending at the end of the line) are removed, +# as is trailing whitespace. The last line is optional; if no DEFAULT +# MESSAGE is given, msgidxof will return the number -1 for unknown +# index numbers. + +BEGIN { +# msg holds the number of messages. + msg = 0; + print "/* Output of mkerrcodes2.awk. DO NOT EDIT. */"; + print ""; + header = 1; +} + +/^#/ { next; } + +header { + if ($1 ~ /^[0123456789]+$/) + { + print "static const int err_code_from_index[] = {"; + header = 0; + } + else + print; +} + +!header { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + +# Print the string msgstr line by line. We delay output by one line to be able +# to treat the last line differently (see END). + print " " $2 ","; + +# Remember the error value and index of each error code. + code[msg] = $1; + pos[msg] = $2; + msg++; +} +END { + print "};"; + print ""; + print "#define errno_to_idx(code) (0 ? -1 \\"; + +# Gather the ranges. + skip = code[0]; + start = code[0]; + stop = code[0]; + for (i = 1; i < msg; i++) + { + if (code[i] == stop + 1) + stop++; + else + { + print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ + skip ") \\"; + skip += code[i] - stop - 1; + start = code[i]; + stop = code[i]; + } + } + print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ + skip ") \\"; + print " : -1)"; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrnos.awk b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrnos.awk new file mode 100644 index 0000000000..f79df6613a --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkerrnos.awk @@ -0,0 +1,104 @@ +# mkerrnos.awk +# Copyright (C) 2003, 2004 g10 Code GmbH +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# As a special exception, g10 Code GmbH gives unlimited permission to +# copy, distribute and modify the C source files that are the output +# of mkerrnos.awk. You need not follow the terms of the GNU General +# Public License when using or distributing such scripts, even though +# portions of the text of mkerrnos.awk appear in them. The GNU +# General Public License (GPL) does govern all other use of the material +# that constitutes the mkerrnos.awk program. +# +# Certain portions of the mkerrnos.awk source text are designed to be +# copied (in certain cases, depending on the input) into the output of +# mkerrnos.awk. We call these the "data" portions. The rest of the +# mkerrnos.awk source text consists of comments plus executable code +# that decides which of the data portions to output in any given case. +# We call these comments and executable code the "non-data" portions. +# mkerrnos.h never copies any of the non-data portions into its output. +# +# This special exception to the GPL applies to versions of mkerrnos.awk +# released by g10 Code GmbH. When you make and distribute a modified version +# of mkerrnos.awk, you may extend this special exception to the GPL to +# apply to your modified version as well, *unless* your modified version +# has the potential to copy into its output some of the text that was the +# non-data portion of the version that you started with. (In other words, +# unless your change moves or copies text from the non-data portions to the +# data portions.) If your modification has such potential, you must delete +# any notice of this special exception to the GPL from your modified version. + +# This script outputs a source file that does define the following +# symbols: +# +# static const int err_code_to_errno[]; +# A mapping of gpg_err_code_t numbers to system errno. The index of an +# error code in the table can be obtained after removing the system error +# code indication bit. +# +# The input file is a list of possible system errors in the column errnoidx +# (defaults to 2). +# +# Comments (starting with # and ending at the end of the line) are removed, +# as is trailing whitespace. + +BEGIN { + FS="[\t]+"; + header = 1; + if (errnoidx == 0) + errnoidx = 2; + + print "/* Output of mkerrnos.awk. DO NOT EDIT. */"; + print ""; +} + +/^#/ { next; } + +header { + if ($1 ~ /^[0-9]/) + { + print "#include <errno.h>"; + print "#ifdef _WIN32"; + print "#include <winsock2.h>"; + print "#endif"; + print ""; + print "static const int err_code_to_errno [] = {"; + header = 0; + } + else + print; +} + +!header { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + + print "#ifdef " $errnoidx; + print " " $errnoidx ","; + print "#else"; + print "#ifdef WSA" $errnoidx; + print " WSA" $errnoidx ","; + print "#else"; + print " 0,"; + print "#endif"; + print "#endif"; +} +END { + print "};"; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkheader.awk b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkheader.awk new file mode 100644 index 0000000000..0ff08f98eb --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkheader.awk @@ -0,0 +1,218 @@ +# mkheader.awk +# Copyright (C) 2003, 2004 g10 Code GmbH +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# As a special exception, g10 Code GmbH gives unlimited permission to +# copy, distribute and modify the C source files that are the output +# of mkheader.awk. You need not follow the terms of the GNU General +# Public License when using or distributing such scripts, even though +# portions of the text of mkheader.awk appear in them. The GNU +# General Public License (GPL) does govern all other use of the material +# that constitutes the mkheader.awk program. +# +# Certain portions of the mkheader.awk source text are designed to be +# copied (in certain cases, depending on the input) into the output of +# mkheader.awk. We call these the "data" portions. The rest of the +# mkheader.awk source text consists of comments plus executable code +# that decides which of the data portions to output in any given case. +# We call these comments and executable code the "non-data" portions. +# mkheader.h never copies any of the non-data portions into its output. +# +# This special exception to the GPL applies to versions of mkheader.awk +# released by g10 Code GmbH. When you make and distribute a modified version +# of mkheader.awk, you may extend this special exception to the GPL to +# apply to your modified version as well, *unless* your modified version +# has the potential to copy into its output some of the text that was the +# non-data portion of the version that you started with. (In other words, +# unless your change moves or copies text from the non-data portions to the +# data portions.) If your modification has such potential, you must delete +# any notice of this special exception to the GPL from your modified version. + +# This script processes gpg-error.h.in in an awful way. +# Its input is, one after another, the content of the err-sources.h.in file, +# the err-codes.h.in file, the errnos.in file, and then gpg-error.h.in. +# There is nothing fancy about this. +# +# An alternative would be to use getline to get the content of the first three files, +# but then we need to pre-process gpg-error.h.in with configure to get +# at the full path of the files in @srcdir@. + +BEGIN { + FS = "[\t]+"; +# sources_nr holds the number of error sources. + sources_nr = 0; +# codes_nr holds the number of error codes. + codes_nr = 0; +# errnos_nr holds the number of system errors. + errnos_nr = 0; +# extra_nr holds the number of extra lines to be included. + extra_nr = 0 + +# These variables walk us through our input. + sources_header = 1; + sources_body = 0; + between_sources_and_codes = 0; + codes_body = 0; + between_codes_and_errnos = 0; + errnos_body = 0; + extra_body = 0; + gpg_error_h = 0; + + print "/* Output of mkheader.awk. DO NOT EDIT. -*- buffer-read-only: t -*- */"; + print ""; + +} + + +sources_header { + if ($1 ~ /^[0123456789]+$/) + { + sources_header = 0; + sources_body = 1; + } +} + +sources_body { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + + if ($1 == "") + { + sources_body = 0; + between_sources_and_codes = 1; + } + else + { +# Remember the error source number and symbol of each error source. + sources_idx[sources_nr] = $1; + sources_sym[sources_nr] = $2; + sources_nr++; + } +} + +between_sources_and_codes { + if ($1 ~ /^[0123456789]+$/) + { + between_sources_and_codes = 0; + codes_body = 1; + } +} + +codes_body { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + + if ($1 == "") + { + codes_body = 0; + between_codes_and_errnos = 1; + } + else + { +# Remember the error code number and symbol of each error source. + codes_idx[codes_nr] = $1; + codes_sym[codes_nr] = $2; + codes_nr++; + } +} + +between_codes_and_errnos { + if ($1 ~ /^[0-9]/) + { + between_codes_and_errnos = 0; + errnos_body = 1; + } +} + +errnos_body { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + + if ($1 !~ /^[0-9]/) + { +# Note that this assumes that extra_body.in doesn't start with a digit. + errnos_body = 0; + extra_body = 1; + } + else + { + errnos_idx[errnos_nr] = "GPG_ERR_SYSTEM_ERROR | " $1; + errnos_sym[errnos_nr] = "GPG_ERR_" $2; + errnos_nr++; + } +} + +extra_body { + if (/^##/) + next + + if (/^EOF/) + { + extra_body = 0; + gpg_error_h = 1; + next; + } + else + { + extra_line[extra_nr] = $0; + extra_nr++; + } +} + +gpg_error_h { + if ($0 ~ /^@include err-sources/) + { + for (i = 0; i < sources_nr; i++) + { + print " " sources_sym[i] " = " sources_idx[i] ","; +# print "#define " sources_sym[i] " (" sources_idx[i] ")"; + } + } + else if ($0 ~ /^@include err-codes/) + { + for (i = 0; i < codes_nr; i++) + { + print " " codes_sym[i] " = " codes_idx[i] ","; +# print "#define " codes_sym[i] " (" codes_idx[i] ")"; + } + } + else if ($0 ~ /^@include errnos/) + { + for (i = 0; i < errnos_nr; i++) + { + print " " errnos_sym[i] " = " errnos_idx[i] ","; +# print "#define " errnos_sym[i] " (" errnos_idx[i] ")"; + } + } + else if ($0 ~ /^@include extra-h.in/) + { + for (i = 0; i < extra_nr; i++) + { + print extra_line[i]; + } + } + else + print; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkstrtable.awk b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkstrtable.awk new file mode 100644 index 0000000000..d97e150489 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkstrtable.awk @@ -0,0 +1,189 @@ +# mkstrtable.awk +# Copyright (C) 2003, 2004, 2008 g10 Code GmbH +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# As a special exception, g10 Code GmbH gives unlimited permission to +# copy, distribute and modify the C source files that are the output +# of mkstrtable.awk. You need not follow the terms of the GNU General +# Public License when using or distributing such scripts, even though +# portions of the text of mkstrtable.awk appear in them. The GNU +# General Public License (GPL) does govern all other use of the material +# that constitutes the mkstrtable.awk program. +# +# Certain portions of the mkstrtable.awk source text are designed to be +# copied (in certain cases, depending on the input) into the output of +# mkstrtable.awk. We call these the "data" portions. The rest of the +# mkstrtable.awk source text consists of comments plus executable code +# that decides which of the data portions to output in any given case. +# We call these comments and executable code the "non-data" portions. +# mkstrtable.h never copies any of the non-data portions into its output. +# +# This special exception to the GPL applies to versions of mkstrtable.awk +# released by g10 Code GmbH. When you make and distribute a modified version +# of mkstrtable.awk, you may extend this special exception to the GPL to +# apply to your modified version as well, *unless* your modified version +# has the potential to copy into its output some of the text that was the +# non-data portion of the version that you started with. (In other words, +# unless your change moves or copies text from the non-data portions to the +# data portions.) If your modification has such potential, you must delete +# any notice of this special exception to the GPL from your modified version. + +# This script outputs a source file that does define the following +# symbols: +# +# static const char msgstr[]; +# A string containing all messages in the list. +# +# static const int msgidx[]; +# A list of index numbers, one for each message, that points to the +# beginning of the string in msgstr. +# +# msgidxof (code); +# A macro that maps code numbers to idx numbers. If a DEFAULT MESSAGE +# is provided (see below), its index will be returned for unknown codes. +# Otherwise -1 is returned for codes that do not appear in the list. +# You can lookup the message with code CODE with: +# msgstr + msgidx[msgidxof (code)]. +# +# The input file has the following format: +# CODE1 ... MESSAGE1 (code nr, <tab>, something, <tab>, msg) +# CODE2 ... MESSAGE2 (code nr, <tab>, something, <tab>, msg) +# ... +# CODEn ... MESSAGEn (code nr, <tab>, something, <tab>, msg) +# ... DEFAULT-MESSAGE (<tab>, something, <tab>, fall-back msg) +# +# Comments (starting with # and ending at the end of the line) are removed, +# as is trailing whitespace. The last line is optional; if no DEFAULT +# MESSAGE is given, msgidxof will return the number -1 for unknown +# index numbers. +# +# The field to be used is specified with the variable "textidx" on +# the command line. It defaults to 2. +# +# The variable nogettext can be set to 1 to suppress gettext markers. +# +# The variable prefix can be used to prepend a string to each message. +# +# The variable namespace can be used to prepend a string to each +# variable and macro name. + +BEGIN { + FS = "[\t]+"; +# cpos holds the current position in the message string. + cpos = 0; +# msg holds the number of messages. + msg = 0; + print "/* Output of mkstrtable.awk. DO NOT EDIT. */"; + print ""; + header = 1; + if (textidx == 0) + textidx = 2; +# nogettext can be set to 1 to suppress gettext noop markers. +} + +/^#/ { next; } + +header { + if ($1 ~ /^[0123456789]+$/) + { + print "/* The purpose of this complex string table is to produce"; + print " optimal code with a minimum of relocations. */"; + print ""; + print "static const char " namespace "msgstr[] = "; + header = 0; + } + else + print; +} + +!header { + sub (/\#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + +# Print the string msgstr line by line. We delay output by one line to be able +# to treat the last line differently (see END). + if (last_msgstr) + { + if (nogettext) + print " \"" last_msgstr "\" \"\\0\""; + else + print " gettext_noop (\"" last_msgstr "\") \"\\0\""; + } + last_msgstr = prefix $textidx; + +# Remember the error code and msgidx of each error message. + code[msg] = $1; + pos[msg] = cpos; + cpos += length (last_msgstr) + 1; + msg++; + + if ($1 == "") + { + has_default = 1; + exit; + } +} +END { + if (has_default) + coded_msgs = msg - 1; + else + coded_msgs = msg; + + if (nogettext) + print " \"" last_msgstr "\";"; + else + print " gettext_noop (\"" last_msgstr "\");"; + print ""; + print "static const int " namespace "msgidx[] ="; + print " {"; + for (i = 0; i < coded_msgs; i++) + print " " pos[i] ","; + print " " pos[coded_msgs]; + print " };"; + print ""; + print "static inline int"; + print namespace "msgidxof (int code)"; + print "{"; + print " return (0 ? 0"; + +# Gather the ranges. + skip = code[0]; + start = code[0]; + stop = code[0]; + for (i = 1; i < coded_msgs; i++) + { + if (code[i] == stop + 1) + stop++; + else + { + print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ + skip ")"; + skip += code[i] - stop - 1; + start = code[i]; + stop = code[i]; + } + } + print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ + skip ")"; + if (has_default) + print " : " stop + 1 " - " skip ");"; + else + print " : -1);"; + print "}"; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkw32errmap.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkw32errmap.c new file mode 100644 index 0000000000..68d0f05de7 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkw32errmap.c @@ -0,0 +1,178 @@ +/* mkw32errmap.c - Generate mapping sources for Windows. + Copyright (C) 2010 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifdef RESOLVE_MACROS +# include <winerror.h> +#endif +#include <stdio.h> +#include <stdlib.h> + +static const char header_gpg_extra_errno_h[] = + "/* errno.h - WindowsCE errno.h substitute\n" + " Copyright (C) 2010 g10 Code GmbH\n" + "\n" + " This file is free software; as a special exception the author gives\n" + " unlimited permission to copy and/or distribute it, with or without\n" + " modifications, as long as this notice is preserved.\n" + "\n" + " This file is distributed in the hope that it will be useful, but\n" + " WITHOUT ANY WARRANTY, to the extent permitted by law; without even\n" + " the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n" + " PURPOSE.\n" + "\n" + " +++ Do not edit! File has been generated by mkw32errmap.c +++\n" + "\n" + " This file is intended to be used with ming32ce-gcc to implement an\n" + " errno substitute under WindowsCE. It must be included via gcc's\n" + " -idirafter option. The gpg-error-config script emits the\n" + " appropriate option snippet. The actual implementation of the errno\n" + " related functions are part of libgpg-error. A separate header file\n" + " is required because errno.h is often included before gpg-error.h.\n" + " */\n" + "\n" + "#ifndef _GPG_ERROR_EXTRA_ERRNO_H\n" + "#define _GPG_ERROR_EXTRA_ERRNO_H\n" + "\n" + "/* Due to peculiarities in W32 we can't implement ERRNO as an\n" + " writable lvalue. This also allows us to easily find places\n" + " where ERRNO is being written to. See also gpg_err_set_errno. */\n" + "int _gpg_w32ce_get_errno (void);\n" + "#define errno (_gpg_w32ce_get_errno ())\n" + "\n"; +static const char footer_gpg_extra_errno_h[] = + "\n" + "#endif /*_GPG_ERROR_EXTRA_ERRNO_H*/\n"; + + +/* The table below is used in two modes. First we run the host + preprocessor over it to generate a new include file. This include + file has the same content but the Windows error macros are + resolved. This is so that we don't need to include winerror.h into + the generated errno.h. The mkw32errmap_marker variable is only + here to have something to grep for after preprocessing. */ +static int mkw32errmap_marker; +struct table_s +{ + int *dummy; + const char *name; + int w32code; + int w32code2; +}; + +struct table_s table[] = + { +#ifdef RESOLVE_MACROS +#define X(a,b,c) \ + {&mkw32errmap_marker, (a), (b), (c)} + X( "EPERM", ERROR_CANNOT_MAKE , 0 ), + X( "ENOENT", ERROR_FILE_NOT_FOUND , ERROR_PATH_NOT_FOUND ), + X( "EINTR", ERROR_INVALID_AT_INTERRUPT_TIME , 0 ), + X( "EIO", ERROR_IO_DEVICE , 0 ), + X( "ENXIO", ERROR_FILE_INVALID , 0 ), + X( "EBADF", ERROR_INVALID_HANDLE , 0 ), + X( "EAGAIN", ERROR_MORE_DATA , WSAEWOULDBLOCK ), + + X( "ENOMEM", ERROR_NOT_ENOUGH_MEMORY , 0 ), + X( "EACCES", ERROR_ACCESS_DENIED , 0 ), + X( "EFAULT", ERROR_PROCESS_ABORTED , 0 ), + X( "EBUSY", ERROR_BUSY , 0 ), + X( "EEXIST", ERROR_FILE_EXISTS , WSAEADDRINUSE ), + + X( "EXDEV", ERROR_NOT_SAME_DEVICE , 0 ), + X( "ENODEV", ERROR_BAD_DEVICE , ERROR_DEV_NOT_EXIST ), + + X( "ENOTDIR",ERROR_DIRECTORY , 0 ), + X( "EINVAL", ERROR_INVALID_PARAMETER , 0 ), + X( "ENFILE", ERROR_NO_MORE_FILES , 0 ), + X( "EMFILE", ERROR_TOO_MANY_OPEN_FILES , 0 ), + X( "ENOSPC", ERROR_DISK_FULL , 0 ), + X( "EROFS", ERROR_WRITE_PROTECT , 0 ), + X( "EPIPE", ERROR_BROKEN_PIPE , 0 ), + X( "ERANGE", ERROR_ARITHMETIC_OVERFLOW , 0 ), + X( "EDEADLOCK",ERROR_POSSIBLE_DEADLOCK , 0 ), + X( "ENAMETOOLONG", ERROR_FILENAME_EXCED_RANGE, 0 ), + X( "ENOLCK", ERROR_SHARING_BUFFER_EXCEEDED , 0 ), + X( "ENOSYS", ERROR_NOT_SUPPORTED , 0 ), + X( "ENOTEMPTY",ERROR_DIR_NOT_EMPTY , 0 ), + X( "ESPIPE", ERROR_SEEK_ON_DEVICE , 0 ), +#if 0 /* FIXME: Find appropriate mappings. */ + X( "EILSEQ", ), + X( "EDOM", ), + X( "EMLINK", ), + X( "ESRCH", ), /* No such process */ + X( "E2BIG", ), /* Arg list too long */ + X( "ENOEXEC", ), /* Exec format error */ + X( "ECHILD", ), /* No child processes */ + X( "EISDIR", ), /* Is a directory */ + X( "ENOTTY", ), /* Inappropriate I/O control operation */ + X( "EFBIG", ), /* File too large */ +#endif +#undef X +#else /*!RESOLVE_MACROS*/ +# include "mkw32errmap.tab.h" +#endif /*!RESOLVE_MACROS*/ + { NULL, 0 } + }; + + + +static int +compare_table (const void *a_v, const void *b_v) +{ + const struct table_s *a = a_v; + const struct table_s *b = b_v; + + return (a->w32code - b->w32code); +} + + +int +main (int argc, char **argv) +{ + int idx; + + for (idx=0; table[idx].name; idx++) + ; + qsort (table, idx, sizeof *table, compare_table); + + if (argc == 2 && !strcmp (argv[1], "--map")) + { + fputs ("static int\n" + "map_w32codes (int err)\n" + "{\n" + " switch (err)\n" + " {\n", stdout ); + for (idx=0; table[idx].name; idx++) + if (table[idx].w32code2) + printf (" case %d: return %d;\n", + table[idx].w32code2, table[idx].w32code); + fputs (" default: return err;\n" + " }\n" + "}\n", stdout); + } + else + { + fputs (header_gpg_extra_errno_h, stdout); + for (idx=0; table[idx].name; idx++) + printf ("#define %-12s %5d\n", table[idx].name, table[idx].w32code); + fputs (footer_gpg_extra_errno_h, stdout); + } + + return 0; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkw32errmap.map.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkw32errmap.map.c new file mode 100644 index 0000000000..c65491e927 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/mkw32errmap.map.c @@ -0,0 +1 @@ +/*dummy*/ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strerror-sym.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strerror-sym.c new file mode 100644 index 0000000000..3d79f40bb5 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strerror-sym.c @@ -0,0 +1,56 @@ +/* strerror-sym.c - Describing an error code with its symbol name. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stddef.h> + +#include <gpg-error.h> + +#include "err-codes-sym.h" +#include "errnos-sym.h" + +/* Return a pointer to a string containing the name of the symbol of + the error code in the error value ERR. Returns NULL if the error + code is not known. */ +const char * +gpg_strerror_sym (gpg_error_t err) +{ + gpg_err_code_t code = gpg_err_code (err); + + if (code & GPG_ERR_SYSTEM_ERROR) + { + int idx; + + code &= ~GPG_ERR_SYSTEM_ERROR; + idx = errnos_msgidxof (code); + if (idx >= 0) + return errnos_msgstr + errnos_msgidx[idx]; + else + return NULL; + } + + if (msgidxof (code) == msgidxof (GPG_ERR_CODE_DIM)) + return NULL; + + return msgstr + msgidx[msgidxof (code)]; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strerror.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strerror.c new file mode 100644 index 0000000000..dc56040262 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strerror.c @@ -0,0 +1,169 @@ +/* strerror.c - Describing an error code. + Copyright (C) 2003 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> + +#include <gpg-error.h> + +#include "gettext.h" +#include "err-codes.h" + +/* Return a pointer to a string containing a description of the error + code in the error value ERR. This function is not thread-safe. */ +const char * +gpg_strerror (gpg_error_t err) +{ + gpg_err_code_t code = gpg_err_code (err); + + if (code & GPG_ERR_SYSTEM_ERROR) + { + int no = gpg_err_code_to_errno (code); + if (no) + return strerror (no); + else + code = GPG_ERR_UNKNOWN_ERRNO; + } + return dgettext (PACKAGE, msgstr + msgidx[msgidxof (code)]); +} + + +#ifdef HAVE_STRERROR_R +#ifdef STRERROR_R_CHAR_P +/* The GNU C library and probably some other systems have this weird + variant of strerror_r. */ + +/* Return a dynamically allocated string in *STR describing the system + error NO. If this call succeeds, return 1. If this call fails due + to a resource shortage, set *STR to NULL and return 1. If this + call fails because the error number is not valid, don't set *STR + and return 0. */ +static int +system_strerror_r (int no, char *buf, size_t buflen) +{ + char *errstr; + + errstr = strerror_r (no, buf, buflen); + if (errstr != buf) + { + size_t errstr_len = strlen (errstr) + 1; + size_t cpy_len = errstr_len < buflen ? errstr_len : buflen; + memcpy (buf, errstr, cpy_len); + + return cpy_len == errstr_len ? 0 : ERANGE; + } + else + { + /* We can not tell if the buffer was large enough, but we can + try to make a guess. */ + if (strlen (buf) + 1 >= buflen) + return ERANGE; + + return 0; + } +} + +#else /* STRERROR_R_CHAR_P */ +/* Now the POSIX version. */ + +static int +system_strerror_r (int no, char *buf, size_t buflen) +{ + return strerror_r (no, buf, buflen); +} + +#endif /* STRERROR_R_CHAR_P */ + +#else /* HAVE_STRERROR_H */ +/* Without strerror_r(), we can still provide a non-thread-safe + version. Maybe we are even lucky and the system's strerror() is + already thread-safe. */ + +static int +system_strerror_r (int no, char *buf, size_t buflen) +{ + char *errstr = strerror (no); + + if (!errstr) + { + int saved_errno = errno; + + if (saved_errno != EINVAL) + snprintf (buf, buflen, "strerror failed: %i\n", errno); + return saved_errno; + } + else + { + size_t errstr_len = strlen (errstr) + 1; + size_t cpy_len = errstr_len < buflen ? errstr_len : buflen; + memcpy (buf, errstr, cpy_len); + return cpy_len == errstr_len ? 0 : ERANGE; + } +} +#endif + + +/* Return the error string for ERR in the user-supplied buffer BUF of + size BUFLEN. This function is, in contrast to gpg_strerror, + thread-safe if a thread-safe strerror_r() function is provided by + the system. If the function succeeds, 0 is returned and BUF + contains the string describing the error. If the buffer was not + large enough, ERANGE is returned and BUF contains as much of the + beginning of the error string as fits into the buffer. */ +int +gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen) +{ + gpg_err_code_t code = gpg_err_code (err); + const char *errstr; + size_t errstr_len; + size_t cpy_len; + + if (code & GPG_ERR_SYSTEM_ERROR) + { + int no = gpg_err_code_to_errno (code); + if (no) + { + int system_err = system_strerror_r (no, buf, buflen); + + if (system_err != EINVAL) + { + if (buflen) + buf[buflen - 1] = '\0'; + return system_err; + } + } + code = GPG_ERR_UNKNOWN_ERRNO; + } + + errstr = dgettext (PACKAGE, msgstr + msgidx[msgidxof (code)]); + errstr_len = strlen (errstr) + 1; + cpy_len = errstr_len < buflen ? errstr_len : buflen; + memcpy (buf, errstr, cpy_len); + if (buflen) + buf[buflen - 1] = '\0'; + + return cpy_len == errstr_len ? 0 : ERANGE; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strsource-sym.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strsource-sym.c new file mode 100644 index 0000000000..a191310e95 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strsource-sym.c @@ -0,0 +1,43 @@ +/* strsource-sym.c - Describing an error source with its symbol name. + Copyright (C) 2003, 2004 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stddef.h> + +#include <gpg-error.h> + +#include "err-sources-sym.h" + +/* Return a pointer to a string containing the name of the symbol of + the error source in the error value ERR. Returns NULL if the error + code is not known. */ +const char * +gpg_strsource_sym (gpg_error_t err) +{ + gpg_err_source_t source = gpg_err_source (err); + + if (msgidxof (source) == msgidxof (GPG_ERR_SOURCE_DIM)) + return NULL; + + return msgstr + msgidx[msgidxof (source)]; +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strsource.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strsource.c new file mode 100644 index 0000000000..66d783c436 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/strsource.c @@ -0,0 +1,37 @@ +/* strsource.c - Describing an error source. + Copyright (C) 2003 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <gpg-error.h> + +#include "gettext.h" +#include "err-sources.h" + +/* Return a pointer to a string containing a description of the error + source in the error value ERR. */ +const char * +gpg_strsource (gpg_error_t err) +{ + gpg_err_source_t source = gpg_err_source (err); + return dgettext (PACKAGE, msgstr + msgidx[msgidxof (source)]); +} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/versioninfo.rc b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/versioninfo.rc new file mode 100644 index 0000000000..5a3b96bca1 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/versioninfo.rc @@ -0,0 +1,52 @@ +/* versioninfo.rc.in - for libgpg-error + * Copyright (C) 2005 g10 Code GmbH + * + * This file is free software; as a special exception the author 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. + */ + +/* This file is processed by configure to create versioninfo.rc */ + +#line __LINE__ "versioninfo.rc.in" + +#include <afxres.h> + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,9,0,2 + PRODUCTVERSION 1,9,0,2 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x21L +#else + FILEFLAGS 0x20L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Provided under the terms of the GNU Lesser General Public License.\0" + VALUE "CompanyName", "g10 Code GmbH\0" + VALUE "FileDescription", "libgpg-error - Common error codes\0" + VALUE "FileVersion", "1.9\0" + VALUE "InternalName", "libgpg-error\0" + VALUE "LegalCopyright", "Copyright © 2005 g10 Code GmbH\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "libgpg-error.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "libgpg-error\0" + VALUE "ProductVersion", "1.9\0" + VALUE "SpecialBuild", "2010-08-12T17:56+0000\0" + END + END +END + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/versioninfo.rc.in b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/versioninfo.rc.in new file mode 100644 index 0000000000..3384adc361 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/versioninfo.rc.in @@ -0,0 +1,52 @@ +/* versioninfo.rc.in - for libgpg-error + * Copyright (C) 2005 g10 Code GmbH + * + * This file is free software; as a special exception the author 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. + */ + +/* This file is processed by configure to create versioninfo.rc */ + +#line __LINE__ "versioninfo.rc.in" + +#include <afxres.h> + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @BUILD_FILEVERSION@ + PRODUCTVERSION @BUILD_FILEVERSION@ + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x21L +#else + FILEFLAGS 0x20L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Provided under the terms of the GNU Lesser General Public License.\0" + VALUE "CompanyName", "g10 Code GmbH\0" + VALUE "FileDescription", "libgpg-error - Common error codes\0" + VALUE "FileVersion", "@VERSION@\0" + VALUE "InternalName", "libgpg-error\0" + VALUE "LegalCopyright", "Copyright © 2005 g10 Code GmbH\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "libgpg-error.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "libgpg-error\0" + VALUE "ProductVersion", "@VERSION@\0" + VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0" + END + END +END + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32-add.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32-add.h new file mode 100644 index 0000000000..02848acf73 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32-add.h @@ -0,0 +1,40 @@ +## w32-add.h - Snippet to be be included into gpg-error.h. +## Comments are indicated by a double hash mark. Due to a +## peculiarity of the script the first used line must not +## start with a hash mark. + +/* Decide whether to use the format_arg attribute. */ +#if _GPG_ERR_GCC_VERSION > 20800 +# define _GPG_ERR_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a))) +#else +# define _GPG_ERR_ATTR_FORMAT_ARG(a) +#endif + +/* A lean gettext implementation based on GNU style mo files which are + required to be encoded in UTF-8. There is a limit on 65534 entries + to save some RAM. Only Germanic plural rules are supported. */ +const char *_gpg_w32_bindtextdomain (const char *domainname, + const char *dirname); +const char *_gpg_w32_textdomain (const char *domainname); +const char *_gpg_w32_gettext (const char *msgid) + _GPG_ERR_ATTR_FORMAT_ARG (1); +const char *_gpg_w32_dgettext (const char *domainname, const char *msgid) + _GPG_ERR_ATTR_FORMAT_ARG (2); +const char *_gpg_w32_dngettext (const char *domainname, const char *msgid1, + const char *msgid2, unsigned long int n) + _GPG_ERR_ATTR_FORMAT_ARG (2) _GPG_ERR_ATTR_FORMAT_ARG (3); +const char *_gpg_w32_gettext_localename (void); +int _gpg_w32_gettext_use_utf8 (int value); + +#ifdef GPG_ERR_ENABLE_GETTEXT_MACROS +# define bindtextdomain(a,b) _gpg_w32_bindtextdomain ((a), (b)) +# define textdomain(a) _gpg_w32_textdomain ((a)) +# define gettext(a) _gpg_w32_gettext ((a)) +# define dgettext(a,b) _gpg_w32_dgettext ((a), (b)) +# define ngettext(a,b,c) _gpg_w32_dngettext (NULL, (a), (b), (c)) +# define dngettext(a,b,c,d) _gpg_w32_dngettext ((a), (b), (c), (d)) +# define gettext_localename() _gpg_w32_gettext_localename () +# define gettext_use_utf8(a) _gpg_w32_gettext_use_utf8 (a) +#endif /*GPG_ERR_ENABLE_GETTEXT_MACROS*/ + + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32-gettext.c b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32-gettext.c new file mode 100644 index 0000000000..da07a25695 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32-gettext.c @@ -0,0 +1,1886 @@ +/* w32-gettext.h - A simple gettext implementation for Windows targets. + Copyright (C) 1995, 1996, 1997, 1999, 2005, 2007, +2 2008, 2010 Free Software Foundation, Inc. + + This file is part of libgpg-error. + + libgpg-error is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + libgpg-error 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif +#if !defined (_WIN32) && !defined (__CYGWIN32__) +# error This module may only be build for Windows or Cygwin32 +#endif + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <ctype.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <stdint.h> +#ifndef HAVE_W32CE_SYSTEM +# include <locale.h> +#endif /*HAVE_W32CE_SYSTEM*/ +#include <windows.h> + +#ifdef JNLIB_IN_JNLIB +#include "libjnlib-config.h" +#endif + +#ifndef jnlib_malloc +# define jnlib_malloc(a) malloc ((a)) +# define jnlib_calloc(a,b) calloc ((a), (b)) +# define jnlib_free(a) free ((a)) +# define jnlib_xstrdup(a) not_used +#endif /*!jnlib_malloc*/ + +#include "init.h" + + + +/* localname.c from gettext BEGIN. */ + +/* Determine the current selected locale. + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */ +/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */ +/* Renamed _nl_locale_name, removed unsed args, removed include files, + non-W32 code and changed comments <wk@gnupg.org>. */ + +/* Mingw headers don't have latest language and sublanguage codes. */ +#ifndef LANG_AFRIKAANS +#define LANG_AFRIKAANS 0x36 +#endif +#ifndef LANG_ALBANIAN +#define LANG_ALBANIAN 0x1c +#endif +#ifndef LANG_AMHARIC +#define LANG_AMHARIC 0x5e +#endif +#ifndef LANG_ARABIC +#define LANG_ARABIC 0x01 +#endif +#ifndef LANG_ARMENIAN +#define LANG_ARMENIAN 0x2b +#endif +#ifndef LANG_ASSAMESE +#define LANG_ASSAMESE 0x4d +#endif +#ifndef LANG_AZERI +#define LANG_AZERI 0x2c +#endif +#ifndef LANG_BASQUE +#define LANG_BASQUE 0x2d +#endif +#ifndef LANG_BELARUSIAN +#define LANG_BELARUSIAN 0x23 +#endif +#ifndef LANG_BENGALI +#define LANG_BENGALI 0x45 +#endif +#ifndef LANG_BURMESE +#define LANG_BURMESE 0x55 +#endif +#ifndef LANG_CAMBODIAN +#define LANG_CAMBODIAN 0x53 +#endif +#ifndef LANG_CATALAN +#define LANG_CATALAN 0x03 +#endif +#ifndef LANG_CHEROKEE +#define LANG_CHEROKEE 0x5c +#endif +#ifndef LANG_DIVEHI +#define LANG_DIVEHI 0x65 +#endif +#ifndef LANG_EDO +#define LANG_EDO 0x66 +#endif +#ifndef LANG_ESTONIAN +#define LANG_ESTONIAN 0x25 +#endif +#ifndef LANG_FAEROESE +#define LANG_FAEROESE 0x38 +#endif +#ifndef LANG_FARSI +#define LANG_FARSI 0x29 +#endif +#ifndef LANG_FRISIAN +#define LANG_FRISIAN 0x62 +#endif +#ifndef LANG_FULFULDE +#define LANG_FULFULDE 0x67 +#endif +#ifndef LANG_GAELIC +#define LANG_GAELIC 0x3c +#endif +#ifndef LANG_GALICIAN +#define LANG_GALICIAN 0x56 +#endif +#ifndef LANG_GEORGIAN +#define LANG_GEORGIAN 0x37 +#endif +#ifndef LANG_GUARANI +#define LANG_GUARANI 0x74 +#endif +#ifndef LANG_GUJARATI +#define LANG_GUJARATI 0x47 +#endif +#ifndef LANG_HAUSA +#define LANG_HAUSA 0x68 +#endif +#ifndef LANG_HAWAIIAN +#define LANG_HAWAIIAN 0x75 +#endif +#ifndef LANG_HEBREW +#define LANG_HEBREW 0x0d +#endif +#ifndef LANG_HINDI +#define LANG_HINDI 0x39 +#endif +#ifndef LANG_IBIBIO +#define LANG_IBIBIO 0x69 +#endif +#ifndef LANG_IGBO +#define LANG_IGBO 0x70 +#endif +#ifndef LANG_INDONESIAN +#define LANG_INDONESIAN 0x21 +#endif +#ifndef LANG_INUKTITUT +#define LANG_INUKTITUT 0x5d +#endif +#ifndef LANG_KANNADA +#define LANG_KANNADA 0x4b +#endif +#ifndef LANG_KANURI +#define LANG_KANURI 0x71 +#endif +#ifndef LANG_KASHMIRI +#define LANG_KASHMIRI 0x60 +#endif +#ifndef LANG_KAZAK +#define LANG_KAZAK 0x3f +#endif +#ifndef LANG_KONKANI +#define LANG_KONKANI 0x57 +#endif +#ifndef LANG_KYRGYZ +#define LANG_KYRGYZ 0x40 +#endif +#ifndef LANG_LAO +#define LANG_LAO 0x54 +#endif +#ifndef LANG_LATIN +#define LANG_LATIN 0x76 +#endif +#ifndef LANG_LATVIAN +#define LANG_LATVIAN 0x26 +#endif +#ifndef LANG_LITHUANIAN +#define LANG_LITHUANIAN 0x27 +#endif +#ifndef LANG_MACEDONIAN +#define LANG_MACEDONIAN 0x2f +#endif +#ifndef LANG_MALAY +#define LANG_MALAY 0x3e +#endif +#ifndef LANG_MALAYALAM +#define LANG_MALAYALAM 0x4c +#endif +#ifndef LANG_MALTESE +#define LANG_MALTESE 0x3a +#endif +#ifndef LANG_MANIPURI +#define LANG_MANIPURI 0x58 +#endif +#ifndef LANG_MARATHI +#define LANG_MARATHI 0x4e +#endif +#ifndef LANG_MONGOLIAN +#define LANG_MONGOLIAN 0x50 +#endif +#ifndef LANG_NEPALI +#define LANG_NEPALI 0x61 +#endif +#ifndef LANG_ORIYA +#define LANG_ORIYA 0x48 +#endif +#ifndef LANG_OROMO +#define LANG_OROMO 0x72 +#endif +#ifndef LANG_PAPIAMENTU +#define LANG_PAPIAMENTU 0x79 +#endif +#ifndef LANG_PASHTO +#define LANG_PASHTO 0x63 +#endif +#ifndef LANG_PUNJABI +#define LANG_PUNJABI 0x46 +#endif +#ifndef LANG_RHAETO_ROMANCE +#define LANG_RHAETO_ROMANCE 0x17 +#endif +#ifndef LANG_SAAMI +#define LANG_SAAMI 0x3b +#endif +#ifndef LANG_SANSKRIT +#define LANG_SANSKRIT 0x4f +#endif +#ifndef LANG_SERBIAN +#define LANG_SERBIAN 0x1a +#endif +#ifndef LANG_SINDHI +#define LANG_SINDHI 0x59 +#endif +#ifndef LANG_SINHALESE +#define LANG_SINHALESE 0x5b +#endif +#ifndef LANG_SLOVAK +#define LANG_SLOVAK 0x1b +#endif +#ifndef LANG_SOMALI +#define LANG_SOMALI 0x77 +#endif +#ifndef LANG_SORBIAN +#define LANG_SORBIAN 0x2e +#endif +#ifndef LANG_SUTU +#define LANG_SUTU 0x30 +#endif +#ifndef LANG_SWAHILI +#define LANG_SWAHILI 0x41 +#endif +#ifndef LANG_SYRIAC +#define LANG_SYRIAC 0x5a +#endif +#ifndef LANG_TAGALOG +#define LANG_TAGALOG 0x64 +#endif +#ifndef LANG_TAJIK +#define LANG_TAJIK 0x28 +#endif +#ifndef LANG_TAMAZIGHT +#define LANG_TAMAZIGHT 0x5f +#endif +#ifndef LANG_TAMIL +#define LANG_TAMIL 0x49 +#endif +#ifndef LANG_TATAR +#define LANG_TATAR 0x44 +#endif +#ifndef LANG_TELUGU +#define LANG_TELUGU 0x4a +#endif +#ifndef LANG_THAI +#define LANG_THAI 0x1e +#endif +#ifndef LANG_TIBETAN +#define LANG_TIBETAN 0x51 +#endif +#ifndef LANG_TIGRINYA +#define LANG_TIGRINYA 0x73 +#endif +#ifndef LANG_TSONGA +#define LANG_TSONGA 0x31 +#endif +#ifndef LANG_TSWANA +#define LANG_TSWANA 0x32 +#endif +#ifndef LANG_TURKMEN +#define LANG_TURKMEN 0x42 +#endif +#ifndef LANG_UKRAINIAN +#define LANG_UKRAINIAN 0x22 +#endif +#ifndef LANG_URDU +#define LANG_URDU 0x20 +#endif +#ifndef LANG_UZBEK +#define LANG_UZBEK 0x43 +#endif +#ifndef LANG_VENDA +#define LANG_VENDA 0x33 +#endif +#ifndef LANG_VIETNAMESE +#define LANG_VIETNAMESE 0x2a +#endif +#ifndef LANG_WELSH +#define LANG_WELSH 0x52 +#endif +#ifndef LANG_XHOSA +#define LANG_XHOSA 0x34 +#endif +#ifndef LANG_YI +#define LANG_YI 0x78 +#endif +#ifndef LANG_YIDDISH +#define LANG_YIDDISH 0x3d +#endif +#ifndef LANG_YORUBA +#define LANG_YORUBA 0x6a +#endif +#ifndef LANG_ZULU +#define LANG_ZULU 0x35 +#endif +#ifndef SUBLANG_ARABIC_SAUDI_ARABIA +#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +#endif +#ifndef SUBLANG_ARABIC_IRAQ +#define SUBLANG_ARABIC_IRAQ 0x02 +#endif +#ifndef SUBLANG_ARABIC_EGYPT +#define SUBLANG_ARABIC_EGYPT 0x03 +#endif +#ifndef SUBLANG_ARABIC_LIBYA +#define SUBLANG_ARABIC_LIBYA 0x04 +#endif +#ifndef SUBLANG_ARABIC_ALGERIA +#define SUBLANG_ARABIC_ALGERIA 0x05 +#endif +#ifndef SUBLANG_ARABIC_MOROCCO +#define SUBLANG_ARABIC_MOROCCO 0x06 +#endif +#ifndef SUBLANG_ARABIC_TUNISIA +#define SUBLANG_ARABIC_TUNISIA 0x07 +#endif +#ifndef SUBLANG_ARABIC_OMAN +#define SUBLANG_ARABIC_OMAN 0x08 +#endif +#ifndef SUBLANG_ARABIC_YEMEN +#define SUBLANG_ARABIC_YEMEN 0x09 +#endif +#ifndef SUBLANG_ARABIC_SYRIA +#define SUBLANG_ARABIC_SYRIA 0x0a +#endif +#ifndef SUBLANG_ARABIC_JORDAN +#define SUBLANG_ARABIC_JORDAN 0x0b +#endif +#ifndef SUBLANG_ARABIC_LEBANON +#define SUBLANG_ARABIC_LEBANON 0x0c +#endif +#ifndef SUBLANG_ARABIC_KUWAIT +#define SUBLANG_ARABIC_KUWAIT 0x0d +#endif +#ifndef SUBLANG_ARABIC_UAE +#define SUBLANG_ARABIC_UAE 0x0e +#endif +#ifndef SUBLANG_ARABIC_BAHRAIN +#define SUBLANG_ARABIC_BAHRAIN 0x0f +#endif +#ifndef SUBLANG_ARABIC_QATAR +#define SUBLANG_ARABIC_QATAR 0x10 +#endif +#ifndef SUBLANG_AZERI_LATIN +#define SUBLANG_AZERI_LATIN 0x01 +#endif +#ifndef SUBLANG_AZERI_CYRILLIC +#define SUBLANG_AZERI_CYRILLIC 0x02 +#endif +#ifndef SUBLANG_BENGALI_INDIA +#define SUBLANG_BENGALI_INDIA 0x01 +#endif +#ifndef SUBLANG_BENGALI_BANGLADESH +#define SUBLANG_BENGALI_BANGLADESH 0x02 +#endif +#ifndef SUBLANG_CHINESE_MACAU +#define SUBLANG_CHINESE_MACAU 0x05 +#endif +#ifndef SUBLANG_ENGLISH_SOUTH_AFRICA +#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +#endif +#ifndef SUBLANG_ENGLISH_JAMAICA +#define SUBLANG_ENGLISH_JAMAICA 0x08 +#endif +#ifndef SUBLANG_ENGLISH_CARIBBEAN +#define SUBLANG_ENGLISH_CARIBBEAN 0x09 +#endif +#ifndef SUBLANG_ENGLISH_BELIZE +#define SUBLANG_ENGLISH_BELIZE 0x0a +#endif +#ifndef SUBLANG_ENGLISH_TRINIDAD +#define SUBLANG_ENGLISH_TRINIDAD 0x0b +#endif +#ifndef SUBLANG_ENGLISH_ZIMBABWE +#define SUBLANG_ENGLISH_ZIMBABWE 0x0c +#endif +#ifndef SUBLANG_ENGLISH_PHILIPPINES +#define SUBLANG_ENGLISH_PHILIPPINES 0x0d +#endif +#ifndef SUBLANG_ENGLISH_INDONESIA +#define SUBLANG_ENGLISH_INDONESIA 0x0e +#endif +#ifndef SUBLANG_ENGLISH_HONGKONG +#define SUBLANG_ENGLISH_HONGKONG 0x0f +#endif +#ifndef SUBLANG_ENGLISH_INDIA +#define SUBLANG_ENGLISH_INDIA 0x10 +#endif +#ifndef SUBLANG_ENGLISH_MALAYSIA +#define SUBLANG_ENGLISH_MALAYSIA 0x11 +#endif +#ifndef SUBLANG_ENGLISH_SINGAPORE +#define SUBLANG_ENGLISH_SINGAPORE 0x12 +#endif +#ifndef SUBLANG_FRENCH_LUXEMBOURG +#define SUBLANG_FRENCH_LUXEMBOURG 0x05 +#endif +#ifndef SUBLANG_FRENCH_MONACO +#define SUBLANG_FRENCH_MONACO 0x06 +#endif +#ifndef SUBLANG_FRENCH_WESTINDIES +#define SUBLANG_FRENCH_WESTINDIES 0x07 +#endif +#ifndef SUBLANG_FRENCH_REUNION +#define SUBLANG_FRENCH_REUNION 0x08 +#endif +#ifndef SUBLANG_FRENCH_CONGO +#define SUBLANG_FRENCH_CONGO 0x09 +#endif +#ifndef SUBLANG_FRENCH_SENEGAL +#define SUBLANG_FRENCH_SENEGAL 0x0a +#endif +#ifndef SUBLANG_FRENCH_CAMEROON +#define SUBLANG_FRENCH_CAMEROON 0x0b +#endif +#ifndef SUBLANG_FRENCH_COTEDIVOIRE +#define SUBLANG_FRENCH_COTEDIVOIRE 0x0c +#endif +#ifndef SUBLANG_FRENCH_MALI +#define SUBLANG_FRENCH_MALI 0x0d +#endif +#ifndef SUBLANG_FRENCH_MOROCCO +#define SUBLANG_FRENCH_MOROCCO 0x0e +#endif +#ifndef SUBLANG_FRENCH_HAITI +#define SUBLANG_FRENCH_HAITI 0x0f +#endif +#ifndef SUBLANG_GERMAN_LUXEMBOURG +#define SUBLANG_GERMAN_LUXEMBOURG 0x04 +#endif +#ifndef SUBLANG_GERMAN_LIECHTENSTEIN +#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +#endif +#ifndef SUBLANG_KASHMIRI_INDIA +#define SUBLANG_KASHMIRI_INDIA 0x02 +#endif +#ifndef SUBLANG_MALAY_MALAYSIA +#define SUBLANG_MALAY_MALAYSIA 0x01 +#endif +#ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM +#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +#endif +#ifndef SUBLANG_NEPALI_INDIA +#define SUBLANG_NEPALI_INDIA 0x02 +#endif +#ifndef SUBLANG_PUNJABI_INDIA +#define SUBLANG_PUNJABI_INDIA 0x01 +#endif +#ifndef SUBLANG_ROMANIAN_ROMANIA +#define SUBLANG_ROMANIAN_ROMANIA 0x01 +#endif +#ifndef SUBLANG_SERBIAN_LATIN +#define SUBLANG_SERBIAN_LATIN 0x02 +#endif +#ifndef SUBLANG_SERBIAN_CYRILLIC +#define SUBLANG_SERBIAN_CYRILLIC 0x03 +#endif +#ifndef SUBLANG_SINDHI_INDIA +#define SUBLANG_SINDHI_INDIA 0x00 +#endif +#ifndef SUBLANG_SINDHI_PAKISTAN +#define SUBLANG_SINDHI_PAKISTAN 0x01 +#endif +#ifndef SUBLANG_SPANISH_GUATEMALA +#define SUBLANG_SPANISH_GUATEMALA 0x04 +#endif +#ifndef SUBLANG_SPANISH_COSTA_RICA +#define SUBLANG_SPANISH_COSTA_RICA 0x05 +#endif +#ifndef SUBLANG_SPANISH_PANAMA +#define SUBLANG_SPANISH_PANAMA 0x06 +#endif +#ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +#endif +#ifndef SUBLANG_SPANISH_VENEZUELA +#define SUBLANG_SPANISH_VENEZUELA 0x08 +#endif +#ifndef SUBLANG_SPANISH_COLOMBIA +#define SUBLANG_SPANISH_COLOMBIA 0x09 +#endif +#ifndef SUBLANG_SPANISH_PERU +#define SUBLANG_SPANISH_PERU 0x0a +#endif +#ifndef SUBLANG_SPANISH_ARGENTINA +#define SUBLANG_SPANISH_ARGENTINA 0x0b +#endif +#ifndef SUBLANG_SPANISH_ECUADOR +#define SUBLANG_SPANISH_ECUADOR 0x0c +#endif +#ifndef SUBLANG_SPANISH_CHILE +#define SUBLANG_SPANISH_CHILE 0x0d +#endif +#ifndef SUBLANG_SPANISH_URUGUAY +#define SUBLANG_SPANISH_URUGUAY 0x0e +#endif +#ifndef SUBLANG_SPANISH_PARAGUAY +#define SUBLANG_SPANISH_PARAGUAY 0x0f +#endif +#ifndef SUBLANG_SPANISH_BOLIVIA +#define SUBLANG_SPANISH_BOLIVIA 0x10 +#endif +#ifndef SUBLANG_SPANISH_EL_SALVADOR +#define SUBLANG_SPANISH_EL_SALVADOR 0x11 +#endif +#ifndef SUBLANG_SPANISH_HONDURAS +#define SUBLANG_SPANISH_HONDURAS 0x12 +#endif +#ifndef SUBLANG_SPANISH_NICARAGUA +#define SUBLANG_SPANISH_NICARAGUA 0x13 +#endif +#ifndef SUBLANG_SPANISH_PUERTO_RICO +#define SUBLANG_SPANISH_PUERTO_RICO 0x14 +#endif +#ifndef SUBLANG_SWEDISH_FINLAND +#define SUBLANG_SWEDISH_FINLAND 0x02 +#endif +#ifndef SUBLANG_TAMAZIGHT_ARABIC +#define SUBLANG_TAMAZIGHT_ARABIC 0x01 +#endif +#ifndef SUBLANG_TAMAZIGHT_LATIN +#define SUBLANG_TAMAZIGHT_LATIN 0x02 +#endif +#ifndef SUBLANG_TIGRINYA_ETHIOPIA +#define SUBLANG_TIGRINYA_ETHIOPIA 0x00 +#endif +#ifndef SUBLANG_TIGRINYA_ERITREA +#define SUBLANG_TIGRINYA_ERITREA 0x01 +#endif +#ifndef SUBLANG_URDU_PAKISTAN +#define SUBLANG_URDU_PAKISTAN 0x01 +#endif +#ifndef SUBLANG_URDU_INDIA +#define SUBLANG_URDU_INDIA 0x02 +#endif +#ifndef SUBLANG_UZBEK_LATIN +#define SUBLANG_UZBEK_LATIN 0x01 +#endif +#ifndef SUBLANG_UZBEK_CYRILLIC +#define SUBLANG_UZBEK_CYRILLIC 0x02 +#endif + +/* Return an XPG style locale name + language[_territory[.codeset]][@modifier]. + Don't even bother determining the codeset; it's not useful in this + context, because message catalogs are not specific to a single + codeset. The result must not be freed; it is statically + allocated. */ +static const char * +my_nl_locale_name (const char *categoryname) +{ + const char *retval; + LCID lcid; + LANGID langid; + int primary, sub; + + /* Let the user override the system settings through environment + variables, as on POSIX systems. */ +#ifndef HAVE_W32CE_SYSTEM + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; +#endif /*!HAVE_W32CE_SYSTEM*/ + + /* Use native Win32 API locale ID. */ +#ifdef HAVE_W32CE_SYSTEM + lcid = GetSystemDefaultLCID (); +#else + lcid = GetThreadLocale (); +#endif + + /* Strip off the sorting rules, keep only the language part. */ + langid = LANGIDFROMLCID (lcid); + + /* Split into language and territory part. */ + primary = PRIMARYLANGID (langid); + sub = SUBLANGID (langid); + + /* Dispatch on language. + See also http://www.unicode.org/unicode/onlinedat/languages.html . + For details about languages, see http://www.ethnologue.com/ . */ + switch (primary) + { + case LANG_AFRIKAANS: return "af_ZA"; + case LANG_ALBANIAN: return "sq_AL"; + case LANG_AMHARIC: return "am_ET"; + case LANG_ARABIC: + switch (sub) + { + case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; + case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; + case SUBLANG_ARABIC_EGYPT: return "ar_EG"; + case SUBLANG_ARABIC_LIBYA: return "ar_LY"; + case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; + case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; + case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; + case SUBLANG_ARABIC_OMAN: return "ar_OM"; + case SUBLANG_ARABIC_YEMEN: return "ar_YE"; + case SUBLANG_ARABIC_SYRIA: return "ar_SY"; + case SUBLANG_ARABIC_JORDAN: return "ar_JO"; + case SUBLANG_ARABIC_LEBANON: return "ar_LB"; + case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; + case SUBLANG_ARABIC_UAE: return "ar_AE"; + case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; + case SUBLANG_ARABIC_QATAR: return "ar_QA"; + } + return "ar"; + case LANG_ARMENIAN: return "hy_AM"; + case LANG_ASSAMESE: return "as_IN"; + case LANG_AZERI: + switch (sub) + { + /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ + case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; + case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; + } + return "az"; + case LANG_BASQUE: + return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ + case LANG_BELARUSIAN: return "be_BY"; + case LANG_BENGALI: + switch (sub) + { + case SUBLANG_BENGALI_INDIA: return "bn_IN"; + case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; + } + return "bn"; + case LANG_BULGARIAN: return "bg_BG"; + case LANG_BURMESE: return "my_MM"; + case LANG_CAMBODIAN: return "km_KH"; + case LANG_CATALAN: return "ca_ES"; + case LANG_CHEROKEE: return "chr_US"; + case LANG_CHINESE: + switch (sub) + { + case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; + case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; + case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; + case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; + case SUBLANG_CHINESE_MACAU: return "zh_MO"; + } + return "zh"; + case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN + * What used to be called Serbo-Croatian + * should really now be two separate + * languages because of political reasons. + * (Says tml, who knows nothing about Serbian + * or Croatian.) + * (I can feel those flames coming already.) + */ + switch (sub) + { + case SUBLANG_DEFAULT: return "hr_HR"; + case SUBLANG_SERBIAN_LATIN: return "sr_CS"; + case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; + } + return "hr"; + case LANG_CZECH: return "cs_CZ"; + case LANG_DANISH: return "da_DK"; + case LANG_DIVEHI: return "div_MV"; + case LANG_DUTCH: + switch (sub) + { + case SUBLANG_DUTCH: return "nl_NL"; + case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; + } + return "nl"; + case LANG_EDO: return "bin_NG"; + case LANG_ENGLISH: + switch (sub) + { + /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought + * English was the language spoken in England. + * Oh well. + */ + case SUBLANG_ENGLISH_US: return "en_US"; + case SUBLANG_ENGLISH_UK: return "en_GB"; + case SUBLANG_ENGLISH_AUS: return "en_AU"; + case SUBLANG_ENGLISH_CAN: return "en_CA"; + case SUBLANG_ENGLISH_NZ: return "en_NZ"; + case SUBLANG_ENGLISH_EIRE: return "en_IE"; + case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; + case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; + case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ + case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; + case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; + case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; + case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; + case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; + case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; + case SUBLANG_ENGLISH_INDIA: return "en_IN"; + case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; + case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; + } + return "en"; + case LANG_ESTONIAN: return "et_EE"; + case LANG_FAEROESE: return "fo_FO"; + case LANG_FARSI: return "fa_IR"; + case LANG_FINNISH: return "fi_FI"; + case LANG_FRENCH: + switch (sub) + { + case SUBLANG_FRENCH: return "fr_FR"; + case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; + case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; + case SUBLANG_FRENCH_SWISS: return "fr_CH"; + case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; + case SUBLANG_FRENCH_MONACO: return "fr_MC"; + case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ + case SUBLANG_FRENCH_REUNION: return "fr_RE"; + case SUBLANG_FRENCH_CONGO: return "fr_CG"; + case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; + case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; + case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; + case SUBLANG_FRENCH_MALI: return "fr_ML"; + case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; + case SUBLANG_FRENCH_HAITI: return "fr_HT"; + } + return "fr"; + case LANG_FRISIAN: return "fy_NL"; + case LANG_FULFULDE: return "ful_NG"; + case LANG_GAELIC: + switch (sub) + { + case 0x01: /* SCOTTISH */ return "gd_GB"; + case 0x02: /* IRISH */ return "ga_IE"; + } + return "C"; + case LANG_GALICIAN: return "gl_ES"; + case LANG_GEORGIAN: return "ka_GE"; + case LANG_GERMAN: + switch (sub) + { + case SUBLANG_GERMAN: return "de_DE"; + case SUBLANG_GERMAN_SWISS: return "de_CH"; + case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; + case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; + case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; + } + return "de"; + case LANG_GREEK: return "el_GR"; + case LANG_GUARANI: return "gn_PY"; + case LANG_GUJARATI: return "gu_IN"; + case LANG_HAUSA: return "ha_NG"; + case LANG_HAWAIIAN: + /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) + or Hawaii Creole English ("cpe_US", 600000 speakers)? */ + return "cpe_US"; + case LANG_HEBREW: return "he_IL"; + case LANG_HINDI: return "hi_IN"; + case LANG_HUNGARIAN: return "hu_HU"; + case LANG_IBIBIO: return "nic_NG"; + case LANG_ICELANDIC: return "is_IS"; + case LANG_IGBO: return "ibo_NG"; + case LANG_INDONESIAN: return "id_ID"; + case LANG_INUKTITUT: return "iu_CA"; + case LANG_ITALIAN: + switch (sub) + { + case SUBLANG_ITALIAN: return "it_IT"; + case SUBLANG_ITALIAN_SWISS: return "it_CH"; + } + return "it"; + case LANG_JAPANESE: return "ja_JP"; + case LANG_KANNADA: return "kn_IN"; + case LANG_KANURI: return "kau_NG"; + case LANG_KASHMIRI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ks_PK"; + case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; + } + return "ks"; + case LANG_KAZAK: return "kk_KZ"; + case LANG_KONKANI: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "kok_IN"; + case LANG_KOREAN: return "ko_KR"; + case LANG_KYRGYZ: return "ky_KG"; + case LANG_LAO: return "lo_LA"; + case LANG_LATIN: return "la_VA"; + case LANG_LATVIAN: return "lv_LV"; + case LANG_LITHUANIAN: return "lt_LT"; + case LANG_MACEDONIAN: return "mk_MK"; + case LANG_MALAY: + switch (sub) + { + case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; + case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; + } + return "ms"; + case LANG_MALAYALAM: return "ml_IN"; + case LANG_MALTESE: return "mt_MT"; + case LANG_MANIPURI: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "mni_IN"; + case LANG_MARATHI: return "mr_IN"; + case LANG_MONGOLIAN: + return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ + case LANG_NEPALI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ne_NP"; + case SUBLANG_NEPALI_INDIA: return "ne_IN"; + } + return "ne"; + case LANG_NORWEGIAN: + switch (sub) + { + case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; + case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; + } + return "no"; + case LANG_ORIYA: return "or_IN"; + case LANG_OROMO: return "om_ET"; + case LANG_PAPIAMENTU: return "pap_AN"; + case LANG_PASHTO: + return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ + case LANG_POLISH: return "pl_PL"; + case LANG_PORTUGUESE: + switch (sub) + { + case SUBLANG_PORTUGUESE: return "pt_PT"; + /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. + Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ + case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; + } + return "pt"; + case LANG_PUNJABI: + switch (sub) + { + case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ + } + return "pa"; + case LANG_RHAETO_ROMANCE: return "rm_CH"; + case LANG_ROMANIAN: + switch (sub) + { + case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; + } + return "ro"; + case LANG_RUSSIAN: + return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ + case LANG_SAAMI: /* actually Northern Sami */ return "se_NO"; + case LANG_SANSKRIT: return "sa_IN"; + case LANG_SINDHI: + switch (sub) + { + case SUBLANG_SINDHI_INDIA: return "sd_IN"; + case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; + } + return "sd"; + case LANG_SINHALESE: return "si_LK"; + case LANG_SLOVAK: return "sk_SK"; + case LANG_SLOVENIAN: return "sl_SI"; + case LANG_SOMALI: return "so_SO"; + case LANG_SORBIAN: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "wen_DE"; + case LANG_SPANISH: + switch (sub) + { + case SUBLANG_SPANISH: return "es_ES"; + case SUBLANG_SPANISH_MEXICAN: return "es_MX"; + case SUBLANG_SPANISH_MODERN: + return "es_ES@modern"; /* not seen on Unix */ + case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; + case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; + case SUBLANG_SPANISH_PANAMA: return "es_PA"; + case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; + case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; + case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; + case SUBLANG_SPANISH_PERU: return "es_PE"; + case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; + case SUBLANG_SPANISH_ECUADOR: return "es_EC"; + case SUBLANG_SPANISH_CHILE: return "es_CL"; + case SUBLANG_SPANISH_URUGUAY: return "es_UY"; + case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; + case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; + case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; + case SUBLANG_SPANISH_HONDURAS: return "es_HN"; + case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; + case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; + } + return "es"; + case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ + case LANG_SWAHILI: return "sw_KE"; + case LANG_SWEDISH: + switch (sub) + { + case SUBLANG_DEFAULT: return "sv_SE"; + case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; + } + return "sv"; + case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ + case LANG_TAGALOG: return "tl_PH"; + case LANG_TAJIK: return "tg_TJ"; + case LANG_TAMAZIGHT: + switch (sub) + { + /* FIXME: Adjust this when Tamazight locales appear on Unix. */ + case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; + case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin"; + } + return "ber_MA"; + case LANG_TAMIL: + return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ + case LANG_TATAR: return "tt_RU"; + case LANG_TELUGU: return "te_IN"; + case LANG_THAI: return "th_TH"; + case LANG_TIBETAN: return "bo_CN"; + case LANG_TIGRINYA: + switch (sub) + { + case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; + case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; + } + return "ti"; + case LANG_TSONGA: return "ts_ZA"; + case LANG_TSWANA: return "tn_BW"; + case LANG_TURKISH: return "tr_TR"; + case LANG_TURKMEN: return "tk_TM"; + case LANG_UKRAINIAN: return "uk_UA"; + case LANG_URDU: + switch (sub) + { + case SUBLANG_URDU_PAKISTAN: return "ur_PK"; + case SUBLANG_URDU_INDIA: return "ur_IN"; + } + return "ur"; + case LANG_UZBEK: + switch (sub) + { + case SUBLANG_UZBEK_LATIN: return "uz_UZ"; + case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; + } + return "uz"; + case LANG_VENDA: + /* FIXME: It's not clear whether Venda has the ISO 639-2 two-letter code + "ve" or not. + http://www.loc.gov/standards/iso639-2/englangn.html has it, but + http://lcweb.loc.gov/standards/iso639-2/codechanges.html doesn't, */ + return "ven_ZA"; /* or "ve_ZA"? */ + case LANG_VIETNAMESE: return "vi_VN"; + case LANG_WELSH: return "cy_GB"; + case LANG_XHOSA: return "xh_ZA"; + case LANG_YI: return "sit_CN"; + case LANG_YIDDISH: return "yi_IL"; + case LANG_YORUBA: return "yo_NG"; + case LANG_ZULU: return "zu_ZA"; + default: return "C"; + } +} + +/* localname.c from gettext END. */ + + + +/* Support functions. */ + +static __inline__ uint32_t +do_swap_u32 (uint32_t i) +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} + +#define SWAPIT(flag, data) ((flag) ? do_swap_u32(data) : (data)) + + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + +/* The so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +static __inline__ unsigned long +hash_string( const char *str_param ) +{ + unsigned long int hval, g; + const char *str = str_param; + + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long int) *str++; + g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} + + +/* Generic message catalog and gettext stuff. */ + +/* The magic number of the GNU message catalog format. */ +#define MAGIC 0x950412de +#define MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + uint32_t magic; + /* The revision number of the file format. */ + uint32_t revision; + /* The number of strings pairs. */ + uint32_t nstrings; + /* Offset of table with start offsets of original strings. */ + uint32_t orig_tab_offset; + /* Offset of table with start offsets of translation strings. */ + uint32_t trans_tab_offset; + /* Size of hashing table. */ + uint32_t hash_tab_size; + /* Offset of first hashing entry. */ + uint32_t hash_tab_offset; +}; + + +struct string_desc +{ + /* Length of addressed string. */ + uint32_t length; + /* Offset of string in file. */ + uint32_t offset; +}; + + +struct overflow_space_s +{ + struct overflow_space_s *next; + uint32_t idx; + uint32_t length; + char d[1]; +}; + +struct loaded_domain +{ + char *data; + char *data_native; /* Data mapped to the native version of the + string. (Allocated along with DATA). */ + int must_swap; + uint16_t nstrings; /* Number of strings. */ + uint16_t *mapped; /* Array of mapping indicators: + 0 := Not mapped (original utf8). + 1 := Mapped to native encoding in overflow space. + >=2 := Mapped to native encoding. The value + gives the length of the mapped string. + Because the terminating nul is included + in the length and an empty string is + not allowed, values are always > 1. */ + struct overflow_space_s *overflow_space; + struct string_desc *orig_tab; + struct string_desc *trans_tab; + uint32_t hash_size; + uint32_t *hash_tab; +}; + + +/* The list of domains we we are aware of. This list is protected by + the criticla section DOMAINLIST_ACCESS_CS. */ +static struct domainlist_s *domainlist; + +/* A critical section to guard access to the domainlist. */ +static CRITICAL_SECTION domainlist_access_cs; + +/* The name of the current domain. This is a malloced string. This + is a gobal variable which is not thread-safe. */ +static char *current_domainname; + + + +/* Constructor for this module. Called from DllMain. */ +static void module_init (void) __attribute__ ((__constructor__)); +static void +module_init (void) +{ + InitializeCriticalSection (&domainlist_access_cs); +} + + +/* Free the domain data. */ +static void +free_domain (struct loaded_domain *domain) +{ + struct overflow_space_s *os, *os2; + + jnlib_free (domain->data); + jnlib_free (domain->mapped); + for (os = domain->overflow_space; os; os = os2) + { + os2 = os->next; + jnlib_free (os); + } + jnlib_free (domain); +} + + +static struct loaded_domain * +load_domain (const char *filename) +{ + FILE *fp; + size_t size; + struct stat st; + struct mo_file_header *data = NULL; + struct loaded_domain *domain = NULL; + size_t to_read; + char *read_ptr; + + fp = fopen (filename, "rb"); + if (!fp) + { + return NULL; + } + if (fstat (fileno (fp), &st) + || (size = (size_t) st.st_size) != st.st_size + || size < sizeof (struct mo_file_header)) + { + fclose (fp); + return NULL; + } + + data = (2*size <= size)? NULL : jnlib_malloc (2*size); + if (!data) + { + fclose (fp); + return NULL; + } + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = fread (read_ptr, 1, to_read, fp); + if (nb < to_read) + { + fclose (fp); + jnlib_free (data); + return NULL; + } + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + fclose (fp); + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (data->magic != MAGIC && data->magic != MAGIC_SWAPPED) + { + /* The magic number is wrong: not a message catalog file. */ + jnlib_free (data); + return NULL; + } + + domain = jnlib_calloc (1, sizeof *domain); + if (!domain) + { + jnlib_free (data); + return NULL; + } + domain->data = (char *) data; + domain->data_native = (char *) data + size; + domain->must_swap = data->magic != MAGIC; + + /* Fill in the information about the available tables. */ + switch (SWAPIT (domain->must_swap, data->revision)) + { + case MO_REVISION_NUMBER: + { + uint32_t nstrings; + + /* Because we use 16 bit values for the mapping array, we + can't support more that 65534 strings (65535 would be okay, + but it is often used as a special value). A PO file with + that many translations is very unlikely given that GnuPG + with its very large number of strings has only about 1600 + strings + variants. */ + nstrings = SWAPIT (domain->must_swap, data->nstrings); + if (nstrings > 65534) + goto bailout; + domain->nstrings = nstrings; + domain->orig_tab = (struct string_desc *) + ((char *) data + SWAPIT (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (struct string_desc *) + ((char *) data + SWAPIT (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = SWAPIT (domain->must_swap, data->hash_tab_size); + domain->hash_tab = (uint32_t *) + ((char *) data + SWAPIT (domain->must_swap, data->hash_tab_offset)); + } + break; + + default: /* This is an invalid revision. */ + goto bailout; + } + + /* Allocate an array to keep track of code page mappings. */ + domain->mapped = jnlib_calloc (domain->nstrings, sizeof *domain->mapped); + if (domain->mapped) + return domain; /* Okay. */ + + bailout: + jnlib_free (data); + jnlib_free (domain); + return NULL; +} + + +/* Return a malloced wide char string from an UTF-8 encoded input + string STRING. Caller must free this value. On failure returns + NULL. The result of calling this function with STRING set to NULL + is not defined. */ +static wchar_t * +utf8_to_wchar (const char *string, size_t length, size_t *retlen) +{ + int n; + wchar_t *result; + size_t nbytes; + + n = MultiByteToWideChar (CP_UTF8, 0, string, length, NULL, 0); + if (n < 0 || (n+1) <= 0) + return NULL; + + nbytes = (size_t)(n+1) * sizeof(*result); + if (nbytes / sizeof(*result) != (n+1)) + { + gpg_err_set_errno (ENOMEM); + return NULL; + } + result = jnlib_malloc (nbytes); + if (!result) + return NULL; + + n = MultiByteToWideChar (CP_UTF8, 0, string, length, result, n); + if (n < 0) + { + jnlib_free (result); + return NULL; + } + *retlen = n; + return result; +} + + +/* Return a malloced string encoded in UTF-8 from the wide char input + string STRING. Caller must free this value. On failure returns + NULL. The result of calling this function with STRING set to NULL + is not defined. */ +static char * +wchar_to_native (const wchar_t *string, size_t length, size_t *retlen) +{ + int n; + char *result; + + n = WideCharToMultiByte (CP_ACP, 0, string, length, NULL, 0, NULL, NULL); + if (n < 0 || (n+1) <= 0) + return NULL; + + result = jnlib_malloc (n+1); + if (!result) + return NULL; + + n = WideCharToMultiByte (CP_ACP, 0, string, length, result, n, NULL, NULL); + if (n < 0) + { + jnlib_free (result); + return NULL; + } + *retlen = n; + return result; +} + + +/* Convert UTF8 to the native codepage. Caller must free the return value. */ +static char * +utf8_to_native (const char *string, size_t length, size_t *retlen) +{ + wchar_t *wstring; + char *result; + size_t newlen; + + wstring = utf8_to_wchar (string, length, &newlen); + if (wstring) + { + result = wchar_to_native (wstring, newlen, &newlen); + jnlib_free (wstring); + } + else + result = NULL; + *retlen = result? newlen : 0; + return result; +} + + + + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +const char * +_gpg_w32_bindtextdomain (const char *domainname, const char *dirname) +{ + const char *catval_full; + char *catval; + char *fname; + const char *retvalue; + + if (!dirname) + { + struct domainlist_s *dl; + + retvalue = NULL; + EnterCriticalSection (&domainlist_access_cs); + { + for (dl = domainlist; dl; dl = dl->next) + if (!strcmp (dl->name, domainname)) + { + retvalue = dl->dname; + break; + } + } + LeaveCriticalSection (&domainlist_access_cs); + return retvalue; + } + + /* DIRNAME is "$INSTALLDIR\share\locale". */ + + /* First find out the category value. */ + catval = NULL; + catval_full = my_nl_locale_name ("LC_MESSAGES"); + + /* Normally we would have to loop over all returned locales and + search for the right file. See gettext intl/dcigettext.c for all + the gory details. Here, we only support the basic category, and + ignore everything else. */ + if (catval_full) + { + char *p; + + catval = jnlib_malloc (strlen (catval_full) + 1); + if (catval) + { + strcpy (catval, catval_full); + p = strchr (catval, '_'); + if (p) + *p = '\0'; + } + } + if (!catval) + return NULL; + + /* Now build the filename string. The complete filename is this: + DIRNAME + \ + CATVAL + \LC_MESSAGES\ + DOMAINNAME + .mo */ + { + int len = (strlen (dirname) + 1 + strlen (catval) + 13 + + strlen (domainname) + 3 + 1); + char *p; + + fname = jnlib_malloc (len); + if (!fname) + { + jnlib_free (catval); + return NULL; + } + + p = fname; + strcpy (p, dirname); + p += strlen (dirname); + *(p++) = '\\'; + strcpy (p, catval); + p += strlen (catval); + strcpy (p, "\\LC_MESSAGES\\"); + p += 13; + strcpy (p, domainname); + p += strlen (domainname); + strcpy (p, ".mo"); + } + + jnlib_free (catval); + + /* Store the domain information in the domainlist. */ + { + struct domainlist_s *item, *dl; + char *rel_ptr1 = NULL; + char *rel_ptr2 = NULL; + + item = jnlib_calloc (1, sizeof *dl + strlen (domainname)); + if (!item) + { + jnlib_free (fname); + return NULL; + } + strcpy (item->name, domainname); + item->dname = jnlib_malloc (strlen (dirname) +1); + if(!item->dname) + { + jnlib_free (item); + jnlib_free (fname); + return NULL; + } + strcpy (item->dname, dirname); + retvalue = item->dname; + + EnterCriticalSection (&domainlist_access_cs); + { + for (dl = domainlist; dl; dl = dl->next) + if (!strcmp (dl->name, domainname)) + break; + if (!dl) /* First time called for this domainname. */ + { + item->fname = fname; + fname = NULL; + item->next = domainlist; + domainlist = item; + item = NULL; + } + else /* Update only. */ + { + rel_ptr1 = dl->fname; + dl->fname = fname; + fname = NULL; + rel_ptr2 = dl->dname; + dl->dname = item->dname; + item->dname = NULL; + } + } + LeaveCriticalSection (&domainlist_access_cs); + + jnlib_free (item); + jnlib_free (rel_ptr1); + jnlib_free (rel_ptr2); + } + + return retvalue; +} + + + + +static const char * +get_plural (const char *data, size_t datalen, unsigned long nplural) +{ + const char *p; + int idx; + + /* We only support the Germanic rule. */ + idx = (nplural == 1? 0 : 1); + + for (; idx; idx--) + { + p = strchr (data, 0) + 1; + if (p >= data+datalen) + return "ERROR in GETTEXT (bad plural entry)"; + datalen -= (p-data); + data = p; + } + return data; +} + + +static const char* +get_string (struct loaded_domain *domain, uint32_t idx, + int use_plural, unsigned long nplural) +{ + struct tls_space_s *tls = get_tls (); + struct overflow_space_s *os; + const char *trans; /* Pointer to the translated entry. */ + size_t translen; /* Length of that entry. */ + + if (idx > 65534) + return "ERROR in GETTEXT (too many strings)"; + + if (tls->gt_use_utf8) + { + trans = (domain->data + + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); + translen = SWAPIT(domain->must_swap, domain->trans_tab[idx].length); + } + else if (!domain->mapped[idx]) + { + /* Not yet mapped. Map from utf-8 to native encoding now. */ + const char *p_utf8; + size_t plen_utf8, buflen; + char *buf; + + p_utf8 = (domain->data + + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); + plen_utf8 = SWAPIT(domain->must_swap, domain->trans_tab[idx].length); + + buf = utf8_to_native (p_utf8, plen_utf8, &buflen); + if (!buf) + { + trans = "ERROR in GETTEXT MALLOC"; + translen = 0; + } + else if (buflen <= plen_utf8 && buflen > 1) + { + /* Copy into the DATA_NATIVE area. */ + char *p_tmp; + + p_tmp = (domain->data_native + + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); + memcpy (p_tmp, buf, buflen); + domain->mapped[idx] = buflen; + trans = p_tmp; + translen = buflen; + } + else + { + /* There is not enough space for the translation (or for + whatever reason an empty string is used): Store it in the + overflow_space and mark that in the mapped array. + Because UTF-8 strings are in general shorter than the + Windows 2 byte encodings, we expect that this won't + happen too often (if at all) and thus we use a linked + list to manage this space. */ + os = jnlib_malloc (sizeof *os + buflen); + if (os) + { + os->idx = idx; + memcpy (os->d, buf, buflen); + os->length = buflen; + os->next = domain->overflow_space; + domain->overflow_space = os; + domain->mapped[idx] = 1; + trans = os->d; + translen = os->length; + } + else + { + trans = "ERROR in GETTEXT MALLOC"; + translen = 0; + } + } + jnlib_free (buf); + } + else if (domain->mapped[idx] == 1) + { + /* The translated string is in the overflow_space. */ + for (os=domain->overflow_space; os; os = os->next) + if (os->idx == idx) + break; + if (os) + { + trans = os->d; + translen = os->length; + } + else + { + trans = "ERROR in GETTEXT (overflow space)\n"; + translen = 0; + } + } + else + { + trans = (domain->data_native + + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); + translen = domain->mapped[idx]; + } + + if (use_plural && translen) + return get_plural (trans, translen, nplural); + else + return trans; +} + + +static const char * +do_gettext (const char *domainname, + const char *msgid, const char *msgid2, unsigned long nplural) +{ + struct domainlist_s *dl; + struct loaded_domain *domain; + int load_failed; + uint32_t top, bottom, nstr; + char *filename; + + if (!domainname) + domainname = current_domainname? current_domainname : ""; + + /* FIXME: The whole locking stuff is a bit questionable because + gettext does not claim to be thread-safe. We need to investigate + this further. */ + + load_failed = 0; + domain = NULL; + filename = NULL; + EnterCriticalSection (&domainlist_access_cs); + { + for (dl = domainlist; dl; dl = dl->next) + if (!strcmp (dl->name, domainname)) + { + load_failed = dl->load_failed; + domain = dl->domain; + break; + } + if (dl && !domain && !load_failed && dl->fname) + { + filename = jnlib_malloc (strlen (dl->fname) + 1); + if (filename) + strcpy (filename, dl->fname); + } + } + LeaveCriticalSection (&domainlist_access_cs); + if (!dl) + goto not_found; /* DOMAINNAME not bound. */ + if (filename) + { + /* No attempt so far to load the MO file. Try now. */ + int updated = 0; + + domain = load_domain (filename); + jnlib_free (filename); + filename = NULL; + EnterCriticalSection (&domainlist_access_cs); + { + for (dl = domainlist; dl; dl = dl->next) + if (!strcmp (dl->name, domainname)) + { + if (domain) + dl->domain = domain; + else + dl->load_failed = 1; + updated = 1; + break; + } + } + LeaveCriticalSection (&domainlist_access_cs); + if (!updated) + { + /* Ooops - lost the domain. */ + free_domain (domain); + domain = NULL; + } + } + + if (!domain) + goto not_found; /* No MO file. */ + + /* First try to use the hash table. */ + if (domain->hash_size > 2 && domain->hash_tab) + { + /* Use the hashing table. */ + uint32_t len = strlen (msgid); + uint32_t hash_val = hash_string (msgid); + uint32_t idx = hash_val % domain->hash_size; + uint32_t incr = 1 + (hash_val % (domain->hash_size - 2)); + + while ( (nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx])) ) + { + nstr--; + if (nstr < domain->nstrings + && SWAPIT(domain->must_swap, + domain->orig_tab[nstr].length) >= len + && !strcmp (msgid, (domain->data + + SWAPIT(domain->must_swap, + domain->orig_tab[nstr].offset)))) + { + return get_string (domain, nstr, !!msgid2, nplural); + } + + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + } + } + + /* Now we try the default method: binary search in the sorted array + of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + nstr = (bottom + top) / 2; + cmp_val = strcmp (msgid, (domain->data + + SWAPIT(domain->must_swap, + domain->orig_tab[nstr].offset))); + if (cmp_val < 0) + top = nstr; + else if (cmp_val > 0) + bottom = nstr + 1; + else + { + return get_string (domain, nstr, !!msgid2, nplural); + } + } + + not_found: + /* We use the standard Germanic rule if plural has been requested. */ + return msgid2? (nplural == 1? msgid : msgid2) : msgid; +} + + +const char * +_gpg_w32_textdomain (const char *domainname) +{ + char *string; + + if (!domainname) + { + if (!current_domainname) + gpg_err_set_errno (0); + } + else + { + string = malloc (strlen (domainname) + 1); + if (!string) + return NULL; + strcpy (string, domainname); + current_domainname = string; + } + return current_domainname; +} + + +/* A direct implementation of gettext instead of a macro calling + dngettext. This is so that the caller does not need to push dummy + values on the stack. The used domain is the first one registered + with bindtextdomain. */ +const char * +_gpg_w32_gettext (const char *msgid) +{ + return do_gettext (NULL, msgid, NULL, 0); +} + + +/* A direct implementation of dgettext instead of a macro calling + dngettext. This is so that the caller does not need to push dummy + values on the stack. */ +const char * +_gpg_w32_dgettext (const char *domainname, const char *msgid) +{ + return do_gettext (domainname, msgid, NULL, 0); +} + + +/* Our implementation of dngettext. This is the most genereic + function we have; a macro implements ngettext. */ +const char * +_gpg_w32_dngettext (const char *domainname, const char *msgid1, + const char *msgid2, unsigned long int n) +{ + /* We use the simple Germanic plural rule. */ + return do_gettext (domainname, msgid1, msgid2, n); +} + + +/* Return the locale name as used by gettext. The return value will + never be NULL. */ +const char * +_gpg_w32_gettext_localename (void) +{ + const char *s; + + s = my_nl_locale_name ("LC_MESSAGES"); + return s? s:""; +} + + +/* With a VALUE of 1 switch the gettext functions into utf8 mode. + That is the strings are returned without translation to the native + charset. A VALUE of 0 switches back to translated strings. A VALUE + of -1 returns the current value. */ +int +_gpg_w32_gettext_use_utf8 (int value) +{ + struct tls_space_s *tls = get_tls (); + int last = tls->gt_use_utf8; + if (value != -1) + tls->gt_use_utf8 = value; + return last; +} + + +#ifdef TEST +int +main (int argc, char **argv) +{ + const char atext1[] = + "Warning: You have entered an insecure passphrase.%%0A" + "A passphrase should be at least %u character long."; + const char atext2[] = + "Warning: You have entered an insecure passphrase.%%0A" + "A passphrase should be at least %u characters long."; + + if (argc) + { + argc--; + argv++; + } + + _gpg_err_w32_bindtextdomain ("gnupg2", "c:/programme/gnu/gnupg/share/locale"); + + printf ("locale is `%s'\n", _gpg_err_w32_gettext_localename ()); + fputs ("text with N=1:\n", stdout); + fputs (_gpg_err_w32_ngettext (atext1, atext2, 1), stdout); + fputs ("\n\ntext with N=2:\n", stdout); + fputs (_gpg_err_w32_ngettext (atext1, atext2, 2), stdout); + fputs ("\nready\n", stdout); + + return 0; +} +/* + * Local Variables: + * compile-command: "i586-mingw32msvc-gcc -DTEST -Wall -g w32-gettext.c" + * End: + */ +#endif /*TEST*/ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32ce-add.h b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32ce-add.h new file mode 100644 index 0000000000..83b75386f0 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/libgpg-error-1.9/w32ce-add.h @@ -0,0 +1,7 @@ +## w32ce-add.h - Snippet to be be included into gpg-error.h. +## (Comments are indicated by a double hash mark) + +/* Substitute for strerror - this one is thread safe. */ +char *_gpg_w32ce_strerror (int err); +#define strerror(a) _gpg_w32ce_strerror (a) + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/m4/ChangeLog b/plugins/MirOTR/libgcrypt-1.4.6/m4/ChangeLog deleted file mode 100644 index fc1433b00e..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/m4/ChangeLog +++ /dev/null @@ -1,35 +0,0 @@ -2009-01-22 Werner Koch <wk@g10code.com> - - * noexecstack.m4: Replace non portable grep -q. Reported by - Albert Chin. - -2007-02-22 Werner Koch <wk@g10code.com> - - * noexecstack.m4: Change default to enable it. - -2007-02-20 Werner Koch <wk@g10code.com> - - * Makefile.am: New. - - * noexecstack.m4: New. Taken from gnupg 1.4 - -2006-10-11 Marcus Brinkmann <marcus@g10code.de> - - * fallback.m4: Removed again. - -2006-10-10 Marcus Brinkmann <marcus@g10code.de> - - * fallback.m4: New file from Pth. - -2006-07-04 Marcus Brinkmann <marcus@g10code.de> - - * sys_socket_h.m4, socklen.m4, onceonly.m4: New files from gnulib. - -2004-04-06 Werner Koch <wk@gnupg.org> - - * libtool.m4: Updated from 1.5.4 - -2003-12-08 Werner Koch <wk@gnupg.org> - - * libtool.m4: New. - diff --git a/plugins/MirOTR/libgcrypt-1.4.6/m4/libtool.m4 b/plugins/MirOTR/libgcrypt-1.4.6/m4/libtool.m4 deleted file mode 100644 index e4055a099c..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/m4/libtool.m4 +++ /dev/null @@ -1,5939 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -## Copyright 1996, 1997, 1998, 1999, 2000, 2001 -## Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -# serial 47 AC_PROG_LIBTOOL -# Debian $Rev: 961 $ - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] - -# Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except M$VC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" - ;; - *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<EOF -[$]* -EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# -------------------- -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ------------------------------------------------------------------ -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_unknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s out/conftest.err; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi4*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=yes - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && test "X$CXX" != "Xno"; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 dll's -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -#- set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognise shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognise a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break - ;; - *) - test "$with_gnu_ld" != yes && break - ;; - esac - fi - done - IFS="$lt_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$lt_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -])# AC_PROG_LD - - -# AC_PROG_LD_GNU -# -------------- -AC_DEFUN([AC_PROG_LD_GNU], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac]) -with_gnu_ld=$lt_cv_prog_gnu_ld -])# AC_PROG_LD_GNU - - -# AC_PROG_LD_RELOAD_FLAG -# ---------------------- -# find reload flag for linker -# -- PORTME Some linkers may need a different reload flag. -AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], -[AC_CACHE_CHECK([for $LD option to reload object files], - lt_cv_ld_reload_flag, - [lt_cv_ld_reload_flag='-r']) -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -])# AC_PROG_LD_RELOAD_FLAG - - -# AC_DEPLIBS_CHECK_METHOD -# ----------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi4*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | kfreebsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' - else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/${ac_tool_prefix}nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - esac - fi - done - IFS="$lt_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will -# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided and an installed libltdl is not found, it is -# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single -# quotes!). If your package is not flat and you're not using automake, -# define top_builddir and top_srcdir appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# -------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' - -_LT_AC_SYS_COMPILER - -# -# Check for any special shared library compilation flags. -# -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' - ;; - esac -fi -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then - AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) - if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : - else - AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) - _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) - -# Report which librarie types wil actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - darwin* | rhapsody*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac - fi - ;; - esac - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cc - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - darwin* | rhapsody*) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac - fi - ;; - esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - dgux*) - case $cc_basename in - ec++) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | kfreebsd*-gnu) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - irix5* | irix6*) - case $cc_basename in - CC) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc) - # Intel C++ - with_gnu_ld=yes - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - cxx) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - osf3*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sco*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - tandem*) - case $cc_basename in - NCC) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext <<EOF -int a; -void foo (void) { a = 0; } -EOF -],[$1],[CXX],[cat > conftest.$ac_ext <<EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -EOF -],[$1],[F77],[cat > conftest.$ac_ext <<EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -EOF -],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" - - for p in `eval $output_verbose_link_cmd`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then - _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then - _LT_AC_TAGVAR(predep_objects, $1)="$p" - else - _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then - _LT_AC_TAGVAR(postdep_objects, $1)="$p" - else - _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$rm -f confest.$objext - -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" - -# Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` - -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP - - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# -------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris* | sysv5*) - symcode='[[BDRT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat <<EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <<EOF >> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - cxx) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | knetbsd*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - sco*) - case $cc_basename in - CC) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - *) - ;; - esac - ;; - solaris*) - case $cc_basename in - CC) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - unixware*) - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux*) - case $CC in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case "$host_os" in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux*) - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs=no - fi - ;; - - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi4*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - if test "$GXX" = yes ; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac - fi - ;; - esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - sco3.2v5*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4.2uw2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv5*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include <windows.h> -# #undef WIN32_LEAN_AND_MEAN -# #include <stdio.h> -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include <cygwin/cygwin_dll.h> -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -SED=$lt_cv_path_SED -]) -AC_MSG_RESULT([$SED]) -]) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/m4/noexecstack.m4 b/plugins/MirOTR/libgcrypt-1.4.6/m4/noexecstack.m4 deleted file mode 100644 index 4aab484fd9..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/m4/noexecstack.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# noexecstack.m4 -dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -dnl Checks whether the stack can be marked nonexecutable by passing an -dnl option to the C-compiler when acting on .s files. Returns that -dnl option in NOEXECSTACK_FLAGS. -dnl This macro is adapted from one found in GLIBC-2.3.5. -AC_DEFUN([CL_AS_NOEXECSTACK],[ -AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AM_PROG_AS]) - -AC_MSG_CHECKING([whether non excutable stack support is requested]) -AC_ARG_ENABLE(noexecstack, - AC_HELP_STRING([--disable-noexecstack], - [disable non executable stack support]), - noexecstack_support=$enableval, noexecstack_support=yes) -AC_MSG_RESULT($noexecstack_support) - -AC_CACHE_CHECK([whether assembler supports --noexecstack option], -cl_cv_as_noexecstack, [dnl - cat > conftest.c <<EOF -void foo() {} -EOF - if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS - -S -o conftest.s conftest.c >/dev/null]) \ - && grep .note.GNU-stack conftest.s >/dev/null \ - && AC_TRY_COMMAND([${CCAS} $CCASFLAGS $CPPFLAGS -Wa,--noexecstack - -c -o conftest.o conftest.s >/dev/null]) - then - cl_cv_as_noexecstack=yes - else - cl_cv_as_noexecstack=no - fi - rm -f conftest*]) - if test "$noexecstack_support" = yes -a "$cl_cv_as_noexecstack" = yes; then - NOEXECSTACK_FLAGS="-Wa,--noexecstack" - else - NOEXECSTACK_FLAGS= - fi - AC_SUBST(NOEXECSTACK_FLAGS) -]) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/m4/onceonly.m4 b/plugins/MirOTR/libgcrypt-1.4.6/m4/onceonly.m4 deleted file mode 100644 index 6d913fafd7..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/m4/onceonly.m4 +++ /dev/null @@ -1,66 +0,0 @@ -# onceonly.m4 serial 4 (gettext-0.15) -dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This file defines some "once only" variants of standard autoconf macros. -dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS -dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS -dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS -dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC -dnl The advantage is that the check for each of the headers/functions/decls -dnl will be put only once into the 'configure' file. It keeps the size of -dnl the 'configure' file down, and avoids redundant output when 'configure' -dnl is run. -dnl The drawback is that the checks cannot be conditionalized. If you write -dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi -dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to -dnl empty, and the check will be inserted before the body of the AC_DEFUNed -dnl function. - -dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf -dnl have this macro built-in. But about AC_CHECK_DECLS_ONCE: note that in -dnl autoconf >= 2.60 the symbol separator is a comma, whereas here it is -dnl whitespace. - -dnl Autoconf version 2.57 or newer is recommended. -AC_PREREQ(2.54) - -# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of -# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). -AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ - : - AC_FOREACH([gl_HEADER_NAME], [$1], [ - AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]), - [-./], [___])), [ - AC_CHECK_HEADERS(gl_HEADER_NAME) - ]) - AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, - [-./], [___]))) - ]) -]) - -# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of -# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). -AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ - : - AC_FOREACH([gl_FUNC_NAME], [$1], [ - AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ - AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME])) - ]) - AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) - ]) -]) - -# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of -# AC_CHECK_DECLS(DECL1, DECL2, ...). -AC_DEFUN([AC_CHECK_DECLS_ONCE], [ - : - AC_FOREACH([gl_DECL_NAME], [$1], [ - AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ - AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) - ]) - AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) - ]) -]) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/m4/socklen.m4 b/plugins/MirOTR/libgcrypt-1.4.6/m4/socklen.m4 deleted file mode 100644 index 5e3765a64b..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/m4/socklen.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# socklen.m4 serial 4 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Albert Chin, Windows fixes from Simon Josefsson. - -dnl Check for socklen_t: historically on BSD it is an int, and in -dnl POSIX 1g it is a type of its own, but some platforms use different -dnl types for the argument to getsockopt, getpeername, etc. So we -dnl have to test to find something that will work. - -dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find -dnl it there first. That file is included by gnulib's socket_.h, which -dnl all users of this module should include. Cygwin must not include -dnl ws2tcpip.h. -AC_DEFUN([gl_TYPE_SOCKLEN_T], - [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl - AC_CHECK_TYPE([socklen_t], , - [AC_MSG_CHECKING([for socklen_t equivalent]) - AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv], - [# Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - gl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t "unsigned int" "long int" "unsigned long int"; do - AC_TRY_COMPILE( - [#include <sys/types.h> - #include <sys/socket.h> - - int getpeername (int, $arg2 *, $t *);], - [$t len; - getpeername (0, 0, &len);], - [gl_cv_socklen_t_equiv="$t"]) - test "$gl_cv_socklen_t_equiv" != "" && break - done - test "$gl_cv_socklen_t_equiv" != "" && break - done - ]) - if test "$gl_cv_socklen_t_equiv" = ""; then - AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) - fi - AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) - AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], - [type to use in place of socklen_t if not defined])], - [#include <sys/types.h> - #if HAVE_SYS_SOCKET_H - # include <sys/socket.h> - #elif HAVE_WS2TCPIP_H - # include <ws2tcpip.h> - #endif])]) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/m4/sys_socket_h.m4 b/plugins/MirOTR/libgcrypt-1.4.6/m4/sys_socket_h.m4 deleted file mode 100644 index d3e45b48c1..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/m4/sys_socket_h.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# sys_socket_h.m4 serial 2 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson. - -AC_DEFUN([gl_HEADER_SYS_SOCKET], -[ - AC_CHECK_HEADERS_ONCE([sys/socket.h]) - if test $ac_cv_header_sys_socket_h = yes; then - SYS_SOCKET_H='' - else - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([winsock2.h ws2tcpip.h]) - SYS_SOCKET_H='sys/socket.h' - fi - AC_SUBST(SYS_SOCKET_H) -]) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/Makefile.am b/plugins/MirOTR/libgcrypt-1.4.6/mpi/Makefile.am new file mode 100644 index 0000000000..edfc5dfd1a --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/Makefile.am @@ -0,0 +1,177 @@ +## Process this file with automake to produce Makefile.in +# Copyright (C) 1992, 1999, 2000, 2002 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +# 1.5 leads to a combinatorial explosion due to all the conditionals +# I was not able to build it with 64Megs - 1.6 fixes this. +# not anymore required: AUTOMAKE_OPTIONS = 1.6 + +# Need to include ../src in addition to top_srcdir because gcrypt.h is +# a built header. +AM_CPPFLAGS = -I../src -I$(top_srcdir)/src +AM_CFLAGS = $(GPG_ERROR_CFLAGS) + +AM_ASFLAGS = $(MPI_SFLAGS) +AM_CCASFLAGS = $(NOEXECSTACK_FLAGS) + +EXTRA_DIST = Manifest config.links +DISTCLEANFILES = mpi-asm-defs.h \ + mpih-add1-asm.S mpih-mul1-asm.S mpih-mul2-asm.S mpih-mul3-asm.S \ + mpih-lshift-asm.S mpih-rshift-asm.S mpih-sub1-asm.S asm-syntax.h \ + mpih-add1.c mpih-mul1.c mpih-mul2.c mpih-mul3.c \ + mpih-lshift.c mpih-rshift.c mpih-sub1.c \ + sysdep.h mod-source-info.h + +# Beware: The following list is not a comment but grepped by +# config.links to get the list of symlinked modules +# Optional modules are marked with an O in the second column. +#BEGIN_ASM_LIST +# mpih-add1 C +# mpih-sub1 C +# mpih-mul1 C +# mpih-mul2 C +# mpih-mul3 C +# mpih-lshift C +# mpih-rshift C +# udiv O +# udiv-qrnnd O +#END_ASM_LIST + +# Note: This function has not yet been implemented. There is only a dummy in +# generic/ +# udiv-w-sdiv O + +# And we need to have conditionals for all modules because +# we don't know whether they are .c or .S. Very ugly; I know. +# Remember to define them all in configure.ac +if MPI_MOD_ASM_MPIH_ADD1 +mpih_add1 = mpih-add1-asm.S +else +if MPI_MOD_C_MPIH_ADD1 +mpih_add1 = mpih-add1.c +else +mpih_add1 = +endif +endif + +if MPI_MOD_ASM_MPIH_SUB1 +mpih_sub1 = mpih-sub1-asm.S +else +if MPI_MOD_C_MPIH_SUB1 +mpih_sub1 = mpih-sub1.c +else +mpih_sub1 = +endif +endif + +if MPI_MOD_ASM_MPIH_MUL1 +mpih_mul1 = mpih-mul1-asm.S +else +if MPI_MOD_C_MPIH_MUL1 +mpih_mul1 = mpih-mul1.c +else +mpih_mul1 = +endif +endif + +if MPI_MOD_ASM_MPIH_MUL2 +mpih_mul2 = mpih-mul2-asm.S +else +if MPI_MOD_C_MPIH_MUL2 +mpih_mul2 = mpih-mul2.c +else +mpih_mul2 = +endif +endif + +if MPI_MOD_ASM_MPIH_MUL3 +mpih_mul3 = mpih-mul3-asm.S +else +if MPI_MOD_C_MPIH_MUL3 +mpih_mul3 = mpih-mul3.c +else +mpih_mul3 = +endif +endif + +if MPI_MOD_ASM_MPIH_LSHIFT +mpih_lshift = mpih-lshift-asm.S +else +if MPI_MOD_C_MPIH_LSHIFT +mpih_lshift = mpih-lshift.c +else +mpih_lshift = +endif +endif + +if MPI_MOD_ASM_MPIH_RSHIFT +mpih_rshift = mpih-rshift-asm.S +else +if MPI_MOD_C_MPIH_RSHIFT +mpih_rshift = mpih-rshift.c +else +mpih_rshift = +endif +endif + +if MPI_MOD_ASM_UDIV +udiv = udiv-asm.S +else +if MPI_MOD_C_UDIV +udiv = udiv.c +else +udiv = +endif +endif + +if MPI_MOD_ASM_UDIV_QRNND +udiv_qrnnd = udiv-qrnnd-asm.S +else +if MPI_MOD_C_UDIV_QRNND +udiv_qrnnd = udiv-qrnnd.c +else +udiv_qrnnd = +endif +endif + +noinst_LTLIBRARIES = libmpi.la + +libmpi_la_LDFLAGS = +nodist_libmpi_la_SOURCES = $(mpih_add1) $(mpih_sub1) $(mpih_mul1) \ + $(mpih_mul2) $(mpih_mul3) $(mpih_lshift) $(mpih_rshift) \ + $(udiv) $(udiv_qrnnd) +libmpi_la_SOURCES = longlong.h \ + mpi-add.c \ + mpi-bit.c \ + mpi-cmp.c \ + mpi-div.c \ + mpi-gcd.c \ + mpi-internal.h \ + mpi-inline.h \ + mpi-inline.c \ + mpi-inv.c \ + mpi-mul.c \ + mpi-mod.c \ + mpi-pow.c \ + mpi-mpow.c \ + mpi-scan.c \ + mpicoder.c \ + mpih-div.c \ + mpih-mul.c \ + mpiutil.c \ + ec.c diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/Makefile.in b/plugins/MirOTR/libgcrypt-1.4.6/mpi/Makefile.in new file mode 100644 index 0000000000..d804aea85b --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/Makefile.in @@ -0,0 +1,672 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 1992, 1999, 2000, 2002 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +# 1.5 leads to a combinatorial explosion due to all the conditionals +# I was not able to build it with 64Megs - 1.6 fixes this. +# not anymore required: AUTOMAKE_OPTIONS = 1.6 + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = mpi +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \ + $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libmpi_la_LIBADD = +am_libmpi_la_OBJECTS = mpi-add.lo mpi-bit.lo mpi-cmp.lo mpi-div.lo \ + mpi-gcd.lo mpi-inline.lo mpi-inv.lo mpi-mul.lo mpi-mod.lo \ + mpi-pow.lo mpi-mpow.lo mpi-scan.lo mpicoder.lo mpih-div.lo \ + mpih-mul.lo mpiutil.lo ec.lo +@MPI_MOD_ASM_MPIH_ADD1_FALSE@@MPI_MOD_C_MPIH_ADD1_TRUE@am__objects_1 = mpih-add1.lo +@MPI_MOD_ASM_MPIH_ADD1_TRUE@am__objects_1 = mpih-add1-asm.lo +@MPI_MOD_ASM_MPIH_SUB1_FALSE@@MPI_MOD_C_MPIH_SUB1_TRUE@am__objects_2 = mpih-sub1.lo +@MPI_MOD_ASM_MPIH_SUB1_TRUE@am__objects_2 = mpih-sub1-asm.lo +@MPI_MOD_ASM_MPIH_MUL1_FALSE@@MPI_MOD_C_MPIH_MUL1_TRUE@am__objects_3 = mpih-mul1.lo +@MPI_MOD_ASM_MPIH_MUL1_TRUE@am__objects_3 = mpih-mul1-asm.lo +@MPI_MOD_ASM_MPIH_MUL2_FALSE@@MPI_MOD_C_MPIH_MUL2_TRUE@am__objects_4 = mpih-mul2.lo +@MPI_MOD_ASM_MPIH_MUL2_TRUE@am__objects_4 = mpih-mul2-asm.lo +@MPI_MOD_ASM_MPIH_MUL3_FALSE@@MPI_MOD_C_MPIH_MUL3_TRUE@am__objects_5 = mpih-mul3.lo +@MPI_MOD_ASM_MPIH_MUL3_TRUE@am__objects_5 = mpih-mul3-asm.lo +@MPI_MOD_ASM_MPIH_LSHIFT_FALSE@@MPI_MOD_C_MPIH_LSHIFT_TRUE@am__objects_6 = mpih-lshift.lo +@MPI_MOD_ASM_MPIH_LSHIFT_TRUE@am__objects_6 = mpih-lshift-asm.lo +@MPI_MOD_ASM_MPIH_RSHIFT_FALSE@@MPI_MOD_C_MPIH_RSHIFT_TRUE@am__objects_7 = mpih-rshift.lo +@MPI_MOD_ASM_MPIH_RSHIFT_TRUE@am__objects_7 = mpih-rshift-asm.lo +@MPI_MOD_ASM_UDIV_FALSE@@MPI_MOD_C_UDIV_TRUE@am__objects_8 = udiv.lo +@MPI_MOD_ASM_UDIV_TRUE@am__objects_8 = udiv-asm.lo +@MPI_MOD_ASM_UDIV_QRNND_FALSE@@MPI_MOD_C_UDIV_QRNND_TRUE@am__objects_9 = udiv-qrnnd.lo +@MPI_MOD_ASM_UDIV_QRNND_TRUE@am__objects_9 = udiv-qrnnd-asm.lo +nodist_libmpi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) \ + $(am__objects_6) $(am__objects_7) $(am__objects_8) \ + $(am__objects_9) +libmpi_la_OBJECTS = $(am_libmpi_la_OBJECTS) \ + $(nodist_libmpi_la_OBJECTS) +libmpi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libmpi_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libmpi_la_SOURCES) $(nodist_libmpi_la_SOURCES) +DIST_SOURCES = $(libmpi_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@ +FFLAGS = @FFLAGS@ +GCRYPT_CIPHERS = @GCRYPT_CIPHERS@ +GCRYPT_DIGESTS = @GCRYPT_DIGESTS@ +GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@ +GCRYPT_RANDOM = @GCRYPT_RANDOM@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@ +LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@ +LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@ +LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@ +LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@ +LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@ +LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@ +LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@ +LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@ +LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_SFLAGS = @MPI_SFLAGS@ +NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@ +OBJDUMP = @OBJDUMP@ +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@ +PTH_CFLAGS = @PTH_CFLAGS@ +PTH_CONFIG = @PTH_CONFIG@ +PTH_LIBS = @PTH_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +VERSION = @VERSION@ +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@ +ac_ct_F77 = @ac_ct_F77@ +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@ +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@ + +# Need to include ../src in addition to top_srcdir because gcrypt.h is +# a built header. +AM_CPPFLAGS = -I../src -I$(top_srcdir)/src +AM_CFLAGS = $(GPG_ERROR_CFLAGS) +AM_ASFLAGS = $(MPI_SFLAGS) +AM_CCASFLAGS = $(NOEXECSTACK_FLAGS) +EXTRA_DIST = Manifest config.links +DISTCLEANFILES = mpi-asm-defs.h \ + mpih-add1-asm.S mpih-mul1-asm.S mpih-mul2-asm.S mpih-mul3-asm.S \ + mpih-lshift-asm.S mpih-rshift-asm.S mpih-sub1-asm.S asm-syntax.h \ + mpih-add1.c mpih-mul1.c mpih-mul2.c mpih-mul3.c \ + mpih-lshift.c mpih-rshift.c mpih-sub1.c \ + sysdep.h mod-source-info.h + +@MPI_MOD_ASM_MPIH_ADD1_FALSE@@MPI_MOD_C_MPIH_ADD1_FALSE@mpih_add1 = +@MPI_MOD_ASM_MPIH_ADD1_FALSE@@MPI_MOD_C_MPIH_ADD1_TRUE@mpih_add1 = mpih-add1.c + +# Beware: The following list is not a comment but grepped by +# config.links to get the list of symlinked modules +# Optional modules are marked with an O in the second column. +#BEGIN_ASM_LIST +# mpih-add1 C +# mpih-sub1 C +# mpih-mul1 C +# mpih-mul2 C +# mpih-mul3 C +# mpih-lshift C +# mpih-rshift C +# udiv O +# udiv-qrnnd O +#END_ASM_LIST + +# Note: This function has not yet been implemented. There is only a dummy in +# generic/ +# udiv-w-sdiv O + +# And we need to have conditionals for all modules because +# we don't know whether they are .c or .S. Very ugly; I know. +# Remember to define them all in configure.ac +@MPI_MOD_ASM_MPIH_ADD1_TRUE@mpih_add1 = mpih-add1-asm.S +@MPI_MOD_ASM_MPIH_SUB1_FALSE@@MPI_MOD_C_MPIH_SUB1_FALSE@mpih_sub1 = +@MPI_MOD_ASM_MPIH_SUB1_FALSE@@MPI_MOD_C_MPIH_SUB1_TRUE@mpih_sub1 = mpih-sub1.c +@MPI_MOD_ASM_MPIH_SUB1_TRUE@mpih_sub1 = mpih-sub1-asm.S +@MPI_MOD_ASM_MPIH_MUL1_FALSE@@MPI_MOD_C_MPIH_MUL1_FALSE@mpih_mul1 = +@MPI_MOD_ASM_MPIH_MUL1_FALSE@@MPI_MOD_C_MPIH_MUL1_TRUE@mpih_mul1 = mpih-mul1.c +@MPI_MOD_ASM_MPIH_MUL1_TRUE@mpih_mul1 = mpih-mul1-asm.S +@MPI_MOD_ASM_MPIH_MUL2_FALSE@@MPI_MOD_C_MPIH_MUL2_FALSE@mpih_mul2 = +@MPI_MOD_ASM_MPIH_MUL2_FALSE@@MPI_MOD_C_MPIH_MUL2_TRUE@mpih_mul2 = mpih-mul2.c +@MPI_MOD_ASM_MPIH_MUL2_TRUE@mpih_mul2 = mpih-mul2-asm.S +@MPI_MOD_ASM_MPIH_MUL3_FALSE@@MPI_MOD_C_MPIH_MUL3_FALSE@mpih_mul3 = +@MPI_MOD_ASM_MPIH_MUL3_FALSE@@MPI_MOD_C_MPIH_MUL3_TRUE@mpih_mul3 = mpih-mul3.c +@MPI_MOD_ASM_MPIH_MUL3_TRUE@mpih_mul3 = mpih-mul3-asm.S +@MPI_MOD_ASM_MPIH_LSHIFT_FALSE@@MPI_MOD_C_MPIH_LSHIFT_FALSE@mpih_lshift = +@MPI_MOD_ASM_MPIH_LSHIFT_FALSE@@MPI_MOD_C_MPIH_LSHIFT_TRUE@mpih_lshift = mpih-lshift.c +@MPI_MOD_ASM_MPIH_LSHIFT_TRUE@mpih_lshift = mpih-lshift-asm.S +@MPI_MOD_ASM_MPIH_RSHIFT_FALSE@@MPI_MOD_C_MPIH_RSHIFT_FALSE@mpih_rshift = +@MPI_MOD_ASM_MPIH_RSHIFT_FALSE@@MPI_MOD_C_MPIH_RSHIFT_TRUE@mpih_rshift = mpih-rshift.c +@MPI_MOD_ASM_MPIH_RSHIFT_TRUE@mpih_rshift = mpih-rshift-asm.S +@MPI_MOD_ASM_UDIV_FALSE@@MPI_MOD_C_UDIV_FALSE@udiv = +@MPI_MOD_ASM_UDIV_FALSE@@MPI_MOD_C_UDIV_TRUE@udiv = udiv.c +@MPI_MOD_ASM_UDIV_TRUE@udiv = udiv-asm.S +@MPI_MOD_ASM_UDIV_QRNND_FALSE@@MPI_MOD_C_UDIV_QRNND_FALSE@udiv_qrnnd = +@MPI_MOD_ASM_UDIV_QRNND_FALSE@@MPI_MOD_C_UDIV_QRNND_TRUE@udiv_qrnnd = udiv-qrnnd.c +@MPI_MOD_ASM_UDIV_QRNND_TRUE@udiv_qrnnd = udiv-qrnnd-asm.S +noinst_LTLIBRARIES = libmpi.la +libmpi_la_LDFLAGS = +nodist_libmpi_la_SOURCES = $(mpih_add1) $(mpih_sub1) $(mpih_mul1) \ + $(mpih_mul2) $(mpih_mul3) $(mpih_lshift) $(mpih_rshift) \ + $(udiv) $(udiv_qrnnd) + +libmpi_la_SOURCES = longlong.h \ + mpi-add.c \ + mpi-bit.c \ + mpi-cmp.c \ + mpi-div.c \ + mpi-gcd.c \ + mpi-internal.h \ + mpi-inline.h \ + mpi-inline.c \ + mpi-inv.c \ + mpi-mul.c \ + mpi-mod.c \ + mpi-pow.c \ + mpi-mpow.c \ + mpi-scan.c \ + mpicoder.c \ + mpih-div.c \ + mpih-mul.c \ + mpiutil.c \ + ec.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .S .c .lo .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 mpi/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu mpi/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @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 + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libmpi.la: $(libmpi_la_OBJECTS) $(libmpi_la_DEPENDENCIES) + $(libmpi_la_LINK) $(libmpi_la_OBJECTS) $(libmpi_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-add.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-bit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-cmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-div.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-gcd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-inv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-mod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-mpow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-mul.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-pow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpi-scan.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpicoder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-add1-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-add1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-div.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-lshift-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-lshift.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-mul.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-mul1-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-mul1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-mul2-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-mul2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-mul3-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-mul3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-rshift-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-rshift.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-sub1-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpih-sub1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpiutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udiv-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udiv-qrnnd-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udiv-qrnnd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udiv.Plo@am__quote@ + +.S.o: +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $< + +.S.obj: +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.S.lo: +@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $< + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +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 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# 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/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-add.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-add.c index a5cbc0f0fe..ada257ae1e 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-add.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-add.c @@ -48,18 +48,18 @@ gcry_mpi_add_ui(gcry_mpi_t w, gcry_mpi_t u, unsigned long v ) /* If not space for W (and possible carry), increase space. */ wsize = usize + 1; - if ( w->alloced < wsize ) + if( w->alloced < wsize ) mpi_resize(w, wsize); /* These must be after realloc (U may be the same as W). */ up = u->d; wp = w->d; - if ( !usize ) { /* simple */ + if( !usize ) { /* simple */ wp[0] = v; wsize = v? 1:0; } - else if ( !usign ) { /* mpi is not negative */ + else if( !usign ) { /* mpi is not negative */ mpi_limb_t cy; cy = _gcry_mpih_add_1(wp, up, usize, v); wp[usize] = cy; @@ -67,7 +67,7 @@ gcry_mpi_add_ui(gcry_mpi_t w, gcry_mpi_t u, unsigned long v ) } else { /* The signs are different. Need exact comparison to determine * which operand to subtract from which. */ - if ( usize == 1 && up[0] < v ) { + if( usize == 1 && up[0] < v ) { wp[0] = v - up[0]; wsize = 1; } @@ -91,7 +91,7 @@ gcry_mpi_add(gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) mpi_size_t usize, vsize, wsize; int usign, vsign, wsign; - if ( u->nlimbs < v->nlimbs ) { /* Swap U and V. */ + if( u->nlimbs < v->nlimbs ) { /* Swap U and V. */ usize = v->nlimbs; usign = v->sign; vsize = u->nlimbs; @@ -116,31 +116,31 @@ gcry_mpi_add(gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) wp = w->d; wsign = 0; - if ( !vsize ) { /* simple */ + if( !vsize ) { /* simple */ MPN_COPY(wp, up, usize ); wsize = usize; wsign = usign; } - else if ( usign != vsign ) { /* different sign */ + else if( usign != vsign ) { /* different sign */ /* This test is right since USIZE >= VSIZE */ - if ( usize != vsize ) { + if( usize != vsize ) { _gcry_mpih_sub(wp, up, usize, vp, vsize); wsize = usize; MPN_NORMALIZE(wp, wsize); wsign = usign; } - else if ( _gcry_mpih_cmp(up, vp, usize) < 0 ) { + else if( _gcry_mpih_cmp(up, vp, usize) < 0 ) { _gcry_mpih_sub_n(wp, vp, up, usize); wsize = usize; MPN_NORMALIZE(wp, wsize); - if ( !usign ) + if( !usign ) wsign = 1; } else { _gcry_mpih_sub_n(wp, up, vp, usize); wsize = usize; MPN_NORMALIZE(wp, wsize); - if ( usign ) + if( usign ) wsign = 1; } } @@ -148,7 +148,7 @@ gcry_mpi_add(gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) mpi_limb_t cy = _gcry_mpih_add(wp, up, usize, vp, vsize); wp[usize] = cy; wsize = usize + cy; - if ( usign ) + if( usign ) wsign = 1; } @@ -174,19 +174,19 @@ gcry_mpi_sub_ui(gcry_mpi_t w, gcry_mpi_t u, unsigned long v ) /* If not space for W (and possible carry), increase space. */ wsize = usize + 1; - if ( w->alloced < wsize ) + if( w->alloced < wsize ) mpi_resize(w, wsize); /* These must be after realloc (U may be the same as W). */ up = u->d; wp = w->d; - if ( !usize ) { /* simple */ + if( !usize ) { /* simple */ wp[0] = v; wsize = v? 1:0; wsign = 1; } - else if ( usign ) { /* mpi and v are negative */ + else if( usign ) { /* mpi and v are negative */ mpi_limb_t cy; cy = _gcry_mpih_add_1(wp, up, usize, v); wp[usize] = cy; @@ -194,7 +194,7 @@ gcry_mpi_sub_ui(gcry_mpi_t w, gcry_mpi_t u, unsigned long v ) } else { /* The signs are different. Need exact comparison to determine * which operand to subtract from which. */ - if ( usize == 1 && up[0] < v ) { + if( usize == 1 && up[0] < v ) { wp[0] = v - up[0]; wsize = 1; wsign = 1; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-bit.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-bit.c index 5aeedbbf6d..32c820c291 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-bit.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-bit.c @@ -54,10 +54,10 @@ _gcry_clz_tab[] = void _gcry_mpi_normalize( gcry_mpi_t a ) { - if ( mpi_is_opaque(a) ) + if( mpi_is_opaque(a) ) return; - for ( ; a->nlimbs && !a->d[a->nlimbs-1]; a->nlimbs-- ) + for( ; a->nlimbs && !a->d[a->nlimbs-1]; a->nlimbs-- ) ; } @@ -71,14 +71,14 @@ gcry_mpi_get_nbits( gcry_mpi_t a ) { unsigned n; - if ( mpi_is_opaque(a) ) { + if( mpi_is_opaque(a) ) { return a->sign; /* which holds the number of bits */ } _gcry_mpi_normalize( a ); - if ( a->nlimbs ) { + if( a->nlimbs ) { mpi_limb_t alimb = a->d[a->nlimbs-1]; - if ( alimb ) + if( alimb ) count_leading_zeros( n, alimb ); else n = BITS_PER_MPI_LIMB; @@ -102,7 +102,7 @@ gcry_mpi_test_bit( gcry_mpi_t a, unsigned int n ) limbno = n / BITS_PER_MPI_LIMB; bitno = n % BITS_PER_MPI_LIMB; - if ( limbno >= a->nlimbs ) + if( limbno >= a->nlimbs ) return 0; /* too far left: this is a 0 */ limb = a->d[limbno]; return (limb & (A_LIMB_1 << bitno))? 1: 0; @@ -161,11 +161,11 @@ gcry_mpi_clear_highbit( gcry_mpi_t a, unsigned int n ) limbno = n / BITS_PER_MPI_LIMB; bitno = n % BITS_PER_MPI_LIMB; - if ( limbno >= a->nlimbs ) + if( limbno >= a->nlimbs ) return; /* not allocated, therefore no need to clear bits :-) */ - for ( ; bitno < BITS_PER_MPI_LIMB; bitno++ ) + for( ; bitno < BITS_PER_MPI_LIMB; bitno++ ) a->d[limbno] &= ~(A_LIMB_1 << bitno); a->nlimbs = limbno+1; } @@ -181,7 +181,7 @@ gcry_mpi_clear_bit( gcry_mpi_t a, unsigned int n ) limbno = n / BITS_PER_MPI_LIMB; bitno = n % BITS_PER_MPI_LIMB; - if ( limbno >= a->nlimbs ) + if( limbno >= a->nlimbs ) return; /* don't need to clear this bit, it's to far to left */ a->d[limbno] &= ~(A_LIMB_1 << bitno); } @@ -198,12 +198,12 @@ _gcry_mpi_rshift_limbs( gcry_mpi_t a, unsigned int count ) mpi_size_t n = a->nlimbs; unsigned int i; - if ( count >= n ) { + if( count >= n ) { a->nlimbs = 0; return; } - for ( i = 0; i < n - count; i++ ) + for( i = 0; i < n - count; i++ ) ap[i] = ap[i+count]; ap[i] = 0; a->nlimbs -= count; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-cmp.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-cmp.c index eb62885e21..9dd10830b0 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-cmp.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-cmp.c @@ -75,15 +75,15 @@ gcry_mpi_cmp (gcry_mpi_t u, gcry_mpi_t v) /* U and V are either both positive or both negative. */ - if ( usize != vsize && !u->sign && !v->sign ) + if( usize != vsize && !u->sign && !v->sign ) return usize - vsize; - if ( usize != vsize && u->sign && v->sign ) + if( usize != vsize && u->sign && v->sign ) return vsize + usize; - if ( !usize ) + if( !usize ) return 0; - if ( !(cmp = _gcry_mpih_cmp( u->d, v->d, usize )) ) + if( !(cmp = _gcry_mpih_cmp( u->d, v->d, usize )) ) return 0; - if ( (cmp < 0?1:0) == (u->sign?1:0)) + if( (cmp < 0?1:0) == (u->sign?1:0)) return 1; return -1; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-div.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-div.c index 690a7e3885..0d8a2d1688 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-div.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-div.c @@ -42,17 +42,17 @@ _gcry_mpi_fdiv_r( gcry_mpi_t rem, gcry_mpi_t dividend, gcry_mpi_t divisor ) /* We need the original value of the divisor after the remainder has been * preliminary calculated. We have to copy it to temporary space if it's * the same variable as REM. */ - if ( rem == divisor ) { + if( rem == divisor ) { temp_divisor = mpi_copy( divisor ); divisor = temp_divisor; } _gcry_mpi_tdiv_r( rem, dividend, divisor ); - if ( ((divisor_sign?1:0) ^ (dividend->sign?1:0)) && rem->nlimbs ) + if( ((divisor_sign?1:0) ^ (dividend->sign?1:0)) && rem->nlimbs ) gcry_mpi_add( rem, rem, divisor); - if ( temp_divisor ) + if( temp_divisor ) mpi_free(temp_divisor); } @@ -70,10 +70,10 @@ _gcry_mpi_fdiv_r_ui( gcry_mpi_t rem, gcry_mpi_t dividend, ulong divisor ) mpi_limb_t rlimb; rlimb = _gcry_mpih_mod_1( dividend->d, dividend->nlimbs, divisor ); - if ( rlimb && dividend->sign ) + if( rlimb && dividend->sign ) rlimb = divisor - rlimb; - if ( rem ) { + if( rem ) { rem->d[0] = rlimb; rem->nlimbs = rlimb? 1:0; } @@ -95,19 +95,19 @@ _gcry_mpi_fdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t dividend, gcry_mp int divisor_sign = divisor->sign; gcry_mpi_t temp_divisor = NULL; - if ( quot == divisor || rem == divisor ) { + if( quot == divisor || rem == divisor ) { temp_divisor = mpi_copy( divisor ); divisor = temp_divisor; } _gcry_mpi_tdiv_qr( quot, rem, dividend, divisor ); - if ( (divisor_sign ^ dividend->sign) && rem->nlimbs ) { + if( (divisor_sign ^ dividend->sign) && rem->nlimbs ) { gcry_mpi_sub_ui( quot, quot, 1 ); gcry_mpi_add( rem, rem, divisor); } - if ( temp_divisor ) + if( temp_divisor ) mpi_free(temp_divisor); } @@ -148,13 +148,13 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d mpi_resize( rem, rsize); qsize = rsize - dsize; /* qsize cannot be bigger than this. */ - if ( qsize <= 0 ) { - if ( num != rem ) { + if( qsize <= 0 ) { + if( num != rem ) { rem->nlimbs = num->nlimbs; rem->sign = num->sign; MPN_COPY(rem->d, num->d, nsize); } - if ( quot ) { + if( quot ) { /* This needs to follow the assignment to rem, in case the * numerator and quotient are the same. */ quot->nlimbs = 0; @@ -163,7 +163,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d return; } - if ( quot ) + if( quot ) mpi_resize( quot, qsize); /* Read pointers here, when reallocation is finished. */ @@ -172,9 +172,9 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d rp = rem->d; /* Optimize division by a single-limb divisor. */ - if ( dsize == 1 ) { + if( dsize == 1 ) { mpi_limb_t rlimb; - if ( quot ) { + if( quot ) { qp = quot->d; rlimb = _gcry_mpih_divmod_1( qp, np, nsize, dp[0] ); qsize -= qp[qsize - 1] == 0; @@ -191,7 +191,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d } - if ( quot ) { + if( quot ) { qp = quot->d; /* Make sure QP and NP point to different objects. Otherwise the * numerator would be gradually overwritten by the quotient limbs. */ @@ -211,7 +211,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d * shifting it NORMALIZATION_STEPS bits to the left. Also shift the * numerator the same number of steps (to keep the quotient the same!). */ - if ( normalization_steps ) { + if( normalization_steps ) { mpi_ptr_t tp; mpi_limb_t nlimb; @@ -227,7 +227,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d * significant word. Move the shifted numerator in the remainder * meanwhile. */ nlimb = _gcry_mpih_lshift(rp, np, nsize, normalization_steps); - if ( nlimb ) { + if( nlimb ) { rp[nsize] = nlimb; rsize = nsize + 1; } @@ -237,7 +237,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d else { /* The denominator is already normalized, as required. Copy it to * temporary space if it overlaps with the quotient or remainder. */ - if ( dp == rp || (quot && (dp == qp))) { + if( dp == rp || (quot && (dp == qp))) { mpi_ptr_t tp; marker_nlimbs[markidx] = dsize; @@ -248,7 +248,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d } /* Move the numerator to the remainder. */ - if ( rp != np ) + if( rp != np ) MPN_COPY(rp, np, nsize); rsize = nsize; @@ -256,7 +256,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d q_limb = _gcry_mpih_divrem( qp, 0, rp, rsize, dp, dsize ); - if ( quot ) { + if( quot ) { qsize = rsize - dsize; if(q_limb) { qp[qsize] = q_limb; @@ -270,7 +270,7 @@ _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t d rsize = dsize; MPN_NORMALIZE (rp, rsize); - if ( normalization_steps && rsize ) { + if( normalization_steps && rsize ) { _gcry_mpih_rshift(rp, rp, rsize, normalization_steps); rsize -= rp[rsize - 1] == 0?1:0; } @@ -293,7 +293,7 @@ _gcry_mpi_tdiv_q_2exp( gcry_mpi_t w, gcry_mpi_t u, unsigned int count ) usize = u->nlimbs; limb_cnt = count / BITS_PER_MPI_LIMB; wsize = usize - limb_cnt; - if ( limb_cnt >= usize ) + if( limb_cnt >= usize ) w->nlimbs = 0; else { mpi_ptr_t wp; @@ -304,7 +304,7 @@ _gcry_mpi_tdiv_q_2exp( gcry_mpi_t w, gcry_mpi_t u, unsigned int count ) up = u->d; count %= BITS_PER_MPI_LIMB; - if ( count ) { + if( count ) { _gcry_mpih_rshift( wp, up + limb_cnt, wsize, count ); wsize -= !wp[wsize - 1]; } diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inline.h b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inline.h index fb43951b1d..88d9f56c41 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inline.h +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inline.h @@ -41,20 +41,20 @@ _gcry_mpih_add_1( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, x = *s1_ptr++; s2_limb += x; *res_ptr++ = s2_limb; - if ( s2_limb < x ) { /* sum is less than the left operand: handle carry */ + if( s2_limb < x ) { /* sum is less than the left operand: handle carry */ while( --s1_size ) { x = *s1_ptr++ + 1; /* add carry */ *res_ptr++ = x; /* and store */ - if ( x ) /* not 0 (no overflow): we can stop */ + if( x ) /* not 0 (no overflow): we can stop */ goto leave; } return 1; /* return carry (size of s1 to small) */ } leave: - if ( res_ptr != s1_ptr ) { /* not the same variable */ + if( res_ptr != s1_ptr ) { /* not the same variable */ mpi_size_t i; /* copy the rest */ - for ( i=0; i < s1_size-1; i++ ) + for( i=0; i < s1_size-1; i++ ) res_ptr[i] = s1_ptr[i]; } return 0; /* no carry */ @@ -68,10 +68,10 @@ _gcry_mpih_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, { mpi_limb_t cy = 0; - if ( s2_size ) + if( s2_size ) cy = _gcry_mpih_add_n( res_ptr, s1_ptr, s2_ptr, s2_size ); - if ( s1_size - s2_size ) + if( s1_size - s2_size ) cy = _gcry_mpih_add_1( res_ptr + s2_size, s1_ptr + s2_size, s1_size - s2_size, cy); return cy; @@ -87,20 +87,20 @@ _gcry_mpih_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, x = *s1_ptr++; s2_limb = x - s2_limb; *res_ptr++ = s2_limb; - if ( s2_limb > x ) { + if( s2_limb > x ) { while( --s1_size ) { x = *s1_ptr++; *res_ptr++ = x - 1; - if ( x ) + if( x ) goto leave; } return 1; } leave: - if ( res_ptr != s1_ptr ) { + if( res_ptr != s1_ptr ) { mpi_size_t i; - for ( i=0; i < s1_size-1; i++ ) + for( i=0; i < s1_size-1; i++ ) res_ptr[i] = s1_ptr[i]; } return 0; @@ -114,10 +114,10 @@ _gcry_mpih_sub( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, { mpi_limb_t cy = 0; - if ( s2_size ) + if( s2_size ) cy = _gcry_mpih_sub_n(res_ptr, s1_ptr, s2_ptr, s2_size); - if ( s1_size - s2_size ) + if( s1_size - s2_size ) cy = _gcry_mpih_sub_1(res_ptr + s2_size, s1_ptr + s2_size, s1_size - s2_size, cy); return cy; @@ -135,10 +135,10 @@ _gcry_mpih_cmp( mpi_ptr_t op1_ptr, mpi_ptr_t op2_ptr, mpi_size_t size ) mpi_size_t i; mpi_limb_t op1_word, op2_word; - for ( i = size - 1; i >= 0 ; i--) { + for( i = size - 1; i >= 0 ; i--) { op1_word = op1_ptr[i]; op2_word = op2_ptr[i]; - if ( op1_word != op2_word ) + if( op1_word != op2_word ) goto diff; } return 0; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-internal.h b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-internal.h index c560e5691f..f9c1f9d4db 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-internal.h +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-internal.h @@ -76,7 +76,7 @@ typedef int mpi_size_t; /* (must be a signed type) */ #define MAX(h,i) ((h) > (i) ? (h) : (i)) #define RESIZE_IF_NEEDED(a,b) \ do { \ - if ( (a)->alloced < (b) ) \ + if( (a)->alloced < (b) ) \ mpi_resize((a), (b)); \ } while(0) @@ -84,21 +84,21 @@ typedef int mpi_size_t; /* (must be a signed type) */ #define MPN_COPY( d, s, n) \ do { \ mpi_size_t _i; \ - for ( _i = 0; _i < (n); _i++ ) \ + for( _i = 0; _i < (n); _i++ ) \ (d)[_i] = (s)[_i]; \ } while(0) #define MPN_COPY_INCR( d, s, n) \ do { \ mpi_size_t _i; \ - for ( _i = 0; _i < (n); _i++ ) \ + for( _i = 0; _i < (n); _i++ ) \ (d)[_i] = (d)[_i]; \ } while (0) #define MPN_COPY_DECR( d, s, n ) \ do { \ mpi_size_t _i; \ - for ( _i = (n)-1; _i >= 0; _i--) \ + for( _i = (n)-1; _i >= 0; _i--) \ (d)[_i] = (s)[_i]; \ } while(0) @@ -106,14 +106,14 @@ typedef int mpi_size_t; /* (must be a signed type) */ #define MPN_ZERO(d, n) \ do { \ int _i; \ - for ( _i = 0; _i < (n); _i++ ) \ + for( _i = 0; _i < (n); _i++ ) \ (d)[_i] = 0; \ } while (0) #define MPN_NORMALIZE(d, n) \ do { \ while( (n) > 0 ) { \ - if ( (d)[(n)-1] ) \ + if( (d)[(n)-1] ) \ break; \ (n)--; \ } \ @@ -121,8 +121,8 @@ typedef int mpi_size_t; /* (must be a signed type) */ #define MPN_NORMALIZE_NOT_ZERO(d, n) \ do { \ - for (;;) { \ - if ( (d)[(n)-1] ) \ + for(;;) { \ + if( (d)[(n)-1] ) \ break; \ (n)--; \ } \ @@ -130,7 +130,7 @@ typedef int mpi_size_t; /* (must be a signed type) */ #define MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace) \ do { \ - if ( (size) < KARATSUBA_THRESHOLD ) \ + if( (size) < KARATSUBA_THRESHOLD ) \ mul_n_basecase (prodp, up, vp, size); \ else \ mul_n (prodp, up, vp, size, tspace); \ @@ -151,15 +151,15 @@ typedef int mpi_size_t; /* (must be a signed type) */ _q += (nh); /* DI is 2**BITS_PER_MPI_LIMB too small */ \ umul_ppmm (_xh, _xl, _q, (d)); \ sub_ddmmss (_xh, _r, (nh), (nl), _xh, _xl); \ - if ( _xh ) { \ + if( _xh ) { \ sub_ddmmss (_xh, _r, _xh, _r, 0, (d)); \ _q++; \ - if ( _xh) { \ + if( _xh) { \ sub_ddmmss (_xh, _r, _xh, _r, 0, (d)); \ _q++; \ } \ } \ - if ( _r >= (d) ) { \ + if( _r >= (d) ) { \ _r -= (d); \ _q++; \ } \ diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inv.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inv.c index 530f8fa4ff..5d269466e0 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inv.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-inv.c @@ -98,7 +98,7 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) v1 = mpi_copy(v); /* !-- used as const 1 */ v2 = mpi_alloc( mpi_get_nlimbs(u) ); mpi_sub( v2, u1, u ); v3 = mpi_copy(v); - if ( mpi_test_bit(u, 0) ) { /* u is odd */ + if( mpi_test_bit(u, 0) ) { /* u is odd */ t1 = mpi_alloc_set_ui(0); t2 = mpi_alloc_set_ui(1); t2->sign = 1; t3 = mpi_copy(v); t3->sign = !t3->sign; @@ -111,7 +111,7 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) } do { do { - if ( mpi_test_bit(t1, 0) || mpi_test_bit(t2, 0) ) { /* one is odd */ + if( mpi_test_bit(t1, 0) || mpi_test_bit(t2, 0) ) { /* one is odd */ mpi_add(t1, t1, v); mpi_sub(t2, t2, u); } @@ -122,7 +122,7 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) ; } while( !mpi_test_bit( t3, 0 ) ); /* while t3 is even */ - if ( !t3->sign ) { + if( !t3->sign ) { mpi_set(u1, t1); mpi_set(u2, t2); mpi_set(u3, t3); @@ -139,7 +139,7 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) mpi_sub(t1, u1, v1); mpi_sub(t2, u2, v2); mpi_sub(t3, u3, v3); - if ( t1->sign ) { + if( t1->sign ) { mpi_add(t1, t1, v); mpi_sub(t2, t2, u); } @@ -175,18 +175,18 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) odd = mpi_test_bit(v,0); u1 = mpi_alloc_set_ui(1); - if ( !odd ) + if( !odd ) u2 = mpi_alloc_set_ui(0); u3 = mpi_copy(u); v1 = mpi_copy(v); - if ( !odd ) { + if( !odd ) { v2 = mpi_alloc( mpi_get_nlimbs(u) ); mpi_sub( v2, u1, u ); /* U is used as const 1 */ } v3 = mpi_copy(v); - if ( mpi_test_bit(u, 0) ) { /* u is odd */ + if( mpi_test_bit(u, 0) ) { /* u is odd */ t1 = mpi_alloc_set_ui(0); - if ( !odd ) { + if( !odd ) { t2 = mpi_alloc_set_ui(1); t2->sign = 1; } t3 = mpi_copy(v); t3->sign = !t3->sign; @@ -194,14 +194,14 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) } else { t1 = mpi_alloc_set_ui(1); - if ( !odd ) + if( !odd ) t2 = mpi_alloc_set_ui(0); t3 = mpi_copy(u); } do { do { - if ( !odd ) { - if ( mpi_test_bit(t1, 0) || mpi_test_bit(t2, 0) ) { /* one is odd */ + if( !odd ) { + if( mpi_test_bit(t1, 0) || mpi_test_bit(t2, 0) ) { /* one is odd */ mpi_add(t1, t1, v); mpi_sub(t2, t2, u); } @@ -210,7 +210,7 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) mpi_rshift(t3, t3, 1); } else { - if ( mpi_test_bit(t1, 0) ) + if( mpi_test_bit(t1, 0) ) mpi_add(t1, t1, v); mpi_rshift(t1, t1, 1); mpi_rshift(t3, t3, 1); @@ -219,16 +219,16 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) ; } while( !mpi_test_bit( t3, 0 ) ); /* while t3 is even */ - if ( !t3->sign ) { + if( !t3->sign ) { mpi_set(u1, t1); - if ( !odd ) + if( !odd ) mpi_set(u2, t2); mpi_set(u3, t3); } else { mpi_sub(v1, v, t1); sign = u->sign; u->sign = !u->sign; - if ( !odd ) + if( !odd ) mpi_sub(v2, u, t2); u->sign = sign; sign = t3->sign; t3->sign = !t3->sign; @@ -236,12 +236,12 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) t3->sign = sign; } mpi_sub(t1, u1, v1); - if ( !odd ) + if( !odd ) mpi_sub(t2, u2, v2); mpi_sub(t3, u3, v3); - if ( t1->sign ) { + if( t1->sign ) { mpi_add(t1, t1, v); - if ( !odd ) + if( !odd ) mpi_sub(t2, t2, u); } } while( mpi_cmp_ui( t3, 0 ) ); /* while t3 != 0 */ @@ -251,7 +251,7 @@ gcry_mpi_invm( gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t n ) mpi_free(u1); mpi_free(v1); mpi_free(t1); - if ( !odd ) { + if( !odd ) { mpi_free(u2); mpi_free(v2); mpi_free(t2); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mpow.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mpow.c index 33b9d393c5..131c5b67b2 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mpow.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mpow.c @@ -52,7 +52,7 @@ build_index( gcry_mpi_t *exparray, int k, int i, int t ) bitno = t-i; for(j=k-1; j >= 0; j-- ) { idx <<= 1; - if ( mpi_test_bit( exparray[j], bitno ) ) + if( mpi_test_bit( exparray[j], bitno ) ) idx |= 1; } /*log_debug("t=%d i=%d idx=%d\n", t, i, idx );*/ @@ -81,7 +81,7 @@ _gcry_mpi_mulpowm( gcry_mpi_t res, gcry_mpi_t *basearray, gcry_mpi_t *exparray, for(t=0, i=0; (tmp=exparray[i]); i++ ) { /*log_mpidump("exp: ", tmp );*/ j = mpi_get_nbits(tmp); - if ( j > t ) + if( j > t ) t = j; } /*log_mpidump("mod: ", m );*/ @@ -101,20 +101,20 @@ _gcry_mpi_mulpowm( gcry_mpi_t res, gcry_mpi_t *basearray, gcry_mpi_t *exparray, barrett_r1, barrett_r2 ); idx = build_index( exparray, k, i, t ); gcry_assert (idx >= 0 && idx < (1<<k)); - if ( !G[idx] ) { - if ( !idx ) + if( !G[idx] ) { + if( !idx ) G[0] = mpi_alloc_set_ui( 1 ); else { for(j=0; j < k; j++ ) { - if ( (idx & (1<<j) ) ) { - if ( !G[idx] ) + if( (idx & (1<<j) ) ) { + if( !G[idx] ) G[idx] = mpi_copy( basearray[j] ); else barrett_mulm( G[idx], G[idx], basearray[j], m, barrett_y, barrett_k, barrett_r1, barrett_r2 ); } } - if ( !G[idx] ) + if( !G[idx] ) G[idx] = mpi_alloc(0); } } @@ -140,7 +140,7 @@ static void barrett_mulm( gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m, gcry_mpi_t y, int k, gcry_mpi_t r1, gcry_mpi_t r2 ) { mpi_mul(w, u, v); - if ( calc_barrett( w, w, m, y, k, r1, r2 ) ) + if( calc_barrett( w, w, m, y, k, r1, r2 ) ) mpi_fdiv_r( w, w, m ); } @@ -178,7 +178,7 @@ calc_barrett( gcry_mpi_t r, gcry_mpi_t x, gcry_mpi_t m, gcry_mpi_t y, int k, gcr int xx = k > 3 ? k-3:0; mpi_normalize( x ); - if ( mpi_get_nlimbs(x) > 2*k ) + if( mpi_get_nlimbs(x) > 2*k ) return 1; /* can't do it */ /* 1. q1 = floor( x / b^k-1) @@ -197,14 +197,14 @@ calc_barrett( gcry_mpi_t r, gcry_mpi_t x, gcry_mpi_t m, gcry_mpi_t y, int k, gcr * 3. if r < 0 then r = r + b^k+1 */ mpi_set( r1, x ); - if ( r1->nlimbs > k+1 ) /* quick modulo operation */ + if( r1->nlimbs > k+1 ) /* quick modulo operation */ r1->nlimbs = k+1; mpi_mul( r2, r2, m ); - if ( r2->nlimbs > k+1 ) /* quick modulo operation */ + if( r2->nlimbs > k+1 ) /* quick modulo operation */ r2->nlimbs = k+1; mpi_sub( r, r1, r2 ); - if ( mpi_is_neg( r ) ) { + if( mpi_is_neg( r ) ) { gcry_mpi_t tmp; tmp = mpi_alloc( k + 2 ); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mul.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mul.c index 7ad9dd594b..25aeaa0a2c 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mul.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-mul.c @@ -41,19 +41,19 @@ gcry_mpi_mul_ui( gcry_mpi_t prod, gcry_mpi_t mult, unsigned long small_mult ) size = mult->nlimbs; sign = mult->sign; - if ( !size || !small_mult ) { + if( !size || !small_mult ) { prod->nlimbs = 0; prod->sign = 0; return; } prod_size = size + 1; - if ( prod->alloced < prod_size ) + if( prod->alloced < prod_size ) mpi_resize( prod, prod_size ); prod_ptr = prod->d; cy = _gcry_mpih_mul_1( prod_ptr, mult->d, size, (mpi_limb_t)small_mult ); - if ( cy ) + if( cy ) prod_ptr[size++] = cy; prod->nlimbs = size; prod->sign = sign; @@ -71,7 +71,7 @@ gcry_mpi_mul_2exp( gcry_mpi_t w, gcry_mpi_t u, unsigned long cnt) usize = u->nlimbs; usign = u->sign; - if ( !usize ) { + if( !usize ) { w->nlimbs = 0; w->sign = 0; return; @@ -79,16 +79,16 @@ gcry_mpi_mul_2exp( gcry_mpi_t w, gcry_mpi_t u, unsigned long cnt) limb_cnt = cnt / BITS_PER_MPI_LIMB; wsize = usize + limb_cnt + 1; - if ( w->alloced < wsize ) + if( w->alloced < wsize ) mpi_resize(w, wsize ); wp = w->d; wsize = usize + limb_cnt; wsign = usign; cnt %= BITS_PER_MPI_LIMB; - if ( cnt ) { + if( cnt ) { wlimb = _gcry_mpih_lshift( wp + limb_cnt, u->d, usize, cnt ); - if ( wlimb ) { + if( wlimb ) { wp[wsize] = wlimb; wsize++; } @@ -117,7 +117,7 @@ gcry_mpi_mul( gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) mpi_ptr_t tmp_limb=NULL; unsigned int tmp_limb_nlimbs = 0; - if ( u->nlimbs < v->nlimbs ) { /* Swap U and V. */ + if( u->nlimbs < v->nlimbs ) { /* Swap U and V. */ usize = v->nlimbs; usign = v->sign; usecure = mpi_is_secure(v); @@ -150,8 +150,8 @@ gcry_mpi_mul( gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) assign_wp = 2; /* mark it as 2 so that we can later copy it back to * mormal memory */ } - else if ( w->alloced < wsize ) { - if ( wp == up || wp == vp ) { + else if( w->alloced < wsize ) { + if( wp == up || wp == vp ) { wp = mpi_alloc_limb_space( wsize, mpi_is_secure(w) ); assign_wp = 1; } @@ -161,17 +161,17 @@ gcry_mpi_mul( gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) } } else { /* Make U and V not overlap with W. */ - if ( wp == up ) { + if( wp == up ) { /* W and U are identical. Allocate temporary space for U. */ tmp_limb_nlimbs = usize; up = tmp_limb = mpi_alloc_limb_space( usize, usecure ); /* Is V identical too? Keep it identical with U. */ - if ( wp == vp ) + if( wp == vp ) vp = up; /* Copy to the temporary space. */ MPN_COPY( up, wp, usize ); } - else if ( wp == vp ) { + else if( wp == vp ) { /* W and V are identical. Allocate temporary space for V. */ tmp_limb_nlimbs = vsize; vp = tmp_limb = mpi_alloc_limb_space( vsize, vsecure ); @@ -180,14 +180,14 @@ gcry_mpi_mul( gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) } } - if ( !vsize ) + if( !vsize ) wsize = 0; else { cy = _gcry_mpih_mul( wp, up, usize, vp, vsize ); wsize -= cy? 0:1; } - if ( assign_wp ) { + if( assign_wp ) { if (assign_wp == 2) { /* copy the temp wp from secure memory back to normal memory */ mpi_ptr_t tmp_wp = mpi_alloc_limb_space (wsize, 0); @@ -199,7 +199,7 @@ gcry_mpi_mul( gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v) } w->nlimbs = wsize; w->sign = sign_product; - if ( tmp_limb ) + if( tmp_limb ) _gcry_mpi_free_limb_space (tmp_limb, tmp_limb_nlimbs); } diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-pow.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-pow.c index 23e9f8eae1..ca7ead0285 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-pow.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-pow.c @@ -234,7 +234,7 @@ gcry_mpi_powm (gcry_mpi_t res, if ( (mpi_limb_signed_t)e < 0 ) { /*mpih_mul( xp, rp, rsize, bp, bsize );*/ - if ( bsize < KARATSUBA_THRESHOLD ) + if( bsize < KARATSUBA_THRESHOLD ) _gcry_mpih_mul ( xp, rp, rsize, bp, bsize ); else _gcry_mpih_mul_karatsuba_case (xp, rp, rsize, bp, bsize, diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-scan.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-scan.c index e06d990150..90699cdd69 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-scan.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpi-scan.c @@ -42,8 +42,8 @@ _gcry_mpi_getbyte( gcry_mpi_t a, unsigned idx ) ap = a->d; for(n=0,i=0; i < a->nlimbs; i++ ) { limb = ap[i]; - for ( j=0; j < BYTES_PER_MPI_LIMB; j++, n++ ) - if ( n == idx ) + for( j=0; j < BYTES_PER_MPI_LIMB; j++, n++ ) + if( n == idx ) return (limb >> j*8) & 0xff; } return -1; @@ -65,38 +65,38 @@ _gcry_mpi_putbyte( gcry_mpi_t a, unsigned idx, int xc ) ap = a->d; for(n=0,i=0; i < a->alloced; i++ ) { limb = ap[i]; - for ( j=0; j < BYTES_PER_MPI_LIMB; j++, n++ ) - if ( n == idx ) { + for( j=0; j < BYTES_PER_MPI_LIMB; j++, n++ ) + if( n == idx ) { #if BYTES_PER_MPI_LIMB == 4 - if ( j == 0 ) + if( j == 0 ) limb = (limb & 0xffffff00) | c; - else if ( j == 1 ) + else if( j == 1 ) limb = (limb & 0xffff00ff) | (c<<8); - else if ( j == 2 ) + else if( j == 2 ) limb = (limb & 0xff00ffff) | (c<<16); else limb = (limb & 0x00ffffff) | (c<<24); #elif BYTES_PER_MPI_LIMB == 8 - if ( j == 0 ) + if( j == 0 ) limb = (limb & 0xffffffffffffff00) | c; - else if ( j == 1 ) + else if( j == 1 ) limb = (limb & 0xffffffffffff00ff) | (c<<8); - else if ( j == 2 ) + else if( j == 2 ) limb = (limb & 0xffffffffff00ffff) | (c<<16); - else if ( j == 3 ) + else if( j == 3 ) limb = (limb & 0xffffffff00ffffff) | (c<<24); - else if ( j == 4 ) + else if( j == 4 ) limb = (limb & 0xffffff00ffffffff) | (c<<32); - else if ( j == 5 ) + else if( j == 5 ) limb = (limb & 0xffff00ffffffffff) | (c<<40); - else if ( j == 6 ) + else if( j == 6 ) limb = (limb & 0xff00ffffffffffff) | (c<<48); else limb = (limb & 0x00ffffffffffffff) | (c<<56); #else #error please enhance this function, its ugly - i know. #endif - if ( a->nlimbs <= i ) + if( a->nlimbs <= i ) a->nlimbs = i+1; ap[i] = limb; return; @@ -115,7 +115,7 @@ _gcry_mpi_trailing_zeros( gcry_mpi_t a ) unsigned n, count = 0; for(n=0; n < a->nlimbs; n++ ) { - if ( a->d[n] ) { + if( a->d[n] ) { unsigned nn; mpi_limb_t alimb = a->d[n]; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpicoder.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpicoder.c index 63e589438c..8f0c76f144 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpicoder.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpicoder.c @@ -46,7 +46,7 @@ mpi_read_from_buffer (const unsigned char *buffer, unsigned *ret_nread, /* log_debug ("mpi too large (%u bits)\n", nbits); */ goto leave; } - else if ( !nbits ) + else if( !nbits ) { /* log_debug ("an mpi of size 0 is not allowed\n"); */ goto leave; @@ -160,9 +160,9 @@ mpi_fromstr (gcry_mpi_t val, const char *str) c <<= 4; if ( c2 >= '0' && c2 <= '9' ) c |= c2 - '0'; - else if ( c2 >= 'a' && c2 <= 'f' ) + else if( c2 >= 'a' && c2 <= 'f' ) c |= c2 - 'a' + 10; - else if ( c2 >= 'A' && c2 <= 'F' ) + else if( c2 >= 'A' && c2 <= 'F' ) c |= c2 - 'A' + 10; else { @@ -601,7 +601,7 @@ gcry_mpi_print (enum gcry_mpi_format format, unsigned int n = (nbits + 7)/8; /* The PGP format can only handle unsigned integers. */ - if ( a->sign ) + if( a->sign ) return gcry_error (GPG_ERR_INV_ARG); if (buffer && n+2 > len) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-div.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-div.c index f151b8b17b..e41e205e1d 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-div.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-div.c @@ -51,7 +51,7 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, int dummy; /* Botch: Should this be handled at all? Rely on callers? */ - if ( !dividend_size ) + if( !dividend_size ) return 0; /* If multiplication is much faster than division, and the @@ -62,12 +62,12 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, * Does it ever help to use udiv_qrnnd_preinv? * && Does what we save compensate for the inversion overhead? */ - if ( UDIV_TIME > (2 * UMUL_TIME + 6) + if( UDIV_TIME > (2 * UMUL_TIME + 6) && (UDIV_TIME - (2 * UMUL_TIME + 6)) * dividend_size > UDIV_TIME ) { int normalization_steps; count_leading_zeros( normalization_steps, divisor_limb ); - if ( normalization_steps ) { + if( normalization_steps ) { mpi_limb_t divisor_limb_inverted; divisor_limb <<= normalization_steps; @@ -78,7 +78,7 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, * * Special case for DIVISOR_LIMB == 100...000. */ - if ( !(divisor_limb << 1) ) + if( !(divisor_limb << 1) ) divisor_limb_inverted = ~(mpi_limb_t)0; else udiv_qrnnd(divisor_limb_inverted, dummy, @@ -93,7 +93,7 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, * | (dividend_ptr[dividend_size - 2] >> ...))) * ...one division less... */ - for ( i = dividend_size - 2; i >= 0; i--) { + for( i = dividend_size - 2; i >= 0; i--) { n0 = dividend_ptr[i]; UDIV_QRNND_PREINV(dummy, r, r, ((n1 << normalization_steps) @@ -115,7 +115,7 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, * * Special case for DIVISOR_LIMB == 100...000. */ - if ( !(divisor_limb << 1) ) + if( !(divisor_limb << 1) ) divisor_limb_inverted = ~(mpi_limb_t)0; else udiv_qrnnd(divisor_limb_inverted, dummy, @@ -124,12 +124,12 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, i = dividend_size - 1; r = dividend_ptr[i]; - if ( r >= divisor_limb ) + if( r >= divisor_limb ) r = 0; else i--; - for ( ; i >= 0; i--) { + for( ; i >= 0; i--) { n0 = dividend_ptr[i]; UDIV_QRNND_PREINV(dummy, r, r, n0, divisor_limb, divisor_limb_inverted); @@ -138,11 +138,11 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, } } else { - if ( UDIV_NEEDS_NORMALIZATION ) { + if( UDIV_NEEDS_NORMALIZATION ) { int normalization_steps; count_leading_zeros(normalization_steps, divisor_limb); - if ( normalization_steps ) { + if( normalization_steps ) { divisor_limb <<= normalization_steps; n1 = dividend_ptr[dividend_size - 1]; @@ -178,7 +178,7 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, else i--; - for (; i >= 0; i--) { + for(; i >= 0; i--) { n0 = dividend_ptr[i]; udiv_qrnnd (dummy, r, r, n0, divisor_limb); } @@ -225,17 +225,17 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, d = dp[0]; n1 = np[nsize - 1]; - if ( n1 >= d ) { + if( n1 >= d ) { n1 -= d; most_significant_q_limb = 1; } qp += qextra_limbs; - for ( i = nsize - 2; i >= 0; i--) + for( i = nsize - 2; i >= 0; i--) udiv_qrnnd( qp[i], n1, n1, np[i], d ); qp -= qextra_limbs; - for ( i = qextra_limbs - 1; i >= 0; i-- ) + for( i = qextra_limbs - 1; i >= 0; i-- ) udiv_qrnnd (qp[i], n1, n1, 0, d); np[0] = n1; @@ -254,28 +254,28 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, n1 = np[1]; n0 = np[0]; - if ( n1 >= d1 && (n1 > d1 || n0 >= d0) ) { + if( n1 >= d1 && (n1 > d1 || n0 >= d0) ) { sub_ddmmss (n1, n0, n1, n0, d1, d0); most_significant_q_limb = 1; } - for ( i = qextra_limbs + nsize - 2 - 1; i >= 0; i-- ) { + for( i = qextra_limbs + nsize - 2 - 1; i >= 0; i-- ) { mpi_limb_t q; mpi_limb_t r; - if ( i >= qextra_limbs ) + if( i >= qextra_limbs ) np--; else np[0] = 0; - if ( n1 == d1 ) { + if( n1 == d1 ) { /* Q should be either 111..111 or 111..110. Need special * treatment of this rare case as normal division would * give overflow. */ q = ~(mpi_limb_t)0; r = n0 + d1; - if ( r < d1 ) { /* Carry in the addition? */ + if( r < d1 ) { /* Carry in the addition? */ add_ssaaaa( n1, n0, r - d0, np[0], 0, d0 ); qp[i] = q; continue; @@ -290,12 +290,12 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, n2 = np[0]; q_test: - if ( n1 > r || (n1 == r && n0 > n2) ) { + if( n1 > r || (n1 == r && n0 > n2) ) { /* The estimated Q was too large. */ q--; sub_ddmmss (n1, n0, n1, n0, 0, d0); r += d1; - if ( r >= d1 ) /* If not carry, test Q again. */ + if( r >= d1 ) /* If not carry, test Q again. */ goto q_test; } @@ -317,7 +317,7 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, d1 = dp[dsize - 2]; n0 = np[dsize - 1]; - if ( n0 >= dX ) { + if( n0 >= dX ) { if(n0 > dX || _gcry_mpih_cmp(np, dp, dsize - 1) >= 0 ) { _gcry_mpih_sub_n(np, np, dp, dsize); n0 = np[dsize - 1]; @@ -325,12 +325,12 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, } } - for ( i = qextra_limbs + nsize - dsize - 1; i >= 0; i--) { + for( i = qextra_limbs + nsize - dsize - 1; i >= 0; i--) { mpi_limb_t q; mpi_limb_t n1, n2; mpi_limb_t cy_limb; - if ( i >= qextra_limbs ) { + if( i >= qextra_limbs ) { np--; n2 = np[dsize]; } @@ -340,7 +340,7 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, np[0] = 0; } - if ( n0 == dX ) { + if( n0 == dX ) { /* This might over-estimate q, but it's probably not worth * the extra code here to find out. */ q = ~(mpi_limb_t)0; @@ -354,7 +354,7 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, while( n1 > r || (n1 == r && n0 > np[dsize - 2])) { q--; r += dX; - if ( r < dX ) /* I.e. "carry in previous addition?" */ + if( r < dX ) /* I.e. "carry in previous addition?" */ break; n1 -= n0 < d1; n0 -= d1; @@ -366,7 +366,7 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs, * could make this loop make two iterations less. */ cy_limb = _gcry_mpih_submul_1(np, dp, dsize, q); - if ( n2 != cy_limb ) { + if( n2 != cy_limb ) { _gcry_mpih_add_n(np, np, dp, dsize); q--; } @@ -399,7 +399,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, mpi_limb_t n1, n0, r; int dummy; - if ( !dividend_size ) + if( !dividend_size ) return 0; /* If multiplication is much faster than division, and the @@ -410,12 +410,12 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, * Does it ever help to use udiv_qrnnd_preinv? * && Does what we save compensate for the inversion overhead? */ - if ( UDIV_TIME > (2 * UMUL_TIME + 6) + if( UDIV_TIME > (2 * UMUL_TIME + 6) && (UDIV_TIME - (2 * UMUL_TIME + 6)) * dividend_size > UDIV_TIME ) { int normalization_steps; count_leading_zeros( normalization_steps, divisor_limb ); - if ( normalization_steps ) { + if( normalization_steps ) { mpi_limb_t divisor_limb_inverted; divisor_limb <<= normalization_steps; @@ -425,7 +425,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, * most significant bit (with weight 2**N) implicit. */ /* Special case for DIVISOR_LIMB == 100...000. */ - if ( !(divisor_limb << 1) ) + if( !(divisor_limb << 1) ) divisor_limb_inverted = ~(mpi_limb_t)0; else udiv_qrnnd(divisor_limb_inverted, dummy, @@ -440,7 +440,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, * | (dividend_ptr[dividend_size - 2] >> ...))) * ...one division less... */ - for ( i = dividend_size - 2; i >= 0; i--) { + for( i = dividend_size - 2; i >= 0; i--) { n0 = dividend_ptr[i]; UDIV_QRNND_PREINV( quot_ptr[i + 1], r, r, ((n1 << normalization_steps) @@ -461,7 +461,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, * most significant bit (with weight 2**N) implicit. */ /* Special case for DIVISOR_LIMB == 100...000. */ - if ( !(divisor_limb << 1) ) + if( !(divisor_limb << 1) ) divisor_limb_inverted = ~(mpi_limb_t) 0; else udiv_qrnnd(divisor_limb_inverted, dummy, @@ -470,12 +470,12 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, i = dividend_size - 1; r = dividend_ptr[i]; - if ( r >= divisor_limb ) + if( r >= divisor_limb ) r = 0; else quot_ptr[i--] = 0; - for ( ; i >= 0; i-- ) { + for( ; i >= 0; i-- ) { n0 = dividend_ptr[i]; UDIV_QRNND_PREINV( quot_ptr[i], r, r, n0, divisor_limb, divisor_limb_inverted); @@ -488,7 +488,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, int normalization_steps; count_leading_zeros (normalization_steps, divisor_limb); - if ( normalization_steps ) { + if( normalization_steps ) { divisor_limb <<= normalization_steps; n1 = dividend_ptr[dividend_size - 1]; @@ -500,7 +500,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, * | (dividend_ptr[dividend_size - 2] >> ...))) * ...one division less... */ - for ( i = dividend_size - 2; i >= 0; i--) { + for( i = dividend_size - 2; i >= 0; i--) { n0 = dividend_ptr[i]; udiv_qrnnd (quot_ptr[i + 1], r, r, ((n1 << normalization_steps) @@ -524,7 +524,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, else quot_ptr[i--] = 0; - for (; i >= 0; i--) { + for(; i >= 0; i--) { n0 = dividend_ptr[i]; udiv_qrnnd( quot_ptr[i], r, r, n0, divisor_limb ); } diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-mul.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-mul.c index d412b693fd..e1f6f58eb5 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-mul.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpih-mul.c @@ -35,7 +35,7 @@ #define MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace) \ do { \ - if ( (size) < KARATSUBA_THRESHOLD ) \ + if( (size) < KARATSUBA_THRESHOLD ) \ mul_n_basecase (prodp, up, vp, size); \ else \ mul_n (prodp, up, vp, size, tspace); \ @@ -80,8 +80,8 @@ mul_n_basecase( mpi_ptr_t prodp, mpi_ptr_t up, /* Multiply by the first limb in V separately, as the result can be * stored (not added) to PROD. We also avoid a loop for zeroing. */ v_limb = vp[0]; - if ( v_limb <= 1 ) { - if ( v_limb == 1 ) + if( v_limb <= 1 ) { + if( v_limb == 1 ) MPN_COPY( prodp, up, size ); else MPN_ZERO( prodp, size ); @@ -95,11 +95,11 @@ mul_n_basecase( mpi_ptr_t prodp, mpi_ptr_t up, /* For each iteration in the outer loop, multiply one limb from * U with one limb from V, and add it to PROD. */ - for ( i = 1; i < size; i++ ) { + for( i = 1; i < size; i++ ) { v_limb = vp[i]; - if ( v_limb <= 1 ) { + if( v_limb <= 1 ) { cy = 0; - if ( v_limb == 1 ) + if( v_limb == 1 ) cy = _gcry_mpih_add_n(prodp, prodp, up, size); } else @@ -117,7 +117,7 @@ static void mul_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, mpi_size_t size, mpi_ptr_t tspace ) { - if ( size & 1 ) { + if( size & 1 ) { /* The size is odd, and the code below doesn't handle that. * Multiply the least significant (size - 1) limbs with a recursive * call, and handle the most significant limb of S1 and S2 @@ -167,7 +167,7 @@ mul_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, /* Product M. ________________ * |_(U1-U0)(V0-V1)_| */ - if ( _gcry_mpih_cmp(up + hsize, up, hsize) >= 0 ) { + if( _gcry_mpih_cmp(up + hsize, up, hsize) >= 0 ) { _gcry_mpih_sub_n(prodp, up + hsize, up, hsize); negflg = 0; } @@ -175,7 +175,7 @@ mul_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, _gcry_mpih_sub_n(prodp, up, up + hsize, hsize); negflg = 1; } - if ( _gcry_mpih_cmp(vp + hsize, vp, hsize) >= 0 ) { + if( _gcry_mpih_cmp(vp + hsize, vp, hsize) >= 0 ) { _gcry_mpih_sub_n(prodp + hsize, vp + hsize, vp, hsize); negflg ^= 1; } @@ -211,12 +211,12 @@ mul_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, /* Add/copy Product L (twice) */ cy += _gcry_mpih_add_n(prodp + hsize, prodp + hsize, tspace, size); - if ( cy ) + if( cy ) _gcry_mpih_add_1(prodp + hsize + size, prodp + hsize + size, hsize, cy); MPN_COPY(prodp, tspace, hsize); cy = _gcry_mpih_add_n(prodp + hsize, prodp + hsize, tspace + hsize, hsize); - if ( cy ) + if( cy ) _gcry_mpih_add_1(prodp + size, prodp + size, size, 1); } } @@ -232,8 +232,8 @@ _gcry_mpih_sqr_n_basecase( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size ) /* Multiply by the first limb in V separately, as the result can be * stored (not added) to PROD. We also avoid a loop for zeroing. */ v_limb = up[0]; - if ( v_limb <= 1 ) { - if ( v_limb == 1 ) + if( v_limb <= 1 ) { + if( v_limb == 1 ) MPN_COPY( prodp, up, size ); else MPN_ZERO(prodp, size); @@ -247,11 +247,11 @@ _gcry_mpih_sqr_n_basecase( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size ) /* For each iteration in the outer loop, multiply one limb from * U with one limb from V, and add it to PROD. */ - for ( i=1; i < size; i++) { + for( i=1; i < size; i++) { v_limb = up[i]; - if ( v_limb <= 1 ) { + if( v_limb <= 1 ) { cy_limb = 0; - if ( v_limb == 1 ) + if( v_limb == 1 ) cy_limb = _gcry_mpih_add_n(prodp, prodp, up, size); } else @@ -267,7 +267,7 @@ void _gcry_mpih_sqr_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size, mpi_ptr_t tspace) { - if ( size & 1 ) { + if( size & 1 ) { /* The size is odd, and the code below doesn't handle that. * Multiply the least significant (size - 1) limbs with a recursive * call, and handle the most significant limb of S1 and S2 @@ -302,7 +302,7 @@ _gcry_mpih_sqr_n( mpi_ptr_t prodp, /* Product M. ________________ * |_(U1-U0)(U0-U1)_| */ - if ( _gcry_mpih_cmp( up + hsize, up, hsize) >= 0 ) + if( _gcry_mpih_cmp( up + hsize, up, hsize) >= 0 ) _gcry_mpih_sub_n( prodp, up + hsize, up, hsize); else _gcry_mpih_sub_n (prodp, up, up + hsize, hsize); @@ -329,13 +329,13 @@ _gcry_mpih_sqr_n( mpi_ptr_t prodp, /* Add/copy Product L (twice). */ cy += _gcry_mpih_add_n (prodp + hsize, prodp + hsize, tspace, size); - if ( cy ) + if( cy ) _gcry_mpih_add_1(prodp + hsize + size, prodp + hsize + size, hsize, cy); MPN_COPY(prodp, tspace, hsize); cy = _gcry_mpih_add_n (prodp + hsize, prodp + hsize, tspace + hsize, hsize); - if ( cy ) + if( cy ) _gcry_mpih_add_1 (prodp + size, prodp + size, size, 1); } } @@ -348,8 +348,8 @@ _gcry_mpih_mul_n( mpi_ptr_t prodp, { int secure; - if ( up == vp ) { - if ( size < KARATSUBA_THRESHOLD ) + if( up == vp ) { + if( size < KARATSUBA_THRESHOLD ) _gcry_mpih_sqr_n_basecase( prodp, up, size ); else { mpi_ptr_t tspace; @@ -360,7 +360,7 @@ _gcry_mpih_mul_n( mpi_ptr_t prodp, } } else { - if ( size < KARATSUBA_THRESHOLD ) + if( size < KARATSUBA_THRESHOLD ) mul_n_basecase( prodp, up, vp, size ); else { mpi_ptr_t tspace; @@ -382,8 +382,8 @@ _gcry_mpih_mul_karatsuba_case( mpi_ptr_t prodp, { mpi_limb_t cy; - if ( !ctx->tspace || ctx->tspace_size < vsize ) { - if ( ctx->tspace ) + if( !ctx->tspace || ctx->tspace_size < vsize ) { + if( ctx->tspace ) _gcry_mpi_free_limb_space( ctx->tspace, ctx->tspace_nlimbs ); ctx->tspace_nlimbs = 2 * vsize; ctx->tspace = mpi_alloc_limb_space( 2 * vsize, @@ -397,9 +397,9 @@ _gcry_mpih_mul_karatsuba_case( mpi_ptr_t prodp, prodp += vsize; up += vsize; usize -= vsize; - if ( usize >= vsize ) { - if ( !ctx->tp || ctx->tp_size < vsize ) { - if ( ctx->tp ) + if( usize >= vsize ) { + if( !ctx->tp || ctx->tp_size < vsize ) { + if( ctx->tp ) _gcry_mpi_free_limb_space( ctx->tp, ctx->tp_nlimbs ); ctx->tp_nlimbs = 2 * vsize; ctx->tp = mpi_alloc_limb_space( 2 * vsize, gcry_is_secure( up ) @@ -417,12 +417,12 @@ _gcry_mpih_mul_karatsuba_case( mpi_ptr_t prodp, } while( usize >= vsize ); } - if ( usize ) { - if ( usize < KARATSUBA_THRESHOLD ) { + if( usize ) { + if( usize < KARATSUBA_THRESHOLD ) { _gcry_mpih_mul( ctx->tspace, vp, vsize, up, usize ); } else { - if ( !ctx->next ) { + if( !ctx->next ) { ctx->next = gcry_xcalloc( 1, sizeof *ctx ); } _gcry_mpih_mul_karatsuba_case( ctx->tspace, @@ -442,15 +442,15 @@ _gcry_mpih_release_karatsuba_ctx( struct karatsuba_ctx *ctx ) { struct karatsuba_ctx *ctx2; - if ( ctx->tp ) + if( ctx->tp ) _gcry_mpi_free_limb_space( ctx->tp, ctx->tp_nlimbs ); - if ( ctx->tspace ) + if( ctx->tspace ) _gcry_mpi_free_limb_space( ctx->tspace, ctx->tspace_nlimbs ); - for ( ctx=ctx->next; ctx; ctx = ctx2 ) { + for( ctx=ctx->next; ctx; ctx = ctx2 ) { ctx2 = ctx->next; - if ( ctx->tp ) + if( ctx->tp ) _gcry_mpi_free_limb_space( ctx->tp, ctx->tp_nlimbs ); - if ( ctx->tspace ) + if( ctx->tspace ) _gcry_mpi_free_limb_space( ctx->tspace, ctx->tspace_nlimbs ); gcry_free( ctx ); } @@ -479,18 +479,18 @@ _gcry_mpih_mul( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize, mpi_limb_t cy; struct karatsuba_ctx ctx; - if ( vsize < KARATSUBA_THRESHOLD ) { + if( vsize < KARATSUBA_THRESHOLD ) { mpi_size_t i; mpi_limb_t v_limb; - if ( !vsize ) + if( !vsize ) return 0; /* Multiply by the first limb in V separately, as the result can be * stored (not added) to PROD. We also avoid a loop for zeroing. */ v_limb = vp[0]; - if ( v_limb <= 1 ) { - if ( v_limb == 1 ) + if( v_limb <= 1 ) { + if( v_limb == 1 ) MPN_COPY( prodp, up, usize ); else MPN_ZERO( prodp, usize ); @@ -504,11 +504,11 @@ _gcry_mpih_mul( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize, /* For each iteration in the outer loop, multiply one limb from * U with one limb from V, and add it to PROD. */ - for ( i = 1; i < vsize; i++ ) { + for( i = 1; i < vsize; i++ ) { v_limb = vp[i]; - if ( v_limb <= 1 ) { + if( v_limb <= 1 ) { cy = 0; - if ( v_limb == 1 ) + if( v_limb == 1 ) cy = _gcry_mpih_add_n(prodp, prodp, up, usize); } else diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c index dcff1e8a0a..4dc5211360 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c @@ -211,7 +211,7 @@ gcry_mpi_set_opaque( gcry_mpi_t a, void *p, unsigned int nbits ) if (!a) a = mpi_alloc(0); - if ( a->flags & 4 ) + if( a->flags & 4 ) gcry_free( a->d ); else _gcry_mpi_free_limb_space (a->d, a->alloced); @@ -228,9 +228,9 @@ gcry_mpi_set_opaque( gcry_mpi_t a, void *p, unsigned int nbits ) void * gcry_mpi_get_opaque( gcry_mpi_t a, unsigned int *nbits ) { - if ( !(a->flags & 4) ) + if( !(a->flags & 4) ) log_bug("mpi_get_opaque on normal mpi\n"); - if ( nbits ) + if( nbits ) *nbits = a->sign; return a->d; } @@ -246,13 +246,13 @@ gcry_mpi_copy( gcry_mpi_t a ) int i; gcry_mpi_t b; - if ( a && (a->flags & 4) ) { + if( a && (a->flags & 4) ) { void *p = gcry_is_secure(a->d)? gcry_xmalloc_secure( (a->sign+7)/8 ) : gcry_xmalloc( (a->sign+7)/8 ); memcpy( p, a->d, (a->sign+7)/8 ); b = gcry_mpi_set_opaque( NULL, p, a->sign ); } - else if ( a ) { + else if( a ) { b = mpi_is_secure(a)? mpi_alloc_secure( a->nlimbs ) : mpi_alloc( a->nlimbs ); b->nlimbs = a->nlimbs; @@ -277,14 +277,14 @@ _gcry_mpi_alloc_like( gcry_mpi_t a ) { gcry_mpi_t b; - if ( a && (a->flags & 4) ) { + if( a && (a->flags & 4) ) { int n = (a->sign+7)/8; void *p = gcry_is_secure(a->d)? gcry_malloc_secure( n ) : gcry_malloc( n ); memcpy( p, a->d, n ); b = gcry_mpi_set_opaque( NULL, p, a->sign ); } - else if ( a ) { + else if( a ) { b = mpi_is_secure(a)? mpi_alloc_secure( a->nlimbs ) : mpi_alloc( a->nlimbs ); b->nlimbs = 0; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/random/Makefile.am b/plugins/MirOTR/libgcrypt-1.4.6/random/Makefile.am new file mode 100644 index 0000000000..336109a6ad --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/random/Makefile.am @@ -0,0 +1,49 @@ +# Makefile for cipher modules +# Copyright (C) 2008 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see <http://www.gnu.org/licenses/>. + +# Process this file with automake to produce Makefile.in + +# Need to include ../src in addition to top_srcdir because gcrypt.h is +# a built header. +AM_CPPFLAGS = -I../src -I$(top_srcdir)/src +AM_CFLAGS = $(GPG_ERROR_CFLAGS) + +noinst_LTLIBRARIES = librandom.la + +GCRYPT_MODULES = @GCRYPT_RANDOM@ + +librandom_la_DEPENDENCIES = $(GCRYPT_MODULES) +librandom_la_LIBADD = $(GCRYPT_MODULES) + +librandom_la_SOURCES = \ +random.c random.h \ +rand-internal.h \ +random-csprng.c \ +random-fips.c \ +rndhw.c + +if USE_RANDOM_DAEMON +librandom_la_SOURCES += random-daemon.c +endif USE_RANDOM_DAEMON + + +EXTRA_librandom_la_SOURCES = \ +rndlinux.c \ +rndegd.c \ +rndunix.c \ +rndw32.c diff --git a/plugins/MirOTR/libgcrypt-1.4.6/random/Makefile.in b/plugins/MirOTR/libgcrypt-1.4.6/random/Makefile.in new file mode 100644 index 0000000000..679abc8245 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/random/Makefile.in @@ -0,0 +1,519 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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 for cipher modules +# Copyright (C) 2008 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see <http://www.gnu.org/licenses/>. + +# Process this file with automake to produce Makefile.in + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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@ +@USE_RANDOM_DAEMON_TRUE@am__append_1 = random-daemon.c +subdir = random +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \ + $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +am__librandom_la_SOURCES_DIST = random.c random.h rand-internal.h \ + random-csprng.c random-fips.c rndhw.c random-daemon.c +@USE_RANDOM_DAEMON_TRUE@am__objects_1 = random-daemon.lo +am_librandom_la_OBJECTS = random.lo random-csprng.lo random-fips.lo \ + rndhw.lo $(am__objects_1) +librandom_la_OBJECTS = $(am_librandom_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(librandom_la_SOURCES) $(EXTRA_librandom_la_SOURCES) +DIST_SOURCES = $(am__librandom_la_SOURCES_DIST) \ + $(EXTRA_librandom_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@ +FFLAGS = @FFLAGS@ +GCRYPT_CIPHERS = @GCRYPT_CIPHERS@ +GCRYPT_DIGESTS = @GCRYPT_DIGESTS@ +GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@ +GCRYPT_RANDOM = @GCRYPT_RANDOM@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@ +LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@ +LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@ +LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@ +LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@ +LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@ +LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@ +LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@ +LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@ +LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_SFLAGS = @MPI_SFLAGS@ +NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@ +OBJDUMP = @OBJDUMP@ +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@ +PTH_CFLAGS = @PTH_CFLAGS@ +PTH_CONFIG = @PTH_CONFIG@ +PTH_LIBS = @PTH_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +VERSION = @VERSION@ +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@ +ac_ct_F77 = @ac_ct_F77@ +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@ +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@ + +# Need to include ../src in addition to top_srcdir because gcrypt.h is +# a built header. +AM_CPPFLAGS = -I../src -I$(top_srcdir)/src +AM_CFLAGS = $(GPG_ERROR_CFLAGS) +noinst_LTLIBRARIES = librandom.la +GCRYPT_MODULES = @GCRYPT_RANDOM@ +librandom_la_DEPENDENCIES = $(GCRYPT_MODULES) +librandom_la_LIBADD = $(GCRYPT_MODULES) +librandom_la_SOURCES = random.c random.h rand-internal.h \ + random-csprng.c random-fips.c rndhw.c $(am__append_1) +EXTRA_librandom_la_SOURCES = \ +rndlinux.c \ +rndegd.c \ +rndunix.c \ +rndw32.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .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 random/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu random/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @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 + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +librandom.la: $(librandom_la_OBJECTS) $(librandom_la_DEPENDENCIES) + $(LINK) $(librandom_la_OBJECTS) $(librandom_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random-csprng.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random-daemon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random-fips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rndegd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rndhw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rndlinux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rndunix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rndw32.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +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 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# 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/plugins/MirOTR/libgcrypt-1.4.6/random/random-csprng.c b/plugins/MirOTR/libgcrypt-1.4.6/random/random-csprng.c index 16fe9db998..6ab868ae37 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/random/random-csprng.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/random/random-csprng.c @@ -747,7 +747,7 @@ read_seed_file (void) #else fd = open( seed_file_name, O_RDONLY ); #endif - if ( fd == -1 && errno == ENOENT) + if( fd == -1 && errno == ENOENT) { allow_seed_file_update = 1; return 0; @@ -972,7 +972,7 @@ read_pool (byte *buffer, size_t length, int level) needed = length - pool_balance; if (needed < POOLSIZE/2) needed = POOLSIZE/2; - else if ( needed > POOLSIZE ) + else if( needed > POOLSIZE ) BUG (); read_random_source (RANDOM_ORIGIN_EXTRAPOLL, needed, GCRY_VERY_STRONG_RANDOM); @@ -1183,14 +1183,14 @@ do_fast_random_poll (void) #elif HAVE_GETTIMEOFDAY { struct timeval tv; - if ( gettimeofday( &tv, NULL ) ) + if( gettimeofday( &tv, NULL ) ) BUG(); add_randomness( &tv.tv_sec, sizeof(tv.tv_sec), RANDOM_ORIGIN_FASTPOLL ); add_randomness( &tv.tv_usec, sizeof(tv.tv_usec), RANDOM_ORIGIN_FASTPOLL ); } #elif HAVE_CLOCK_GETTIME { struct timespec tv; - if ( clock_gettime( CLOCK_REALTIME, &tv ) == -1 ) + if( clock_gettime( CLOCK_REALTIME, &tv ) == -1 ) BUG(); add_randomness( &tv.tv_sec, sizeof(tv.tv_sec), RANDOM_ORIGIN_FASTPOLL ); add_randomness( &tv.tv_nsec, sizeof(tv.tv_nsec), RANDOM_ORIGIN_FASTPOLL ); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/random/rndegd.c b/plugins/MirOTR/libgcrypt-1.4.6/random/rndegd.c index ba82a52616..63a5e0f162 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/random/rndegd.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/random/rndegd.c @@ -58,7 +58,7 @@ my_make_filename (const char *first_part, const char *second_part) n += strlen (second_part) + 1; home = NULL; - if ( *first_part == '~' && first_part[1] == '/' + if( *first_part == '~' && first_part[1] == '/' && (home = getenv("HOME")) && *home ) n += strlen(home); @@ -83,9 +83,9 @@ do_write( int fd, void *buf, size_t nbytes ) while( nleft > 0 ) { nwritten = write( fd, buf, nleft); - if ( nwritten < 0 ) + if( nwritten < 0 ) { - if ( errno == EINTR ) + if( errno == EINTR ) continue; return -1; } @@ -107,9 +107,9 @@ do_read( int fd, void *buf, size_t nbytes ) n = read(fd, (char*)buf + nread, nbytes ); } while( n == -1 && errno == EINTR ); - if ( n == -1) + if( n == -1) return nread? nread:-1; - if ( n == 0) + if( n == 0) return -1; nread += n; nbytes -= n; @@ -221,9 +221,9 @@ _gcry_rndegd_gather_random (void (*add)(const void*, size_t, int nbytes; int do_restart = 0; - if ( !length ) + if( !length ) return 0; - if ( !level ) + if( !level ) return 0; restart: @@ -236,20 +236,20 @@ _gcry_rndegd_gather_random (void (*add)(const void*, size_t, /* First time we do it with a non blocking request */ buffer[0] = 1; /* non blocking */ buffer[1] = nbytes; - if ( do_write( fd, buffer, 2 ) == -1 ) + if( do_write( fd, buffer, 2 ) == -1 ) log_fatal("can't write to the EGD: %s\n", strerror(errno) ); n = do_read( fd, buffer, 1 ); - if ( n == -1 ) + if( n == -1 ) { log_error("read error on EGD: %s\n", strerror(errno)); do_restart = 1; goto restart; } n = buffer[0]; - if ( n ) + if( n ) { n = do_read( fd, buffer, n ); - if ( n == -1 ) + if( n == -1 ) { log_error("read error on EGD: %s\n", strerror(errno)); do_restart = 1; @@ -259,7 +259,7 @@ _gcry_rndegd_gather_random (void (*add)(const void*, size_t, length -= n; } - if ( length ) + if( length ) { log_info ( _("Please wait, entropy is being gathered. Do some work if it would\n" @@ -272,10 +272,10 @@ _gcry_rndegd_gather_random (void (*add)(const void*, size_t, buffer[0] = 2; /* blocking */ buffer[1] = nbytes; - if ( do_write( fd, buffer, 2 ) == -1 ) + if( do_write( fd, buffer, 2 ) == -1 ) log_fatal("can't write to the EGD: %s\n", strerror(errno) ); n = do_read( fd, buffer, nbytes ); - if ( n == -1 ) + if( n == -1 ) { log_error("read error on EGD: %s\n", strerror(errno)); do_restart = 1; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/random/rndlinux.c b/plugins/MirOTR/libgcrypt-1.4.6/random/rndlinux.c index aca72011ea..574ef6dcc0 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/random/rndlinux.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/random/rndlinux.c @@ -74,9 +74,9 @@ open_device ( const char *name ) struct stat sb; - if ( fstat( fd, &sb ) ) + if( fstat( fd, &sb ) ) log_fatal("stat() off %s failed: %s\n", name, strerror(errno) ); - if ( (!S_ISCHR(sb.st_mode)) && (!S_ISFIFO(sb.st_mode)) ) + if( (!S_ISCHR(sb.st_mode)) && (!S_ISFIFO(sb.st_mode)) ) log_fatal("invalid random device!\n" ); */ return fd; @@ -108,13 +108,13 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, /* Open the requested device. */ if (level >= 2) { - if ( fd_random == -1 ) + if( fd_random == -1 ) fd_random = open_device ( NAME_OF_DEV_RANDOM ); fd = fd_random; } else { - if ( fd_urandom == -1 ) + if( fd_urandom == -1 ) fd_urandom = open_device ( NAME_OF_DEV_URANDOM ); fd = fd_urandom; } @@ -130,16 +130,16 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, FD_SET(fd, &rfds); tv.tv_sec = 3; tv.tv_usec = 0; - if ( !(rc=select(fd+1, &rfds, NULL, NULL, &tv)) ) + if( !(rc=select(fd+1, &rfds, NULL, NULL, &tv)) ) { - if ( !warn ) + if( !warn ) { _gcry_random_progress ("need_entropy", 'X', 0, (int)length); warn = 1; } continue; } - else if ( rc == -1 ) + else if( rc == -1 ) { log_error ("select() error: %s\n", strerror(errno)); continue; @@ -149,14 +149,14 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, { int nbytes = length < sizeof(buffer)? length : sizeof(buffer); n = read(fd, buffer, nbytes ); - if ( n >= 0 && n > nbytes ) + if( n >= 0 && n > nbytes ) { log_error("bogus read from random device (n=%d)\n", n ); n = nbytes; } } while( n == -1 && errno == EINTR ); - if ( n == -1 ) + if( n == -1 ) log_fatal("read error on random device: %s\n", strerror(errno)); (*add)( buffer, n, origin ); length -= n; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/random/rndunix.c b/plugins/MirOTR/libgcrypt-1.4.6/random/rndunix.c index 8f5d30a9ac..1faf9abc0e 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/random/rndunix.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/random/rndunix.c @@ -529,7 +529,7 @@ slow_poll(FILE *dbgfp, int dbgall, size_t *nbytes ) /* Since popen() is a fairly heavy function, we check to see whether * the executable exists before we try to run it */ if (access(dataSources[i].path, X_OK)) { - if ( dbgfp && dbgall ) + if( dbgfp && dbgall ) fprintf(dbgfp, "%s not present%s\n", dataSources[i].path, dataSources[i].hasAlternative ? ", has alternatives" : ""); @@ -555,7 +555,7 @@ slow_poll(FILE *dbgfp, int dbgall, size_t *nbytes ) /* If there are alternatives for this command, don't try and * execute them */ while (dataSources[i].hasAlternative) { - if ( dbgfp && dbgall ) + if( dbgfp && dbgall ) fprintf(dbgfp, "Skipping %s\n", dataSources[i + 1].path); i++; } @@ -584,7 +584,7 @@ slow_poll(FILE *dbgfp, int dbgall, size_t *nbytes ) /* One of the sources has data available, read it into the buffer */ for (i = 0; dataSources[i].path != NULL; i++) { - if ( dataSources[i].pipe && FD_ISSET(dataSources[i].pipeFD, &fds)) { + if( dataSources[i].pipe && FD_ISSET(dataSources[i].pipeFD, &fds)) { size_t noBytes; if ((noBytes = fread(gather_buffer + bufPos, 1, @@ -603,14 +603,14 @@ slow_poll(FILE *dbgfp, int dbgall, size_t *nbytes ) total = dataSources[i].length / dataSources[i].usefulness; } - if ( dbgfp ) + if( dbgfp ) fprintf(dbgfp, "%s %s contributed %d bytes, " "usefulness = %d\n", dataSources[i].path, (dataSources[i].arg != NULL) ? dataSources[i].arg : "", dataSources[i].length, total); - if ( dataSources[i].length ) + if( dataSources[i].length ) usefulness += total; } dataSources[i].pipe = NULL; @@ -661,7 +661,7 @@ slow_poll(FILE *dbgfp, int dbgall, size_t *nbytes ) } } - if ( dbgfp ) { + if( dbgfp ) { fprintf(dbgfp, "Got %d bytes, usefulness = %d\n", bufPos, usefulness); fflush(dbgfp); } @@ -681,9 +681,9 @@ start_gatherer( int pipefd ) { const char *s = getenv("GNUPG_RNDUNIX_DBG"); - if ( s ) { + if( s ) { dbgfp = (*s=='-' && !s[1])? stdout : fopen(s, "a"); - if ( !dbgfp ) + if( !dbgfp ) log_info("can't open debug file `%s': %s\n", s, strerror(errno) ); else @@ -694,7 +694,7 @@ start_gatherer( int pipefd ) /* close all files but the ones we need */ { int nmax, n1, n2, i; #ifdef _SC_OPEN_MAX - if ( (nmax=sysconf( _SC_OPEN_MAX )) < 0 ) { + if( (nmax=sysconf( _SC_OPEN_MAX )) < 0 ) { #ifdef _POSIX_OPEN_MAX nmax = _POSIX_OPEN_MAX; #else @@ -707,7 +707,7 @@ start_gatherer( int pipefd ) n1 = fileno( stderr ); n2 = dbgfp? fileno( dbgfp ) : -1; for(i=0; i < nmax; i++ ) { - if ( i != n1 && i != n2 && i != pipefd ) + if( i != n1 && i != n2 && i != pipefd ) close(i); } errno = 0; @@ -717,7 +717,7 @@ start_gatherer( int pipefd ) /* Set up the buffer. Not ethat we use a plain standard malloc here. */ gather_buffer_size = GATHER_BUFSIZE; gather_buffer = malloc( gather_buffer_size ); - if ( !gather_buffer ) { + if( !gather_buffer ) { log_error("out of core while allocating the gatherer buffer\n"); exit(2); } @@ -738,7 +738,7 @@ start_gatherer( int pipefd ) fclose(stderr); /* Arrghh!! It's Stuart code!! */ - for (;;) { + for(;;) { GATHER_MSG msg; size_t nbytes; const char *p; @@ -752,20 +752,20 @@ start_gatherer( int pipefd ) p += msg.ndata; while( write( pipefd, &msg, sizeof(msg) ) != sizeof(msg) ) { - if ( errno == EINTR ) + if( errno == EINTR ) continue; - if ( errno == EAGAIN ) { + if( errno == EAGAIN ) { struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 50000; select(0, NULL, NULL, NULL, &tv); continue; } - if ( errno == EPIPE ) /* parent has exited, so give up */ + if( errno == EPIPE ) /* parent has exited, so give up */ exit(0); /* we can't do very much here because stderr is closed */ - if ( dbgfp ) + if( dbgfp ) fprintf(dbgfp, "gatherer can't write to pipe: %s\n", strerror(errno) ); /* we start a new poll to give the system some time */ @@ -789,7 +789,7 @@ read_a_msg( int fd, GATHER_MSG *msg ) do { n = read(fd, buffer, length ); } while( n == -1 && errno == EINTR ); - if ( n == -1 ) + if( n == -1 ) return -1; buffer += n; length -= n; @@ -813,24 +813,24 @@ _gcry_rndunix_gather_random (void (*add)(const void*, size_t, GATHER_MSG msg; size_t n; - if ( !level ) + if( !level ) return 0; - if ( !gatherer_pid ) { + if( !gatherer_pid ) { /* Make sure we are not setuid. */ if ( getuid() != geteuid() ) BUG(); /* time to start the gatherer process */ - if ( pipe( pipedes ) ) { + if( pipe( pipedes ) ) { log_error("pipe() failed: %s\n", strerror(errno)); return -1; } gatherer_pid = fork(); - if ( gatherer_pid == -1 ) { + if( gatherer_pid == -1 ) { log_error("can't for gatherer process: %s\n", strerror(errno)); return -1; } - if ( !gatherer_pid ) { + if( !gatherer_pid ) { start_gatherer( pipedes[1] ); /* oops, can't happen */ return -1; @@ -842,23 +842,23 @@ _gcry_rndunix_gather_random (void (*add)(const void*, size_t, int goodness; ulong subtract; - if ( read_a_msg( pipedes[0], &msg ) ) { + if( read_a_msg( pipedes[0], &msg ) ) { log_error("reading from gatherer pipe failed: %s\n", strerror(errno)); return -1; } - if ( level > 1 ) { - if ( msg.usefulness > 30 ) + if( level > 1 ) { + if( msg.usefulness > 30 ) goodness = 100; else if ( msg.usefulness ) goodness = msg.usefulness * 100 / 30; else goodness = 0; } - else if ( level ) { - if ( msg.usefulness > 15 ) + else if( level ) { + if( msg.usefulness > 15 ) goodness = 100; else if ( msg.usefulness ) goodness = msg.usefulness * 100 / 15; @@ -869,7 +869,7 @@ _gcry_rndunix_gather_random (void (*add)(const void*, size_t, goodness = 100; /* goodness of level 0 is always 100 % */ n = msg.ndata; - if ( n > length ) + if( n > length ) n = length; (*add)( msg.data, n, origin ); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/AUTHORS b/plugins/MirOTR/libgcrypt-1.4.6/read/AUTHORS index 0372c284b2..0372c284b2 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/AUTHORS +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/AUTHORS diff --git a/plugins/MirOTR/libgcrypt-1.4.6/COPYING b/plugins/MirOTR/libgcrypt-1.4.6/read/COPYING index d60c31a97a..d60c31a97a 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/COPYING +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/COPYING diff --git a/plugins/MirOTR/libgcrypt-1.4.6/COPYING.LIB b/plugins/MirOTR/libgcrypt-1.4.6/read/COPYING.LIB index cf9b6b9972..cf9b6b9972 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/COPYING.LIB +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/COPYING.LIB diff --git a/plugins/MirOTR/libgcrypt-1.4.6/ChangeLog b/plugins/MirOTR/libgcrypt-1.4.6/read/ChangeLog index 70ca736e0c..70ca736e0c 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/ChangeLog +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/ChangeLog diff --git a/plugins/MirOTR/libgcrypt-1.4.6/INSTALL b/plugins/MirOTR/libgcrypt-1.4.6/read/INSTALL index 5458714e1e..5458714e1e 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/INSTALL +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/INSTALL diff --git a/plugins/MirOTR/libgcrypt-1.4.6/read/Makefile.am b/plugins/MirOTR/libgcrypt-1.4.6/read/Makefile.am new file mode 100644 index 0000000000..61ae90e058 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/Makefile.am @@ -0,0 +1,53 @@ +## Process this file with automake to produce Makefile.in +# Copyright (C) 1992, 1999, 2000, 2002 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = dist-bzip2 +DISTCHECK_CONFIGURE_FLAGS = --enable-random-daemon \ + --enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia + +DIST_SUBDIRS = m4 mpi cipher random src doc tests +SUBDIRS = mpi cipher random src doc tests +EXTRA_DIST = autogen.sh README.SVN +DISTCLEANFILES = + + +# Add all the files listed in "distfiles" files to the distribution, +# apply version number s to some files and create a VERSION file which +# we need for the Prereq: patch file trick. +dist-hook: + @set -e; \ + for file in `cd $(top_srcdir); \ + find mpi -type f -name distfiles`; do \ + dir=`dirname $$file` ; $(mkinstalldirs) $(distdir)/$$dir ; \ + for i in distfiles `cat $(top_srcdir)/$$file` ; do \ + ln $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i 2> /dev/null \ + || cp -p $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i; \ + done ; \ + done + @set -e; \ + echo "$(VERSION)" > $(distdir)/VERSION + +stowinstall: + $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgcrypt + + + + + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/read/Makefile.in b/plugins/MirOTR/libgcrypt-1.4.6/read/Makefile.in new file mode 100644 index 0000000000..6ca4ceb3bf --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/Makefile.in @@ -0,0 +1,719 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 1992, 1999, 2000, 2002 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING COPYING.LIB ChangeLog \ + INSTALL NEWS THANKS TODO compile config.guess config.sub \ + depcomp install-sh ltmain.sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \ + $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@ +FFLAGS = @FFLAGS@ +GCRYPT_CIPHERS = @GCRYPT_CIPHERS@ +GCRYPT_DIGESTS = @GCRYPT_DIGESTS@ +GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@ +GCRYPT_RANDOM = @GCRYPT_RANDOM@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@ +LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@ +LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@ +LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@ +LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@ +LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@ +LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@ +LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@ +LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@ +LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_SFLAGS = @MPI_SFLAGS@ +NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@ +OBJDUMP = @OBJDUMP@ +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@ +PTH_CFLAGS = @PTH_CFLAGS@ +PTH_CONFIG = @PTH_CONFIG@ +PTH_LIBS = @PTH_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +VERSION = @VERSION@ +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@ +ac_ct_F77 = @ac_ct_F77@ +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@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = dist-bzip2 +DISTCHECK_CONFIGURE_FLAGS = --enable-random-daemon \ + --enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia + +DIST_SUBDIRS = m4 mpi cipher random src doc tests +SUBDIRS = mpi cipher random src doc tests +EXTRA_DIST = autogen.sh README.SVN +DISTCLEANFILES = +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am + + +# Add all the files listed in "distfiles" files to the distribution, +# apply version number s to some files and create a VERSION file which +# we need for the Prereq: patch file trick. +dist-hook: + @set -e; \ + for file in `cd $(top_srcdir); \ + find mpi -type f -name distfiles`; do \ + dir=`dirname $$file` ; $(mkinstalldirs) $(distdir)/$$dir ; \ + for i in distfiles `cat $(top_srcdir)/$$file` ; do \ + ln $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i 2> /dev/null \ + || cp -p $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i; \ + done ; \ + done + @set -e; \ + echo "$(VERSION)" > $(distdir)/VERSION + +stowinstall: + $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgcrypt +# 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/plugins/MirOTR/libgcrypt-1.4.6/NEWS b/plugins/MirOTR/libgcrypt-1.4.6/read/NEWS index cdaa2db853..cdaa2db853 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/NEWS +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/NEWS diff --git a/plugins/MirOTR/libgcrypt-1.4.6/README b/plugins/MirOTR/libgcrypt-1.4.6/read/README index e73bb6a090..e73bb6a090 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/README +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/README diff --git a/plugins/MirOTR/libgcrypt-1.4.6/README.SVN b/plugins/MirOTR/libgcrypt-1.4.6/read/README.SVN index ae17923bd5..ae17923bd5 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/README.SVN +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/README.SVN diff --git a/plugins/MirOTR/libgcrypt-1.4.6/THANKS b/plugins/MirOTR/libgcrypt-1.4.6/read/THANKS index f34974d3ad..f34974d3ad 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/THANKS +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/THANKS diff --git a/plugins/MirOTR/libgcrypt-1.4.6/TODO b/plugins/MirOTR/libgcrypt-1.4.6/read/TODO index 74468e31aa..74468e31aa 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/TODO +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/TODO diff --git a/plugins/MirOTR/libgcrypt-1.4.6/VERSION b/plugins/MirOTR/libgcrypt-1.4.6/read/VERSION index c514bd85c2..c514bd85c2 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/VERSION +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/VERSION diff --git a/plugins/MirOTR/libgcrypt-1.4.6/acinclude.m4 b/plugins/MirOTR/libgcrypt-1.4.6/read/acinclude.m4 index a7bc0fa789..a7bc0fa789 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/acinclude.m4 +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/acinclude.m4 diff --git a/plugins/MirOTR/libgcrypt-1.4.6/aclocal.m4 b/plugins/MirOTR/libgcrypt-1.4.6/read/aclocal.m4 index b42ddc35b2..b42ddc35b2 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/aclocal.m4 +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/aclocal.m4 diff --git a/plugins/MirOTR/libgcrypt-1.4.6/autogen.sh b/plugins/MirOTR/libgcrypt-1.4.6/read/autogen.sh index 3f2db4f76f..3f2db4f76f 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/autogen.sh +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/autogen.sh diff --git a/plugins/MirOTR/libgcrypt-1.4.6/compile b/plugins/MirOTR/libgcrypt-1.4.6/read/compile index 1b1d232169..1b1d232169 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/compile +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/compile diff --git a/plugins/MirOTR/libgcrypt-1.4.6/config.guess b/plugins/MirOTR/libgcrypt-1.4.6/read/config.guess index 7fef1a3e30..7fef1a3e30 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/config.guess +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/config.guess diff --git a/plugins/MirOTR/libgcrypt-1.4.6/read/config.h.in b/plugins/MirOTR/libgcrypt-1.4.6/read/config.h.in new file mode 100644 index 0000000000..25c1c83533 --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/config.h.in @@ -0,0 +1,428 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + + +#ifndef _GCRYPT_CONFIG_H_INCLUDED +#define _GCRYPT_CONFIG_H_INCLUDED +/* need this, because some autoconf tests rely on this (e.g. stpcpy) + * and it should be used for new programs */ +#define _GNU_SOURCE 1 + + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Subversion revision used to build this package */ +#undef BUILD_REVISION + +/* configure did not test for endianess */ +#undef DISABLED_ENDIAN_CHECK + +/* Define if you don't want the default EGD socket name. For details see + cipher/rndegd.c */ +#undef EGD_SOCKET_NAME + +/* Define to support an HMAC based integrity check */ +#undef ENABLE_HMAC_BINARY_CHECK + +/* Enable support for the PadLock engine. */ +#undef ENABLE_PADLOCK_SUPPORT + +/* Define to use the GNU C visibility attribute. */ +#undef GCRY_USE_VISIBILITY + +/* The default error source for libgcrypt. */ +#undef GPG_ERR_SOURCE_DEFAULT + +/* Define to 1 if you have the `atexit' function. */ +#undef HAVE_ATEXIT + +/* Defined if the mlock() call does not work */ +#undef HAVE_BROKEN_MLOCK + +/* Defined if a `byte' is typedef'd */ +#undef HAVE_BYTE_TYPEDEF + +/* Define to 1 if you have the `clock_gettime' function. */ +#undef HAVE_CLOCK_GETTIME + +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#undef HAVE_DECL_SYS_SIGLIST + +/* defined if the system supports a random device */ +#undef HAVE_DEV_RANDOM + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* defined if we run on some of the PCDOS like systems (DOS, Windoze. OS/2) + with special properties like no file modes */ +#undef HAVE_DOSISH_SYSTEM + +/* defined if we must run on a stupid file system */ +#undef HAVE_DRIVE_LETTERS + +/* Define to 1 if you have the `fcntl' function. */ +#undef HAVE_FCNTL + +/* Define to 1 if you have the `ftruncate' function. */ +#undef HAVE_FTRUNCATE + +/* Define to 1 if you have the `gethrtime' function. */ +#undef HAVE_GETHRTIME + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `getrusage' function. */ +#undef HAVE_GETRUSAGE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `rt' library (-lrt). */ +#undef HAVE_LIBRT + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Defined if the system supports an mlock() call */ +#undef HAVE_MLOCK + +/* Define to 1 if you have the `mmap' function. */ +#undef HAVE_MMAP + +/* Defined if the GNU Pth is available */ +#undef HAVE_PTH + +/* Define to 1 if you have the `raise' function. */ +#undef HAVE_RAISE + +/* Define to 1 if you have the `rand' function. */ +#undef HAVE_RAND + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the `stricmp' function. */ +#undef HAVE_STRICMP + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* Define to 1 if you have the `sysconf' function. */ +#undef HAVE_SYSCONF + +/* Define to 1 if you have the `syslog' function. */ +#undef HAVE_SYSLOG + +/* Define to 1 if you have the <sys/capability.h> header file. */ +#undef HAVE_SYS_CAPABILITY_H + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the <sys/select.h> header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Defined if a `u16' is typedef'd */ +#undef HAVE_U16_TYPEDEF + +/* Defined if a `u32' is typedef'd */ +#undef HAVE_U32_TYPEDEF + +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + +/* Defined if a `ulong' is typedef'd */ +#undef HAVE_ULONG_TYPEDEF + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Defined if a `ushort' is typedef'd */ +#undef HAVE_USHORT_TYPEDEF + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Defined if we run on a W32 API based system */ +#undef HAVE_W32_SYSTEM + +/* Define to 1 if you have the `wait4' function. */ +#undef HAVE_WAIT4 + +/* Define to 1 if you have the `waitpid' function. */ +#undef HAVE_WAITPID + +/* Define to 1 if you have the <winsock2.h> header file. */ +#undef HAVE_WINSOCK2_H + +/* Define to 1 if you have the <ws2tcpip.h> header file. */ +#undef HAVE_WS2TCPIP_H + +/* Defined if this is not a regular release */ +#undef IS_DEVELOPMENT_VERSION + +/* List of available cipher algorithms */ +#undef LIBGCRYPT_CIPHERS + +/* List of available digest algorithms */ +#undef LIBGCRYPT_DIGESTS + +/* List of available public key cipher algorithms */ +#undef LIBGCRYPT_PUBKEY_CIPHERS + +/* Define to use the (obsolete) malloc guarding feature */ +#undef M_GUARD + +/* defined to the name of the strong random device */ +#undef NAME_OF_DEV_RANDOM + +/* defined to the name of the weaker random device */ +#undef NAME_OF_DEV_URANDOM + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Name of this package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* A human readable text with the name of the OS */ +#undef PRINTABLE_OS_NAME + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* The size of `unsigned int', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_INT + +/* The size of `unsigned long', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_LONG + +/* The size of `unsigned long long', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_LONG_LONG + +/* The size of `unsigned short', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_SHORT + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Defined if this module should be included */ +#undef USE_AES + +/* Defined if this module should be included */ +#undef USE_ARCFOUR + +/* Defined if this module should be included */ +#undef USE_BLOWFISH + +/* Defined if this module should be included */ +#undef USE_CAMELLIA + +/* define if capabilities should be used */ +#undef USE_CAPABILITIES + +/* Defined if this module should be included */ +#undef USE_CAST5 + +/* Defined if this module should be included */ +#undef USE_CRC + +/* Defined if this module should be included */ +#undef USE_DES + +/* Defined if this module should be included */ +#undef USE_DSA + +/* Defined if this module should be included */ +#undef USE_ECC + +/* Defined if this module should be included */ +#undef USE_ELGAMAL + +/* Defined if the GNU Portable Thread Library should be used */ +#undef USE_GNU_PTH + +/* Defined if this module should be included */ +#undef USE_MD4 + +/* Defined if this module should be included */ +#undef USE_MD5 + +/* set this to limit filenames to the 8.3 format */ +#undef USE_ONLY_8DOT3 + +/* Define to support the experimental random daemon */ +#undef USE_RANDOM_DAEMON + +/* Defined if this module should be included */ +#undef USE_RFC2268 + +/* Defined if this module should be included */ +#undef USE_RMD160 + +/* Defined if the EGD based RNG should be used. */ +#undef USE_RNDEGD + +/* Defined if the /dev/random RNG should be used. */ +#undef USE_RNDLINUX + +/* Defined if the default Unix RNG should be used. */ +#undef USE_RNDUNIX + +/* Defined if the Windows specific RNG should be used. */ +#undef USE_RNDW32 + +/* Defined if this module should be included */ +#undef USE_RSA + +/* Defined if this module should be included */ +#undef USE_SEED + +/* Defined if this module should be included */ +#undef USE_SERPENT + +/* Defined if this module should be included */ +#undef USE_SHA1 + +/* Defined if this module should be included */ +#undef USE_SHA256 + +/* Defined if this module should be included */ +#undef USE_SHA512 + +/* Defined if this module should be included */ +#undef USE_TIGER + +/* Defined if this module should be included */ +#undef USE_TWOFISH + +/* Defined if this module should be included */ +#undef USE_WHIRLPOOL + +/* Version of this package */ +#undef VERSION + +/* Defined if compiled symbols have a leading underscore */ +#undef WITH_SYMBOL_UNDERSCORE + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* To allow the use of Libgcrypt in multithreaded programs we have to use + special features from the library. */ +#ifndef _REENTRANT +# define _REENTRANT 1 +#endif + + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +#undef size_t + +/* type to use in place of socklen_t if not defined */ +#undef socklen_t + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t + + +#define _GCRYPT_IN_LIBGCRYPT 1 + +/* If the configure check for endianness has been disabled, get it from + OS macros. This is intended for making fat binary builds on OS X. */ +#ifdef DISABLED_ENDIAN_CHECK +# if defined(__BIG_ENDIAN__) +# define WORDS_BIGENDIAN 1 +# elif defined(__LITTLE_ENDIAN__) +# undef WORDS_BIGENDIAN +# else +# error "No endianness found" +# endif +#endif /*DISABLED_ENDIAN_CHECK*/ + +/* We basically use the original Camellia source. Make sure the symbols + properly prefixed. */ +#define CAMELLIA_EXT_SYM_PREFIX _gcry_ + +/* This error code is only available with gpg-error 1.7. Thus + we define it here with the usual gcry prefix. */ +#define GCRY_GPG_ERR_NOT_OPERATIONAL 176 + + +#endif /*_GCRYPT_CONFIG_H_INCLUDED*/ + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/config.sub b/plugins/MirOTR/libgcrypt-1.4.6/read/config.sub index 5190461560..5190461560 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/config.sub +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/config.sub diff --git a/plugins/MirOTR/libgcrypt-1.4.6/configure b/plugins/MirOTR/libgcrypt-1.4.6/read/configure index bf5d640885..bf5d640885 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/configure +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/configure diff --git a/plugins/MirOTR/libgcrypt-1.4.6/configure.ac b/plugins/MirOTR/libgcrypt-1.4.6/read/configure.ac index a063f37ae2..a063f37ae2 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/configure.ac +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/configure.ac diff --git a/plugins/MirOTR/libgcrypt-1.4.6/depcomp b/plugins/MirOTR/libgcrypt-1.4.6/read/depcomp index ca5ea4e1ef..ca5ea4e1ef 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/depcomp +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/depcomp diff --git a/plugins/MirOTR/libgcrypt-1.4.6/install-sh b/plugins/MirOTR/libgcrypt-1.4.6/read/install-sh index 4fbbae7b7f..4fbbae7b7f 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/install-sh +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/install-sh diff --git a/plugins/MirOTR/libgcrypt-1.4.6/ltmain.sh b/plugins/MirOTR/libgcrypt-1.4.6/read/ltmain.sh index c715b59412..c715b59412 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/ltmain.sh +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/ltmain.sh diff --git a/plugins/MirOTR/libgcrypt-1.4.6/missing b/plugins/MirOTR/libgcrypt-1.4.6/read/missing index 894e786e16..894e786e16 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/missing +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/missing diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mkinstalldirs b/plugins/MirOTR/libgcrypt-1.4.6/read/mkinstalldirs index ef7e16fdaf..ef7e16fdaf 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mkinstalldirs +++ b/plugins/MirOTR/libgcrypt-1.4.6/read/mkinstalldirs diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/Makefile.am b/plugins/MirOTR/libgcrypt-1.4.6/src/Makefile.am new file mode 100644 index 0000000000..544b5e2e8e --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/Makefile.am @@ -0,0 +1,132 @@ +# Makefile.am - for gcrypt/src +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +# 2006, 2007 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +## Process this file with automake to produce Makefile.in + +EXTRA_DIST = Manifest libgcrypt-config.in libgcrypt.m4 libgcrypt.vers \ + gcrypt.h.in libgcrypt.def +bin_SCRIPTS = libgcrypt-config +m4datadir = $(datadir)/aclocal +m4data_DATA = libgcrypt.m4 +include_HEADERS = gcrypt.h gcrypt-module.h + +lib_LTLIBRARIES = libgcrypt.la +bin_PROGRAMS = dumpsexp hmac256 +if USE_RANDOM_DAEMON +sbin_PROGRAMS = gcryptrnd +bin_PROGRAMS += getrandom +endif USE_RANDOM_DAEMON + + +if HAVE_LD_VERSION_SCRIPT + libgcrypt_version_script_cmd = -Wl,--version-script=$(srcdir)/libgcrypt.vers +else + libgcrypt_version_script_cmd = +endif + +libgcrypt_la_CFLAGS = @GPG_ERROR_CFLAGS@ +libgcrypt_la_SOURCES = g10lib.h visibility.c visibility.h types.h \ + cipher.h cipher-proto.h \ + misc.c global.c sexp.c hwfeatures.c \ + stdmem.c stdmem.h secmem.c secmem.h \ + mpi.h missing-string.c module.c fips.c \ + hmac256.c hmac256.h \ + ath.h ath.c + +if HAVE_W32_SYSTEM + +LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + sed -e 's/-I/--include-dir /g;s/-D/--define /g'` + +.rc.lo: + $(LTRCCOMPILE) -i $< -o $@ + +gcrypt_res = versioninfo.lo +gcrypt_res_ldflag = -Wl,.libs/versioninfo.o + +no_undefined = -no-undefined +export_symbols = -export-symbols $(srcdir)/libgcrypt.def + +install-def-file: + $(INSTALL) $(srcdir)/libgcrypt.def $(DESTDIR)$(libdir)/libgcrypt.def + +uninstall-def-file: + -rm $(DESTDIR)$(libdir)/libgcrypt.def + +gcrypt_deps = $(gcrypt_res) libgcrypt.def + +else !HAVE_W32_SYSTEM + +gcrypt_res = +gcrypt_res_ldflag = +no_undefined = +export_symbols = +install-def-file: +uninstall-def-file: + +gcrypt_deps = + +endif !HAVE_W32_SYSTEM + + +libgcrypt_la_LDFLAGS = $(gcrypt_res_ldflag) $(no_undefined) $(export_symbols) \ + $(libgcrypt_version_script_cmd) -version-info \ + @LIBGCRYPT_LT_CURRENT@:@LIBGCRYPT_LT_REVISION@:@LIBGCRYPT_LT_AGE@ +libgcrypt_la_DEPENDENCIES = \ + ../cipher/libcipher.la \ + ../random/librandom.la \ + ../mpi/libmpi.la \ + $(srcdir)/libgcrypt.vers $(gcrypt_deps) +libgcrypt_la_LIBADD = \ + ../cipher/libcipher.la \ + ../random/librandom.la \ + ../mpi/libmpi.la \ + @LTLIBOBJS@ @GPG_ERROR_LIBS@ + + +dumpsexp_SOURCES = dumpsexp.c +dumpsexp_LDADD = + +hmac256_SOURCES = hmac256.c +hmac256_CFLAGS = -DSTANDALONE +hmac256_LDADD = + +if USE_RANDOM_DAEMON +gcryptrnd_SOURCES = gcryptrnd.c +gcryptrnd_CFLAGS = $(GPG_ERROR_CFLAGS) $(PTH_CFLAGS) +gcryptrnd_LDADD = libgcrypt.la $(PTH_LIBS) + +getrandom_SOURCES = getrandom.c +endif USE_RANDOM_DAEMON + + +install-data-local: install-def-file + +uninstall-local: uninstall-def-file + +# FIXME: We need to figure out how to get the actual name (parsing +# libgcrypt.la?) and how to create the hmac file already at link time +# so that it can be used without installing libgcrypt first. +#install-exec-hook: +# ./hmac256 "What am I, a doctor or a moonshuttle conductor?" \ +# < $(DESTDIR)$(libdir)/libgcrypt.so.11.5.0 \ +# > $(DESTDIR)$(libdir)/.libgcrypt.so.11.5.0.hmac + diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/Makefile.in b/plugins/MirOTR/libgcrypt-1.4.6/src/Makefile.in new file mode 100644 index 0000000000..9f0932085c --- /dev/null +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/Makefile.in @@ -0,0 +1,922 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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 - for gcrypt/src +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +# 2006, 2007 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + + + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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 = dumpsexp$(EXEEXT) hmac256$(EXEEXT) $(am__EXEEXT_1) +@USE_RANDOM_DAEMON_TRUE@sbin_PROGRAMS = gcryptrnd$(EXEEXT) +@USE_RANDOM_DAEMON_TRUE@am__append_1 = getrandom +subdir = src +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/gcrypt.h.in \ + $(srcdir)/libgcrypt-config.in $(srcdir)/versioninfo.rc.in \ + ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \ + $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gcrypt.h libgcrypt-config versioninfo.rc +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +am_libgcrypt_la_OBJECTS = libgcrypt_la-visibility.lo \ + libgcrypt_la-misc.lo libgcrypt_la-global.lo \ + libgcrypt_la-sexp.lo libgcrypt_la-hwfeatures.lo \ + libgcrypt_la-stdmem.lo libgcrypt_la-secmem.lo \ + libgcrypt_la-missing-string.lo libgcrypt_la-module.lo \ + libgcrypt_la-fips.lo libgcrypt_la-hmac256.lo \ + libgcrypt_la-ath.lo +libgcrypt_la_OBJECTS = $(am_libgcrypt_la_OBJECTS) +libgcrypt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgcrypt_la_CFLAGS) \ + $(CFLAGS) $(libgcrypt_la_LDFLAGS) $(LDFLAGS) -o $@ +@USE_RANDOM_DAEMON_TRUE@am__EXEEXT_1 = getrandom$(EXEEXT) +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) +am_dumpsexp_OBJECTS = dumpsexp.$(OBJEXT) +dumpsexp_OBJECTS = $(am_dumpsexp_OBJECTS) +dumpsexp_DEPENDENCIES = +am__gcryptrnd_SOURCES_DIST = gcryptrnd.c +@USE_RANDOM_DAEMON_TRUE@am_gcryptrnd_OBJECTS = \ +@USE_RANDOM_DAEMON_TRUE@ gcryptrnd-gcryptrnd.$(OBJEXT) +gcryptrnd_OBJECTS = $(am_gcryptrnd_OBJECTS) +am__DEPENDENCIES_1 = +@USE_RANDOM_DAEMON_TRUE@gcryptrnd_DEPENDENCIES = libgcrypt.la \ +@USE_RANDOM_DAEMON_TRUE@ $(am__DEPENDENCIES_1) +gcryptrnd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gcryptrnd_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__getrandom_SOURCES_DIST = getrandom.c +@USE_RANDOM_DAEMON_TRUE@am_getrandom_OBJECTS = getrandom.$(OBJEXT) +getrandom_OBJECTS = $(am_getrandom_OBJECTS) +getrandom_LDADD = $(LDADD) +am_hmac256_OBJECTS = hmac256-hmac256.$(OBJEXT) +hmac256_OBJECTS = $(am_hmac256_OBJECTS) +hmac256_DEPENDENCIES = +hmac256_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(hmac256_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgcrypt_la_SOURCES) $(dumpsexp_SOURCES) \ + $(gcryptrnd_SOURCES) $(getrandom_SOURCES) $(hmac256_SOURCES) +DIST_SOURCES = $(libgcrypt_la_SOURCES) $(dumpsexp_SOURCES) \ + $(am__gcryptrnd_SOURCES_DIST) $(am__getrandom_SOURCES_DIST) \ + $(hmac256_SOURCES) +m4dataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(m4data_DATA) +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@ +FFLAGS = @FFLAGS@ +GCRYPT_CIPHERS = @GCRYPT_CIPHERS@ +GCRYPT_DIGESTS = @GCRYPT_DIGESTS@ +GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@ +GCRYPT_RANDOM = @GCRYPT_RANDOM@ +GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ +GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ +GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@ +LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@ +LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@ +LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@ +LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@ +LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@ +LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@ +LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@ +LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@ +LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MPI_SFLAGS = @MPI_SFLAGS@ +NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@ +OBJDUMP = @OBJDUMP@ +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@ +PTH_CFLAGS = @PTH_CFLAGS@ +PTH_CONFIG = @PTH_CONFIG@ +PTH_LIBS = @PTH_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +VERSION = @VERSION@ +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@ +ac_ct_F77 = @ac_ct_F77@ +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@ +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@ +EXTRA_DIST = Manifest libgcrypt-config.in libgcrypt.m4 libgcrypt.vers \ + gcrypt.h.in libgcrypt.def + +bin_SCRIPTS = libgcrypt-config +m4datadir = $(datadir)/aclocal +m4data_DATA = libgcrypt.m4 +include_HEADERS = gcrypt.h gcrypt-module.h +lib_LTLIBRARIES = libgcrypt.la +@HAVE_LD_VERSION_SCRIPT_FALSE@libgcrypt_version_script_cmd = +@HAVE_LD_VERSION_SCRIPT_TRUE@libgcrypt_version_script_cmd = -Wl,--version-script=$(srcdir)/libgcrypt.vers +libgcrypt_la_CFLAGS = @GPG_ERROR_CFLAGS@ +libgcrypt_la_SOURCES = g10lib.h visibility.c visibility.h types.h \ + cipher.h cipher-proto.h \ + misc.c global.c sexp.c hwfeatures.c \ + stdmem.c stdmem.h secmem.c secmem.h \ + mpi.h missing-string.c module.c fips.c \ + hmac256.c hmac256.h \ + ath.h ath.c + +@HAVE_W32_SYSTEM_TRUE@LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ +@HAVE_W32_SYSTEM_TRUE@ `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ +@HAVE_W32_SYSTEM_TRUE@ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` + +@HAVE_W32_SYSTEM_FALSE@gcrypt_res = +@HAVE_W32_SYSTEM_TRUE@gcrypt_res = versioninfo.lo +@HAVE_W32_SYSTEM_FALSE@gcrypt_res_ldflag = +@HAVE_W32_SYSTEM_TRUE@gcrypt_res_ldflag = -Wl,.libs/versioninfo.o +@HAVE_W32_SYSTEM_FALSE@no_undefined = +@HAVE_W32_SYSTEM_TRUE@no_undefined = -no-undefined +@HAVE_W32_SYSTEM_FALSE@export_symbols = +@HAVE_W32_SYSTEM_TRUE@export_symbols = -export-symbols $(srcdir)/libgcrypt.def +@HAVE_W32_SYSTEM_FALSE@gcrypt_deps = +@HAVE_W32_SYSTEM_TRUE@gcrypt_deps = $(gcrypt_res) libgcrypt.def +libgcrypt_la_LDFLAGS = $(gcrypt_res_ldflag) $(no_undefined) $(export_symbols) \ + $(libgcrypt_version_script_cmd) -version-info \ + @LIBGCRYPT_LT_CURRENT@:@LIBGCRYPT_LT_REVISION@:@LIBGCRYPT_LT_AGE@ + +libgcrypt_la_DEPENDENCIES = \ + ../cipher/libcipher.la \ + ../random/librandom.la \ + ../mpi/libmpi.la \ + $(srcdir)/libgcrypt.vers $(gcrypt_deps) + +libgcrypt_la_LIBADD = \ + ../cipher/libcipher.la \ + ../random/librandom.la \ + ../mpi/libmpi.la \ + @LTLIBOBJS@ @GPG_ERROR_LIBS@ + +dumpsexp_SOURCES = dumpsexp.c +dumpsexp_LDADD = +hmac256_SOURCES = hmac256.c +hmac256_CFLAGS = -DSTANDALONE +hmac256_LDADD = +@USE_RANDOM_DAEMON_TRUE@gcryptrnd_SOURCES = gcryptrnd.c +@USE_RANDOM_DAEMON_TRUE@gcryptrnd_CFLAGS = $(GPG_ERROR_CFLAGS) $(PTH_CFLAGS) +@USE_RANDOM_DAEMON_TRUE@gcryptrnd_LDADD = libgcrypt.la $(PTH_LIBS) +@USE_RANDOM_DAEMON_TRUE@getrandom_SOURCES = getrandom.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj .rc +$(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 src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @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 +gcrypt.h: $(top_builddir)/config.status $(srcdir)/gcrypt.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +libgcrypt-config: $(top_builddir)/config.status $(srcdir)/libgcrypt-config.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +versioninfo.rc: $(top_builddir)/config.status $(srcdir)/versioninfo.rc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgcrypt.la: $(libgcrypt_la_OBJECTS) $(libgcrypt_la_DEPENDENCIES) + $(libgcrypt_la_LINK) -rpath $(libdir) $(libgcrypt_la_OBJECTS) $(libgcrypt_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ + rm -f "$(DESTDIR)$(sbindir)/$$f"; \ + done + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +dumpsexp$(EXEEXT): $(dumpsexp_OBJECTS) $(dumpsexp_DEPENDENCIES) + @rm -f dumpsexp$(EXEEXT) + $(LINK) $(dumpsexp_OBJECTS) $(dumpsexp_LDADD) $(LIBS) +gcryptrnd$(EXEEXT): $(gcryptrnd_OBJECTS) $(gcryptrnd_DEPENDENCIES) + @rm -f gcryptrnd$(EXEEXT) + $(gcryptrnd_LINK) $(gcryptrnd_OBJECTS) $(gcryptrnd_LDADD) $(LIBS) +getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) + @rm -f getrandom$(EXEEXT) + $(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) +hmac256$(EXEEXT): $(hmac256_OBJECTS) $(hmac256_DEPENDENCIES) + @rm -f hmac256$(EXEEXT) + $(hmac256_LINK) $(hmac256_OBJECTS) $(hmac256_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumpsexp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcryptrnd-gcryptrnd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac256-hmac256.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-ath.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-fips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-global.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-hmac256.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-hwfeatures.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-misc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-missing-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-secmem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-sexp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-stdmem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt_la-visibility.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libgcrypt_la-visibility.lo: visibility.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-visibility.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-visibility.Tpo -c -o libgcrypt_la-visibility.lo `test -f 'visibility.c' || echo '$(srcdir)/'`visibility.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-visibility.Tpo $(DEPDIR)/libgcrypt_la-visibility.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='visibility.c' object='libgcrypt_la-visibility.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-visibility.lo `test -f 'visibility.c' || echo '$(srcdir)/'`visibility.c + +libgcrypt_la-misc.lo: misc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-misc.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-misc.Tpo -c -o libgcrypt_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-misc.Tpo $(DEPDIR)/libgcrypt_la-misc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libgcrypt_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c + +libgcrypt_la-global.lo: global.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-global.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-global.Tpo -c -o libgcrypt_la-global.lo `test -f 'global.c' || echo '$(srcdir)/'`global.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-global.Tpo $(DEPDIR)/libgcrypt_la-global.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='global.c' object='libgcrypt_la-global.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-global.lo `test -f 'global.c' || echo '$(srcdir)/'`global.c + +libgcrypt_la-sexp.lo: sexp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-sexp.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-sexp.Tpo -c -o libgcrypt_la-sexp.lo `test -f 'sexp.c' || echo '$(srcdir)/'`sexp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-sexp.Tpo $(DEPDIR)/libgcrypt_la-sexp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sexp.c' object='libgcrypt_la-sexp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-sexp.lo `test -f 'sexp.c' || echo '$(srcdir)/'`sexp.c + +libgcrypt_la-hwfeatures.lo: hwfeatures.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-hwfeatures.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-hwfeatures.Tpo -c -o libgcrypt_la-hwfeatures.lo `test -f 'hwfeatures.c' || echo '$(srcdir)/'`hwfeatures.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-hwfeatures.Tpo $(DEPDIR)/libgcrypt_la-hwfeatures.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hwfeatures.c' object='libgcrypt_la-hwfeatures.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-hwfeatures.lo `test -f 'hwfeatures.c' || echo '$(srcdir)/'`hwfeatures.c + +libgcrypt_la-stdmem.lo: stdmem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-stdmem.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-stdmem.Tpo -c -o libgcrypt_la-stdmem.lo `test -f 'stdmem.c' || echo '$(srcdir)/'`stdmem.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-stdmem.Tpo $(DEPDIR)/libgcrypt_la-stdmem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stdmem.c' object='libgcrypt_la-stdmem.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-stdmem.lo `test -f 'stdmem.c' || echo '$(srcdir)/'`stdmem.c + +libgcrypt_la-secmem.lo: secmem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-secmem.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-secmem.Tpo -c -o libgcrypt_la-secmem.lo `test -f 'secmem.c' || echo '$(srcdir)/'`secmem.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-secmem.Tpo $(DEPDIR)/libgcrypt_la-secmem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='secmem.c' object='libgcrypt_la-secmem.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-secmem.lo `test -f 'secmem.c' || echo '$(srcdir)/'`secmem.c + +libgcrypt_la-missing-string.lo: missing-string.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-missing-string.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-missing-string.Tpo -c -o libgcrypt_la-missing-string.lo `test -f 'missing-string.c' || echo '$(srcdir)/'`missing-string.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-missing-string.Tpo $(DEPDIR)/libgcrypt_la-missing-string.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='missing-string.c' object='libgcrypt_la-missing-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-missing-string.lo `test -f 'missing-string.c' || echo '$(srcdir)/'`missing-string.c + +libgcrypt_la-module.lo: module.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-module.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-module.Tpo -c -o libgcrypt_la-module.lo `test -f 'module.c' || echo '$(srcdir)/'`module.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-module.Tpo $(DEPDIR)/libgcrypt_la-module.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='module.c' object='libgcrypt_la-module.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-module.lo `test -f 'module.c' || echo '$(srcdir)/'`module.c + +libgcrypt_la-fips.lo: fips.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-fips.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-fips.Tpo -c -o libgcrypt_la-fips.lo `test -f 'fips.c' || echo '$(srcdir)/'`fips.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-fips.Tpo $(DEPDIR)/libgcrypt_la-fips.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fips.c' object='libgcrypt_la-fips.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-fips.lo `test -f 'fips.c' || echo '$(srcdir)/'`fips.c + +libgcrypt_la-hmac256.lo: hmac256.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-hmac256.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-hmac256.Tpo -c -o libgcrypt_la-hmac256.lo `test -f 'hmac256.c' || echo '$(srcdir)/'`hmac256.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-hmac256.Tpo $(DEPDIR)/libgcrypt_la-hmac256.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hmac256.c' object='libgcrypt_la-hmac256.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-hmac256.lo `test -f 'hmac256.c' || echo '$(srcdir)/'`hmac256.c + +libgcrypt_la-ath.lo: ath.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -MT libgcrypt_la-ath.lo -MD -MP -MF $(DEPDIR)/libgcrypt_la-ath.Tpo -c -o libgcrypt_la-ath.lo `test -f 'ath.c' || echo '$(srcdir)/'`ath.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgcrypt_la-ath.Tpo $(DEPDIR)/libgcrypt_la-ath.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ath.c' object='libgcrypt_la-ath.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgcrypt_la_CFLAGS) $(CFLAGS) -c -o libgcrypt_la-ath.lo `test -f 'ath.c' || echo '$(srcdir)/'`ath.c + +gcryptrnd-gcryptrnd.o: gcryptrnd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gcryptrnd_CFLAGS) $(CFLAGS) -MT gcryptrnd-gcryptrnd.o -MD -MP -MF $(DEPDIR)/gcryptrnd-gcryptrnd.Tpo -c -o gcryptrnd-gcryptrnd.o `test -f 'gcryptrnd.c' || echo '$(srcdir)/'`gcryptrnd.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gcryptrnd-gcryptrnd.Tpo $(DEPDIR)/gcryptrnd-gcryptrnd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gcryptrnd.c' object='gcryptrnd-gcryptrnd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gcryptrnd_CFLAGS) $(CFLAGS) -c -o gcryptrnd-gcryptrnd.o `test -f 'gcryptrnd.c' || echo '$(srcdir)/'`gcryptrnd.c + +gcryptrnd-gcryptrnd.obj: gcryptrnd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gcryptrnd_CFLAGS) $(CFLAGS) -MT gcryptrnd-gcryptrnd.obj -MD -MP -MF $(DEPDIR)/gcryptrnd-gcryptrnd.Tpo -c -o gcryptrnd-gcryptrnd.obj `if test -f 'gcryptrnd.c'; then $(CYGPATH_W) 'gcryptrnd.c'; else $(CYGPATH_W) '$(srcdir)/gcryptrnd.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gcryptrnd-gcryptrnd.Tpo $(DEPDIR)/gcryptrnd-gcryptrnd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gcryptrnd.c' object='gcryptrnd-gcryptrnd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gcryptrnd_CFLAGS) $(CFLAGS) -c -o gcryptrnd-gcryptrnd.obj `if test -f 'gcryptrnd.c'; then $(CYGPATH_W) 'gcryptrnd.c'; else $(CYGPATH_W) '$(srcdir)/gcryptrnd.c'; fi` + +hmac256-hmac256.o: hmac256.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hmac256_CFLAGS) $(CFLAGS) -MT hmac256-hmac256.o -MD -MP -MF $(DEPDIR)/hmac256-hmac256.Tpo -c -o hmac256-hmac256.o `test -f 'hmac256.c' || echo '$(srcdir)/'`hmac256.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/hmac256-hmac256.Tpo $(DEPDIR)/hmac256-hmac256.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hmac256.c' object='hmac256-hmac256.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hmac256_CFLAGS) $(CFLAGS) -c -o hmac256-hmac256.o `test -f 'hmac256.c' || echo '$(srcdir)/'`hmac256.c + +hmac256-hmac256.obj: hmac256.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hmac256_CFLAGS) $(CFLAGS) -MT hmac256-hmac256.obj -MD -MP -MF $(DEPDIR)/hmac256-hmac256.Tpo -c -o hmac256-hmac256.obj `if test -f 'hmac256.c'; then $(CYGPATH_W) 'hmac256.c'; else $(CYGPATH_W) '$(srcdir)/hmac256.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/hmac256-hmac256.Tpo $(DEPDIR)/hmac256-hmac256.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hmac256.c' object='hmac256-hmac256.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hmac256_CFLAGS) $(CFLAGS) -c -o hmac256-hmac256.obj `if test -f 'hmac256.c'; then $(CYGPATH_W) 'hmac256.c'; else $(CYGPATH_W) '$(srcdir)/hmac256.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-m4dataDATA: $(m4data_DATA) + @$(NORMAL_INSTALL) + test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" + @list='$(m4data_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \ + $(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \ + done + +uninstall-m4dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(m4data_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \ + rm -f "$(DESTDIR)$(m4datadir)/$$f"; \ + done +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ + $(HEADERS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-sbinPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-data-local install-includeHEADERS \ + install-m4dataDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-libLTLIBRARIES install-sbinPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-local uninstall-m4dataDATA uninstall-sbinPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-sbinPROGRAMS ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-binSCRIPTS install-data \ + install-data-am install-data-local install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-m4dataDATA install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \ + uninstall-sbinPROGRAMS + + +@HAVE_W32_SYSTEM_TRUE@.rc.lo: +@HAVE_W32_SYSTEM_TRUE@ $(LTRCCOMPILE) -i $< -o $@ + +@HAVE_W32_SYSTEM_TRUE@install-def-file: +@HAVE_W32_SYSTEM_TRUE@ $(INSTALL) $(srcdir)/libgcrypt.def $(DESTDIR)$(libdir)/libgcrypt.def + +@HAVE_W32_SYSTEM_TRUE@uninstall-def-file: +@HAVE_W32_SYSTEM_TRUE@ -rm $(DESTDIR)$(libdir)/libgcrypt.def +@HAVE_W32_SYSTEM_FALSE@install-def-file: +@HAVE_W32_SYSTEM_FALSE@uninstall-def-file: + +install-data-local: install-def-file + +uninstall-local: uninstall-def-file + +# FIXME: We need to figure out how to get the actual name (parsing +# libgcrypt.la?) and how to create the hmac file already at link time +# so that it can be used without installing libgcrypt first. +#install-exec-hook: +# ./hmac256 "What am I, a doctor or a moonshuttle conductor?" \ +# < $(DESTDIR)$(libdir)/libgcrypt.so.11.5.0 \ +# > $(DESTDIR)$(libdir)/.libgcrypt.so.11.5.0.hmac +# 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/plugins/MirOTR/libgcrypt-1.4.6/src/gcrypt.h b/plugins/MirOTR/libgcrypt-1.4.6/src/gcrypt.h index 9e624d3572..08112a7610 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/src/gcrypt.h +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/gcrypt.h @@ -1199,7 +1199,7 @@ void gcry_md_debug (gcry_md_hd_t hd, const char *suffix); #define gcry_md_putc(h,c) \ do { \ gcry_md_hd_t h__ = (h); \ - if ( (h__)->bufpos == (h__)->bufsize ) \ + if( (h__)->bufpos == (h__)->bufsize ) \ gcry_md_write( (h__), NULL, 0 ); \ (h__)->buf[(h__)->bufpos++] = (c) & 0xff; \ } while(0) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/gcryptrnd.c b/plugins/MirOTR/libgcrypt-1.4.6/src/gcryptrnd.c index 8aa3568837..e15fecaf35 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/src/gcryptrnd.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/gcryptrnd.c @@ -202,7 +202,7 @@ disable_core_dumps (void) if (getrlimit (RLIMIT_CORE, &limit)) limit.rlim_max = 0; limit.rlim_cur = 0; - if ( !setrlimit (RLIMIT_CORE, &limit) ) + if( !setrlimit (RLIMIT_CORE, &limit) ) return 0; if (errno != EINVAL && errno != ENOSYS) logit (LOG_ERR, "can't disable core dumps: %s\n", strerror (errno)); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/global.c b/plugins/MirOTR/libgcrypt-1.4.6/src/global.c index 7c73f14a99..a69513e7d5 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/src/global.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/global.c @@ -167,7 +167,7 @@ parse_version_number( const char *s, int *number ) { int val = 0; - if ( *s == '0' && isdigit(s[1]) ) + if( *s == '0' && isdigit(s[1]) ) return NULL; /* leading zeros are not allowed */ for ( ; isdigit(*s); s++ ) { val *= 10; @@ -190,15 +190,15 @@ static const char * parse_version_string( const char *s, int *major, int *minor, int *micro ) { s = parse_version_number( s, major ); - if ( !s || *s != '.' ) + if( !s || *s != '.' ) return NULL; s++; s = parse_version_number( s, minor ); - if ( !s || *s != '.' ) + if( !s || *s != '.' ) return NULL; s++; s = parse_version_number( s, micro ); - if ( !s ) + if( !s ) return NULL; return s; /* patchlevel */ } @@ -788,7 +788,7 @@ _gcry_check_heap( const void *a ) /* FIXME: implement this*/ #if 0 - if ( some_handler ) + if( some_handler ) some_handler(a) else _gcry_private_check_heap(a) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/misc.c b/plugins/MirOTR/libgcrypt-1.4.6/src/misc.c index 0146c61273..fcad8d4e3b 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/src/misc.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/misc.c @@ -48,7 +48,7 @@ gcry_set_gettext_handler( const char *(*f)(const char*) ) const char * _gcry_gettext( const char *key ) { - if ( user_gettext_handler ) + if( user_gettext_handler ) return user_gettext_handler( key ); /* FIXME: switch the domain to gnupg and restore later */ return key; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/missing-string.c b/plugins/MirOTR/libgcrypt-1.4.6/src/missing-string.c index c5f4c83f70..a5e56c3f76 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/src/missing-string.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/missing-string.c @@ -45,8 +45,8 @@ stpcpy(char *a,const char *b) int strcasecmp( const char *a, const char *b ) { - for ( ; *a && *b; a++, b++ ) { - if ( *a != *b && toupper(*a) != toupper(*b) ) + for( ; *a && *b; a++, b++ ) { + if( *a != *b && toupper(*a) != toupper(*b) ) break; } return *(const byte*)a - *(const byte*)b; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/sexp.c b/plugins/MirOTR/libgcrypt-1.4.6/src/sexp.c index 865e7d7a88..e11f86ec0a 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/src/sexp.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/sexp.c @@ -84,9 +84,9 @@ dump_mpi( gcry_mpi_t a ) char buffer[1000];
size_t n = 1000;
- if ( !a )
+ if( !a )
fputs("[no MPI]", stderr );
- else if ( gcry_mpi_print( GCRYMPI_FMT_HEX, buffer, &n, a ) )
+ else if( gcry_mpi_print( GCRYMPI_FMT_HEX, buffer, &n, a ) )
fputs("[MPI too large to print]", stderr );
else
fputs( buffer, stderr );
@@ -100,17 +100,17 @@ dump_string (const byte *p, size_t n, int delim ) {
if ((*p & 0x80) || iscntrl( *p ) || *p == delim )
{
- if ( *p == '\n' )
+ if( *p == '\n' )
log_printf ("\\n");
- else if ( *p == '\r' )
+ else if( *p == '\r' )
log_printf ("\\r");
- else if ( *p == '\f' )
+ else if( *p == '\f' )
log_printf ("\\f");
- else if ( *p == '\v' )
+ else if( *p == '\v' )
log_printf ("\\v");
- else if ( *p == '\b' )
+ else if( *p == '\b' )
log_printf ("\\b");
- else if ( !*p )
+ else if( !*p )
log_printf ("\\0");
else
log_printf ("\\x%02x", *p );
@@ -145,7 +145,7 @@ gcry_sexp_dump (const gcry_sexp_t a) indent++;
break;
case ST_CLOSE:
- if ( indent )
+ if( indent )
indent--;
log_printf ("%*s[close]\n", 2*indent, "");
break;
@@ -831,19 +831,19 @@ hextobyte( const byte *s ) {
int c=0;
- if ( *s >= '0' && *s <= '9' )
+ if( *s >= '0' && *s <= '9' )
c = 16 * (*s - '0');
- else if ( *s >= 'A' && *s <= 'F' )
+ else if( *s >= 'A' && *s <= 'F' )
c = 16 * (10 + *s - 'A');
- else if ( *s >= 'a' && *s <= 'f' ) {
+ else if( *s >= 'a' && *s <= 'f' ) {
c = 16 * (10 + *s - 'a');
}
s++;
- if ( *s >= '0' && *s <= '9' )
+ if( *s >= '0' && *s <= '9' )
c += *s - '0';
- else if ( *s >= 'A' && *s <= 'F' )
+ else if( *s >= 'A' && *s <= 'F' )
c += 10 + *s - 'A';
- else if ( *s >= 'a' && *s <= 'f' ) {
+ else if( *s >= 'a' && *s <= 'f' ) {
c += 10 + *s - 'a';
}
return c;
@@ -942,7 +942,7 @@ unquote_string (const char *string, size_t length, unsigned char *buf) }
esc = 0;
}
- else if ( *s == '\\' )
+ else if( *s == '\\' )
esc = 1;
else
*d++ = *s;
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/src/stdmem.c b/plugins/MirOTR/libgcrypt-1.4.6/src/stdmem.c index 14a7691563..bb8adeabec 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/src/stdmem.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/src/stdmem.c @@ -160,7 +160,7 @@ _gcry_private_realloc ( void *a, size_t n ) len = p[-4]; len |= p[-3] << 8; len |= p[-2] << 16; - if ( len >= n ) /* We don't shrink for now. */ + if( len >= n ) /* We don't shrink for now. */ return a; if (p[-1] == MAGIC_SEC_BYTE) b = _gcry_private_malloc_secure(n); diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/ChangeLog b/plugins/MirOTR/libgcrypt-1.4.6/tests/ChangeLog deleted file mode 100644 index e906aacf7a..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/ChangeLog +++ /dev/null @@ -1,770 +0,0 @@ -2010-07-13 Werner Koch <wk@g10code.com> - - * aeswrap.c: New. Take from trunk. - -2010-07-09 Werner Koch <wk@g10code.com> - - * basic.c (check_digests): Add tests for TIGER1 and TIGER2 from - the NESSIE project. - -2010-06-10 Werner Koch <wk@g10code.com> - - * t-mpi-bit.c (mpi2bitstr_nlz): Handle case for LENGTH==0. - -2009-01-22 Werner Koch <wk@g10code.com> - - * cavs_tests.sh: Pass option -D to driver if required. - - * fipsdrv.c (run_dsa_sign): Use hash of the data. - (dsa_gen_with_seed): New. - (run_dsa_pqg_gen): Add args SEED and SEEDLEN and use them. - (main): Optically take a seed for dsa-pgq-gen. - (standalone_mode): New. - (main): Add option --standalone. - (print_dsa_domain_parameters): Implement standalone mode. - -2009-01-21 Werner Koch <wk@g10code.com> - - * fipsdrv.c (run_dsa_verify): Use gcry_mpi_scan again. - (run_rsa_derive): Also print N. - - * fipsdrv.c (run_dsa_verify): Use hash of the data. - - * pubkey.c (get_dsa_key_fips186_with_seed_new): New. - (check_run): Call it. - -2008-12-11 Werner Koch <wk@g10code.com> - - * fipsdrv.c (run_rsa_derive): New. - (main): Add mode rsa-derive. - -2008-12-10 Werner Koch <wk@g10code.com> - - * basic.c (main): Check for error after running self-test in - non-fips mode. - - * pubkey.c (get_dsa_key_with_domain_new): New. - (get_dsa_key_fips186_with_domain_new): New. - (check_run): Call them. - -2008-12-08 Werner Koch <wk@g10code.com> - - * fipsdrv.c [W32]: Include fcntl.h. - -2008-12-05 Werner Koch <wk@g10code.com> - - * pubkey.c (get_dsa_key_new): Add arg transient_key. - (check_run): Use it. - -2008-12-03 Werner Koch <wk@g10code.com> - - * fipsdrv.c (run_dsa_pqg_gen): Facor code out into .. - (print_dsa_domain_parameters, dsa_gen): .. these two new functions. - (print_sexp, read_sexp_from_file): New. - (run_dsa_sign): New. - (run_dsa_verify): New. - -2008-12-02 Werner Koch <wk@g10code.com> - - * fipsdrv.c: All standalone build. - - * mpitests.c (mpi_powm): New. - -2008-11-28 Werner Koch <wk@g10code.com> - - * fips186-dsa.c: New. - - * fipsdrv.c (print_mpi_line, print_data_line): New. - (run_dsa_pqg_gen): New. - (usage): Add mode dsa-pqg-gen. - -2008-11-25 Werner Koch <wk@g10code.com> - - * pubkey.c (get_dsa_key_new): New. - -2008-11-24 Werner Koch <wk@g10code.com> - - * tsexp.c (basic): Add test for format character S. - - * pubkey.c (check_x931_derived_key): New. - (get_keys_x931_new): New. - (check_run): Check X9.31 generated RSA key. - -2008-11-07 Werner Koch <wk@g10code.com> - - * fipsdrv.c (run_cipher_mct_loop, get_current_iv): New. - (read_textline, read_hexline, skip_to_empty_line): New. - (main): New option --mct-server. - * cavs_driver.pl: Update from upstream and adjust to new fipsdrv. - -2008-11-05 Werner Koch <wk@g10code.com> - - * fipsdrv.c (run_encrypt_decrypt): Disable weak key detection. - -2008-10-31 Werner Koch <wk@g10code.com> - - * fipsdrv.c (run_rsa_sign): Buffer needs to be larger for SHA512. - -2008-10-27 Werner Koch <wk@g10code.com> - - * fipsdrv.c (run_encrypt_decrypt): Make IV_BUFFER optional. - (main): Ditto. - * cavs_driver.pl: Remove the --no-fips flags. - (libgcrypt_encdec($$$$$)): Make IV optional. - (libgcrypt_state_cipher($$$$$)): Ditto. - -2008-10-24 Werner Koch <wk@g10code.com> - - * benchmark.c (md_bench): Do not test MD5 in fips mode. - * basic.c (check_digests, check_hmac): Ditto. - -2008-10-06 Werner Koch <wk@g10code.com> - - * cavs_driver.pl: New version from upstream. - (libgcrypt_rsa_verify($$$$)): Pass pkcs1. - (libgcrypt_rsa_sign($$$)): Pass pkcs1 and hash algo. - - * fipsdrv.c (run_rsa_sign): Hash data in pkcs1 mode. - (run_rsa_verify): Ditto. - (read_key_file): Rename to read_private_key_file. Factor public - key code out to.. - (read_public_key_file): .. new. - -2008-10-02 Werner Koch <wk@g10code.com> - - * fipsdrv.c (print_buffer): Add base64 printing code. - (base64_decode, read_key_file, parse_tag, read_sig_file): New. - (run_rsa_gen, run_rsa_sign): New. - (main): Add modes rsa-gen, rsa-sign and rsa-verify. - - -2008-09-29 Werner Koch <wk@g10code.com> - - * fipsdrv.c: Merge code from fipsrngdrv.c - * fipsrngdrv.c: Remove. - -2008-09-26 Werner Koch <wk@g10code.com> - - * Makefile.am: Distribute cavs_driver.pl. - * cavs_tests.sh: New. - * fipsdrv.c: New. - -2008-09-18 Werner Koch <wk@g10code.com> - - * benchmark.c (main): Do not disable secure memory in FIPS mode. - -2008-09-18 Werner Koch <wk@g10code.com> - - * basic.c (main): Do not disable secure memory in FIPS mode. - -2008-09-16 Werner Koch <wk@g10code.com> - - * fipsrngdrv.c (main): Bail out on write error. Implement verbose - option. - (main): Use flag to disable dup block checks. - -2008-09-15 Werner Koch <wk@g10code.com> - - * fipsrngdrv.c: New. - -2008-09-09 Werner Koch <wk@g10code.com> - - * basic.c (main): New option --selftest. - -2008-08-29 Werner Koch <wk@g10code.com> - - * keygrip.c: Update to also check ECDSA. - -2008-08-28 Werner Koch <wk@g10code.com> - - * rsa-16k.key: New sample key. - -2008-08-27 Werner Koch <wk@g10code.com> - - * pkbench.c (read_file): New. - (process_key_pair_file): Replace mmap by read_file. - (main): Add a --fips option. - * Makefile.am (EXTRA_DIST): Remove. - (EXTRA_PROGRAMS): Add pkbench. - - * basic.c (main): Extended FIPS self-test test. - -2008-08-26 Werner Koch <wk@g10code.com> - - * basic.c (get_keys_new): Use transient-key flag. - * benchmark.c (main): First check options then do the libgcrypt - initialization. - (rsa_bench): Use transient-key flag if not in fips mode. - -2008-08-20 Werner Koch <wk@g10code.com> - - * t-mpi-bit.c (test_lshift): New. - (mpi2bitstr_nlz, lshiftbitstring): New. - (main): Run test. - -2008-08-18 Werner Koch <wk@g10code.com> - - * basic.c (main): Add option --fips. - -2008-08-15 Werner Koch <wk@g10code.com> - - * register.c (main): Check for fips mode. - (check_run): Take care of fips mode. - - * basic.c (check_cbc_mac_cipher, check_ciphers, check_digests) - (check_hmac, check_pubkey): Do not test unavalaible algorithms in - fips mode. - (main): Check for fips mode. - -2008-04-22 Werner Koch <wk@g10code.com> - - * basic.c (check_one_cipher): Also check in-place encryption. - -2008-03-17 Werner Koch <wk@g10code.com> - - * benchmark.c (main): Add option --cipher-repetition. - (cipher_bench): Use it. - -2008-03-12 Werner Koch <wk@g10code.com> - - * benchmark.c (rsa_bench): Add arg NO_BLINDING. - (main): Add option --no-blinding. - -2007-12-05 Werner Koch <wk@g10code.com> - - * pubkey.c (sample_private_key_1_1,sample_private_key_1_2): New. - (get_keys_sample): Add arg SECRET_VARIANT. - (check_run): Check all variants. Also check gcry_pk_testkey. - (check_keys_crypt): Add DECRYPT_FAIL_CODE. - (check_keys): Ditto. - -2007-11-30 Werner Koch <wk@g10code.com> - - * benchmark.c (main): Add optione --verbose and reworked the - option parsing. - (random_bench): Dump random stats. - -2007-10-31 Werner Koch <wk@g10code.com> - - * benchmark.c (start_timer, stop_timer, elapsed_time) [W32]: Fixed. - -2007-06-20 Werner Koch <wk@g10code.com> - - * benchmark.c (rsa_bench): New. - (main): New command "rsa". - -2007-05-03 Werner Koch <wk@g10code.com> - - * Makefile.am (EXTRA_DIST): Do not build pkbench.c - -2007-05-02 David Shaw <dshaw@jabberwocky.com> - - * basic.c (check_ciphers): Add Camellia. - -2007-04-30 David Shaw <dshaw@jabberwocky.com> - - * basic.c (check_ciphers): #if out ciphers we don't have. Add - test for GCRY_CIPHER_RFC2268_40. - -2007-04-30 Werner Koch <wk@g10code.com> - - * version.c: New. - * Makefile.am (TESTS): Add version. - -2007-04-30 Marcus Brinkmann <marcus@g10code.de> - - * benchmark.c (ecc_bench): Release KEY_SPEC. - -2007-04-28 Marcus Brinkmann <marcus@g10code.de> - - * ac-data.c (check_run): Don't give redundant GCRY_AC_FLAG_DEALLOC - in addition to GCRY_AC_FLAG_COPY. Don't release LABEL1 or MPI0, - as those are donated to libgcrypt, but do release MPI0 and MPI2. - -2007-04-12 Marcus Brinkmann <marcus@g10code.de> - - * ac-schemes.c (scheme_spec): Revert last change. - - * ac-schemes.c (scheme_spec): Remove const qualifier from member M. - (es_check): Remove const qualifier from C and M2. - -2007-03-28 Werner Koch <wk@g10code.com> - - * pkbench.c (generate_key): Support named curves. - - * benchmark.c (dsa_bench): New args ITERATIONS and PRINT_HEADER. - (main): Call dsa and ecc benchs. - (show_sexp): New. - - * Makefile.am (TESTS): Move pkbench to EXTRA_PROGRAMS. - -2007-03-22 Werner Koch <wk@g10code.com> - - * benchmark.c (die): New. - (ecc_bench): New. - - * pkbench.c (main): Reworked to provide proper option handling. - -2007-03-13 Werner Koch <wk@g10code.com> - - * mpitests.c: Reformatted to GNU standards. - (main): Add options --verbose and --debug for future use. - -2007-03-13 Werner Dittmann <Werner.Dittmann@t-online.de> (wk) - - * mpitests.c: New. - -2007-02-23 Werner Koch <wk@g10code.com> - - * Makefile.am (TEST): Run benchmark as last. - - * ac-data.c (check_sexp_conversion): Print label only in verbose - mode. - - * pubkey.c (main): Run test just 2 times instead of 10. - (get_elg_key_new): New. - (check_run): Also run tests with Elgamal keys. - (check_keys): New arg NBITS_DATA. - (get_elg_key_new): Use only 400 for the 512 bit Elgamal test. - - * random.c: New. - -2007-02-22 Werner Koch <wk@g10code.com> - - * basic.c (check_pubkey_sign): Also try signing using an OID. - - * Makefile.am (TESTS) [W32]: Removed pkbench for now. - * pkbench.c (benchmark): Fixed for W32. - -2007-02-21 Werner Koch <wk@g10code.com> - - * hmac.c (check_one_mac): Make pointer args const. - * basic.c (check_one_md): Ditto. - (check_one_hmac): Ditto. - - * keygen.c (progress_cb): Filter out line feeds. - * basic.c (progress_handler): Ditto. - -2006-12-18 Werner Koch <wk@g10code.com> - - * Makefile.am (AM_CFLAGS, AM_CPPFLAGS): Splitted and merged with - Moritz' changes. - (INCLUDES): Removed. - - * keygen.c (progress_handler): New. - (main): Use it in verbose mode. - -2006-11-05 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (AM_CFLAGS): Added -I$(top_builddir)/src so that the - new gcrypt.h is used, not the one installed in the system. - -2006-10-17 Werner Koch <wk@g10code.com> - - * keygen.c (check_rsa_keys): Also create an 1536 bit DSA key. - -2006-08-03 Werner Koch <wk@g10code.com> - - * t-mpi-bit.c: New. - -2006-07-06 Werner Koch <wk@g10code.com> - - * benchmark.c (main): New option --use-random-daemon. New command - strongrandom. - (random_bench): New arg VERY_STRONG. - -2006-03-14 Werner Koch <wk@g10code.com> - - * benchmark.c (main): Allow for seed file argument to random bench. - - * basic.c (main): Use progress handler only in verbose mode. - (main): Speed up test key generation. - * ac-data.c (check_sexp_conversion, check_run): Take care of VERBOSE. - * ac.c (main): Ditto. - * pubkey.c (main): Ditto. - * pkbench.c (main): Ditto. - * keygen.c (main): Ditto. - (check_rsa_keys): Print key only in verbose mode. - -2006-03-10 Brad Hards <bradh@frogmouth.net> (wk, patch 2006-02-18) - - * basic.c (check_one_hmac, check_hmac): New. - -2006-03-07 Werner Koch <wk@g10code.com> - - * benchmark.c (cipher_bench): Add OFB mode. - -2006-01-18 Brad Hards <bradh@frogmouth.net> (wk 2006-03-07) - - * basic.c: Added test cases for OFB and CFB modes. Fixed some - compiler warnings for signedness. - -2005-11-12 Moritz Schulte <moritz@g10code.com> - - * ac-data.c: Added way more test cases. - -2005-09-15 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (TESTS): Added keygrip. - * keygrip.c: New. - -2005-09-19 Werner Koch <wk@g10code.com> - - * benchmark.c (dsa_bench): New. - -2005-08-19 Werner Koch <wk@g10code.com> - - * hmac.c (main): Added all FIPS tests. - -2005-08-18 Werner Koch <wk@g10code.com> - - * hmac.c: New. - -2005-04-22 Moritz Schulte <moritz@g10code.com> - - * tsexp.c: Include <config.h> in case HAVE_CONFIG_H is defined; - thanks to Albert Chin. - * testapi.c: Likewise. - * register.c: Likewise. - * pubkey.c: Likewise. - * prime.c: Likewise. - * pkbench.c: Likewise. - * keygen.c: Likewise. - * benchmark.c: Likewise. - * basic.c: Likewise. - * ac-schemes.c: Likewise. - * ac-data.c: Likewise. - * ac.c: Likewise. - -2005-04-16 Moritz Schulte <moritz@g10code.com> - - * ac-data.c (check_run): Include new test. - -2005-04-11 Moritz Schulte <moritz@g10code.com> - - * basic.c (check_digests): Add tests for Whirlpool. - -2005-03-30 Moritz Schulte <moritz@g10code.com> - - * ac-schemes.c: New file. - * ac-data.c: New file. - * Makefile.am (TESTS): Added ac-schemes and ac-data. - -2004-09-15 Moritz Schulte <moritz@g10code.com> - - * pkbench.c: Include <time.h>. - -2004-08-24 Moritz Schulte <moritz@g10code.com> - - * pkbench.c (context_init): Improve generation of test data. - -2004-08-23 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (TESTS): Added: pkbench. - * pkbench.c: New file. - -2004-02-25 Werner Koch <wk@gnupg.org> - - * Makefile.am (TEST): Add benchmark. - - * benchmark.c (md_bench, cipher_bench): Allow NULL arg to to run - tests for all algorithms. - (main): Run all tests by default. - -2004-02-03 Werner Koch <wk@gnupg.org> - - * tsexp.c (basic): New pass to check secure memory switching. - -2004-01-12 Moritz Schulte <mo@g10code.com> - - * ac.c (check_one): Adjust to new ac API. - -2003-11-22 Werner Koch <wk@gnupg.org> - - * pubkey.c (check_keys_crypt): Fixed my last patch. - -2003-11-11 Werner Koch <wk@gnupg.org> - - * tsexp.c (basic): Add pass structure and a test for the %b - format. - -2003-11-04 Werner Koch <wk@gnupg.org> - - * Makefile.am (noinst_PROGRAMS): Use this so that test programs - get always build. - - * keygen.c (check_nonce): New. - (main): Add a basic check for the nocen function. - -2003-10-31 Werner Koch <wk@gnupg.org> - - * basic.c (check_aes128_cbc_cts_cipher): Make it a prototype - - * ac.c (check_run): Comment unused variable. - -2003-10-10 Werner Koch <wk@gnupg.org> - - * prime.c (check_primes): Generate a generator and avoid printing - unless in verbose mode. - -2003-10-07 Werner Koch <wk@gnupg.org> - - * tsexp.c (check_sscan): New. - -2003-09-04 Werner Koch <wk@gnupg.org> - - * pubkey.c (check_keys_crypt): Fix for compatibility mode. - -2003-09-02 Moritz Schulte <mo@g10code.com> - - * Makefile.am (TESTS): Added: prime. - - * prime.c: New file. - -2003-08-27 Moritz Schulte <mo@g10code.com> - - * basic.c (check_ciphers): Added: Serpent. - Write braces around flags. - -2003-08-04 Moritz Schulte <moritz@g10code.com> - - * benchmark.c (do_powm): Adjust for new gcry_mpi_scan interface. - -2003-07-23 Moritz Schulte <moritz@g10code.com> - - * ac.c (key_copy): New function... - (check_one): ... use it. - -2003-07-22 Moritz Schulte <moritz@g10code.com> - - * basic.c (check_ciphers): Use gcry_cipher_map_name. - -2003-07-18 Moritz Schulte <moritz@g10code.com> - - * ac.c (check_run): Renamed to ... - (check_one): ... this, changed calling interface. - (check_run): New function. - - * register.c: Adjust gcry_cipher_spec_t structure. - -2003-07-14 Moritz Schulte <moritz@g10code.com> - - * register.c: Adjust cipher specification structure. - - * benchmark.c: New file. - * testapi.c: New file. - - * Makefile.am (EXTRA_PROGRAMS): Set to: benchmark testapi. - (check_PROGRAMS): Set to: $(TESTS). - -2003-07-12 Moritz Schulte <moritz@g10code.com> - - * ac.c, basic.c, keygen.c, register.c, sexp.c, tsexp.c: Used - gcry_err* wrappers for libgpg symbols. - - * basic.c (check_ciphers): Added: GCRY_CIPHER_TWOFISH128. - -2003-07-08 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (LIBS): Remove: -lpthread. - - * basic.c (check_one_cipher): Fix variable initialization. Thanks - to Simon Joseffson <jas@extundo.com>. - -2003-07-07 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (TESTS): Added: register. - -2003-07-05 Moritz Schulte <moritz@g10code.com> - - * register.c (check_run): Adjusted for new gcry_cipher_register API. - -2003-07-02 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (TESTS): Added: ac. - * ac.c: New file. - -2003-06-18 Werner Koch <wk@gnupg.org> - - * basic.c (check_cbc_mac_cipher): Adjusted for new API of get_blklen - and get_keylen. - (check_ctr_cipher): Ditto. - (check_one_cipher): Ditto. - (check_one_md): Adjusted for new API of gcry_md_copy. - -2003-06-18 Moritz Schulte <moritz@g10code.com> - - * register.c: Replace old type GcryModule with newer one: - gcry_module_t. - Adjusted for new API. - - * Makefile.am (AM_CFLAGS): Added: @GPG_ERROR_CFLAGS@. - -2003-06-15 Moritz Schulte <moritz@g10code.com> - - * basic.c (get_keys_new): New function. - (do_check_one_pubkey): New function ... - (check_one_pubkey): ... use it. - (progress_handler): New function. - (main): Use gcry_set_progress_handler. - -2003-06-14 Moritz Schulte <moritz@g10code.com> - - * basic.c: Replaced calls to gcry_strerror with calls to - gpg_strerror. - (check_one_md): Adjust for new gcry_md_copy API. - - * tsexp.c: Likewise. - * keygen.c: Likewise. - -2003-06-12 Moritz Schulte <moritz@g10code.com> - - * basic.c: Changed here and there, reorganized pubkey checks, - added DSA and ELG keys. - -2003-06-09 Moritz Schulte <moritz@g10code.com> - - * basic.c, keygen.c, pubkey.c, register.c, tsexp.c: Changed to use - new API. - -2003-06-01 Moritz Schulte <moritz@g10code.com> - - * tsexp.c (canon_len): Adjust for new gcry_sexp_canon_len API. - -2003-05-26 Moritz Schulte <moritz@g10code.com> - - * basic.c (verify_one_signature): Adjust for libgpg-error. - (check_pubkey_sign): Likewise. - (check_pubkey): Likewise. - * basic.c (check_pubkey_sign): Likewise. - * tsexp.c (canon_len): Likewise. - (back_and_forth_one): Likewise. - -2003-04-27 Moritz Schulte <moritz@g10code.com> - - * pubkey.c: Changed the sample private key to contain the - identifier `openpgp-rsa' instead of `rsa'. - - * basic.c (check_digests): Enabled/fixed some tests for TIGER. - -2003-04-17 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (TESTS): Removed `register' for now. - -2003-04-17 Moritz Schulte <moritz@g10code.com> - - * basic.c (check_digests): Include checks for SHA512 and SHA384. - -2003-04-16 Moritz Schulte <moritz@g10code.com> - - * basic.c (check_one_md): Also test md_copy. - -2003-04-07 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (TESTS): Added register. - - * register.c: New file. - -2003-03-30 Simon Josefsson <jas@extundo.com> - - * basic.c (check_one_cipher): New. Test CTR. - (main): Call it. - (check_ciphers): Check CTR mode. - -2003-03-26 Moritz Schulte <moritz@g10code.com> - - * Makefile.am (TESTS): Added pubkey. - - * pubkey.c: New file. - -2003-03-22 Simon Josefsson <jas@extundo.com> - - * basic.c (check_cbc_mac_cipher): New. - (main): Use it. - -2003-03-19 Werner Koch <wk@gnupg.org> - - * keygen.c (check_rsa_keys): Don't expect an exponent when asking - for e=0. - (check_generated_rsa_key): Just print exponent if EXPECTED_E is 0. - -2003-03-02 Moritz Schulte <moritz@g10code.com> - - * basic.c (check_one_cipher): Use gcry_cipher_reset() instead of - gcry_cipher_close(), gcry_cipher_open and gcry_cipher_setkey(). - -2003-01-23 Werner Koch <wk@gnupg.org> - - * keygen.c: New. - -2003-01-20 Simon Josefsson <jas@extundo.com> - - * basic.c (check_digests): Add CRC. - (check_one_md): Print computed and expected values on error. - -2003-01-20 Werner Koch <wk@gnupg.org> - - * basic.c (check_one_md): Kludge to check a one million "a". - (check_digests): Add checks for SHA-256. - -2003-01-20 Werner Koch <wk@gnupg.org> - - * basic.c (check_pubkey): Check the keygrip for the sample key. - -2003-01-15 Werner Koch <wk@gnupg.org> - - * basic.c (verify_one_signature,check_pubkey_sign) - (check_pubkey): New. - (main): Check public key functions. Add a --debug option. - -2002-11-23 Werner Koch <wk@gnupg.org> - - * basic.c (check_digests): Add another test for MD4. By Simon - Josefsson. - -2002-11-10 Simon Josefsson <jas@extundo.com> - - * basic.c (check_aes128_cbc_cts_cipher): New function. - (check_one_cipher): Add flags parameter. - (check_ciphers): Support flags parameter. - (main): Check CTS. - -2002-11-10 Werner Koch <wk@gnupg.org> - - * basic.c (check_one_md): New. By Simon Josefsson. - (check_digests): New tests for MD4. By Simon. - -2002-08-26 Werner Koch <wk@gnupg.org> - - * basic.c (check_ciphers): Check simple DES. - -2002-05-16 Werner Koch <wk@gnupg.org> - - * tsexp.c (back_and_forth): Very minimal test of the new functions. - -2002-05-14 Werner Koch <wk@gnupg.org> - - Changed license of all files to the LGPL. - -2002-05-02 Werner Koch <wk@gnupg.org> - - * basic.c: Add option --verbose. - -2002-01-11 Werner Koch <wk@gnupg.org> - - * tsexp.c (canon_len): Fixed tests. - -2001-12-18 Werner Koch <wk@gnupg.org> - - * tsexp.c: New. - - - Copyright 2001, 2002, 2003, 2008 Free Software Foundation, Inc. - - This file is free software; as a special exception the author gives - unlimited permission to copy and/or distribute it, with or without - modifications, as long as this notice is preserved. - - This file 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. diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/README b/plugins/MirOTR/libgcrypt-1.4.6/tests/README deleted file mode 100644 index 5326890259..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/README +++ /dev/null @@ -1,9 +0,0 @@ -Some notes about the tests. - -rsa-16k.key - A 16384 bit RSA key (public and privat), created 2008-08-28. - It took 91 minutes to create it on a 1500Mhz Pentium M. - pkpench showed these results: - encrypt: 80 ms - decrypt: 14370 ms - sign: 14110 ms - verify: 30 ms diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/ac-data.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/ac-data.c deleted file mode 100644 index e97b4f49ec..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/ac-data.c +++ /dev/null @@ -1,208 +0,0 @@ -/* ac-data.c - Public key encryption/decryption tests - * Copyright (C) 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdlib.h> -#include <stdio.h> -#include <assert.h> - -#define assert_err(err) \ - do \ - if (err) \ - { \ - fprintf (stderr, "Error occured at line %i: %s\n", \ - __LINE__, gcry_strerror (err)); \ - exit (1); \ - } \ - while (0) - -#include "../src/gcrypt.h" - -static int verbose; - -static void -die (const char *format, ...) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - exit (1); -} - -static void -check_sexp_conversion (gcry_ac_data_t data, const char **identifiers) -{ - gcry_ac_data_t data2; - gcry_error_t err; - gcry_sexp_t sexp; - unsigned int i; - const char *label1, *label2; - gcry_mpi_t mpi1, mpi2; - size_t length1, length2; - - err = gcry_ac_data_to_sexp (data, &sexp, identifiers); - assert_err (err); - if (verbose) - gcry_sexp_dump (sexp); - err = gcry_ac_data_from_sexp (&data2, sexp, identifiers); - assert_err (err); - - length1 = gcry_ac_data_length (data); - length2 = gcry_ac_data_length (data2); - assert (length1 == length2); - - for (i = 0; i < length1; i++) - { - err = gcry_ac_data_get_index (data, 0, i, &label1, &mpi1); - assert_err (err); - err = gcry_ac_data_get_index (data2, 0, i, &label2, &mpi2); - assert_err (err); - if (verbose) - { - fprintf (stderr, "Label1=`%s'\n", label1); - fprintf (stderr, "Label2=`%s'\n", label2); - } - assert (! strcmp (label1, label2)); - assert (! gcry_mpi_cmp (mpi1, mpi2)); - } - - gcry_ac_data_destroy (data2); - gcry_sexp_release (sexp); -} - -void -check_run (void) -{ - const char *identifiers[] = { "foo", - "bar", - "baz", - "hello", - "somemoretexthere", - "blahblahblah", - NULL }; - const char *identifiers_null[] = { NULL }; - gcry_ac_data_t data; - gcry_error_t err; - const char *label0; - const char *label1; - gcry_mpi_t mpi0; - gcry_mpi_t mpi1; - gcry_mpi_t mpi2; - - /* Initialize values. */ - - label0 = "thisisreallylonglabelbutsincethereisnolimitationonthelengthoflabelsitshouldworkjustfine"; - mpi0 = gcry_mpi_new (0); - assert (mpi0); - gcry_mpi_set_ui (mpi0, 123456); - - err = gcry_ac_data_new (&data); - assert_err (err); - - check_sexp_conversion (data, identifiers); - check_sexp_conversion (data, identifiers_null); - check_sexp_conversion (data, NULL); - - err = gcry_ac_data_set (data, 0, label0, mpi0); - assert_err (err); - err = gcry_ac_data_get_index (data, 0, 0, &label1, &mpi1); - assert_err (err); - assert (label0 == label1); - assert (mpi0 == mpi1); - check_sexp_conversion (data, identifiers); - check_sexp_conversion (data, identifiers_null); - check_sexp_conversion (data, NULL); - - if (verbose) - printf ("data-set-test-0 succeeded\n"); - - gcry_ac_data_clear (data); - - err = gcry_ac_data_set (data, GCRY_AC_FLAG_COPY, label0, mpi0); - assert_err (err); - - err = gcry_ac_data_set (data, GCRY_AC_FLAG_COPY, "foo", mpi0); - assert_err (err); - err = gcry_ac_data_set (data, GCRY_AC_FLAG_COPY, "foo", mpi0); - assert_err (err); - err = gcry_ac_data_set (data, GCRY_AC_FLAG_COPY, "bar", mpi0); - assert_err (err); - err = gcry_ac_data_set (data, GCRY_AC_FLAG_COPY, "blah1", mpi0); - assert_err (err); - check_sexp_conversion (data, identifiers); - check_sexp_conversion (data, identifiers_null); - check_sexp_conversion (data, NULL); - - err = gcry_ac_data_get_name (data, 0, label0, &mpi1); - assert_err (err); - assert (mpi0 != mpi1); - err = gcry_ac_data_get_name (data, GCRY_AC_FLAG_COPY, label0, &mpi2); - assert_err (err); - assert (mpi0 != mpi1); - assert (mpi1 != mpi2); - err = gcry_ac_data_get_index (data, 0, 0, &label1, &mpi1); - assert_err (err); - gcry_mpi_release (mpi0); - gcry_mpi_release (mpi2); - - if (verbose) - printf ("data-set-test-1 succeeded\n"); - - gcry_ac_data_clear (data); - assert (! gcry_ac_data_length (data)); - check_sexp_conversion (data, identifiers); - check_sexp_conversion (data, identifiers_null); - check_sexp_conversion (data, NULL); - - if (verbose) - printf ("data-set-test-2 succeeded\n"); - - gcry_ac_data_destroy (data); - - -} - -int -main (int argc, char **argv) -{ - int debug = 0; - int i = 1; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); - - for (; i > 0; i--) - check_run (); - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/ac-schemes.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/ac-schemes.c deleted file mode 100644 index dcef0bf760..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/ac-schemes.c +++ /dev/null @@ -1,347 +0,0 @@ -/* ac-schemes.c - Tests for ES/SSA - Copyright (C) 2003, 2005 Free Software Foundation, Inc. - - This file is part of Libgcrypt. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <errno.h> - -#include "../src/gcrypt.h" - -static unsigned int verbose; - -static void -die (const char *format, ...) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - exit (1); -} - -typedef struct scheme_spec -{ - unsigned int idx; - gcry_ac_scheme_t scheme; - unsigned int flags; - const char *m; - size_t m_n; -} scheme_spec_t; - -#define SCHEME_SPEC_FLAG_GET_OPTS (1 << 0) - -#define FILL(idx, scheme, flags, m) \ - { idx, GCRY_AC_##scheme, flags, m, sizeof (m) } - -scheme_spec_t es_specs[] = - { - FILL (0, ES_PKCS_V1_5, 0, "foobar"), - FILL (1, ES_PKCS_V1_5, 0, "") - }; - -scheme_spec_t ssa_specs[] = - { - FILL (0, SSA_PKCS_V1_5, SCHEME_SPEC_FLAG_GET_OPTS, "foobar") - }; - -#undef FILL - -gcry_err_code_t -scheme_get_opts (scheme_spec_t specs, void **opts) -{ - gcry_err_code_t err = GPG_ERR_NO_ERROR; - void *opts_new = NULL; - - switch (specs.scheme) - { - case GCRY_AC_SSA_PKCS_V1_5: - { - gcry_ac_ssa_pkcs_v1_5_t *opts_pkcs_v1_5 = NULL; - - opts_new = gcry_malloc (sizeof (gcry_ac_ssa_pkcs_v1_5_t)); - if (! opts_new) - err = gpg_err_code_from_errno (ENOMEM); - else - { - opts_pkcs_v1_5 = (gcry_ac_ssa_pkcs_v1_5_t *) opts_new; - - switch (specs.idx) - { - case 0: - opts_pkcs_v1_5->md = GCRY_MD_SHA1; - break; - case 1: - opts_pkcs_v1_5->md = GCRY_MD_MD5; - break; - } - } - } - case GCRY_AC_ES_PKCS_V1_5: - break; - } - - if (! err) - *opts = opts_new; - - return err; -} - -gcry_error_t -es_check (gcry_ac_handle_t handle, scheme_spec_t spec, - gcry_ac_key_t key_public, gcry_ac_key_t key_secret) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - char *c = NULL; - char *m2 = NULL; - size_t c_n = 0; - size_t m2_n = 0; - void *opts = NULL; - gcry_ac_io_t io_m; - gcry_ac_io_t io_c; - gcry_ac_io_t io_m2; - - if (spec.flags & SCHEME_SPEC_FLAG_GET_OPTS) - err = scheme_get_opts (spec, &opts); - if (! err) - { - c = NULL; - m2 = NULL; - - gcry_ac_io_init (&io_m, GCRY_AC_IO_READABLE, - GCRY_AC_IO_STRING, spec.m, spec.m_n); - gcry_ac_io_init (&io_c, GCRY_AC_IO_WRITABLE, - GCRY_AC_IO_STRING, &c, &c_n); - - err = gcry_ac_data_encrypt_scheme (handle, GCRY_AC_ES_PKCS_V1_5, 0, opts, key_public, - &io_m, &io_c); - if (! err) - { - gcry_ac_io_init (&io_c, GCRY_AC_IO_READABLE, - GCRY_AC_IO_STRING, c, c_n); - gcry_ac_io_init (&io_m2, GCRY_AC_IO_WRITABLE, - GCRY_AC_IO_STRING, &m2, &m2_n); - - err = gcry_ac_data_decrypt_scheme (handle, GCRY_AC_ES_PKCS_V1_5, 0, - opts, key_secret, &io_c, &io_m2); - } - if (! err) - assert ((spec.m_n == m2_n) && (! strncmp (spec.m, m2, spec.m_n))); - - if (c) - gcry_free (c); - if (m2) - gcry_free (m2); - } - - if (opts) - gcry_free (opts); - - return err; -} - -gcry_error_t -ssa_check (gcry_ac_handle_t handle, scheme_spec_t spec, - gcry_ac_key_t key_public, gcry_ac_key_t key_secret) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - unsigned char *s = NULL; - size_t s_n = 0; - void *opts = NULL; - gcry_ac_io_t io_m; - gcry_ac_io_t io_s; - - if (spec.flags & SCHEME_SPEC_FLAG_GET_OPTS) - err = scheme_get_opts (spec, &opts); - if (! err) - { - gcry_ac_io_init (&io_m, GCRY_AC_IO_READABLE, - GCRY_AC_IO_STRING, spec.m, spec.m_n); - gcry_ac_io_init (&io_s, GCRY_AC_IO_WRITABLE, - GCRY_AC_IO_STRING, &s, &s_n); - - err = gcry_ac_data_sign_scheme (handle, GCRY_AC_SSA_PKCS_V1_5, 0, opts, key_secret, - &io_m, &io_s); - if (! err) - { - gcry_ac_io_init (&io_m, GCRY_AC_IO_READABLE, - GCRY_AC_IO_STRING, spec.m, spec.m_n); - gcry_ac_io_init (&io_s, GCRY_AC_IO_READABLE, - GCRY_AC_IO_STRING, s, s_n); - err = gcry_ac_data_verify_scheme (handle, GCRY_AC_SSA_PKCS_V1_5, 0, opts, key_public, - &io_m, &io_s); - } - assert (! err); - - if (s) - gcry_free (s); - } - - if (opts) - gcry_free (opts); - - return err; -} - -void -es_checks (gcry_ac_handle_t handle, gcry_ac_key_t key_public, gcry_ac_key_t key_secret) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - unsigned int i = 0; - - for (i = 0; (i < (sizeof (es_specs) / sizeof (*es_specs))) && (! err); i++) - err = es_check (handle, es_specs[i], key_public, key_secret); - - assert (! err); -} - -void -ssa_checks (gcry_ac_handle_t handle, gcry_ac_key_t key_public, gcry_ac_key_t key_secret) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - unsigned int i = 0; - - for (i = 0; (i < (sizeof (ssa_specs) / sizeof (*ssa_specs))) && (! err); i++) - err = ssa_check (handle, ssa_specs[i], key_public, key_secret); - - assert (! err); -} - -#define KEY_TYPE_PUBLIC (1 << 0) -#define KEY_TYPE_SECRET (1 << 1) - -typedef struct key_spec -{ - const char *name; - unsigned int flags; - const char *mpi_string; -} key_spec_t; - -key_spec_t key_specs[] = - { - { "n", KEY_TYPE_PUBLIC | KEY_TYPE_SECRET, - "e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa" - "2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291" - "ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7" - "891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251" }, - { "e", KEY_TYPE_PUBLIC | KEY_TYPE_SECRET, - "010001" }, - { "d", KEY_TYPE_SECRET, - "046129F2489D71579BE0A75FE029BD6CDB574EBF57EA8A5B0FDA942CAB943B11" - "7D7BB95E5D28875E0F9FC5FCC06A72F6D502464DABDED78EF6B716177B83D5BD" - "C543DC5D3FED932E59F5897E92E6F58A0F33424106A3B6FA2CBF877510E4AC21" - "C3EE47851E97D12996222AC3566D4CCB0B83D164074ABF7DE655FC2446DA1781" }, - { "p", KEY_TYPE_SECRET, - "00e861b700e17e8afe6837e7512e35b6ca11d0ae47d8b85161c67baf64377213" - "fe52d772f2035b3ca830af41d8a4120e1c1c70d12cc22f00d28d31dd48a8d424f1" }, - { "q", KEY_TYPE_SECRET, - "00f7a7ca5367c661f8e62df34f0d05c10c88e5492348dd7bddc942c9a8f369f9" - "35a07785d2db805215ed786e4285df1658eed3ce84f469b81b50d358407b4ad361" }, - { "u", KEY_TYPE_SECRET, - "304559a9ead56d2309d203811a641bb1a09626bc8eb36fffa23c968ec5bd891e" - "ebbafc73ae666e01ba7c8990bae06cc2bbe10b75e69fcacb353a6473079d8e9b" }, - { NULL }, - }; - -gcry_error_t -key_init (gcry_ac_key_type_t type, gcry_ac_key_t *key) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - gcry_ac_data_t key_data = NULL; - gcry_ac_key_t key_new = NULL; - gcry_mpi_t mpi = NULL; - unsigned int i = 0; - - err = gcry_ac_data_new (&key_data); - for (i = 0; key_specs[i].name && (! err); i++) - { - if (((type == GCRY_AC_KEY_PUBLIC) && (key_specs[i].flags & KEY_TYPE_PUBLIC)) - || ((type == GCRY_AC_KEY_SECRET) && (key_specs[i].flags & KEY_TYPE_SECRET))) - { - err = gcry_mpi_scan (&mpi, GCRYMPI_FMT_HEX, key_specs[i].mpi_string, 0, NULL); - if (! err) - { - gcry_ac_data_set (key_data, GCRY_AC_FLAG_COPY | GCRY_AC_FLAG_DEALLOC, - key_specs[i].name, mpi); - gcry_mpi_release (mpi); - } - } - } - if (! err) - err = gcry_ac_key_init (&key_new, NULL, type, key_data); - - if (key_data) - gcry_ac_data_destroy (key_data); - - if (! err) - *key = key_new; - - return err; -} - -static void -check_run (void) -{ - gcry_ac_handle_t handle = NULL; - gcry_error_t err = GPG_ERR_NO_ERROR; - gcry_ac_key_t key_public = NULL, key_secret = NULL; - - err = key_init (GCRY_AC_KEY_PUBLIC, &key_public); - if (! err) - err = key_init (GCRY_AC_KEY_SECRET, &key_secret); - - if (! err) - err = gcry_ac_open (&handle, GCRY_AC_RSA, 0); - if (! err) - { - es_checks (handle, key_public, key_secret); - ssa_checks (handle, key_public, key_secret); - } - - assert (! err); -} - -int -main (int argc, char **argv) -{ - unsigned int debug = 0; - - if ((argc > 1) && (! strcmp (argv[1], "--verbose"))) - verbose = 1; - else if ((argc > 1) && (! strcmp (argv[1], "--debug"))) - verbose = debug = 1; - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (! gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - - check_run (); - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/ac.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/ac.c deleted file mode 100644 index d734360a95..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/ac.c +++ /dev/null @@ -1,162 +0,0 @@ -/* pubkey.c - Public key encryption/decryption tests - * Copyright (C) 2003, 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> - -#include "../src/gcrypt.h" - -static int verbose; - -static void -die (const char *format, ...) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - exit (1); -} - -void -key_copy (gcry_ac_handle_t handle, - gcry_ac_key_type_t type, - gcry_ac_key_t *key_cp, gcry_ac_key_t key) -{ - gcry_error_t err = 0; - - err = gcry_ac_key_init (key_cp, handle, type, - gcry_ac_key_data_get (key)); - - assert (! err); -} - -void -check_one (gcry_mpi_t x) -{ - gcry_ac_handle_t handle; - gcry_ac_key_pair_t key_pair; - gcry_ac_key_t key_sec, key_sec_cp, key_pub, key_pub_cp; - gcry_error_t err = 0; - gcry_mpi_t x2; - gcry_ac_data_t data, data2; - gcry_ac_key_spec_rsa_t rsa_spec; - - rsa_spec.e = gcry_mpi_new (0); - gcry_mpi_set_ui (rsa_spec.e, 1); - - err = gcry_ac_open (&handle, GCRY_AC_RSA, 0); - assert (! err); - - err = gcry_ac_key_pair_generate (handle, 1024, &rsa_spec, &key_pair, NULL); - assert (! err); - - key_sec = gcry_ac_key_pair_extract (key_pair, GCRY_AC_KEY_SECRET); - key_copy (handle, GCRY_AC_KEY_SECRET, &key_sec_cp, key_sec); - - key_pub = gcry_ac_key_pair_extract (key_pair, GCRY_AC_KEY_PUBLIC); - key_copy (handle, GCRY_AC_KEY_PUBLIC, &key_pub_cp, key_pub); - - err = gcry_ac_data_encrypt (handle, GCRY_AC_FLAG_NO_BLINDING, key_pub_cp, x, &data); - assert (! err); - - err = gcry_ac_data_decrypt (handle, GCRY_AC_FLAG_NO_BLINDING, key_sec_cp, &x2, data); - assert (! err); - - assert (! gcry_mpi_cmp (x, x2)); - - gcry_ac_data_destroy (data); - - err = gcry_ac_data_sign (handle, key_sec, x, &data); - assert (! err); - err = gcry_ac_data_copy (&data2, data); - assert (! err); - gcry_ac_data_destroy (data); - err = gcry_ac_data_copy (&data, data2); - assert (! err); - gcry_ac_data_destroy (data2); - - err = gcry_ac_data_verify (handle, key_pub, x, data); - assert (! err); - - gcry_ac_data_destroy (data); - - err = gcry_ac_data_sign (handle, key_sec, x, &data); - assert (! err); - { - const char *label; - gcry_mpi_t y; - - err = gcry_ac_data_get_index (data, 0, 0, &label, &y); - assert (! err); - gcry_mpi_add_ui (y, y, 1); - - err = gcry_ac_data_verify (handle, key_pub, x, data); - assert (gcry_err_code (err) == GPG_ERR_BAD_SIGNATURE); - } - - gcry_ac_close (handle); -} - -void -check_run (void) -{ - /*const char *s = "All Hail Discordia."; -- not used */ - unsigned int a = 0x4223; - gcry_mpi_t x; - - x = gcry_mpi_new (0); - gcry_mpi_set_ui (x, a); - check_one (x); - gcry_mpi_release (x); -} - -int -main (int argc, char **argv) -{ - int debug = 0; - int i = 1; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); - /* No valuable keys are create, so we can speed up our RNG. */ - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - - for (; i > 0; i--) - check_run (); - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/aeswrap.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/aeswrap.c deleted file mode 100644 index 39ef1e72a0..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/aeswrap.c +++ /dev/null @@ -1,259 +0,0 @@ -/* aeswrap.c - AESWRAP mode regression tests - * Copyright (C) 2009 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> - -#include "../src/gcrypt.h" - -static int verbose; -static int error_count; - -static void -fail (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - error_count++; -} - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - - - -static void -check (int algo, - const void *kek, size_t keklen, - const void *data, size_t datalen, - const void *expected, size_t expectedlen) -{ - gcry_error_t err; - gcry_cipher_hd_t hd; - unsigned char outbuf[32+8]; - size_t outbuflen; - - err = gcry_cipher_open (&hd, algo, GCRY_CIPHER_MODE_AESWRAP, 0); - if (err) - { - fail ("gcry_cipher_open failed: %s\n", gpg_strerror (err)); - return; - } - - err = gcry_cipher_setkey (hd, kek, keklen); - if (err) - { - fail ("gcry_cipher_setkey failed: %s\n", gpg_strerror (err)); - return; - } - - outbuflen = datalen + 8; - if (outbuflen > sizeof outbuf) - err = gpg_error (GPG_ERR_INTERNAL); - else - err = gcry_cipher_encrypt (hd, outbuf, outbuflen, data, datalen); - if (err) - { - fail ("gcry_cipher_encrypt failed: %s\n", gpg_strerror (err)); - return; - } - - if (outbuflen != expectedlen || memcmp (outbuf, expected, expectedlen)) - { - const unsigned char *s; - int i; - - fail ("mismatch at encryption!\n"); - fprintf (stderr, "computed: "); - for (i = 0; i < outbuflen; i++) - fprintf (stderr, "%02x ", outbuf[i]); - fprintf (stderr, "\nexpected: "); - for (s = expected, i = 0; i < expectedlen; s++, i++) - fprintf (stderr, "%02x ", *s); - putc ('\n', stderr); - } - - - outbuflen = expectedlen - 8; - if (outbuflen > sizeof outbuf) - err = gpg_error (GPG_ERR_INTERNAL); - else - err = gcry_cipher_decrypt (hd, outbuf, outbuflen, expected, expectedlen); - if (err) - { - fail ("gcry_cipher_decrypt failed: %s\n", gpg_strerror (err)); - return; - } - - if (outbuflen != datalen || memcmp (outbuf, data, datalen)) - { - const unsigned char *s; - int i; - - fail ("mismatch at decryption!\n"); - fprintf (stderr, "computed: "); - for (i = 0; i < outbuflen; i++) - fprintf (stderr, "%02x ", outbuf[i]); - fprintf (stderr, "\nexpected: "); - for (s = data, i = 0; i < datalen; s++, i++) - fprintf (stderr, "%02x ", *s); - putc ('\n', stderr); - } - - /* Now the last step again with a key reset. */ - gcry_cipher_reset (hd); - - outbuflen = expectedlen - 8; - if (outbuflen > sizeof outbuf) - err = gpg_error (GPG_ERR_INTERNAL); - else - err = gcry_cipher_decrypt (hd, outbuf, outbuflen, expected, expectedlen); - if (err) - { - fail ("gcry_cipher_decrypt(2) failed: %s\n", gpg_strerror (err)); - return; - } - - if (outbuflen != datalen || memcmp (outbuf, data, datalen)) - fail ("mismatch at decryption(2)!\n"); - - /* And once ore without a key reset. */ - outbuflen = expectedlen - 8; - if (outbuflen > sizeof outbuf) - err = gpg_error (GPG_ERR_INTERNAL); - else - err = gcry_cipher_decrypt (hd, outbuf, outbuflen, expected, expectedlen); - if (err) - { - fail ("gcry_cipher_decrypt(3) failed: %s\n", gpg_strerror (err)); - return; - } - - if (outbuflen != datalen || memcmp (outbuf, data, datalen)) - fail ("mismatch at decryption(3)!\n"); - - gcry_cipher_close (hd); -} - - -static void -check_all (void) -{ - if (verbose) - fprintf (stderr, "4.1 Wrap 128 bits of Key Data with a 128-bit KEK\n"); - check - (GCRY_CIPHER_AES128, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", 16, - "\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF", 16, - "\x1F\xA6\x8B\x0A\x81\x12\xB4\x47\xAE\xF3\x4B\xD8\xFB\x5A\x7B\x82" - "\x9D\x3E\x86\x23\x71\xD2\xCF\xE5", 24); - - if (verbose) - fprintf (stderr, "4.2 Wrap 128 bits of Key Data with a 192-bit KEK\n"); - check - (GCRY_CIPHER_AES192, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\x14\x15\x16\x17", 24, - "\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF", 16, - "\x96\x77\x8B\x25\xAE\x6C\xA4\x35\xF9\x2B\x5B\x97\xC0\x50\xAE\xD2" - "\x46\x8A\xB8\xA1\x7A\xD8\x4E\x5D", 24); - - if (verbose) - fprintf (stderr, "4.3 Wrap 128 bits of Key Data with a 256-bit KEK\n"); - check - (GCRY_CIPHER_AES256, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F", 32, - "\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF", 16, - "\x64\xE8\xC3\xF9\xCE\x0F\x5B\xA2\x63\xE9\x77\x79\x05\x81\x8A\x2A" - "\x93\xC8\x19\x1E\x7D\x6E\x8A\xE7", 24); - - if (verbose) - fprintf (stderr, "4.4 Wrap 192 bits of Key Data with a 192-bit KEK\n"); - check - (GCRY_CIPHER_AES192, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\x14\x15\x16\x17", 24, - "\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF" - "\x00\x01\x02\x03\x04\x05\x06\x07", 24, - "\x03\x1D\x33\x26\x4E\x15\xD3\x32\x68\xF2\x4E\xC2\x60\x74\x3E\xDC" - "\xE1\xC6\xC7\xDD\xEE\x72\x5A\x93\x6B\xA8\x14\x91\x5C\x67\x62\xD2", 32); - - if (verbose) - fprintf (stderr, "4.5 Wrap 192 bits of Key Data with a 256-bit KEK\n"); - check - (GCRY_CIPHER_AES256, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F", 32, - "\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF" - "\x00\x01\x02\x03\x04\x05\x06\x07", 24, - "\xA8\xF9\xBC\x16\x12\xC6\x8B\x3F\xF6\xE6\xF4\xFB\xE3\x0E\x71\xE4" - "\x76\x9C\x8B\x80\xA3\x2C\xB8\x95\x8C\xD5\xD1\x7D\x6B\x25\x4D\xA1", 32); - - if (verbose) - fprintf (stderr, "4.6 Wrap 256 bits of Key Data with a 256-bit KEK\n"); - check - (GCRY_CIPHER_AES, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F", 32, - "\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF" - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", 32, - "\x28\xC9\xF4\x04\xC4\xB8\x10\xF4\xCB\xCC\xB3\x5C\xFB\x87\xF8\x26" - "\x3F\x57\x86\xE2\xD8\x0E\xD3\x26\xCB\xC7\xF0\xE7\x1A\x99\xF4\x3B" - "\xFB\x98\x8B\x9B\x7A\x02\xDD\x21", 40); -} - -int -main (int argc, char **argv) -{ - int debug = 0; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - check_all (); - - return error_count ? 1 : 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/basic.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/basic.c deleted file mode 100644 index d8cdea6ceb..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/basic.c +++ /dev/null @@ -1,2250 +0,0 @@ -/* basic.c - basic regression tests - * Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> - -#include "../src/gcrypt.h" - -typedef struct test_spec_pubkey_key -{ - const char *secret; - const char *public; - const char *grip; -} -test_spec_pubkey_key_t; - -typedef struct test_spec_pubkey -{ - int id; - int flags; - test_spec_pubkey_key_t key; -} -test_spec_pubkey_t; - -#define FLAG_CRYPT (1 << 0) -#define FLAG_SIGN (1 << 1) -#define FLAG_GRIP (1 << 2) - -static int verbose; -static int error_count; -static int in_fips_mode; - -static void -fail (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - error_count++; -} - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - -#define MAX_DATA_LEN 100 - -void -progress_handler (void *cb_data, const char *what, int printchar, - int current, int total) -{ - (void)cb_data; - (void)what; - (void)current; - (void)total; - - if (printchar == '\n') - fputs ( "<LF>", stdout); - else - putchar (printchar); - fflush (stdout); -} - -static void -check_cbc_mac_cipher (void) -{ - struct tv - { - int algo; - char key[MAX_DATA_LEN]; - unsigned char plaintext[MAX_DATA_LEN]; - size_t plaintextlen; - char mac[MAX_DATA_LEN]; - } - tv[] = - { - { GCRY_CIPHER_AES, - "chicken teriyaki", - "This is a sample plaintext for CBC MAC of sixtyfour bytes.......", - 0, "\x23\x8f\x6d\xc7\x53\x6a\x62\x97\x11\xc4\xa5\x16\x43\xea\xb0\xb6" }, - { GCRY_CIPHER_3DES, - "abcdefghABCDEFGH01234567", - "This is a sample plaintext for CBC MAC of sixtyfour bytes.......", - 0, "\x5c\x11\xf0\x01\x47\xbd\x3d\x3a" }, - { GCRY_CIPHER_DES, - "abcdefgh", - "This is a sample plaintext for CBC MAC of sixtyfour bytes.......", - 0, "\xfa\x4b\xdf\x9d\xfa\xab\x01\x70" } - }; - gcry_cipher_hd_t hd; - unsigned char out[MAX_DATA_LEN]; - int i, blklen, keylen; - gcry_error_t err = 0; - - if (verbose) - fprintf (stderr, "Starting CBC MAC checks.\n"); - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - if (gcry_cipher_test_algo (tv[i].algo) && in_fips_mode) - { - if (verbose) - fprintf (stderr, " algorithm %d not available in fips mode\n", - tv[i].algo); - continue; - } - - err = gcry_cipher_open (&hd, - tv[i].algo, - GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_CBC_MAC); - if (!hd) - { - fail ("cbc-mac algo %d, grcy_open_cipher failed: %s\n", - tv[i].algo, gpg_strerror (err)); - return; - } - - blklen = gcry_cipher_get_algo_blklen(tv[i].algo); - if (!blklen) - { - fail ("cbc-mac algo %d, gcry_cipher_get_algo_blklen failed\n", - tv[i].algo); - gcry_cipher_close (hd); - return; - } - - keylen = gcry_cipher_get_algo_keylen (tv[i].algo); - if (!keylen) - { - fail ("cbc-mac algo %d, gcry_cipher_get_algo_keylen failed\n", - tv[i].algo); - return; - } - - err = gcry_cipher_setkey (hd, tv[i].key, keylen); - if (err) - { - fail ("cbc-mac algo %d, gcry_cipher_setkey failed: %s\n", - tv[i].algo, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - err = gcry_cipher_setiv (hd, NULL, 0); - if (err) - { - fail ("cbc-mac algo %d, gcry_cipher_setiv failed: %s\n", - tv[i].algo, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - if (verbose) - fprintf (stderr, " checking CBC MAC for %s [%i]\n", - gcry_cipher_algo_name (tv[i].algo), - tv[i].algo); - err = gcry_cipher_encrypt (hd, - out, blklen, - tv[i].plaintext, - tv[i].plaintextlen ? - tv[i].plaintextlen : - strlen ((char*)tv[i].plaintext)); - if (err) - { - fail ("cbc-mac algo %d, gcry_cipher_encrypt failed: %s\n", - tv[i].algo, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - -#if 0 - { - int j; - for (j = 0; j < gcry_cipher_get_algo_blklen (tv[i].algo); j++) - printf ("\\x%02x", out[j] & 0xFF); - printf ("\n"); - } -#endif - - if (memcmp (tv[i].mac, out, blklen)) - fail ("cbc-mac algo %d, encrypt mismatch entry %d\n", tv[i].algo, i); - - gcry_cipher_close (hd); - } - if (verbose) - fprintf (stderr, "Completed CBC MAC checks.\n"); -} - -static void -check_aes128_cbc_cts_cipher (void) -{ - char key[128 / 8] = "chicken teriyaki"; - unsigned char plaintext[] = - "I would like the General Gau's Chicken, please, and wonton soup."; - struct tv - { - unsigned char out[MAX_DATA_LEN]; - int inlen; - } tv[] = - { - { "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4\xd8\xa5\x80\x36\x2d\xa7\xff\x7f" - "\x97", - 17 }, - { "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1\xd4\x45\xd4\xc8\xef\xf7\xed\x22" - "\x97\x68\x72\x68\xd6\xec\xcc\xc0\xc0\x7b\x25\xe2\x5e\xcf\xe5", - 31 }, - { "\x39\x31\x25\x23\xa7\x86\x62\xd5\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8" - "\x97\x68\x72\x68\xd6\xec\xcc\xc0\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84", - 32 }, - { "\x97\x68\x72\x68\xd6\xec\xcc\xc0\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84" - "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c\x1b\x55\x49\xd2\xf8\x38\x02\x9e" - "\x39\x31\x25\x23\xa7\x86\x62\xd5\xbe\x7f\xcb\xcc\x98\xeb\xf5", - 47 }, - { "\x97\x68\x72\x68\xd6\xec\xcc\xc0\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84" - "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8" - "\x39\x31\x25\x23\xa7\x86\x62\xd5\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8", - 48 }, - { "\x97\x68\x72\x68\xd6\xec\xcc\xc0\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84" - "\x39\x31\x25\x23\xa7\x86\x62\xd5\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8" - "\x48\x07\xef\xe8\x36\xee\x89\xa5\x26\x73\x0d\xbc\x2f\x7b\xc8\x40" - "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8", - 64 }, - }; - gcry_cipher_hd_t hd; - unsigned char out[MAX_DATA_LEN]; - int i; - gcry_error_t err = 0; - - if (verbose) - fprintf (stderr, "Starting AES128 CBC CTS checks.\n"); - err = gcry_cipher_open (&hd, - GCRY_CIPHER_AES, - GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_CBC_CTS); - if (err) - { - fail ("aes-cbc-cts, grcy_open_cipher failed: %s\n", gpg_strerror (err)); - return; - } - - err = gcry_cipher_setkey (hd, key, 128 / 8); - if (err) - { - fail ("aes-cbc-cts, gcry_cipher_setkey failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - err = gcry_cipher_setiv (hd, NULL, 0); - if (err) - { - fail ("aes-cbc-cts, gcry_cipher_setiv failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - if (verbose) - fprintf (stderr, " checking encryption for length %i\n", tv[i].inlen); - err = gcry_cipher_encrypt (hd, out, MAX_DATA_LEN, - plaintext, tv[i].inlen); - if (err) - { - fail ("aes-cbc-cts, gcry_cipher_encrypt failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - if (memcmp (tv[i].out, out, tv[i].inlen)) - fail ("aes-cbc-cts, encrypt mismatch entry %d\n", i); - - err = gcry_cipher_setiv (hd, NULL, 0); - if (err) - { - fail ("aes-cbc-cts, gcry_cipher_setiv failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - if (verbose) - fprintf (stderr, " checking decryption for length %i\n", tv[i].inlen); - err = gcry_cipher_decrypt (hd, out, tv[i].inlen, NULL, 0); - if (err) - { - fail ("aes-cbc-cts, gcry_cipher_decrypt failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - if (memcmp (plaintext, out, tv[i].inlen)) - fail ("aes-cbc-cts, decrypt mismatch entry %d\n", i); - } - - gcry_cipher_close (hd); - if (verbose) - fprintf (stderr, "Completed AES128 CBC CTS checks.\n"); -} - -static void -check_ctr_cipher (void) -{ - struct tv - { - int algo; - char key[MAX_DATA_LEN]; - char ctr[MAX_DATA_LEN]; - struct data - { - unsigned char plaintext[MAX_DATA_LEN]; - int inlen; - char out[MAX_DATA_LEN]; - } - data[MAX_DATA_LEN]; - } tv[] = - { - /* http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf */ - { GCRY_CIPHER_AES, - "\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\xcf\x4f\x3c", - "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\x87\x4d\x61\x91\xb6\x20\xe3\x26\x1b\xef\x68\x64\x99\x0d\xb6\xce" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\x98\x06\xf6\x6b\x79\x70\xfd\xff\x86\x17\x18\x7b\xb9\xff\xfd\xff" }, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e\x5b\x4f\x09\x02\x0d\xb0\x3e\xab" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1\x79\x21\x70\xa0\xf3\x00\x9c\xee" }, - } - }, - { GCRY_CIPHER_AES192, - "\x8e\x73\xb0\xf7\xda\x0e\x64\x52\xc8\x10\xf3\x2b" - "\x80\x90\x79\xe5\x62\xf8\xea\xd2\x52\x2c\x6b\x7b", - "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\x1a\xbc\x93\x24\x17\x52\x1c\xa2\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\x09\x03\x39\xec\x0a\xa6\xfa\xef\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94" }, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70\xd1\xbd\x1d\x66\x56\x20\xab\xf7" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\x4f\x78\xa7\xf6\xd2\x98\x09\x58\x5a\x97\xda\xec\x58\xc6\xb0\x50" }, - } - }, - { GCRY_CIPHER_AES256, - "\x60\x3d\xeb\x10\x15\xca\x71\xbe\x2b\x73\xae\xf0\x85\x7d\x77\x81" - "\x1f\x35\x2c\x07\x3b\x61\x08\xd7\x2d\x98\x10\xa3\x09\x14\xdf\xf4", - "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\x60\x1e\xc3\x13\x77\x57\x89\xa5\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a\xca\x84\xe9\x90\xca\xca\xf5\xc5" }, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c\xe8\x70\x17\xba\x2d\x84\x98\x8d" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6\x13\xc2\xdd\x08\x45\x79\x41\xa6" } - } - } - }; - gcry_cipher_hd_t hde, hdd; - unsigned char out[MAX_DATA_LEN]; - int i, j, keylen, blklen; - gcry_error_t err = 0; - - if (verbose) - fprintf (stderr, "Starting CTR cipher checks.\n"); - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_CTR, 0); - if (!err) - err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_CTR, 0); - if (err) - { - fail ("aes-ctr, grcy_open_cipher failed: %s\n", gpg_strerror (err)); - return; - } - - keylen = gcry_cipher_get_algo_keylen(tv[i].algo); - if (!keylen) - { - fail ("aes-ctr, gcry_cipher_get_algo_keylen failed\n"); - return; - } - - err = gcry_cipher_setkey (hde, tv[i].key, keylen); - if (!err) - err = gcry_cipher_setkey (hdd, tv[i].key, keylen); - if (err) - { - fail ("aes-ctr, gcry_cipher_setkey failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - blklen = gcry_cipher_get_algo_blklen(tv[i].algo); - if (!blklen) - { - fail ("aes-ctr, gcry_cipher_get_algo_blklen failed\n"); - return; - } - - err = gcry_cipher_setctr (hde, tv[i].ctr, blklen); - if (!err) - err = gcry_cipher_setctr (hdd, tv[i].ctr, blklen); - if (err) - { - fail ("aes-ctr, gcry_cipher_setctr failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - if (verbose) - fprintf (stderr, " checking CTR mode for for %s [%i]\n", - gcry_cipher_algo_name (tv[i].algo), - tv[i].algo); - for (j = 0; tv[i].data[j].inlen; j++) - { - err = gcry_cipher_encrypt (hde, out, MAX_DATA_LEN, - tv[i].data[j].plaintext, - tv[i].data[j].inlen == -1 ? - strlen ((char*)tv[i].data[j].plaintext) : - tv[i].data[j].inlen); - if (err) - { - fail ("aes-ctr, gcry_cipher_encrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - if (memcmp (tv[i].data[j].out, out, tv[i].data[j].inlen)) - fail ("aes-ctr, encrypt mismatch entry %d:%d\n", i, j); - - err = gcry_cipher_decrypt (hdd, out, tv[i].data[j].inlen, NULL, 0); - if (err) - { - fail ("aes-ctr, gcry_cipher_decrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - if (memcmp (tv[i].data[j].plaintext, out, tv[i].data[j].inlen)) - fail ("aes-ctr, decrypt mismatch entry %d:%d\n", i, j); - } - - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - } - if (verbose) - fprintf (stderr, "Completed CTR cipher checks.\n"); -} - -static void -check_cfb_cipher (void) -{ - struct tv - { - int algo; - char key[MAX_DATA_LEN]; - char iv[MAX_DATA_LEN]; - struct data - { - unsigned char plaintext[MAX_DATA_LEN]; - int inlen; - char out[MAX_DATA_LEN]; - } - data[MAX_DATA_LEN]; - } tv[] = - { - /* http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf */ - { GCRY_CIPHER_AES, - "\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\xcf\x4f\x3c", - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20\x33\x34\x49\xf8\xe8\x3c\xfb\x4a" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\xc8\xa6\x45\x37\xa0\xb3\xa9\x3f\xcd\xe3\xcd\xad\x9f\x1c\xe5\x8b"}, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x26\x75\x1f\x67\xa3\xcb\xb1\x40\xb1\x80\x8c\xf1\x87\xa4\xf4\xdf" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\xc0\x4b\x05\x35\x7c\x5d\x1c\x0e\xea\xc4\xc6\x6f\x9f\xf7\xf2\xe6" }, - } - }, - { GCRY_CIPHER_AES192, - "\x8e\x73\xb0\xf7\xda\x0e\x64\x52\xc8\x10\xf3\x2b" - "\x80\x90\x79\xe5\x62\xf8\xea\xd2\x52\x2c\x6b\x7b", - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\xcd\xc8\x0d\x6f\xdd\xf1\x8c\xab\x34\xc2\x59\x09\xc9\x9a\x41\x74" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\x67\xce\x7f\x7f\x81\x17\x36\x21\x96\x1a\x2b\x70\x17\x1d\x3d\x7a" }, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x2e\x1e\x8a\x1d\xd5\x9b\x88\xb1\xc8\xe6\x0f\xed\x1e\xfa\xc4\xc9" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\xc0\x5f\x9f\x9c\xa9\x83\x4f\xa0\x42\xae\x8f\xba\x58\x4b\x09\xff" }, - } - }, - { GCRY_CIPHER_AES256, - "\x60\x3d\xeb\x10\x15\xca\x71\xbe\x2b\x73\xae\xf0\x85\x7d\x77\x81" - "\x1f\x35\x2c\x07\x3b\x61\x08\xd7\x2d\x98\x10\xa3\x09\x14\xdf\xf4", - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\xdc\x7e\x84\xbf\xda\x79\x16\x4b\x7e\xcd\x84\x86\x98\x5d\x38\x60" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\x39\xff\xed\x14\x3b\x28\xb1\xc8\x32\x11\x3c\x63\x31\xe5\x40\x7b" }, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\xdf\x10\x13\x24\x15\xe5\x4b\x92\xa1\x3e\xd0\xa8\x26\x7a\xe2\xf9" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\x75\xa3\x85\x74\x1a\xb9\xce\xf8\x20\x31\x62\x3d\x55\xb1\xe4\x71" } - } - } - }; - gcry_cipher_hd_t hde, hdd; - unsigned char out[MAX_DATA_LEN]; - int i, j, keylen, blklen; - gcry_error_t err = 0; - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_CFB, 0); - if (!err) - err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_CFB, 0); - if (err) - { - fail ("aes-cfb, grcy_open_cipher failed: %s\n", gpg_strerror (err)); - return; - } - - keylen = gcry_cipher_get_algo_keylen(tv[i].algo); - if (!keylen) - { - fail ("aes-cfb, gcry_cipher_get_algo_keylen failed\n"); - return; - } - - err = gcry_cipher_setkey (hde, tv[i].key, keylen); - if (!err) - err = gcry_cipher_setkey (hdd, tv[i].key, keylen); - if (err) - { - fail ("aes-cfb, gcry_cipher_setkey failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - blklen = gcry_cipher_get_algo_blklen(tv[i].algo); - if (!blklen) - { - fail ("aes-cfb, gcry_cipher_get_algo_blklen failed\n"); - return; - } - - err = gcry_cipher_setiv (hde, tv[i].iv, blklen); - if (!err) - err = gcry_cipher_setiv (hdd, tv[i].iv, blklen); - if (err) - { - fail ("aes-cfb, gcry_cipher_setiv failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - for (j = 0; tv[i].data[j].inlen; j++) - { - err = gcry_cipher_encrypt (hde, out, MAX_DATA_LEN, - tv[i].data[j].plaintext, - tv[i].data[j].inlen); - if (err) - { - fail ("aes-cfb, gcry_cipher_encrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - if (memcmp (tv[i].data[j].out, out, tv[i].data[j].inlen)) { - fail ("aes-cfb, encrypt mismatch entry %d:%d\n", i, j); - } - err = gcry_cipher_decrypt (hdd, out, tv[i].data[j].inlen, NULL, 0); - if (err) - { - fail ("aes-cfb, gcry_cipher_decrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - if (memcmp (tv[i].data[j].plaintext, out, tv[i].data[j].inlen)) - fail ("aes-cfb, decrypt mismatch entry %d:%d\n", i, j); - } - - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - } -} - -static void -check_ofb_cipher (void) -{ - struct tv - { - int algo; - char key[MAX_DATA_LEN]; - char iv[MAX_DATA_LEN]; - struct data - { - unsigned char plaintext[MAX_DATA_LEN]; - int inlen; - char out[MAX_DATA_LEN]; - } - data[MAX_DATA_LEN]; - } tv[] = - { - /* http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf */ - { GCRY_CIPHER_AES, - "\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\xcf\x4f\x3c", - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20\x33\x34\x49\xf8\xe8\x3c\xfb\x4a" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5\x3c\x52\xda\xc5\x4e\xd8\x25"}, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43\x44\xf7\xa8\x22\x60\xed\xcc" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\x30\x4c\x65\x28\xf6\x59\xc7\x78\x66\xa5\x10\xd9\xc1\xd6\xae\x5e" }, - } - }, - { GCRY_CIPHER_AES192, - "\x8e\x73\xb0\xf7\xda\x0e\x64\x52\xc8\x10\xf3\x2b" - "\x80\x90\x79\xe5\x62\xf8\xea\xd2\x52\x2c\x6b\x7b", - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\xcd\xc8\x0d\x6f\xdd\xf1\x8c\xab\x34\xc2\x59\x09\xc9\x9a\x41\x74" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\xfc\xc2\x8b\x8d\x4c\x63\x83\x7c\x09\xe8\x17\x00\xc1\x10\x04\x01" }, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x8d\x9a\x9a\xea\xc0\xf6\x59\x6f\x55\x9c\x6d\x4d\xaf\x59\xa5\xf2" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\x6d\x9f\x20\x08\x57\xca\x6c\x3e\x9c\xac\x52\x4b\xd9\xac\xc9\x2a" }, - } - }, - { GCRY_CIPHER_AES256, - "\x60\x3d\xeb\x10\x15\xca\x71\xbe\x2b\x73\xae\xf0\x85\x7d\x77\x81" - "\x1f\x35\x2c\x07\x3b\x61\x08\xd7\x2d\x98\x10\xa3\x09\x14\xdf\xf4", - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", - { { "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a", - 16, - "\xdc\x7e\x84\xbf\xda\x79\x16\x4b\x7e\xcd\x84\x86\x98\x5d\x38\x60" }, - { "\xae\x2d\x8a\x57\x1e\x03\xac\x9c\x9e\xb7\x6f\xac\x45\xaf\x8e\x51", - 16, - "\x4f\xeb\xdc\x67\x40\xd2\x0b\x3a\xc8\x8f\x6a\xd8\x2a\x4f\xb0\x8d" }, - { "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11\xe5\xfb\xc1\x19\x1a\x0a\x52\xef", - 16, - "\x71\xab\x47\xa0\x86\xe8\x6e\xed\xf3\x9d\x1c\x5b\xba\x97\xc4\x08" }, - { "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - 16, - "\x01\x26\x14\x1d\x67\xf3\x7b\xe8\x53\x8f\x5a\x8b\xe7\x40\xe4\x84" } - } - } - }; - gcry_cipher_hd_t hde, hdd; - unsigned char out[MAX_DATA_LEN]; - int i, j, keylen, blklen; - gcry_error_t err = 0; - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_OFB, 0); - if (!err) - err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_OFB, 0); - if (err) - { - fail ("aes-ofb, grcy_open_cipher failed: %s\n", gpg_strerror (err)); - return; - } - - keylen = gcry_cipher_get_algo_keylen(tv[i].algo); - if (!keylen) - { - fail ("aes-ofb, gcry_cipher_get_algo_keylen failed\n"); - return; - } - - err = gcry_cipher_setkey (hde, tv[i].key, keylen); - if (!err) - err = gcry_cipher_setkey (hdd, tv[i].key, keylen); - if (err) - { - fail ("aes-ofb, gcry_cipher_setkey failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - blklen = gcry_cipher_get_algo_blklen(tv[i].algo); - if (!blklen) - { - fail ("aes-ofb, gcry_cipher_get_algo_blklen failed\n"); - return; - } - - err = gcry_cipher_setiv (hde, tv[i].iv, blklen); - if (!err) - err = gcry_cipher_setiv (hdd, tv[i].iv, blklen); - if (err) - { - fail ("aes-ofb, gcry_cipher_setiv failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - for (j = 0; tv[i].data[j].inlen; j++) - { - err = gcry_cipher_encrypt (hde, out, MAX_DATA_LEN, - tv[i].data[j].plaintext, - tv[i].data[j].inlen); - if (err) - { - fail ("aes-ofb, gcry_cipher_encrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - if (memcmp (tv[i].data[j].out, out, tv[i].data[j].inlen)) - fail ("aes-ofb, encrypt mismatch entry %d:%d\n", i, j); - - err = gcry_cipher_decrypt (hdd, out, tv[i].data[j].inlen, NULL, 0); - if (err) - { - fail ("aes-ofb, gcry_cipher_decrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - if (memcmp (tv[i].data[j].plaintext, out, tv[i].data[j].inlen)) - fail ("aes-ofb, decrypt mismatch entry %d:%d\n", i, j); - } - - err = gcry_cipher_reset(hde); - if (!err) - err = gcry_cipher_reset(hdd); - if (err) - { - fail ("aes-ofb, gcry_cipher_reset (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - /* gcry_cipher_reset clears the IV */ - err = gcry_cipher_setiv (hde, tv[i].iv, blklen); - if (!err) - err = gcry_cipher_setiv (hdd, tv[i].iv, blklen); - if (err) - { - fail ("aes-ofb, gcry_cipher_setiv failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - - /* this time we encrypt and decrypt one byte at a time */ - for (j = 0; tv[i].data[j].inlen; j++) - { - int byteNum; - for (byteNum = 0; byteNum < tv[i].data[j].inlen; ++byteNum) - { - err = gcry_cipher_encrypt (hde, out+byteNum, 1, - (tv[i].data[j].plaintext) + byteNum, - 1); - if (err) - { - fail ("aes-ofb, gcry_cipher_encrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - } - - if (memcmp (tv[i].data[j].out, out, tv[i].data[j].inlen)) - fail ("aes-ofb, encrypt mismatch entry %d:%d\n", i, j); - - for (byteNum = 0; byteNum < tv[i].data[j].inlen; ++byteNum) - { - err = gcry_cipher_decrypt (hdd, out+byteNum, 1, NULL, 0); - if (err) - { - fail ("aes-ofb, gcry_cipher_decrypt (%d, %d) failed: %s\n", - i, j, gpg_strerror (err)); - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - return; - } - } - - if (memcmp (tv[i].data[j].plaintext, out, tv[i].data[j].inlen)) - fail ("aes-ofb, decrypt mismatch entry %d:%d\n", i, j); - } - - gcry_cipher_close (hde); - gcry_cipher_close (hdd); - } -} - -static void -check_one_cipher (int algo, int mode, int flags) -{ - gcry_cipher_hd_t hd; - char key[32]; - unsigned char plain[16], in[16], out[16]; - int keylen; - gcry_error_t err = 0; - - memcpy (key, "0123456789abcdef.,;/[]{}-=ABCDEF", 32); - memcpy (plain, "foobar42FOOBAR17", 16); - - keylen = gcry_cipher_get_algo_keylen (algo); - if (!keylen) - { - fail ("algo %d, mode %d, gcry_cipher_get_algo_keylen failed\n", - algo, mode); - return; - } - - if (keylen < 40 / 8 || keylen > 32) - { - fail ("algo %d, mode %d, keylength problem (%d)\n", algo, mode, keylen); - return; - } - - err = gcry_cipher_open (&hd, algo, mode, flags); - if (err) - { - fail ("algo %d, mode %d, grcy_open_cipher failed: %s\n", - algo, mode, gpg_strerror (err)); - return; - } - - err = gcry_cipher_setkey (hd, key, keylen); - if (err) - { - fail ("algo %d, mode %d, gcry_cipher_setkey failed: %s\n", - algo, mode, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - err = gcry_cipher_encrypt (hd, out, 16, plain, 16); - if (err) - { - fail ("algo %d, mode %d, gcry_cipher_encrypt failed: %s\n", - algo, mode, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - gcry_cipher_reset (hd); - - err = gcry_cipher_decrypt (hd, in, 16, out, 16); - if (err) - { - fail ("algo %d, mode %d, gcry_cipher_decrypt failed: %s\n", - algo, mode, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - if (memcmp (plain, in, 16)) - fail ("algo %d, mode %d, encrypt-decrypt mismatch\n", algo, mode); - - /* Again, using in-place encryption. */ - gcry_cipher_reset (hd); - - memcpy (out, plain, 16); - err = gcry_cipher_encrypt (hd, out, 16, NULL, 0); - if (err) - { - fail ("algo %d, mode %d, in-place, gcry_cipher_encrypt failed: %s\n", - algo, mode, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - gcry_cipher_reset (hd); - - err = gcry_cipher_decrypt (hd, out, 16, NULL, 0); - if (err) - { - fail ("algo %d, mode %d, in-place, gcry_cipher_decrypt failed: %s\n", - algo, mode, gpg_strerror (err)); - gcry_cipher_close (hd); - return; - } - - if (memcmp (plain, out, 16)) - fail ("algo %d, mode %d, in-place, encrypt-decrypt mismatch\n",algo, mode); - - - gcry_cipher_close (hd); - -} - - -static void -check_ciphers (void) -{ - static int algos[] = { -#if USE_BLOWFISH - GCRY_CIPHER_BLOWFISH, -#endif -#if USE_DES - GCRY_CIPHER_DES, - GCRY_CIPHER_3DES, -#endif -#if USE_CAST5 - GCRY_CIPHER_CAST5, -#endif -#if USE_AES - GCRY_CIPHER_AES, - GCRY_CIPHER_AES192, - GCRY_CIPHER_AES256, -#endif -#if USE_TWOFISH - GCRY_CIPHER_TWOFISH, - GCRY_CIPHER_TWOFISH128, -#endif -#if USE_SERPENT - GCRY_CIPHER_SERPENT128, - GCRY_CIPHER_SERPENT192, - GCRY_CIPHER_SERPENT256, -#endif -#if USE_RFC2268 - GCRY_CIPHER_RFC2268_40, -#endif -#if USE_SEED - GCRY_CIPHER_SEED, -#endif -#if USE_CAMELLIA - GCRY_CIPHER_CAMELLIA128, - GCRY_CIPHER_CAMELLIA192, - GCRY_CIPHER_CAMELLIA256, -#endif - 0 - }; - static int algos2[] = { -#if USE_ARCFOUR - GCRY_CIPHER_ARCFOUR, -#endif - 0 - }; - int i; - - if (verbose) - fprintf (stderr, "Starting Cipher checks.\n"); - for (i = 0; algos[i]; i++) - { - if (gcry_cipher_test_algo (algos[i]) && in_fips_mode) - { - if (verbose) - fprintf (stderr, " algorithm %d not available in fips mode\n", - algos[i]); - continue; - } - if (verbose) - fprintf (stderr, " checking %s [%i]\n", - gcry_cipher_algo_name (algos[i]), - gcry_cipher_map_name (gcry_cipher_algo_name (algos[i]))); - - check_one_cipher (algos[i], GCRY_CIPHER_MODE_ECB, 0); - check_one_cipher (algos[i], GCRY_CIPHER_MODE_CFB, 0); - check_one_cipher (algos[i], GCRY_CIPHER_MODE_OFB, 0); - check_one_cipher (algos[i], GCRY_CIPHER_MODE_CBC, 0); - check_one_cipher (algos[i], GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_CBC_CTS); - check_one_cipher (algos[i], GCRY_CIPHER_MODE_CTR, 0); - } - - for (i = 0; algos2[i]; i++) - { - if (gcry_cipher_test_algo (algos[i]) && in_fips_mode) - { - if (verbose) - fprintf (stderr, " algorithm %d not available in fips mode\n", - algos[i]); - continue; - } - if (verbose) - fprintf (stderr, " checking `%s'\n", - gcry_cipher_algo_name (algos2[i])); - - check_one_cipher (algos2[i], GCRY_CIPHER_MODE_STREAM, 0); - } - /* we have now run all cipher's selftests */ - - if (verbose) - fprintf (stderr, "Completed Cipher checks.\n"); - - /* TODO: add some extra encryption to test the higher level functions */ -} - - - -static void -check_one_md (int algo, const char *data, int len, const char *expect) -{ - gcry_md_hd_t hd, hd2; - unsigned char *p; - int mdlen; - int i; - gcry_error_t err = 0; - - err = gcry_md_open (&hd, algo, 0); - if (err) - { - fail ("algo %d, grcy_md_open failed: %s\n", algo, gpg_strerror (err)); - return; - } - - mdlen = gcry_md_get_algo_dlen (algo); - if (mdlen < 1 || mdlen > 500) - { - fail ("algo %d, grcy_md_get_algo_dlen failed: %d\n", algo, mdlen); - return; - } - - if (*data == '!' && !data[1]) - { /* hash one million times a "a" */ - char aaa[1000]; - - /* Write in odd size chunks so that we test the buffering. */ - memset (aaa, 'a', 1000); - for (i = 0; i < 1000; i++) - gcry_md_write (hd, aaa, 1000); - } - else - gcry_md_write (hd, data, len); - - err = gcry_md_copy (&hd2, hd); - if (err) - { - fail ("algo %d, gcry_md_copy failed: %s\n", algo, gpg_strerror (err)); - } - - gcry_md_close (hd); - - p = gcry_md_read (hd2, algo); - - if (memcmp (p, expect, mdlen)) - { - printf ("computed: "); - for (i = 0; i < mdlen; i++) - printf ("%02x ", p[i] & 0xFF); - printf ("\nexpected: "); - for (i = 0; i < mdlen; i++) - printf ("%02x ", expect[i] & 0xFF); - printf ("\n"); - - fail ("algo %d, digest mismatch\n", algo); - } - - gcry_md_close (hd2); -} - - -static void -check_digests (void) -{ - static struct algos - { - int md; - const char *data; - const char *expect; - } algos[] = - { - { GCRY_MD_MD4, "", - "\x31\xD6\xCF\xE0\xD1\x6A\xE9\x31\xB7\x3C\x59\xD7\xE0\xC0\x89\xC0" }, - { GCRY_MD_MD4, "a", - "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb\x24" }, - { GCRY_MD_MD4, "message digest", - "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01\x4b" }, - { GCRY_MD_MD5, "", - "\xD4\x1D\x8C\xD9\x8F\x00\xB2\x04\xE9\x80\x09\x98\xEC\xF8\x42\x7E" }, - { GCRY_MD_MD5, "a", - "\x0C\xC1\x75\xB9\xC0\xF1\xB6\xA8\x31\xC3\x99\xE2\x69\x77\x26\x61" }, - { GCRY_MD_MD5, "abc", - "\x90\x01\x50\x98\x3C\xD2\x4F\xB0\xD6\x96\x3F\x7D\x28\xE1\x7F\x72" }, - { GCRY_MD_MD5, "message digest", - "\xF9\x6B\x69\x7D\x7C\xB7\x93\x8D\x52\x5A\x2F\x31\xAA\xF1\x61\xD0" }, - { GCRY_MD_SHA1, "abc", - "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E" - "\x25\x71\x78\x50\xC2\x6C\x9C\xD0\xD8\x9D" }, - { GCRY_MD_SHA1, - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE" - "\x4A\xA1\xF9\x51\x29\xE5\xE5\x46\x70\xF1" }, - { GCRY_MD_SHA1, "!" /* kludge for "a"*1000000 */ , - "\x34\xAA\x97\x3C\xD4\xC4\xDA\xA4\xF6\x1E" - "\xEB\x2B\xDB\xAD\x27\x31\x65\x34\x01\x6F" }, - /* From RFC3874 */ - { GCRY_MD_SHA224, "abc", - "\x23\x09\x7d\x22\x34\x05\xd8\x22\x86\x42\xa4\x77\xbd\xa2\x55\xb3" - "\x2a\xad\xbc\xe4\xbd\xa0\xb3\xf7\xe3\x6c\x9d\xa7" }, - { GCRY_MD_SHA224, - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "\x75\x38\x8b\x16\x51\x27\x76\xcc\x5d\xba\x5d\xa1\xfd\x89\x01\x50" - "\xb0\xc6\x45\x5c\xb4\xf5\x8b\x19\x52\x52\x25\x25" }, - { GCRY_MD_SHA224, "!", - "\x20\x79\x46\x55\x98\x0c\x91\xd8\xbb\xb4\xc1\xea\x97\x61\x8a\x4b" - "\xf0\x3f\x42\x58\x19\x48\xb2\xee\x4e\xe7\xad\x67" }, - { GCRY_MD_SHA256, "abc", - "\xba\x78\x16\xbf\x8f\x01\xcf\xea\x41\x41\x40\xde\x5d\xae\x22\x23" - "\xb0\x03\x61\xa3\x96\x17\x7a\x9c\xb4\x10\xff\x61\xf2\x00\x15\xad" }, - { GCRY_MD_SHA256, - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "\x24\x8d\x6a\x61\xd2\x06\x38\xb8\xe5\xc0\x26\x93\x0c\x3e\x60\x39" - "\xa3\x3c\xe4\x59\x64\xff\x21\x67\xf6\xec\xed\xd4\x19\xdb\x06\xc1" }, - { GCRY_MD_SHA256, "!", - "\xcd\xc7\x6e\x5c\x99\x14\xfb\x92\x81\xa1\xc7\xe2\x84\xd7\x3e\x67" - "\xf1\x80\x9a\x48\xa4\x97\x20\x0e\x04\x6d\x39\xcc\xc7\x11\x2c\xd0" }, - { GCRY_MD_SHA384, "abc", - "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50\x07" - "\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff\x5b\xed" - "\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34\xc8\x25\xa7" }, - { GCRY_MD_SHA512, "abc", - "\xDD\xAF\x35\xA1\x93\x61\x7A\xBA\xCC\x41\x73\x49\xAE\x20\x41\x31" - "\x12\xE6\xFA\x4E\x89\xA9\x7E\xA2\x0A\x9E\xEE\xE6\x4B\x55\xD3\x9A" - "\x21\x92\x99\x2A\x27\x4F\xC1\xA8\x36\xBA\x3C\x23\xA3\xFE\xEB\xBD" - "\x45\x4D\x44\x23\x64\x3C\xE8\x0E\x2A\x9A\xC9\x4F\xA5\x4C\xA4\x9F" }, - { GCRY_MD_RMD160, "", - "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28" - "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31" }, - { GCRY_MD_RMD160, "a", - "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae" - "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe" }, - { GCRY_MD_RMD160, "abc", - "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04" - "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc" }, - { GCRY_MD_RMD160, "message digest", - "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8" - "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36" }, - { GCRY_MD_CRC32, "", "\x00\x00\x00\x00" }, - { GCRY_MD_CRC32, "foo", "\x8c\x73\x65\x21" }, - { GCRY_MD_CRC32_RFC1510, "", "\x00\x00\x00\x00" }, - { GCRY_MD_CRC32_RFC1510, "foo", "\x73\x32\xbc\x33" }, - { GCRY_MD_CRC32_RFC1510, "test0123456789", "\xb8\x3e\x88\xd6" }, - { GCRY_MD_CRC32_RFC1510, "MASSACHVSETTS INSTITVTE OF TECHNOLOGY", - "\xe3\x41\x80\xf7" }, -#if 0 - { GCRY_MD_CRC32_RFC1510, "\x80\x00", "\x3b\x83\x98\x4b" }, - { GCRY_MD_CRC32_RFC1510, "\x00\x08", "\x0e\xdb\x88\x32" }, - { GCRY_MD_CRC32_RFC1510, "\x00\x80", "\xed\xb8\x83\x20" }, -#endif - { GCRY_MD_CRC32_RFC1510, "\x80", "\xed\xb8\x83\x20" }, -#if 0 - { GCRY_MD_CRC32_RFC1510, "\x80\x00\x00\x00", "\xed\x59\xb6\x3b" }, - { GCRY_MD_CRC32_RFC1510, "\x00\x00\x00\x01", "\x77\x07\x30\x96" }, -#endif - { GCRY_MD_CRC24_RFC2440, "", "\xb7\x04\xce" }, - { GCRY_MD_CRC24_RFC2440, "foo", "\x4f\xc2\x55" }, - { GCRY_MD_TIGER, "", - "\x24\xF0\x13\x0C\x63\xAC\x93\x32\x16\x16\x6E\x76" - "\xB1\xBB\x92\x5F\xF3\x73\xDE\x2D\x49\x58\x4E\x7A" }, - { GCRY_MD_TIGER, "abc", - "\xF2\x58\xC1\xE8\x84\x14\xAB\x2A\x52\x7A\xB5\x41" - "\xFF\xC5\xB8\xBF\x93\x5F\x7B\x95\x1C\x13\x29\x51" }, - { GCRY_MD_TIGER, "Tiger", - "\x9F\x00\xF5\x99\x07\x23\x00\xDD\x27\x6A\xBB\x38" - "\xC8\xEB\x6D\xEC\x37\x79\x0C\x11\x6F\x9D\x2B\xDF" }, - { GCRY_MD_TIGER, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefg" - "hijklmnopqrstuvwxyz0123456789+-", - "\x87\xFB\x2A\x90\x83\x85\x1C\xF7\x47\x0D\x2C\xF8" - "\x10\xE6\xDF\x9E\xB5\x86\x44\x50\x34\xA5\xA3\x86" }, - { GCRY_MD_TIGER, "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdef" - "ghijklmnopqrstuvwxyz+0123456789", - "\x46\x7D\xB8\x08\x63\xEB\xCE\x48\x8D\xF1\xCD\x12" - "\x61\x65\x5D\xE9\x57\x89\x65\x65\x97\x5F\x91\x97" }, - { GCRY_MD_TIGER, "Tiger - A Fast New Hash Function, " - "by Ross Anderson and Eli Biham", - "\x0C\x41\x0A\x04\x29\x68\x86\x8A\x16\x71\xDA\x5A" - "\x3F\xD2\x9A\x72\x5E\xC1\xE4\x57\xD3\xCD\xB3\x03" }, - { GCRY_MD_TIGER, "Tiger - A Fast New Hash Function, " - "by Ross Anderson and Eli Biham, proceedings of Fa" - "st Software Encryption 3, Cambridge.", - "\xEB\xF5\x91\xD5\xAF\xA6\x55\xCE\x7F\x22\x89\x4F" - "\xF8\x7F\x54\xAC\x89\xC8\x11\xB6\xB0\xDA\x31\x93" }, - { GCRY_MD_TIGER, "Tiger - A Fast New Hash Function, " - "by Ross Anderson and Eli Biham, proceedings of Fa" - "st Software Encryption 3, Cambridge, 1996.", - "\x3D\x9A\xEB\x03\xD1\xBD\x1A\x63\x57\xB2\x77\x4D" - "\xFD\x6D\x5B\x24\xDD\x68\x15\x1D\x50\x39\x74\xFC" }, - { GCRY_MD_TIGER, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh" - "ijklmnopqrstuvwxyz0123456789+-ABCDEFGHIJKLMNOPQRS" - "TUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", - "\x00\xB8\x3E\xB4\xE5\x34\x40\xC5\x76\xAC\x6A\xAE" - "\xE0\xA7\x48\x58\x25\xFD\x15\xE7\x0A\x59\xFF\xE4" }, - - { GCRY_MD_TIGER1, "", - "\x32\x93\xAC\x63\x0C\x13\xF0\x24\x5F\x92\xBB\xB1" - "\x76\x6E\x16\x16\x7A\x4E\x58\x49\x2D\xDE\x73\xF3" }, - { GCRY_MD_TIGER1, "a", - "\x77\xBE\xFB\xEF\x2E\x7E\xF8\xAB\x2E\xC8\xF9\x3B" - "\xF5\x87\xA7\xFC\x61\x3E\x24\x7F\x5F\x24\x78\x09" }, - { GCRY_MD_TIGER1, "abc", - "\x2A\xAB\x14\x84\xE8\xC1\x58\xF2\xBF\xB8\xC5\xFF" - "\x41\xB5\x7A\x52\x51\x29\x13\x1C\x95\x7B\x5F\x93" }, - { GCRY_MD_TIGER1, "message digest", - "\xD9\x81\xF8\xCB\x78\x20\x1A\x95\x0D\xCF\x30\x48" - "\x75\x1E\x44\x1C\x51\x7F\xCA\x1A\xA5\x5A\x29\xF6" }, - { GCRY_MD_TIGER1, "abcdefghijklmnopqrstuvwxyz", - "\x17\x14\xA4\x72\xEE\xE5\x7D\x30\x04\x04\x12\xBF" - "\xCC\x55\x03\x2A\x0B\x11\x60\x2F\xF3\x7B\xEE\xE9" }, - { GCRY_MD_TIGER1, - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "\x0F\x7B\xF9\xA1\x9B\x9C\x58\xF2\xB7\x61\x0D\xF7" - "\xE8\x4F\x0A\xC3\xA7\x1C\x63\x1E\x7B\x53\xF7\x8E" }, - { GCRY_MD_TIGER1, - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" "0123456789", - "\x8D\xCE\xA6\x80\xA1\x75\x83\xEE\x50\x2B\xA3\x8A" - "\x3C\x36\x86\x51\x89\x0F\xFB\xCC\xDC\x49\xA8\xCC" }, - { GCRY_MD_TIGER1, - "1234567890" "1234567890" "1234567890" "1234567890" - "1234567890" "1234567890" "1234567890" "1234567890", - "\x1C\x14\x79\x55\x29\xFD\x9F\x20\x7A\x95\x8F\x84" - "\xC5\x2F\x11\xE8\x87\xFA\x0C\xAB\xDF\xD9\x1B\xFD" }, - { GCRY_MD_TIGER1, "!", - "\x6D\xB0\xE2\x72\x9C\xBE\xAD\x93\xD7\x15\xC6\xA7" - "\xD3\x63\x02\xE9\xB3\xCE\xE0\xD2\xBC\x31\x4B\x41" }, - - { GCRY_MD_TIGER2, "", - "\x44\x41\xBE\x75\xF6\x01\x87\x73\xC2\x06\xC2\x27" - "\x45\x37\x4B\x92\x4A\xA8\x31\x3F\xEF\x91\x9F\x41" }, - { GCRY_MD_TIGER2, "a", - "\x67\xE6\xAE\x8E\x9E\x96\x89\x99\xF7\x0A\x23\xE7" - "\x2A\xEA\xA9\x25\x1C\xBC\x7C\x78\xA7\x91\x66\x36" }, - { GCRY_MD_TIGER2, "abc", - "\xF6\x8D\x7B\xC5\xAF\x4B\x43\xA0\x6E\x04\x8D\x78" - "\x29\x56\x0D\x4A\x94\x15\x65\x8B\xB0\xB1\xF3\xBF" }, - { GCRY_MD_TIGER2, "message digest", - "\xE2\x94\x19\xA1\xB5\xFA\x25\x9D\xE8\x00\x5E\x7D" - "\xE7\x50\x78\xEA\x81\xA5\x42\xEF\x25\x52\x46\x2D" }, - { GCRY_MD_TIGER2, "abcdefghijklmnopqrstuvwxyz", - "\xF5\xB6\xB6\xA7\x8C\x40\x5C\x85\x47\xE9\x1C\xD8" - "\x62\x4C\xB8\xBE\x83\xFC\x80\x4A\x47\x44\x88\xFD" }, - { GCRY_MD_TIGER2, - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "\xA6\x73\x7F\x39\x97\xE8\xFB\xB6\x3D\x20\xD2\xDF" - "\x88\xF8\x63\x76\xB5\xFE\x2D\x5C\xE3\x66\x46\xA9" }, - { GCRY_MD_TIGER2, - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" "0123456789", - "\xEA\x9A\xB6\x22\x8C\xEE\x7B\x51\xB7\x75\x44\xFC" - "\xA6\x06\x6C\x8C\xBB\x5B\xBA\xE6\x31\x95\x05\xCD" }, - { GCRY_MD_TIGER2, - "1234567890" "1234567890" "1234567890" "1234567890" - "1234567890" "1234567890" "1234567890" "1234567890", - "\xD8\x52\x78\x11\x53\x29\xEB\xAA\x0E\xEC\x85\xEC" - "\xDC\x53\x96\xFD\xA8\xAA\x3A\x58\x20\x94\x2F\xFF" }, - { GCRY_MD_TIGER2, "!", - "\xE0\x68\x28\x1F\x06\x0F\x55\x16\x28\xCC\x57\x15" - "\xB9\xD0\x22\x67\x96\x91\x4D\x45\xF7\x71\x7C\xF4" }, - - - { GCRY_MD_WHIRLPOOL, "", - "\x19\xFA\x61\xD7\x55\x22\xA4\x66\x9B\x44\xE3\x9C\x1D\x2E\x17\x26" - "\xC5\x30\x23\x21\x30\xD4\x07\xF8\x9A\xFE\xE0\x96\x49\x97\xF7\xA7" - "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB\xCF\x88\xE3\xE0\x3C\x4F\x07\x57" - "\xEA\x89\x64\xE5\x9B\x63\xD9\x37\x08\xB1\x38\xCC\x42\xA6\x6E\xB3" }, - { GCRY_MD_WHIRLPOOL, "a", - "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F\x11\xA6\x72\x06\x53\x1F\xB7\xD7" - "\xF0\xDF\xF5\x94\x13\x14\x5E\x69\x73\xC4\x50\x01\xD0\x08\x7B\x42" - "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6\x3A\x42\x39\x1A\x39\x14\x5A\x59" - "\x1A\x92\x20\x0D\x56\x01\x95\xE5\x3B\x47\x85\x84\xFD\xAE\x23\x1A" }, - { GCRY_MD_WHIRLPOOL, "a", - "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F\x11\xA6\x72\x06\x53\x1F\xB7\xD7" - "\xF0\xDF\xF5\x94\x13\x14\x5E\x69\x73\xC4\x50\x01\xD0\x08\x7B\x42" - "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6\x3A\x42\x39\x1A\x39\x14\x5A\x59" - "\x1A\x92\x20\x0D\x56\x01\x95\xE5\x3B\x47\x85\x84\xFD\xAE\x23\x1A" }, - { GCRY_MD_WHIRLPOOL, - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B\xF1\x1F\x00\xED\x9A\xBA\x26\x90" - "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E" - "\x08\xEB\xA2\x66\x29\x12\x9D\x8F\xB7\xCB\x57\x21\x1B\x92\x81\xA6" - "\x55\x17\xCC\x87\x9D\x7B\x96\x21\x42\xC6\x5F\x5A\x7A\xF0\x14\x67" }, - { GCRY_MD_WHIRLPOOL, - "!", - "\x0C\x99\x00\x5B\xEB\x57\xEF\xF5\x0A\x7C\xF0\x05\x56\x0D\xDF\x5D" - "\x29\x05\x7F\xD8\x6B\x20\xBF\xD6\x2D\xEC\xA0\xF1\xCC\xEA\x4A\xF5" - "\x1F\xC1\x54\x90\xED\xDC\x47\xAF\x32\xBB\x2B\x66\xC3\x4F\xF9\xAD" - "\x8C\x60\x08\xAD\x67\x7F\x77\x12\x69\x53\xB2\x26\xE4\xED\x8B\x01" }, - { 0 }, - }; - int i; - - if (verbose) - fprintf (stderr, "Starting hash checks.\n"); - - for (i = 0; algos[i].md; i++) - { - if ((gcry_md_test_algo (algos[i].md) || algos[i].md == GCRY_MD_MD5) - && in_fips_mode) - { - if (verbose) - fprintf (stderr, " algorithm %d not available in fips mode\n", - algos[i].md); - continue; - } - if (verbose) - fprintf (stderr, " checking %s [%i] for length %zi\n", - gcry_md_algo_name (algos[i].md), - algos[i].md, - !strcmp (algos[i].data, "!")? - 1000000 : strlen(algos[i].data)); - - check_one_md (algos[i].md, algos[i].data, strlen (algos[i].data), - algos[i].expect); - } - - if (verbose) - fprintf (stderr, "Completed hash checks.\n"); -} - -static void -check_one_hmac (int algo, const char *data, int datalen, - const char *key, int keylen, const char *expect) -{ - gcry_md_hd_t hd, hd2; - unsigned char *p; - int mdlen; - int i; - gcry_error_t err = 0; - - err = gcry_md_open (&hd, algo, GCRY_MD_FLAG_HMAC); - if (err) - { - fail ("algo %d, grcy_md_open failed: %s\n", algo, gpg_strerror (err)); - return; - } - - mdlen = gcry_md_get_algo_dlen (algo); - if (mdlen < 1 || mdlen > 500) - { - fail ("algo %d, grcy_md_get_algo_dlen failed: %d\n", algo, mdlen); - return; - } - - gcry_md_setkey( hd, key, keylen ); - - gcry_md_write (hd, data, datalen); - - err = gcry_md_copy (&hd2, hd); - if (err) - { - fail ("algo %d, gcry_md_copy failed: %s\n", algo, gpg_strerror (err)); - } - - gcry_md_close (hd); - - p = gcry_md_read (hd2, algo); - if (!p) - fail("algo %d, hmac gcry_md_read failed\n", algo); - - if (memcmp (p, expect, mdlen)) - { - printf ("computed: "); - for (i = 0; i < mdlen; i++) - printf ("%02x ", p[i] & 0xFF); - printf ("\nexpected: "); - for (i = 0; i < mdlen; i++) - printf ("%02x ", expect[i] & 0xFF); - printf ("\n"); - - fail ("algo %d, digest mismatch\n", algo); - } - - gcry_md_close (hd2); -} - -static void -check_hmac (void) -{ - static struct algos - { - int md; - const char *data; - const char *key; - const char *expect; - } algos[] = - { - { GCRY_MD_MD5, "what do ya want for nothing?", "Jefe", - "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38" }, - { GCRY_MD_MD5, - "Hi There", - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", - "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d" }, - { GCRY_MD_MD5, - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA", - "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6" }, - { GCRY_MD_MD5, - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd", - "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", - "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea\x3a\x75\x16\x47\x46\xff\xaa\x79" }, - { GCRY_MD_MD5, "Test With Truncation", - "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", - "\x56\x46\x1e\xf2\x34\x2e\xdc\x00\xf9\xba\xb9\x95\x69\x0e\xfd\x4c" }, - { GCRY_MD_MD5, "Test Using Larger Than Block-Size Key - Hash Key First", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa", - "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f\x0b\x62\xe6\xce\x61\xb9\xd0\xcd" }, - { GCRY_MD_MD5, - "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa", - "\x6f\x63\x0f\xad\x67\xcd\xa0\xee\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e", }, - { GCRY_MD_SHA256, "what do ya want for nothing?", "Jefe", - "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75\xc7\x5a" - "\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec\x38\x43" }, - { GCRY_MD_SHA256, - "Hi There", - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1\x2b\x88" - "\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32\xcf\xf7" }, - { GCRY_MD_SHA256, - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA\xAA", - "\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81\xa7" - "\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5\x65\xfe" }, - { GCRY_MD_SHA256, - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd", - "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", - "\x82\x55\x8a\x38\x9a\x44\x3c\x0e\xa4\xcc\x81\x98\x99\xf2\x08" - "\x3a\x85\xf0\xfa\xa3\xe5\x78\xf8\x07\x7a\x2e\x3f\xf4\x67\x29\x66\x5b" }, - { GCRY_MD_SHA256, - "Test Using Larger Than Block-Size Key - Hash Key First", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\x60\xe4\x31\x59\x1e\xe0\xb6\x7f\x0d\x8a\x26\xaa\xcb\xf5\xb7\x7f" - "\x8e\x0b\xc6\x21\x37\x28\xc5\x14\x05\x46\x04\x0f\x0e\xe3\x7f\x54" }, - { GCRY_MD_SHA256, - "This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm.", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\x9b\x09\xff\xa7\x1b\x94\x2f\xcb\x27\x63\x5f\xbc\xd5\xb0\xe9\x44" - "\xbf\xdc\x63\x64\x4f\x07\x13\x93\x8a\x7f\x51\x53\x5c\x3a\x35\xe2" }, - { GCRY_MD_SHA224, "what do ya want for nothing?", "Jefe", - "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f" - "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00\x8f\xd0\x5e\x44" }, - { GCRY_MD_SHA224, - "Hi There", - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19\x68\x32\x10\x7c\xd4\x9d\xf3\x3f\x47" - "\xb4\xb1\x16\x99\x12\xba\x4f\x53\x68\x4b\x22" }, - { GCRY_MD_SHA224, - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA\xAA", - "\x7f\xb3\xcb\x35\x88\xc6\xc1\xf6\xff\xa9\x69\x4d\x7d\x6a\xd2\x64" - "\x93\x65\xb0\xc1\xf6\x5d\x69\xd1\xec\x83\x33\xea" }, - { GCRY_MD_SHA224, - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd", - "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", - "\x6c\x11\x50\x68\x74\x01\x3c\xac\x6a\x2a\xbc\x1b\xb3\x82\x62" - "\x7c\xec\x6a\x90\xd8\x6e\xfc\x01\x2d\xe7\xaf\xec\x5a" }, - { GCRY_MD_SHA224, - "Test Using Larger Than Block-Size Key - Hash Key First", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\x95\xe9\xa0\xdb\x96\x20\x95\xad\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2" - "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27\x3f\xa6\x87\x0e" }, - { GCRY_MD_SHA224, - "This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm.", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\x3a\x85\x41\x66\xac\x5d\x9f\x02\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd" - "\x94\x67\x70\xdb\x9c\x2b\x95\xc9\xf6\xf5\x65\xd1" }, - { GCRY_MD_SHA384, "what do ya want for nothing?", "Jefe", - "\xaf\x45\xd2\xe3\x76\x48\x40\x31\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b" - "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47\xe4\x2e\xc3\x73\x63\x22\x44\x5e" - "\x8e\x22\x40\xca\x5e\x69\xe2\xc7\x8b\x32\x39\xec\xfa\xb2\x16\x49" }, - { GCRY_MD_SHA384, - "Hi There", - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90\x7f\x15" - "\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c\xfa\xea" - "\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6" }, - { GCRY_MD_SHA384, - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA\xAA", - "\x88\x06\x26\x08\xd3\xe6\xad\x8a\x0a\xa2\xac\xe0\x14\xc8\xa8\x6f" - "\x0a\xa6\x35\xd9\x47\xac\x9f\xeb\xe8\x3e\xf4\xe5\x59\x66\x14\x4b" - "\x2a\x5a\xb3\x9d\xc1\x38\x14\xb9\x4e\x3a\xb6\xe1\x01\xa3\x4f\x27" }, - { GCRY_MD_SHA384, - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd", - "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", - "\x3e\x8a\x69\xb7\x78\x3c\x25\x85\x19\x33\xab\x62\x90\xaf\x6c\xa7" - "\x7a\x99\x81\x48\x08\x50\x00\x9c\xc5\x57\x7c\x6e\x1f\x57\x3b\x4e" - "\x68\x01\xdd\x23\xc4\xa7\xd6\x79\xcc\xf8\xa3\x86\xc6\x74\xcf\xfb" }, - { GCRY_MD_SHA384, - "Test Using Larger Than Block-Size Key - Hash Key First", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\x4e\xce\x08\x44\x85\x81\x3e\x90\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4" - "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6" - "\x0c\x2e\xf6\xab\x40\x30\xfe\x82\x96\x24\x8d\xf1\x63\xf4\x49\x52" }, - { GCRY_MD_SHA384, - "This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm.", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\x66\x17\x17\x8e\x94\x1f\x02\x0d\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c" - "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a\xdc\xce\xbb\x82\x46\x1e\x99\xc5" - "\xa6\x78\xcc\x31\xe7\x99\x17\x6d\x38\x60\xe6\x11\x0c\x46\x52\x3e" }, - { GCRY_MD_SHA512, "what do ya want for nothing?", "Jefe", - "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3" - "\x87\xbd\x64\x22\x2e\x83\x1f\xd6\x10\x27\x0c\xd7\xea\x25\x05\x54" - "\x97\x58\xbf\x75\xc0\x5a\x99\x4a\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd" - "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b\x63\x6e\x07\x0a\x38\xbc\xe7\x37" }, - { GCRY_MD_SHA512, - "Hi There", - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" - "\x0b\x0b\x0b", - "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0" - "\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1\x7c\xde" - "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae\xa3\xf4\xe4" - "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20\x3a\x12\x68\x54" }, - { GCRY_MD_SHA512, - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" - "\xdd\xdd\xdd\xdd\xdd", - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - "\xAA\xAA\xAA\xAA", - "\xfa\x73\xb0\x08\x9d\x56\xa2\x84\xef\xb0\xf0\x75\x6c\x89\x0b\xe9" - "\xb1\xb5\xdb\xdd\x8e\xe8\x1a\x36\x55\xf8\x3e\x33\xb2\x27\x9d\x39" - "\xbf\x3e\x84\x82\x79\xa7\x22\xc8\x06\xb4\x85\xa4\x7e\x67\xc8\x07" - "\xb9\x46\xa3\x37\xbe\xe8\x94\x26\x74\x27\x88\x59\xe1\x32\x92\xfb" }, - { GCRY_MD_SHA512, - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" - "\xcd\xcd\xcd\xcd\xcd", - "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", - "\xb0\xba\x46\x56\x37\x45\x8c\x69\x90\xe5\xa8\xc5\xf6\x1d\x4a\xf7" - "\xe5\x76\xd9\x7f\xf9\x4b\x87\x2d\xe7\x6f\x80\x50\x36\x1e\xe3\xdb" - "\xa9\x1c\xa5\xc1\x1a\xa2\x5e\xb4\xd6\x79\x27\x5c\xc5\x78\x80\x63" - "\xa5\xf1\x97\x41\x12\x0c\x4f\x2d\xe2\xad\xeb\xeb\x10\xa2\x98\xdd" }, - { GCRY_MD_SHA512, - "Test Using Larger Than Block-Size Key - Hash Key First", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4" - "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1\x12\x1b\x01\x37\x83\xf8\xf3\x52" - "\x6b\x56\xd0\x37\xe0\x5f\x25\x98\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52" - "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec\x8b\x91\x5a\x98\x5d\x78\x65\x98" }, - { GCRY_MD_SHA512, - "This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm.", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - "\xaa\xaa\xaa", - "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd" - "\xde\xbd\x71\xf8\x86\x72\x89\x86\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44" - "\xb6\x02\x2c\xac\x3c\x49\x82\xb1\x0d\x5e\xeb\x55\xc3\xe4\xde\x15" - "\x13\x46\x76\xfb\x6d\xe0\x44\x60\x65\xc9\x74\x40\xfa\x8c\x6a\x58" }, - { 0 }, - }; - int i; - - if (verbose) - fprintf (stderr, "Starting hashed MAC checks.\n"); - - for (i = 0; algos[i].md; i++) - { - if ((gcry_md_test_algo (algos[i].md) || algos[i].md == GCRY_MD_MD5) - && in_fips_mode) - { - if (verbose) - fprintf (stderr, " algorithm %d not available in fips mode\n", - algos[i].md); - continue; - } - if (verbose) - fprintf (stderr, - " checking %s [%i] for %zi byte key and %zi byte data\n", - gcry_md_algo_name (algos[i].md), - algos[i].md, - strlen(algos[i].key), strlen(algos[i].data)); - - check_one_hmac (algos[i].md, algos[i].data, strlen (algos[i].data), - algos[i].key, strlen(algos[i].key), - algos[i].expect); - } - - if (verbose) - fprintf (stderr, "Completed hashed MAC checks.\n"); - } - -/* Check that the signature SIG matches the hash HASH. PKEY is the - public key used for the verification. BADHASH is a hasvalue which - should; result in a bad signature status. */ -static void -verify_one_signature (gcry_sexp_t pkey, gcry_sexp_t hash, - gcry_sexp_t badhash, gcry_sexp_t sig) -{ - gcry_error_t rc; - - rc = gcry_pk_verify (sig, hash, pkey); - if (rc) - fail ("gcry_pk_verify failed: %s\n", gpg_strerror (rc)); - rc = gcry_pk_verify (sig, badhash, pkey); - if (gcry_err_code (rc) != GPG_ERR_BAD_SIGNATURE) - fail ("gcry_pk_verify failed to detect a bad signature: %s\n", - gpg_strerror (rc)); -} - - -/* Test the public key sign function using the private ket SKEY. PKEY - is used for verification. */ -static void -check_pubkey_sign (int n, gcry_sexp_t skey, gcry_sexp_t pkey) -{ - gcry_error_t rc; - gcry_sexp_t sig, badhash, hash; - int dataidx; - static const char baddata[] = - "(data\n (flags pkcs1)\n" - " (hash sha1 #11223344556677889900AABBCCDDEEFF10203041#))\n"; - static struct - { - const char *data; - int expected_rc; - } datas[] = - { - { "(data\n (flags pkcs1)\n" - " (hash sha1 #11223344556677889900AABBCCDDEEFF10203040#))\n", - 0 }, - /* This test is to see whether hash algorithms not hard wired in - pubkey.c are detected: */ - { "(data\n (flags pkcs1)\n" - " (hash oid.1.3.14.3.2.29 " - " #11223344556677889900AABBCCDDEEFF10203040#))\n", - 0 }, - { "(data\n (flags )\n" - " (hash sha1 #11223344556677889900AABBCCDDEEFF10203040#))\n", - GPG_ERR_CONFLICT }, - { "(data\n (flags pkcs1)\n" - " (hash foo #11223344556677889900AABBCCDDEEFF10203040#))\n", - GPG_ERR_DIGEST_ALGO }, - { "(data\n (flags )\n" " (value #11223344556677889900AA#))\n", - 0 }, - { "(data\n (flags )\n" " (value #0090223344556677889900AA#))\n", - 0 }, - { "(data\n (flags raw)\n" " (value #11223344556677889900AA#))\n", - 0 }, - { "(data\n (flags pkcs1)\n" - " (value #11223344556677889900AA#))\n", - GPG_ERR_CONFLICT }, - { "(data\n (flags raw foo)\n" - " (value #11223344556677889900AA#))\n", - GPG_ERR_INV_FLAG }, - { NULL } - }; - - (void)n; - - rc = gcry_sexp_sscan (&badhash, NULL, baddata, strlen (baddata)); - if (rc) - die ("converting data failed: %s\n", gpg_strerror (rc)); - - for (dataidx = 0; datas[dataidx].data; dataidx++) - { - if (verbose) - fprintf (stderr, " signature test %d\n", dataidx); - - rc = gcry_sexp_sscan (&hash, NULL, datas[dataidx].data, - strlen (datas[dataidx].data)); - if (rc) - die ("converting data failed: %s\n", gpg_strerror (rc)); - - rc = gcry_pk_sign (&sig, hash, skey); - if (gcry_err_code (rc) != datas[dataidx].expected_rc) - fail ("gcry_pk_sign failed: %s\n", gpg_strerror (rc)); - - if (!rc) - verify_one_signature (pkey, hash, badhash, sig); - - gcry_sexp_release (sig); - sig = NULL; - gcry_sexp_release (hash); - hash = NULL; - } - - gcry_sexp_release (badhash); -} - -static void -check_pubkey_grip (int n, const unsigned char *grip, - gcry_sexp_t skey, gcry_sexp_t pkey) -{ - unsigned char sgrip[20], pgrip[20]; - - if (!gcry_pk_get_keygrip (skey, sgrip)) - die ("get keygrip for private RSA key failed\n"); - if (!gcry_pk_get_keygrip (pkey, pgrip)) - die ("[%i] get keygrip for public RSA key failed\n", n); - if (memcmp (sgrip, pgrip, 20)) - fail ("[%i] keygrips don't match\n", n); - if (memcmp (sgrip, grip, 20)) - fail ("wrong keygrip for RSA key\n"); -} - -static void -do_check_one_pubkey (int n, gcry_sexp_t skey, gcry_sexp_t pkey, - const unsigned char *grip, int flags) -{ - if (flags & FLAG_SIGN) - check_pubkey_sign (n, skey, pkey); - if (grip && (flags & FLAG_GRIP)) - check_pubkey_grip (n, grip, skey, pkey); -} - -static void -check_one_pubkey (int n, test_spec_pubkey_t spec) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - gcry_sexp_t skey, pkey; - - err = gcry_sexp_sscan (&skey, NULL, spec.key.secret, - strlen (spec.key.secret)); - if (!err) - err = gcry_sexp_sscan (&pkey, NULL, spec.key.public, - strlen (spec.key.public)); - if (err) - die ("converting sample key failed: %s\n", gpg_strerror (err)); - - do_check_one_pubkey (n, skey, pkey, - (const unsigned char*)spec.key.grip, spec.flags); - - gcry_sexp_release (skey); - gcry_sexp_release (pkey); -} - -static void -get_keys_new (gcry_sexp_t *pkey, gcry_sexp_t *skey) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - if (verbose) - fprintf (stderr, " generating RSA key:"); - rc = gcry_sexp_new (&key_spec, - in_fips_mode ? "(genkey (rsa (nbits 4:1024)))" - : "(genkey (rsa (nbits 4:1024)(transient-key)))", - 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gpg_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating RSA key: %s\n", gpg_strerror (rc)); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (! pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (! sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - -static void -check_one_pubkey_new (int n) -{ - gcry_sexp_t skey, pkey; - - get_keys_new (&pkey, &skey); - do_check_one_pubkey (n, skey, pkey, NULL, FLAG_SIGN | FLAG_CRYPT); -} - -/* Run all tests for the public key functions. */ -static void -check_pubkey (void) -{ - test_spec_pubkey_t pubkeys[] = - { - { - GCRY_PK_RSA, FLAG_CRYPT | FLAG_SIGN, - - { "(private-key\n" - " (rsa\n" - " (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa" - " 2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291" - " ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7" - " 891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)\n" - " (e #010001#)\n" - " (d #046129F2489D71579BE0A75FE029BD6CDB574EBF57EA8A5B0FDA942CAB943B11" - " 7D7BB95E5D28875E0F9FC5FCC06A72F6D502464DABDED78EF6B716177B83D5BD" - " C543DC5D3FED932E59F5897E92E6F58A0F33424106A3B6FA2CBF877510E4AC21" - " C3EE47851E97D12996222AC3566D4CCB0B83D164074ABF7DE655FC2446DA1781#)\n" - " (p #00e861b700e17e8afe6837e7512e35b6ca11d0ae47d8b85161c67baf64377213" - " fe52d772f2035b3ca830af41d8a4120e1c1c70d12cc22f00d28d31dd48a8d424f1#)\n" - " (q #00f7a7ca5367c661f8e62df34f0d05c10c88e5492348dd7bddc942c9a8f369f9" - " 35a07785d2db805215ed786e4285df1658eed3ce84f469b81b50d358407b4ad361#)\n" - " (u #304559a9ead56d2309d203811a641bb1a09626bc8eb36fffa23c968ec5bd891e" - " ebbafc73ae666e01ba7c8990bae06cc2bbe10b75e69fcacb353a6473079d8e9b#)))\n", - - "(public-key\n" - " (rsa\n" - " (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa" - " 2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291" - " ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7" - " 891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)\n" - " (e #010001#)))\n", - - "\x32\x10\x0c\x27\x17\x3e\xf6\xe9\xc4\xe9" - "\xa2\x5d\x3d\x69\xf8\x6d\x37\xa4\xf9\x39"} - }, - { - GCRY_PK_DSA, FLAG_SIGN, - - { "(private-key\n" - " (DSA\n" - " (p #00AD7C0025BA1A15F775F3F2D673718391D00456978D347B33D7B49E7F32EDAB" - " 96273899DD8B2BB46CD6ECA263FAF04A28903503D59062A8865D2AE8ADFB5191" - " CF36FFB562D0E2F5809801A1F675DAE59698A9E01EFE8D7DCFCA084F4C6F5A44" - " 44D499A06FFAEA5E8EF5E01F2FD20A7B7EF3F6968AFBA1FB8D91F1559D52D8777B#)\n" - " (q #00EB7B5751D25EBBB7BD59D920315FD840E19AEBF9#)\n" - " (g #1574363387FDFD1DDF38F4FBE135BB20C7EE4772FB94C337AF86EA8E49666503" - " AE04B6BE81A2F8DD095311E0217ACA698A11E6C5D33CCDAE71498ED35D13991E" - " B02F09AB40BD8F4C5ED8C75DA779D0AE104BC34C960B002377068AB4B5A1F984" - " 3FBA91F537F1B7CAC4D8DD6D89B0D863AF7025D549F9C765D2FC07EE208F8D15#)\n" - " (y #64B11EF8871BE4AB572AA810D5D3CA11A6CDBC637A8014602C72960DB135BF46" - " A1816A724C34F87330FC9E187C5D66897A04535CC2AC9164A7150ABFA8179827" - " 6E45831AB811EEE848EBB24D9F5F2883B6E5DDC4C659DEF944DCFD80BF4D0A20" - " 42CAA7DC289F0C5A9D155F02D3D551DB741A81695B74D4C8F477F9C7838EB0FB#)\n" - " (x #11D54E4ADBD3034160F2CED4B7CD292A4EBF3EC0#)))\n", - - "(public-key\n" - " (DSA\n" - " (p #00AD7C0025BA1A15F775F3F2D673718391D00456978D347B33D7B49E7F32EDAB" - " 96273899DD8B2BB46CD6ECA263FAF04A28903503D59062A8865D2AE8ADFB5191" - " CF36FFB562D0E2F5809801A1F675DAE59698A9E01EFE8D7DCFCA084F4C6F5A44" - " 44D499A06FFAEA5E8EF5E01F2FD20A7B7EF3F6968AFBA1FB8D91F1559D52D8777B#)\n" - " (q #00EB7B5751D25EBBB7BD59D920315FD840E19AEBF9#)\n" - " (g #1574363387FDFD1DDF38F4FBE135BB20C7EE4772FB94C337AF86EA8E49666503" - " AE04B6BE81A2F8DD095311E0217ACA698A11E6C5D33CCDAE71498ED35D13991E" - " B02F09AB40BD8F4C5ED8C75DA779D0AE104BC34C960B002377068AB4B5A1F984" - " 3FBA91F537F1B7CAC4D8DD6D89B0D863AF7025D549F9C765D2FC07EE208F8D15#)\n" - " (y #64B11EF8871BE4AB572AA810D5D3CA11A6CDBC637A8014602C72960DB135BF46" - " A1816A724C34F87330FC9E187C5D66897A04535CC2AC9164A7150ABFA8179827" - " 6E45831AB811EEE848EBB24D9F5F2883B6E5DDC4C659DEF944DCFD80BF4D0A20" - " 42CAA7DC289F0C5A9D155F02D3D551DB741A81695B74D4C8F477F9C7838EB0FB#)))\n", - - "\xc6\x39\x83\x1a\x43\xe5\x05\x5d\xc6\xd8" - "\x4a\xa6\xf9\xeb\x23\xbf\xa9\x12\x2d\x5b" } - }, - { - GCRY_PK_ELG, FLAG_SIGN | FLAG_CRYPT, - - { "(private-key\n" - " (ELG\n" - " (p #00B93B93386375F06C2D38560F3B9C6D6D7B7506B20C1773F73F8DE56E6CD65D" - " F48DFAAA1E93F57A2789B168362A0F787320499F0B2461D3A4268757A7B27517" - " B7D203654A0CD484DEC6AF60C85FEB84AAC382EAF2047061FE5DAB81A20A0797" - " 6E87359889BAE3B3600ED718BE61D4FC993CC8098A703DD0DC942E965E8F18D2A7#)\n" - " (g #05#)\n" - " (y #72DAB3E83C9F7DD9A931FDECDC6522C0D36A6F0A0FEC955C5AC3C09175BBFF2B" - " E588DB593DC2E420201BEB3AC17536918417C497AC0F8657855380C1FCF11C5B" - " D20DB4BEE9BDF916648DE6D6E419FA446C513AAB81C30CB7B34D6007637BE675" - " 56CE6473E9F9EE9B9FADD275D001563336F2186F424DEC6199A0F758F6A00FF4#)\n" - " (x #03C28900087B38DABF4A0AB98ACEA39BB674D6557096C01D72E31C16BDD32214#)))\n", - - "(public-key\n" - " (ELG\n" - " (p #00B93B93386375F06C2D38560F3B9C6D6D7B7506B20C1773F73F8DE56E6CD65D" - " F48DFAAA1E93F57A2789B168362A0F787320499F0B2461D3A4268757A7B27517" - " B7D203654A0CD484DEC6AF60C85FEB84AAC382EAF2047061FE5DAB81A20A0797" - " 6E87359889BAE3B3600ED718BE61D4FC993CC8098A703DD0DC942E965E8F18D2A7#)\n" - " (g #05#)\n" - " (y #72DAB3E83C9F7DD9A931FDECDC6522C0D36A6F0A0FEC955C5AC3C09175BBFF2B" - " E588DB593DC2E420201BEB3AC17536918417C497AC0F8657855380C1FCF11C5B" - " D20DB4BEE9BDF916648DE6D6E419FA446C513AAB81C30CB7B34D6007637BE675" - " 56CE6473E9F9EE9B9FADD275D001563336F2186F424DEC6199A0F758F6A00FF4#)))\n", - - "\xa7\x99\x61\xeb\x88\x83\xd2\xf4\x05\xc8" - "\x4f\xba\x06\xf8\x78\x09\xbc\x1e\x20\xe5" } - }, - }; - int i; - if (verbose) - fprintf (stderr, "Starting public key checks.\n"); - for (i = 0; i < sizeof (pubkeys) / sizeof (*pubkeys); i++) - if (pubkeys[i].id) - { - if (gcry_pk_test_algo (pubkeys[i].id) && in_fips_mode) - { - if (verbose) - fprintf (stderr, " algorithm %d not available in fips mode\n", - pubkeys[i].id); - continue; - } - check_one_pubkey (i, pubkeys[i]); - } - if (verbose) - fprintf (stderr, "Completed public key checks.\n"); - - if (verbose) - fprintf (stderr, "Starting additional public key checks.\n"); - for (i = 0; i < sizeof (pubkeys) / sizeof (*pubkeys); i++) - if (pubkeys[i].id) - { - if (gcry_pk_test_algo (pubkeys[i].id) && in_fips_mode) - { - if (verbose) - fprintf (stderr, " algorithm %d not available in fips mode\n", - pubkeys[i].id); - continue; - } - check_one_pubkey_new (i); - } - if (verbose) - fprintf (stderr, "Completed additional public key checks.\n"); - -} - -int -main (int argc, char **argv) -{ - gpg_error_t err; - int last_argc = -1; - int debug = 0; - int use_fips = 0; - int selftest_only = 0; - - if (argc) - { argc--; argv++; } - - while (argc && last_argc != argc ) - { - last_argc = argc; - if (!strcmp (*argv, "--")) - { - argc--; argv++; - break; - } - else if (!strcmp (*argv, "--verbose")) - { - verbose++; - argc--; argv++; - } - else if (!strcmp (*argv, "--debug")) - { - verbose = debug = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--fips")) - { - use_fips = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--selftest")) - { - selftest_only = 1; - verbose += 2; - argc--; argv++; - } - } - - gcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose); - - if (use_fips) - gcry_control (GCRYCTL_FORCE_FIPS_MODE, 0); - - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - - if ( gcry_fips_mode_active () ) - in_fips_mode = 1; - - if (!in_fips_mode) - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - - if (verbose) - gcry_set_progress_handler (progress_handler, NULL); - - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - /* No valuable keys are create, so we can speed up our RNG. */ - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - - if (!selftest_only) - { - check_ciphers (); - check_aes128_cbc_cts_cipher (); - check_cbc_mac_cipher (); - check_ctr_cipher (); - check_cfb_cipher (); - check_ofb_cipher (); - check_digests (); - check_hmac (); - check_pubkey (); - } - - - if (in_fips_mode && !selftest_only) - { - /* If we are in fips mode do some more tests. */ - gcry_md_hd_t md; - - /* First trigger a self-test. */ - gcry_control (GCRYCTL_FORCE_FIPS_MODE, 0); - if (!gcry_control (GCRYCTL_OPERATIONAL_P, 0)) - fail ("not in operational state after self-test\n"); - - /* Get us into the error state. */ - err = gcry_md_open (&md, GCRY_MD_SHA1, 0); - if (err) - fail ("failed to open SHA-1 hash context: %s\n", gpg_strerror (err)); - else - { - err = gcry_md_enable (md, GCRY_MD_SHA256); - if (err) - fail ("failed to add SHA-256 hash context: %s\n", - gpg_strerror (err)); - else - { - /* gcry_md_get_algo is only defined for a context with - just one digest algorithm. With our setup it should - put the oibrary intoerror state. */ - fputs ("Note: Two lines with error messages follow " - "- this is expected\n", stderr); - gcry_md_get_algo (md); - gcry_md_close (md); - if (gcry_control (GCRYCTL_OPERATIONAL_P, 0)) - fail ("expected error state but still in operational state\n"); - else - { - /* Now run a self-test and to get back into - operational state. */ - gcry_control (GCRYCTL_FORCE_FIPS_MODE, 0); - if (!gcry_control (GCRYCTL_OPERATIONAL_P, 0)) - fail ("did not reach operational after error " - "and self-test\n"); - } - } - } - - } - else - { - /* If in standard mode, run selftests. */ - if (gcry_control (GCRYCTL_SELFTEST, 0)) - fail ("running self-test failed\n"); - } - - if (verbose) - fprintf (stderr, "\nAll tests completed. Errors: %i\n", error_count); - - if (in_fips_mode && !gcry_fips_mode_active ()) - fprintf (stderr, "FIPS mode is not anymore active\n"); - - return error_count ? 1 : 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/benchmark.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/benchmark.c deleted file mode 100644 index 8f8f04ce16..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/benchmark.c +++ /dev/null @@ -1,1158 +0,0 @@ -/* benchmark.c - for libgcrypt - * Copyright (C) 2002, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser general Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <time.h> -#include <stdarg.h> -#ifdef _WIN32 -#include <windows.h> -#else -#include <sys/times.h> -#endif - -#ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" -#else -# include <gcrypt.h> -#endif - - -#define PGM "benchmark" - -static int verbose; - -/* Do encryption tests with large buffers. */ -static int large_buffers; - -/* Number of cipher repetitions. */ -static int cipher_repetitions; - -/* Whether fips mode was active at startup. */ -static int in_fips_mode; - - -static const char sample_private_dsa_key_1024[] = -"(private-key\n" -" (dsa\n" -" (p #00A126202D592214C5A8F6016E2C3F4256052ACB1CB17D88E64B1293FAF08F5E4685" - "03E6F68366B326A56284370EB2103E92D8346A163E44A08FDC422AC8E9E44268557A" - "853539A6AF39353A59CE5E78FD98B57D0F3E3A7EBC8A256AC9A775BA59689F3004BF" - "C3035730C4C0C51626C5D7F5852637EC589BB29DAB46C161572E4B#)\n" -" (q #00DEB5A296421887179ECA1762884DE2AF8185AFC5#)\n" -" (g #3958B34AE7747194ECBD312F8FEE8CBE3918E94DF9FD11E2912E56318F33BDC38622" - "B18DDFF393074BCA8BAACF50DF27AEE529F3E8AEECE55C398DAB3A5E04C2EA142312" - "FACA2FE7F0A88884F8DAC3979EE67598F9A383B2A2325F035C796F352A5C3CDF2CB3" - "85AD24EC52A6E55247E1BB37D260F79E617D2A4446415B6AD79A#)\n" -" (y #519E9FE9AB0545A6724E74603B7B04E48DC1437E0284A11EA605A7BA8AB1CF354FD4" - "ECC93880AC293391C69B558AD84E7AAFA88F11D028CF3A378F241D6B056A90C588F6" - "66F68D27262B4DA84657D15057D371BCEC1F6504032507D5B881E45FC93A1B973155" - "D91C57219D090C3ACD75E7C2B9F1176A208AC03D6C12AC28A271#)\n" -" (x #4186F8A58C5DF46C5BCFC7006BEEBF05E93C0CA7#)\n" -"))\n"; - -static const char sample_public_dsa_key_1024[] = -"(public-key\n" -" (dsa\n" -" (p #00A126202D592214C5A8F6016E2C3F4256052ACB1CB17D88E64B1293FAF08F5E4685" - "03E6F68366B326A56284370EB2103E92D8346A163E44A08FDC422AC8E9E44268557A" - "853539A6AF39353A59CE5E78FD98B57D0F3E3A7EBC8A256AC9A775BA59689F3004BF" - "C3035730C4C0C51626C5D7F5852637EC589BB29DAB46C161572E4B#)\n" -" (q #00DEB5A296421887179ECA1762884DE2AF8185AFC5#)\n" -" (g #3958B34AE7747194ECBD312F8FEE8CBE3918E94DF9FD11E2912E56318F33BDC38622" - "B18DDFF393074BCA8BAACF50DF27AEE529F3E8AEECE55C398DAB3A5E04C2EA142312" - "FACA2FE7F0A88884F8DAC3979EE67598F9A383B2A2325F035C796F352A5C3CDF2CB3" - "85AD24EC52A6E55247E1BB37D260F79E617D2A4446415B6AD79A#)\n" -" (y #519E9FE9AB0545A6724E74603B7B04E48DC1437E0284A11EA605A7BA8AB1CF354FD4" - "ECC93880AC293391C69B558AD84E7AAFA88F11D028CF3A378F241D6B056A90C588F6" - "66F68D27262B4DA84657D15057D371BCEC1F6504032507D5B881E45FC93A1B973155" - "D91C57219D090C3ACD75E7C2B9F1176A208AC03D6C12AC28A271#)\n" -"))\n"; - - -static const char sample_private_dsa_key_2048[] = -"(private-key\n" -" (dsa\n" -" (p #00B54636673962B64F7DC23C71ACEF6E7331796F607560B194DFCC0CA370E858A365" - "A413152FB6EB8C664BD171AC316FE5B381CD084D07377571599880A068EF1382D85C" - "308B4E9DEAC12D66DE5C4A826EBEB5ED94A62E7301E18927E890589A2F230272A150" - "C118BC3DC2965AE0D05BE4F65C6137B2BA7EDABB192C3070D202C10AA3F534574970" - "71454DB8A73DDB6511A5BA98EF1450FD90DE5BAAFC9FD3AC22EBEA612DD075BB7405" - "D56866D125E33982C046808F7CEBA8E5C0B9F19A6FE451461660A1CBA9EF68891179" - "0256A573D3B8F35A5C7A0C6C31F2DB90E25A26845252AD9E485EF2D339E7B5890CD4" - "2F9C9F315ED409171EC35CA04CC06B275577B3#)\n" -" (q #00DA67989167FDAC4AE3DF9247A716859A30C0CF9C5A6DBA01EABA3481#)\n" -" (g #48E35DA584A089D05142AA63603FDB00D131B07A0781E2D5A8F9614D2B33D3E40A78" - "98A9E10CDBB612CF093F95A3E10D09566726F2C12823836B2D9CD974BB695665F3B3" - "5D219A9724B87F380BD5207EDA0AE38C79E8F18122C3F76E4CEB0ABED3250914987F" - "B30D4B9E19C04C28A5D4F45560AF586F6A1B41751EAD90AE7F044F4E2A4A50C1F508" - "4FC202463F478F678B9A19392F0D2961C5391C546EF365368BB46410C9C1CEE96E9F" - "0C953570C2ED06328B11C90E86E57CAA7FA5ABAA278E22A4C8C08E16EE59F484EC44" - "2CF55535BAA2C6BEA8833A555372BEFE1E665D3C7DAEF58061D5136331EF4EB61BC3" - "6EE4425A553AF8885FEA15A88135BE133520#)\n" -" (y #66E0D1A69D663466F8FEF2B7C0878DAC93C36A2FB2C05E0306A53B926021D4B92A1C" - "2FA6860061E88E78CBBBA49B0E12700F07DBF86F72CEB2927EDAC0C7E3969C3A47BB" - "4E0AE93D8BB3313E93CC7A72DFEEE442EFBC81B3B2AEC9D8DCBE21220FB760201D79" - "328C41C773866587A44B6954767D022A88072900E964089D9B17133603056C985C4F" - "8A0B648F297F8D2C3CB43E4371DC6002B5B12CCC085BDB2CFC5074A0587566187EE3" - "E11A2A459BD94726248BB8D6CC62938E11E284C2C183576FBB51749EB238C4360923" - "79C08CE1C8CD77EB57404CE9B4744395ACF721487450BADE3220576F2F816248B0A7" - "14A264330AECCB24DE2A1107847B23490897#)\n" -" (x #477BD14676E22563C5ABA68025CEBA2A48D485F5B2D4AD4C0EBBD6D0#)\n" -"))\n"; - - -static const char sample_public_dsa_key_2048[] = -"(public-key\n" -" (dsa\n" -" (p #00B54636673962B64F7DC23C71ACEF6E7331796F607560B194DFCC0CA370E858A365" - "A413152FB6EB8C664BD171AC316FE5B381CD084D07377571599880A068EF1382D85C" - "308B4E9DEAC12D66DE5C4A826EBEB5ED94A62E7301E18927E890589A2F230272A150" - "C118BC3DC2965AE0D05BE4F65C6137B2BA7EDABB192C3070D202C10AA3F534574970" - "71454DB8A73DDB6511A5BA98EF1450FD90DE5BAAFC9FD3AC22EBEA612DD075BB7405" - "D56866D125E33982C046808F7CEBA8E5C0B9F19A6FE451461660A1CBA9EF68891179" - "0256A573D3B8F35A5C7A0C6C31F2DB90E25A26845252AD9E485EF2D339E7B5890CD4" - "2F9C9F315ED409171EC35CA04CC06B275577B3#)\n" -" (q #00DA67989167FDAC4AE3DF9247A716859A30C0CF9C5A6DBA01EABA3481#)\n" -" (g #48E35DA584A089D05142AA63603FDB00D131B07A0781E2D5A8F9614D2B33D3E40A78" - "98A9E10CDBB612CF093F95A3E10D09566726F2C12823836B2D9CD974BB695665F3B3" - "5D219A9724B87F380BD5207EDA0AE38C79E8F18122C3F76E4CEB0ABED3250914987F" - "B30D4B9E19C04C28A5D4F45560AF586F6A1B41751EAD90AE7F044F4E2A4A50C1F508" - "4FC202463F478F678B9A19392F0D2961C5391C546EF365368BB46410C9C1CEE96E9F" - "0C953570C2ED06328B11C90E86E57CAA7FA5ABAA278E22A4C8C08E16EE59F484EC44" - "2CF55535BAA2C6BEA8833A555372BEFE1E665D3C7DAEF58061D5136331EF4EB61BC3" - "6EE4425A553AF8885FEA15A88135BE133520#)\n" -" (y #66E0D1A69D663466F8FEF2B7C0878DAC93C36A2FB2C05E0306A53B926021D4B92A1C" - "2FA6860061E88E78CBBBA49B0E12700F07DBF86F72CEB2927EDAC0C7E3969C3A47BB" - "4E0AE93D8BB3313E93CC7A72DFEEE442EFBC81B3B2AEC9D8DCBE21220FB760201D79" - "328C41C773866587A44B6954767D022A88072900E964089D9B17133603056C985C4F" - "8A0B648F297F8D2C3CB43E4371DC6002B5B12CCC085BDB2CFC5074A0587566187EE3" - "E11A2A459BD94726248BB8D6CC62938E11E284C2C183576FBB51749EB238C4360923" - "79C08CE1C8CD77EB57404CE9B4744395ACF721487450BADE3220576F2F816248B0A7" - "14A264330AECCB24DE2A1107847B23490897#)\n" -"))\n"; - - -static const char sample_private_dsa_key_3072[] = -"(private-key\n" -" (dsa\n" -" (p #00BA73E148AEA5E8B64878AF5BE712B8302B9671C5F3EEB7722A9D0D9868D048C938" - "877C91C335C7819292E69C7D34264F1578E32EC2DA8408DF75D0EB76E0D3030B84B5" - "62D8EF93AB53BAB6B8A5DE464F5CA87AEA43BDCF0FB0B7815AA3114CFC84FD916A83" - "B3D5FD78390189332232E9D037D215313FD002FF46C048B66703F87FAE092AAA0988" - "AC745336EBE672A01DEDBD52395783579B67CF3AE1D6F1602CCCB12154FA0E00AE46" - "0D9B289CF709194625BCB919B11038DEFC50ADBBA20C3F320078E4E9529B4F6848E2" - "AB5E6278DB961FE226F2EEBD201E071C48C5BEF98B4D9BEE42C1C7102D893EBF8902" - "D7A91266340AFD6CE1D09E52282FFF5B97EAFA3886A3FCF84FF76D1E06538D0D8E60" - "B3332145785E07D29A5965382DE3470D1D888447FA9C00A2373378FC3FA7B9F7D17E" - "95A6A5AE1397BE46D976EF2C96E89913AC4A09351CA661BF6F67E30407DA846946C7" - "62D9BAA6B77825097D3E7B886456BB32E3E74516BF3FD93D71B257AA8F723E01CE33" - "8015353D3778B02B892AF7#)\n" -" (q #00BFF3F3CC18FA018A5B8155A8695E1E4939660D5E4759322C39D50F3B93E5F68B#)\n" -" (g #6CCFD8219F5FCE8EF2BEF3262929787140847E38674B1EF8DB20255E212CB6330EC4" - "DFE8A26AB7ECC5760DEB9BBF59A2B2821D510F1868172222867558B8D204E889C474" - "7CA30FBF9D8CF41AE5D5BD845174641101593849FF333E6C93A6550931B2B9D56B98" - "9CAB01729D9D736FA6D24A74D2DDE1E9E648D141473E443DD6BBF0B3CAB64F9FE4FC" - "134B2EB57437789F75C744DF1FA67FA8A64603E5441BC7ECE29E00BDF262BDC81E8C" - "7330A18A412DE38E7546D342B89A0AF675A89E6BEF00540EB107A2FE74EA402B0D89" - "F5C02918DEEEAF8B8737AC866B09B50810AB8D8668834A1B9E1E53866E2B0A926FAB" - "120A0CDE5B3715FFFE6ACD1AB73588DCC1EC4CE9392FE57F8D1D35811200CB07A0E6" - "374E2C4B0AEB7E3D077B8545C0E438DCC0F1AE81E186930E99EBC5B91B77E92803E0" - "21602887851A4FFDB3A7896AC655A0901218C121C5CBB0931E7D5EAC243F37711B5F" - "D5A62B1B38A83F03D8F6703D8B98DF367FC8A76990335F62173A5391836F0F2413EC" - "4997AF9EB55C6660B01A#)\n" -" (y #2320B22434C5DB832B4EC267CC52E78DD5CCFA911E8F0804E7E7F32B186B2D4167AE" - "4AA6869822E76400492D6A193B0535322C72B0B7AA4A87E33044FDC84BE24C64A053" - "A37655EE9EABDCDC1FDF63F3F1C677CEB41595DF7DEFE9178D85A3D621B4E4775492" - "8C0A58D2458D06F9562E4DE2FE6129A64063A99E88E54485B97484A28188C4D33F15" - "DDC903B6CEA0135E3E3D27B4EA39319696305CE93D7BA7BE00367DBE3AAF43491E71" - "CBF254744A5567F5D70090D6139E0C990239627B3A1C5B20B6F9F6374B8D8D8A8997" - "437265BE1E3B4810D4B09254400DE287A0DFFBAEF339E48D422B1D41A37E642BC026" - "73314701C8FA9792845C129351A87A945A03E6C895860E51D6FB8B7340A94D1A8A7B" - "FA85AC83B4B14E73AB86CB96C236C8BFB0978B61B2367A7FE4F7891070F56C78D5DD" - "F5576BFE5BE4F333A4E2664E79528B3294907AADD63F4F2E7AA8147B928D8CD69765" - "3DB98C4297CB678046ED55C0DBE60BF7142C594603E4D705DC3D17270F9F086EC561" - "2703D518D8D49FF0EBE6#)\n" -" (x #00A9FFFC88E67D6F7B810E291C050BAFEA7FC4A75E8D2F16CFED3416FD77607232#)\n" -"))\n"; - -static const char sample_public_dsa_key_3072[] = -"(public-key\n" -" (dsa\n" -" (p #00BA73E148AEA5E8B64878AF5BE712B8302B9671C5F3EEB7722A9D0D9868D048C938" - "877C91C335C7819292E69C7D34264F1578E32EC2DA8408DF75D0EB76E0D3030B84B5" - "62D8EF93AB53BAB6B8A5DE464F5CA87AEA43BDCF0FB0B7815AA3114CFC84FD916A83" - "B3D5FD78390189332232E9D037D215313FD002FF46C048B66703F87FAE092AAA0988" - "AC745336EBE672A01DEDBD52395783579B67CF3AE1D6F1602CCCB12154FA0E00AE46" - "0D9B289CF709194625BCB919B11038DEFC50ADBBA20C3F320078E4E9529B4F6848E2" - "AB5E6278DB961FE226F2EEBD201E071C48C5BEF98B4D9BEE42C1C7102D893EBF8902" - "D7A91266340AFD6CE1D09E52282FFF5B97EAFA3886A3FCF84FF76D1E06538D0D8E60" - "B3332145785E07D29A5965382DE3470D1D888447FA9C00A2373378FC3FA7B9F7D17E" - "95A6A5AE1397BE46D976EF2C96E89913AC4A09351CA661BF6F67E30407DA846946C7" - "62D9BAA6B77825097D3E7B886456BB32E3E74516BF3FD93D71B257AA8F723E01CE33" - "8015353D3778B02B892AF7#)\n" -" (q #00BFF3F3CC18FA018A5B8155A8695E1E4939660D5E4759322C39D50F3B93E5F68B#)\n" -" (g #6CCFD8219F5FCE8EF2BEF3262929787140847E38674B1EF8DB20255E212CB6330EC4" - "DFE8A26AB7ECC5760DEB9BBF59A2B2821D510F1868172222867558B8D204E889C474" - "7CA30FBF9D8CF41AE5D5BD845174641101593849FF333E6C93A6550931B2B9D56B98" - "9CAB01729D9D736FA6D24A74D2DDE1E9E648D141473E443DD6BBF0B3CAB64F9FE4FC" - "134B2EB57437789F75C744DF1FA67FA8A64603E5441BC7ECE29E00BDF262BDC81E8C" - "7330A18A412DE38E7546D342B89A0AF675A89E6BEF00540EB107A2FE74EA402B0D89" - "F5C02918DEEEAF8B8737AC866B09B50810AB8D8668834A1B9E1E53866E2B0A926FAB" - "120A0CDE5B3715FFFE6ACD1AB73588DCC1EC4CE9392FE57F8D1D35811200CB07A0E6" - "374E2C4B0AEB7E3D077B8545C0E438DCC0F1AE81E186930E99EBC5B91B77E92803E0" - "21602887851A4FFDB3A7896AC655A0901218C121C5CBB0931E7D5EAC243F37711B5F" - "D5A62B1B38A83F03D8F6703D8B98DF367FC8A76990335F62173A5391836F0F2413EC" - "4997AF9EB55C6660B01A#)\n" -" (y #2320B22434C5DB832B4EC267CC52E78DD5CCFA911E8F0804E7E7F32B186B2D4167AE" - "4AA6869822E76400492D6A193B0535322C72B0B7AA4A87E33044FDC84BE24C64A053" - "A37655EE9EABDCDC1FDF63F3F1C677CEB41595DF7DEFE9178D85A3D621B4E4775492" - "8C0A58D2458D06F9562E4DE2FE6129A64063A99E88E54485B97484A28188C4D33F15" - "DDC903B6CEA0135E3E3D27B4EA39319696305CE93D7BA7BE00367DBE3AAF43491E71" - "CBF254744A5567F5D70090D6139E0C990239627B3A1C5B20B6F9F6374B8D8D8A8997" - "437265BE1E3B4810D4B09254400DE287A0DFFBAEF339E48D422B1D41A37E642BC026" - "73314701C8FA9792845C129351A87A945A03E6C895860E51D6FB8B7340A94D1A8A7B" - "FA85AC83B4B14E73AB86CB96C236C8BFB0978B61B2367A7FE4F7891070F56C78D5DD" - "F5576BFE5BE4F333A4E2664E79528B3294907AADD63F4F2E7AA8147B928D8CD69765" - "3DB98C4297CB678046ED55C0DBE60BF7142C594603E4D705DC3D17270F9F086EC561" - "2703D518D8D49FF0EBE6#)\n" -"))\n"; - - -#define DIM(v) (sizeof(v)/sizeof((v)[0])) -#define DIMof(type,member) DIM(((type *)0)->member) -#define BUG() do {fprintf ( stderr, "Ooops at %s:%d\n", __FILE__ , __LINE__ );\ - exit(2);} while(0) - - -/* Helper for the start and stop timer. */ -#ifdef _WIN32 -struct { - FILETIME creation_time, exit_time, kernel_time, user_time; -} started_at, stopped_at; -#else -static clock_t started_at, stopped_at; -#endif - -static void -die (const char *format, ...) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - putchar ('\n'); - fputs ( PGM ": ", stderr); - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - exit (1); -} - -static void -show_sexp (const char *prefix, gcry_sexp_t a) -{ - char *buf; - size_t size; - - fputs (prefix, stderr); - size = gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, NULL, 0); - buf = malloc (size); - if (!buf) - die ("out of core\n"); - - gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, buf, size); - fprintf (stderr, "%.*s", (int)size, buf); -} - - -static void -start_timer (void) -{ -#ifdef _WIN32 - GetProcessTimes (GetCurrentProcess (), - &started_at.creation_time, &started_at.exit_time, - &started_at.kernel_time, &started_at.user_time); - stopped_at = started_at; -#else - struct tms tmp; - - times (&tmp); - started_at = stopped_at = tmp.tms_utime; -#endif -} - -static void -stop_timer (void) -{ -#ifdef _WIN32 - GetProcessTimes (GetCurrentProcess (), - &stopped_at.creation_time, &stopped_at.exit_time, - &stopped_at.kernel_time, &stopped_at.user_time); -#else - struct tms tmp; - - times (&tmp); - stopped_at = tmp.tms_utime; -#endif -} - -static const char * -elapsed_time (void) -{ - static char buf[50]; -#if _WIN32 - unsigned long long t1, t2, t; - - t1 = (((unsigned long long)started_at.kernel_time.dwHighDateTime << 32) - + started_at.kernel_time.dwLowDateTime); - t1 += (((unsigned long long)started_at.user_time.dwHighDateTime << 32) - + started_at.user_time.dwLowDateTime); - t2 = (((unsigned long long)stopped_at.kernel_time.dwHighDateTime << 32) - + stopped_at.kernel_time.dwLowDateTime); - t2 += (((unsigned long long)stopped_at.user_time.dwHighDateTime << 32) - + stopped_at.user_time.dwLowDateTime); - t = (t2 - t1)/10000; - snprintf (buf, sizeof buf, "%5.0fms", (double)t ); -#else - snprintf (buf, sizeof buf, "%5.0fms", - (((double) (stopped_at - started_at))/CLOCKS_PER_SEC)*10000000); -#endif - return buf; -} - - -static void -random_bench (int very_strong) -{ - char buf[128]; - int i; - - printf ("%-10s", "random"); - - if (!very_strong) - { - start_timer (); - for (i=0; i < 100; i++) - gcry_randomize (buf, sizeof buf, GCRY_STRONG_RANDOM); - stop_timer (); - printf (" %s", elapsed_time ()); - } - - start_timer (); - for (i=0; i < 100; i++) - gcry_randomize (buf, 8, - very_strong? GCRY_VERY_STRONG_RANDOM:GCRY_STRONG_RANDOM); - stop_timer (); - printf (" %s", elapsed_time ()); - - putchar ('\n'); - if (verbose) - gcry_control (GCRYCTL_DUMP_RANDOM_STATS); -} - - - -static void -md_bench ( const char *algoname ) -{ - int algo; - gcry_md_hd_t hd; - int i; - char buf[1000]; - gcry_error_t err = GPG_ERR_NO_ERROR; - - if (!algoname) - { - for (i=1; i < 400; i++) - if (in_fips_mode && i == GCRY_MD_MD5) - ; /* Don't use MD5 in fips mode. */ - else if ( !gcry_md_test_algo (i) ) - md_bench (gcry_md_algo_name (i)); - return; - } - - algo = gcry_md_map_name (algoname); - if (!algo) - { - fprintf (stderr, PGM ": invalid hash algorithm `%s'\n", algoname); - exit (1); - } - - err = gcry_md_open (&hd, algo, 0); - if (err) - { - fprintf (stderr, PGM ": error opening hash algorithm `%s'\n", algoname); - exit (1); - } - - for (i=0; i < sizeof buf; i++) - buf[i] = i; - - printf ("%-12s", gcry_md_algo_name (algo)); - - start_timer (); - for (i=0; i < 1000; i++) - gcry_md_write (hd, buf, sizeof buf); - gcry_md_final (hd); - stop_timer (); - printf (" %s", elapsed_time ()); - - gcry_md_reset (hd); - start_timer (); - for (i=0; i < 10000; i++) - gcry_md_write (hd, buf, sizeof buf/10); - gcry_md_final (hd); - stop_timer (); - printf (" %s", elapsed_time ()); - - gcry_md_reset (hd); - start_timer (); - for (i=0; i < 1000000; i++) - gcry_md_write (hd, "", 1); - gcry_md_final (hd); - stop_timer (); - printf (" %s", elapsed_time ()); - - gcry_md_close (hd); - putchar ('\n'); -} - -static void -cipher_bench ( const char *algoname ) -{ - static int header_printed; - int algo; - gcry_cipher_hd_t hd; - int i; - int keylen, blklen; - char key[128]; - char *outbuf, *buf; - size_t allocated_buflen, buflen; - int repetitions; - static struct { int mode; const char *name; int blocked; } modes[] = { - { GCRY_CIPHER_MODE_ECB, "ECB", 1 }, - { GCRY_CIPHER_MODE_CBC, "CBC", 1 }, - { GCRY_CIPHER_MODE_CFB, "CFB", 0 }, - { GCRY_CIPHER_MODE_OFB, "OFB", 0 }, - { GCRY_CIPHER_MODE_CTR, "CTR", 0 }, - { GCRY_CIPHER_MODE_STREAM, "STREAM", 0 }, - {0} - }; - int modeidx; - gcry_error_t err = GPG_ERR_NO_ERROR; - - - if (!algoname) - { - for (i=1; i < 400; i++) - if ( !gcry_cipher_test_algo (i) ) - cipher_bench (gcry_cipher_algo_name (i)); - return; - } - - if (large_buffers) - { - allocated_buflen = 1024 * 100; - repetitions = 10; - } - else - { - allocated_buflen = 1024; - repetitions = 1000; - } - repetitions *= cipher_repetitions; - - buf = gcry_xmalloc (allocated_buflen); - outbuf = gcry_xmalloc (allocated_buflen); - - if (!header_printed) - { - if (cipher_repetitions != 1) - printf ("Running each test %d times.\n", cipher_repetitions); - printf ("%-12s", ""); - for (modeidx=0; modes[modeidx].mode; modeidx++) - printf (" %-15s", modes[modeidx].name ); - putchar ('\n'); - printf ("%-12s", ""); - for (modeidx=0; modes[modeidx].mode; modeidx++) - printf (" ---------------" ); - putchar ('\n'); - header_printed = 1; - } - - algo = gcry_cipher_map_name (algoname); - if (!algo) - { - fprintf (stderr, PGM ": invalid cipher algorithm `%s'\n", algoname); - exit (1); - } - - keylen = gcry_cipher_get_algo_keylen (algo); - if (!keylen) - { - fprintf (stderr, PGM ": failed to get key length for algorithm `%s'\n", - algoname); - exit (1); - } - if ( keylen > sizeof key ) - { - fprintf (stderr, PGM ": algo %d, keylength problem (%d)\n", - algo, keylen ); - exit (1); - } - for (i=0; i < keylen; i++) - key[i] = i + (clock () & 0xff); - - blklen = gcry_cipher_get_algo_blklen (algo); - if (!blklen) - { - fprintf (stderr, PGM ": failed to get block length for algorithm `%s'\n", - algoname); - exit (1); - } - - printf ("%-12s", gcry_cipher_algo_name (algo)); - fflush (stdout); - - for (modeidx=0; modes[modeidx].mode; modeidx++) - { - if ((blklen > 1 && modes[modeidx].mode == GCRY_CIPHER_MODE_STREAM) - | (blklen == 1 && modes[modeidx].mode != GCRY_CIPHER_MODE_STREAM)) - { - printf (" " ); - continue; - } - - for (i=0; i < sizeof buf; i++) - buf[i] = i; - - err = gcry_cipher_open (&hd, algo, modes[modeidx].mode, 0); - if (err) - { - fprintf (stderr, PGM ": error opening cipher `%s'\n", algoname); - exit (1); - } - - err = gcry_cipher_setkey (hd, key, keylen); - if (err) - { - fprintf (stderr, "gcry_cipher_setkey failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hd); - exit (1); - } - - buflen = allocated_buflen; - if (modes[modeidx].blocked) - buflen = (buflen / blklen) * blklen; - - start_timer (); - for (i=err=0; !err && i < repetitions; i++) - err = gcry_cipher_encrypt ( hd, outbuf, buflen, buf, buflen); - stop_timer (); - - printf (" %s", elapsed_time ()); - fflush (stdout); - gcry_cipher_close (hd); - if (err) - { - fprintf (stderr, "gcry_cipher_encrypt failed: %s\n", - gpg_strerror (err) ); - exit (1); - } - - err = gcry_cipher_open (&hd, algo, modes[modeidx].mode, 0); - if (err) - { - fprintf (stderr, PGM ": error opening cipher `%s'/n", algoname); - exit (1); - } - - err = gcry_cipher_setkey (hd, key, keylen); - if (err) - { - fprintf (stderr, "gcry_cipher_setkey failed: %s\n", - gpg_strerror (err)); - gcry_cipher_close (hd); - exit (1); - } - - start_timer (); - for (i=err=0; !err && i < repetitions; i++) - err = gcry_cipher_decrypt ( hd, outbuf, buflen, buf, buflen); - stop_timer (); - printf (" %s", elapsed_time ()); - fflush (stdout); - gcry_cipher_close (hd); - if (err) - { - fprintf (stderr, "gcry_cipher_decrypt failed: %s\n", - gpg_strerror (err) ); - exit (1); - } - } - - putchar ('\n'); - gcry_free (buf); - gcry_free (outbuf); -} - - - -static void -rsa_bench (int iterations, int print_header, int no_blinding) -{ - gpg_error_t err; - int p_sizes[] = { 1024, 2048, 3072, 4096 }; - int testno; - - if (print_header) - printf ("Algorithm generate %4d*sign %4d*verify\n" - "------------------------------------------------\n", - iterations, iterations ); - for (testno=0; testno < DIM (p_sizes); testno++) - { - gcry_sexp_t key_spec, key_pair, pub_key, sec_key; - gcry_mpi_t x; - gcry_sexp_t data; - gcry_sexp_t sig = NULL; - int count; - - printf ("RSA %3d bit ", p_sizes[testno]); - fflush (stdout); - - err = gcry_sexp_build (&key_spec, NULL, - gcry_fips_mode_active () - ? "(genkey (RSA (nbits %d)))" - : "(genkey (RSA (nbits %d)(transient-key)))", - p_sizes[testno]); - if (err) - die ("creating S-expression failed: %s\n", gcry_strerror (err)); - - start_timer (); - err = gcry_pk_genkey (&key_pair, key_spec); - if (err) - die ("creating %d bit RSA key failed: %s\n", - p_sizes[testno], gcry_strerror (err)); - - pub_key = gcry_sexp_find_token (key_pair, "public-key", 0); - if (! pub_key) - die ("public part missing in key\n"); - sec_key = gcry_sexp_find_token (key_pair, "private-key", 0); - if (! sec_key) - die ("private part missing in key\n"); - gcry_sexp_release (key_pair); - gcry_sexp_release (key_spec); - - stop_timer (); - printf (" %s", elapsed_time ()); - fflush (stdout); - - x = gcry_mpi_new (p_sizes[testno]); - gcry_mpi_randomize (x, p_sizes[testno]-8, GCRY_WEAK_RANDOM); - err = gcry_sexp_build (&data, NULL, - "(data (flags raw) (value %m))", x); - gcry_mpi_release (x); - if (err) - die ("converting data failed: %s\n", gcry_strerror (err)); - - start_timer (); - for (count=0; count < iterations; count++) - { - gcry_sexp_release (sig); - err = gcry_pk_sign (&sig, data, sec_key); - if (err) - die ("signing failed (%d): %s\n", count, gpg_strerror (err)); - } - stop_timer (); - printf (" %s", elapsed_time ()); - fflush (stdout); - - start_timer (); - for (count=0; count < iterations; count++) - { - err = gcry_pk_verify (sig, data, pub_key); - if (err) - { - putchar ('\n'); - show_sexp ("seckey:\n", sec_key); - show_sexp ("data:\n", data); - show_sexp ("sig:\n", sig); - die ("verify failed (%d): %s\n", count, gpg_strerror (err)); - } - } - stop_timer (); - printf (" %s", elapsed_time ()); - - if (no_blinding) - { - fflush (stdout); - x = gcry_mpi_new (p_sizes[testno]); - gcry_mpi_randomize (x, p_sizes[testno]-8, GCRY_WEAK_RANDOM); - err = gcry_sexp_build (&data, NULL, - "(data (flags no-blinding) (value %m))", x); - gcry_mpi_release (x); - if (err) - die ("converting data failed: %s\n", gcry_strerror (err)); - - start_timer (); - for (count=0; count < iterations; count++) - { - gcry_sexp_release (sig); - err = gcry_pk_sign (&sig, data, sec_key); - if (err) - die ("signing failed (%d): %s\n", count, gpg_strerror (err)); - } - stop_timer (); - printf (" %s", elapsed_time ()); - fflush (stdout); - } - - putchar ('\n'); - fflush (stdout); - - gcry_sexp_release (sig); - gcry_sexp_release (data); - gcry_sexp_release (sec_key); - gcry_sexp_release (pub_key); - } -} - - - -static void -dsa_bench (int iterations, int print_header) -{ - gpg_error_t err; - gcry_sexp_t pub_key[3], sec_key[3]; - int p_sizes[3] = { 1024, 2048, 3072 }; - int q_sizes[3] = { 160, 224, 256 }; - gcry_sexp_t data; - gcry_sexp_t sig; - int i, j; - - err = gcry_sexp_sscan (pub_key+0, NULL, sample_public_dsa_key_1024, - strlen (sample_public_dsa_key_1024)); - if (!err) - err = gcry_sexp_sscan (sec_key+0, NULL, sample_private_dsa_key_1024, - strlen (sample_private_dsa_key_1024)); - if (!err) - err = gcry_sexp_sscan (pub_key+1, NULL, sample_public_dsa_key_2048, - strlen (sample_public_dsa_key_2048)); - if (!err) - err = gcry_sexp_sscan (sec_key+1, NULL, sample_private_dsa_key_2048, - strlen (sample_private_dsa_key_2048)); - if (!err) - err = gcry_sexp_sscan (pub_key+2, NULL, sample_public_dsa_key_3072, - strlen (sample_public_dsa_key_3072)); - if (!err) - err = gcry_sexp_sscan (sec_key+2, NULL, sample_private_dsa_key_3072, - strlen (sample_private_dsa_key_3072)); - if (err) - { - fprintf (stderr, PGM ": converting sample keys failed: %s\n", - gcry_strerror (err)); - exit (1); - } - - if (print_header) - printf ("Algorithm generate %4d*sign %4d*verify\n" - "------------------------------------------------\n", - iterations, iterations ); - for (i=0; i < DIM (q_sizes); i++) - { - gcry_mpi_t x; - - x = gcry_mpi_new (q_sizes[i]); - gcry_mpi_randomize (x, q_sizes[i], GCRY_WEAK_RANDOM); - err = gcry_sexp_build (&data, NULL, "(data (flags raw) (value %m))", x); - gcry_mpi_release (x); - if (err) - { - fprintf (stderr, PGM ": converting data failed: %s\n", - gcry_strerror (err)); - exit (1); - } - - printf ("DSA %d/%d -", p_sizes[i], q_sizes[i]); - fflush (stdout); - - start_timer (); - for (j=0; j < iterations; j++) - { - err = gcry_pk_sign (&sig, data, sec_key[i]); - if (err) - { - putchar ('\n'); - fprintf (stderr, PGM ": signing failed: %s\n", - gpg_strerror (err)); - exit (1); - } - } - stop_timer (); - printf (" %s", elapsed_time ()); - fflush (stdout); - - start_timer (); - for (j=0; j < iterations; j++) - { - err = gcry_pk_verify (sig, data, pub_key[i]); - if (err) - { - putchar ('\n'); - fprintf (stderr, PGM ": verify failed: %s\n", - gpg_strerror (err)); - exit (1); - } - } - stop_timer (); - printf (" %s\n", elapsed_time ()); - fflush (stdout); - - gcry_sexp_release (sig); - gcry_sexp_release (data); - } - - - for (i=0; i < DIM (q_sizes); i++) - { - gcry_sexp_release (sec_key[i]); - gcry_sexp_release (pub_key[i]); - } -} - - -static void -ecc_bench (int iterations, int print_header) -{ -#if USE_ECC - gpg_error_t err; - int p_sizes[] = { 192, 224, 256, 384, 521 }; - int testno; - - if (print_header) - printf ("Algorithm generate %4d*sign %4d*verify\n" - "------------------------------------------------\n", - iterations, iterations ); - for (testno=0; testno < DIM (p_sizes); testno++) - { - gcry_sexp_t key_spec, key_pair, pub_key, sec_key; - gcry_mpi_t x; - gcry_sexp_t data; - gcry_sexp_t sig = NULL; - int count; - - printf ("ECDSA %3d bit ", p_sizes[testno]); - fflush (stdout); - - err = gcry_sexp_build (&key_spec, NULL, - "(genkey (ECDSA (nbits %d)))", p_sizes[testno]); - if (err) - die ("creating S-expression failed: %s\n", gcry_strerror (err)); - - start_timer (); - err = gcry_pk_genkey (&key_pair, key_spec); - if (err) - die ("creating %d bit ECC key failed: %s\n", - p_sizes[testno], gcry_strerror (err)); - - pub_key = gcry_sexp_find_token (key_pair, "public-key", 0); - if (! pub_key) - die ("public part missing in key\n"); - sec_key = gcry_sexp_find_token (key_pair, "private-key", 0); - if (! sec_key) - die ("private part missing in key\n"); - gcry_sexp_release (key_pair); - gcry_sexp_release (key_spec); - - stop_timer (); - printf (" %s", elapsed_time ()); - fflush (stdout); - - x = gcry_mpi_new (p_sizes[testno]); - gcry_mpi_randomize (x, p_sizes[testno], GCRY_WEAK_RANDOM); - err = gcry_sexp_build (&data, NULL, "(data (flags raw) (value %m))", x); - gcry_mpi_release (x); - if (err) - die ("converting data failed: %s\n", gcry_strerror (err)); - - start_timer (); - for (count=0; count < iterations; count++) - { - gcry_sexp_release (sig); - err = gcry_pk_sign (&sig, data, sec_key); - if (err) - die ("signing failed: %s\n", gpg_strerror (err)); - } - stop_timer (); - printf (" %s", elapsed_time ()); - fflush (stdout); - - start_timer (); - for (count=0; count < iterations; count++) - { - err = gcry_pk_verify (sig, data, pub_key); - if (err) - { - putchar ('\n'); - show_sexp ("seckey:\n", sec_key); - show_sexp ("data:\n", data); - show_sexp ("sig:\n", sig); - die ("verify failed: %s\n", gpg_strerror (err)); - } - } - stop_timer (); - printf (" %s\n", elapsed_time ()); - fflush (stdout); - - gcry_sexp_release (sig); - gcry_sexp_release (data); - gcry_sexp_release (sec_key); - gcry_sexp_release (pub_key); - } -#endif /*USE_ECC*/ -} - - - -static void -do_powm ( const char *n_str, const char *e_str, const char *m_str) -{ - gcry_mpi_t e, n, msg, cip; - gcry_error_t err; - int i; - - err = gcry_mpi_scan (&n, GCRYMPI_FMT_HEX, n_str, 0, 0); - if (err) BUG (); - err = gcry_mpi_scan (&e, GCRYMPI_FMT_HEX, e_str, 0, 0); - if (err) BUG (); - err = gcry_mpi_scan (&msg, GCRYMPI_FMT_HEX, m_str, 0, 0); - if (err) BUG (); - - cip = gcry_mpi_new (0); - - start_timer (); - for (i=0; i < 1000; i++) - gcry_mpi_powm (cip, msg, e, n); - stop_timer (); - printf (" %s", elapsed_time ()); fflush (stdout); -/* { */ -/* char *buf; */ - -/* if (gcry_mpi_aprint (GCRYMPI_FMT_HEX, (void**)&buf, NULL, cip)) */ -/* BUG (); */ -/* printf ("result: %s\n", buf); */ -/* gcry_free (buf); */ -/* } */ - gcry_mpi_release (cip); - gcry_mpi_release (msg); - gcry_mpi_release (n); - gcry_mpi_release (e); -} - - -static void -mpi_bench (void) -{ - printf ("%-10s", "powm"); fflush (stdout); - - do_powm ( -"20A94417D4D5EF2B2DA99165C7DC87DADB3979B72961AF90D09D59BA24CB9A10166FDCCC9C659F2B9626EC23F3FA425F564A072BA941B03FA81767CC289E4", - "29", -"B870187A323F1ECD5B8A0B4249507335A1C4CE8394F38FD76B08C78A42C58F6EA136ACF90DFE8603697B1694A3D81114D6117AC1811979C51C4DD013D52F8" - ); - do_powm ( - "20A94417D4D5EF2B2DA99165C7DC87DADB3979B72961AF90D09D59BA24CB9A10166FDCCC9C659F2B9626EC23F3FA425F564A072BA941B03FA81767CC289E41071F0246879A442658FBD18C1771571E7073EEEB2160BA0CBFB3404D627069A6CFBD53867AD2D9D40231648000787B5C84176B4336144644AE71A403CA40716", - "29", - "B870187A323F1ECD5B8A0B4249507335A1C4CE8394F38FD76B08C78A42C58F6EA136ACF90DFE8603697B1694A3D81114D6117AC1811979C51C4DD013D52F8FC4EE4BB446B83E48ABED7DB81CBF5E81DE4759E8D68AC985846D999F96B0D8A80E5C69D272C766AB8A23B40D50A4FA889FBC2BD2624222D8EB297F4BAEF8593847" - ); - do_powm ( - "20A94417D4D5EF2B2DA99165C7DC87DADB3979B72961AF90D09D59BA24CB9A10166FDCCC9C659F2B9626EC23F3FA425F564A072BA941B03FA81767CC289E41071F0246879A442658FBD18C1771571E7073EEEB2160BA0CBFB3404D627069A6CFBD53867AD2D9D40231648000787B5C84176B4336144644AE71A403CA4071620A94417D4D5EF2B2DA99165C7DC87DADB3979B72961AF90D09D59BA24CB9A10166FDCCC9C659F2B9626EC23F3FA425F564A072BA941B03FA81767CC289E41071F0246879A442658FBD18C1771571E7073EEEB2160BA0CBFB3404D627069A6CFBD53867AD2D9D40231648000787B5C84176B4336144644AE71A403CA40716", - "29", - "B870187A323F1ECD5B8A0B4249507335A1C4CE8394F38FD76B08C78A42C58F6EA136ACF90DFE8603697B1694A3D81114D6117AC1811979C51C4DD013D52F8FC4EE4BB446B83E48ABED7DB81CBF5E81DE4759E8D68AC985846D999F96B0D8A80E5C69D272C766AB8A23B40D50A4FA889FBC2BD2624222D8EB297F4BAEF8593847B870187A323F1ECD5B8A0B4249507335A1C4CE8394F38FD76B08C78A42C58F6EA136ACF90DFE8603697B1694A3D81114D6117AC1811979C51C4DD013D52F8FC4EE4BB446B83E48ABED7DB81CBF5E81DE4759E8D68AC985846D999F96B0D8A80E5C69D272C766AB8A23B40D50A4FA889FBC2BD2624222D8EB297F4BAEF8593847" - ); - - putchar ('\n'); - - -} - - -int -main( int argc, char **argv ) -{ - int last_argc = -1; - int no_blinding = 0; - int use_random_daemon = 0; - - if (argc) - { argc--; argv++; } - - while (argc && last_argc != argc ) - { - last_argc = argc; - if (!strcmp (*argv, "--")) - { - argc--; argv++; - break; - } - else if (!strcmp (*argv, "--help")) - { - fputs ("usage: benchmark " - "[md|cipher|random|mpi|rsa|dsa|ecc [algonames]]\n", - stdout); - exit (0); - } - else if (!strcmp (*argv, "--verbose")) - { - verbose++; - argc--; argv++; - } - else if (!strcmp (*argv, "--use-random-daemon")) - { - use_random_daemon = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--no-blinding")) - { - no_blinding = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--large-buffers")) - { - large_buffers = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--cipher-repetition")) - { - argc--; argv++; - if (argc) - { - cipher_repetitions = atoi(*argv); - argc--; argv++; - } - } - else if (!strcmp (*argv, "--fips")) - { - argc--; argv++; - /* This command needs to be called before gcry_check_version. */ - gcry_control (GCRYCTL_FORCE_FIPS_MODE, 0); - } - } - - gcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose); - - if (!gcry_check_version (GCRYPT_VERSION)) - { - fprintf (stderr, PGM ": version mismatch\n"); - exit (1); - } - - if (gcry_fips_mode_active ()) - in_fips_mode = 1; - else - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - - if (use_random_daemon) - gcry_control (GCRYCTL_USE_RANDOM_DAEMON, 1); - - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - - - if (cipher_repetitions < 1) - cipher_repetitions = 1; - - if ( !argc ) - { - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - md_bench (NULL); - putchar ('\n'); - cipher_bench (NULL); - putchar ('\n'); - rsa_bench (100, 1, no_blinding); - dsa_bench (100, 0); - ecc_bench (100, 0); - putchar ('\n'); - mpi_bench (); - putchar ('\n'); - random_bench (0); - } - else if ( !strcmp (*argv, "random") || !strcmp (*argv, "strongrandom")) - { - if (argc == 1) - random_bench ((**argv == 's')); - else if (argc == 2) - { - gcry_control (GCRYCTL_SET_RANDOM_SEED_FILE, argv[1]); - random_bench ((**argv == 's')); - gcry_control (GCRYCTL_UPDATE_RANDOM_SEED_FILE); - } - else - fputs ("usage: benchmark [strong]random [seedfile]\n", stdout); - } - else if ( !strcmp (*argv, "md")) - { - if (argc == 1) - md_bench (NULL); - else - for (argc--, argv++; argc; argc--, argv++) - md_bench ( *argv ); - } - else if ( !strcmp (*argv, "cipher")) - { - if (argc == 1) - cipher_bench (NULL); - else - for (argc--, argv++; argc; argc--, argv++) - cipher_bench ( *argv ); - } - else if ( !strcmp (*argv, "mpi")) - { - mpi_bench (); - } - else if ( !strcmp (*argv, "rsa")) - { - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - rsa_bench (100, 1, no_blinding); - } - else if ( !strcmp (*argv, "dsa")) - { - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - dsa_bench (100, 1); - } - else if ( !strcmp (*argv, "ecc")) - { - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - ecc_bench (100, 1); - } - else - { - fprintf (stderr, PGM ": bad arguments\n"); - return 1; - } - - - if (in_fips_mode && !gcry_fips_mode_active ()) - fprintf (stderr, PGM ": FIPS mode is not anymore active\n"); - - return 0; -} - diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/cavs_driver.pl b/plugins/MirOTR/libgcrypt-1.4.6/tests/cavs_driver.pl deleted file mode 100644 index 7111f0f47c..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/cavs_driver.pl +++ /dev/null @@ -1,2243 +0,0 @@ -#!/usr/bin/env perl -# -# $Id: cavs_driver.pl 1497 2009-01-22 14:01:29Z smueller $ -# -# CAVS test driver (based on the OpenSSL driver) -# Written by: Stephan Müller <sm@atsec.com> -# Copyright (c) atsec information security corporation -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# NO WARRANTY -# -# BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -# FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -# OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -# PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -# OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -# TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -# PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -# REPAIR OR CORRECTION. -# -# IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -# WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -# REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -# INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -# OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -# TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -# YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -# PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGES. -# -# -# test execution instruction: -# 1. get the request files from the lab -# 2. call each request file from 1. with this program: -# $0 <FILE>.rep -# 3. send the resulting file <FILE>.rsp to the lab -# -# -# Test should be easily adoptable to other implementations -# See the first functions for this task -# -# Following tests are covered (others may also be covered -# but have not been tested) -# -# AES -# [CBC|CFB128|ECB|OFB]GFSbox[128|192|256] -# [CBC|CFB128|ECB|OFB]MCT[128|192|256] -# [CBC|CFB128|ECB|OFB]VarKey[128|192|256] -# [CBC|CFB128|ECB|OFB]KeySbox[128|192|256] -# [CBC|CFB128|ECB|OFB]MMT[128|192|256] -# [CBC|CFB128|ECB|OFB]VarTxt[128|192|256] -# -# RSA -# SigGen[15|RSA] -# SigVer15 -# (SigVerRSA is not applicable for OpenSSL as X9.31 padding -# is not done through openssl dgst) -# KeyGen RSA X9.31 -# -# SHA -# SHA[1|224|256|384|512]ShortMsg -# SHA[1|224|256|384|512]LongMsg -# SHA[1|224|256|384|512]Monte -# -# HMAC (SHA - caveat: we only support hash output equal to the block size of -# of the hash - we do not support truncation of the hash; to support -# that, we first need to decipher the HMAC.req file - see hmac_kat() ) -# HMAC -# -# TDES -# T[CBC|CFB??|ECB|OFB]Monte[1|2|3] -# T[CBC|CFB??|ECB|OFB]permop -# T[CBC|CFB??|ECB|OFB]MMT[1|2|3] -# T[CBC|CFB??|ECB|OFB]subtab -# T[CBC|CFB??|ECB|OFB]varkey -# T[CBC|CFB??|ECB|OFB]invperm -# T[CBC|CFB??|ECB|OFB]vartext -# -# ANSI X9.31 RNG -# ANSI931_AES128MCT -# ANSI931_AES128VST -# -# DSA -# PQGGen -# SigGen -# SigVer -# -# RC4 (atsec developed tests) -# RC4KeyBD -# RC4MCT -# RC4PltBD -# RC4REGT -# - -use strict; -use warnings; -use IPC::Open2; -use Getopt::Std; -use MIME::Base64; - -# Contains the command line options -my %opt; - -################################################################# -##### Central interface functions to the external ciphers ####### -################################################################# -# Only these interface routines should be changed in case of -# porting to a new cipher library -# -# For porting to a new library, create implementation of these functions -# and then add pointers to the respective implementation of each -# function to the given variables. - -# common encryption/decryption routine -# $1 key in hex form (please note for 3DES: even when ede3 for three -# independent ciphers is given with the cipher specification, we hand in -# either one key for k1 = k2 = k3, two keys which are concatinated for -# k1 = k3, k2 independent, or three keys which are concatinated for -# k1, k2, k3 independent) -# $2 iv in hex form -# $3 cipher - the cipher string is defined as specified in the openssl -# enc(1ssl) specification for the option "-ciphername" -# (e.g. aes-128-cbc or des-ede3-cbc) -# $4 encrypt=1/decrypt=0 -# $5 de/encrypted data in hex form -# return en/decrypted data in hex form -my $encdec; - -# -# Derive an RSA key from the given X9.31 parameters. -# $1: modulus size -# $2: E in hex form -# $3: Xp1 in hex form -# $4: Xp2 in hex form -# $5: Xp in hex form -# $6: Xq1 in hex form -# $7: Xq2 in hex form -# $8: Xq in hex form -# return: string with the calculated values in hex format, where each value -# is separated from the previous with a \n in the following order: -# P\n -# Q\n -# N\n -# D\n -my $rsa_derive; - -# Sign a message with RSA -# $1: data to be signed in hex form -# $2: Hash algo -# $3: Key file in PEM format with the private key -# return: digest in hex format -my $rsa_sign; - -# Verify a message with RSA -# $1: data to be verified in hex form -# $2: hash algo -# $3: file holding the public RSA key in PEM format -# $4: file holding the signature in binary form -# return: 1 == verified / 0 == not verified -my $rsa_verify; - -# generate a new private RSA key with the following properties: -# exponent is 65537 -# PEM format -# $1 key size in bit -# $2 keyfile name -# return: nothing, but file created -my $gen_rsakey; - -# Creating a hash -# $1: Plaintext in hex form -# $2: hash type in the form documented in openssl's dgst(1ssl) - e.g. -# sha1, sha224, sha256, sha384, sha512 -# return: hash in hex form -my $hash; - -# supplying the call to the external cipher implementation -# that is being used to keep STDIN and STDOUT open -# to maintain the state of the block chaining -# $1: cipher -# $2: 1=encryption, 0=decryption -# $3: buffersize needed for openssl -# $4: encryption key in binary form -# $5: IV in binary form -# return: command line to execute the application -my $state_cipher; -# the only difference of the DES version is that it implements the inner loop -# of the TDES tests -my $state_cipher_des; - -# supplying the call to the external cipher implementation -# that is being used to keep STDIN and STDOUT open -# to maintain the state of the RNG with its seed -# -# input holds seed values -# $1: cipher key in hex format -# $2: DT value in hex format -# $3: V value in hex format -# -# return: command line to execute the application -# -# the application is expected to deliver random values on STDOUT - the script -# reads 128 bits repeatedly where the state of the RNG must be retained -# between the reads. The output of the RNG on STDOUT is assumed to be binary. -my $state_rng; - -# Generate an HMAC based on SHAx -# $1: Key to be used for the HMAC in hex format -# $2: length of the hash to be calculated in bits -# $3: Message for which the HMAC shall be calculated in hex format -# $4: hash type (1 - SHA1, 224 - SHA224, and so on) -# return: calculated HMAC in hex format -my $hmac; - -# -# Generate the P, Q, G, Seed, counter, h (value used to generate g) values -# for DSA -# $1: modulus size -# return: string with the calculated values in hex format, where each value -# is separated from the previous with a \n in the following order: -# P\n -# Q\n -# G\n -# Seed\n -# counter\n -# h -my $dsa_pqggen; - -# -# Generate an DSA public key from the provided parameters: -# $1: Name of file to create -# $2: P in hex form -# $3: Q in hex form -# $4: G in hex form -# $5: Y in hex form -my $dsa_genpubkey; - -# Verify a message with DSA -# $1: data to be verified in hex form -# $2: file holding the public DSA key in PEM format -# $3: R value of the signature -# $4: S value of the signature -# return: 1 == verified / 0 == not verified -my $dsa_verify; - -# generate a new DSA key with the following properties: -# PEM format -# $1 keyfile name -# return: file created, hash with keys of P, Q, G in hex format -my $gen_dsakey; - -# Sign a message with DSA -# $1: data to be signed in hex form -# $2: Key file in PEM format with the private key -# return: hash of digest information in hex format with Y, R, S as keys -my $dsa_sign; - -################################################################ -##### OpenSSL interface functions -################################################################ -sub openssl_encdec($$$$$) { - my $key=shift; - my $iv=shift; - my $cipher=shift; - my $enc = (shift) ? "-e" : "-d"; - my $data=shift; - - # We only invoke the driver with the IV parameter, if we have - # an IV, otherwise, we skip it - $iv = "-iv $iv" if ($iv); - - $data=hex2bin($data); - my $program="openssl enc -$cipher -nopad -nosalt -K $key $enc $iv"; - $program = "rc4 -k $key" if $opt{'R'}; #for ARCFOUR, no IV must be given - $data=pipe_through_program($data,$program); - return bin2hex($data); -} - -sub openssl_rsa_sign($$$) { - my $data = shift; - my $cipher = shift; - my $keyfile = shift; - - $data=hex2bin($data); - die "ARCFOUR not available for RSA" if $opt{'R'}; - $data=pipe_through_program($data, - "openssl dgst -$cipher -binary -sign $keyfile"); - return bin2hex($data); -} - -sub openssl_rsa_verify($$$$) { - my $data = shift; - my $cipher = shift; - my $keyfile = shift; - my $sigfile = shift; - - $data = hex2bin($data); - die "ARCFOUR not available for RSA" if $opt{'R'}; - $data = pipe_through_program($data, - "openssl dgst -$cipher -binary -verify $keyfile -signature $sigfile"); - - # Parse through the OpenSSL output information - return ($data =~ /OK/); -} - -sub openssl_gen_rsakey($$) { - my $keylen = shift; - my $file = shift; - - die "ARCFOUR not available for RSA" if $opt{'R'}; - # generating of a key with exponent 0x10001 - my @args = ("openssl", "genrsa", "-F4", "-out", "$file", "$keylen"); - system(@args) == 0 - or die "system @args failed: $?"; - die "system @args failed: file $file not created" if (! -f $file); -} - -sub openssl_hash($$) { - my $pt = shift; - my $cipher = shift; - - die "ARCFOUR not available for hashes" if $opt{'R'}; - my $hash = hex2bin($pt); - #bin2hex not needed as the '-hex' already converts it - return pipe_through_program($hash, "openssl dgst -$cipher -hex"); -} - -sub openssl_state_cipher($$$$$) { - my $cipher = shift; - my $encdec = shift; - my $bufsize = shift; - my $key = shift; - my $iv = shift; - - my $enc = $encdec ? "-e": "-d"; - - # We only invoke the driver with the IV parameter, if we have - # an IV, otherwise, we skip it - $iv = "-iv ".bin2hex($iv) if ($iv); - - my $out = "openssl enc -'$cipher' $enc -nopad -nosalt -bufsize $bufsize -K ".bin2hex($key)." $iv"; - #for ARCFOUR, no IV must be given - $out = "rc4 -k " . bin2hex($key) if $opt{'R'}; - return $out; -} - -###### End of OpenSSL interface implementation ############ - -########################################################### -###### libgcrypt implementation -########################################################### -sub libgcrypt_encdec($$$$$) { - my $key=shift; - my $iv=shift; - my $cipher=shift; - my $enc = (shift) ? "encrypt" : "decrypt"; - my $data=shift; - - # We only invoke the driver with the IV parameter, if we have - # an IV, otherwise, we skip it - $iv = "--iv $iv" if ($iv); - - my $program="fipsdrv --key $key $iv --algo $cipher $enc"; - - return pipe_through_program($data,$program); - -} - -sub libgcrypt_rsa_derive($$$$$$$$) { - my $n = shift; - my $e = shift; - my $xp1 = shift; - my $xp2 = shift; - my $xp = shift; - my $xq1 = shift; - my $xq2 = shift; - my $xq = shift; - my $sexp; - my @tmp; - - $n = sprintf ("%u", $n); - $e = sprintf ("%u", hex($e)); - $sexp = "(genkey(rsa(nbits " . sprintf ("%u:%s", length($n), $n) . ")" - . "(rsa-use-e " . sprintf ("%u:%s", length($e), $e) . ")" - . "(derive-parms" - . "(Xp1 #$xp1#)" - . "(Xp2 #$xp2#)" - . "(Xp #$xp#)" - . "(Xq1 #$xq1#)" - . "(Xq2 #$xq2#)" - . "(Xq #$xq#))))\n"; - - return pipe_through_program($sexp, "fipsdrv rsa-derive"); -} - - -sub libgcrypt_rsa_sign($$$) { - my $data = shift; - my $hashalgo = shift; - my $keyfile = shift; - - die "ARCFOUR not available for RSA" if $opt{'R'}; - - return pipe_through_program($data, - "fipsdrv --pkcs1 --algo $hashalgo --key $keyfile rsa-sign"); -} - -sub libgcrypt_rsa_verify($$$$) { - my $data = shift; - my $hashalgo = shift; - my $keyfile = shift; - my $sigfile = shift; - - die "ARCFOUR not available for RSA" if $opt{'R'}; - $data = pipe_through_program($data, - "fipsdrv --pkcs1 --algo $hashalgo --key $keyfile --signature $sigfile rsa-verify"); - - # Parse through the output information - return ($data =~ /GOOD signature/); -} - -sub libgcrypt_gen_rsakey($$) { - my $keylen = shift; - my $file = shift; - - die "ARCFOUR not available for RSA" if $opt{'R'}; - my @args = ("fipsdrv --keysize $keylen rsa-gen > $file"); - system(@args) == 0 - or die "system @args failed: $?"; - die "system @args failed: file $file not created" if (! -f $file); -} - -sub libgcrypt_hash($$) { - my $pt = shift; - my $hashalgo = shift; - - my $program = "fipsdrv --algo $hashalgo digest"; - die "ARCFOUR not available for hashes" if $opt{'R'}; - - return pipe_through_program($pt, $program); -} - -sub libgcrypt_state_cipher($$$$$) { - my $cipher = shift; - my $enc = (shift) ? "encrypt": "decrypt"; - my $bufsize = shift; - my $key = shift; - my $iv = shift; - - # We only invoke the driver with the IV parameter, if we have - # an IV, otherwise, we skip it - $iv = "--iv ".bin2hex($iv) if ($iv); - - my $program="fipsdrv --binary --key ".bin2hex($key)." $iv --algo '$cipher' --chunk '$bufsize' $enc"; - - return $program; -} - -sub libgcrypt_state_cipher_des($$$$$) { - my $cipher = shift; - my $enc = (shift) ? "encrypt": "decrypt"; - my $bufsize = shift; - my $key = shift; - my $iv = shift; - - # We only invoke the driver with the IV parameter, if we have - # an IV, otherwise, we skip it - $iv = "--iv ".bin2hex($iv) if ($iv); - - my $program="fipsdrv --algo '$cipher' --mct-server $enc"; - - return $program; -} - -sub libgcrypt_state_rng($$$) { - my $key = shift; - my $dt = shift; - my $v = shift; - - return "fipsdrv --binary --loop --key $key --iv $v --dt $dt random"; -} - -sub libgcrypt_hmac($$$$) { - my $key = shift; - my $maclen = shift; - my $msg = shift; - my $hashtype = shift; - - my $program = "fipsdrv --key $key --algo $hashtype hmac-sha"; - return pipe_through_program($msg, $program); -} - -sub libgcrypt_dsa_pqggen($) { - my $mod = shift; - - my $program = "fipsdrv --keysize $mod dsa-pqg-gen"; - return pipe_through_program("", $program); -} - -sub libgcrypt_gen_dsakey($) { - my $file = shift; - - my $program = "fipsdrv --keysize 1024 --key $file dsa-gen"; - my $tmp; - my %ret; - - die "ARCFOUR not available for DSA" if $opt{'R'}; - - $tmp = pipe_through_program("", $program); - die "dsa key gen failed: file $file not created" if (! -f $file); - - @ret{'P', 'Q', 'G', 'Seed', 'c', 'H'} = split(/\n/, $tmp); - return %ret; -} - -sub libgcrypt_dsa_genpubkey($$$$$) { - my $filename = shift; - my $p = shift; - my $q = shift; - my $g = shift; - my $y = shift; - - my $sexp; - - $sexp = "(public-key(dsa(p #$p#)(q #$q#)(g #$g#)(y #$y#)))"; - - open(FH, ">", $filename) or die; - print FH $sexp; - close FH; -} - -sub libgcrypt_dsa_sign($$) { - my $data = shift; - my $keyfile = shift; - my $tmp; - my %ret; - - die "ARCFOUR not available for DSA" if $opt{'R'}; - - $tmp = pipe_through_program($data, "fipsdrv --key $keyfile dsa-sign"); - @ret{'Y', 'R', 'S'} = split(/\n/, $tmp); - return %ret; -} - -sub libgcrypt_dsa_verify($$$$) { - my $data = shift; - my $keyfile = shift; - my $r = shift; - my $s = shift; - - my $ret; - - die "ARCFOUR not available for DSA" if $opt{'R'}; - - my $sigfile = "$keyfile.sig"; - open(FH, ">$sigfile") or die "Cannot create file $sigfile: $?"; - print FH "(sig-val(dsa(r #$r#)(s #$s#)))"; - close FH; - - $ret = pipe_through_program($data, - "fipsdrv --key $keyfile --signature $sigfile dsa-verify"); - unlink ($sigfile); - # Parse through the output information - return ($ret =~ /GOOD signature/); -} - -######### End of libgcrypt implementation ################ - -################################################################ -###### Vendor1 interface functions -################################################################ - -sub vendor1_encdec($$$$$) { - my $key=shift; - my $iv=shift; - my $cipher=shift; - my $enc = (shift) ? "encrypt" : "decrypt"; - my $data=shift; - - $data=hex2bin($data); - my $program = "./aes $enc $key"; - $data=pipe_through_program($data,$program); - return bin2hex($data); -} - -sub vendor1_state_cipher($$$$$) { - my $cipher = shift; - my $encdec = shift; - my $bufsize = shift; - my $key = shift; - my $iv = shift; - - $key = bin2hex($key); - my $enc = $encdec ? "encrypt": "decrypt"; - my $out = "./aes $enc $key $bufsize"; - return $out; -} - -##### No other interface functions below this point ###### -########################################################## - -########################################################## -# General helper routines - -# Executing a program by feeding STDIN and retrieving -# STDOUT -# $1: data string to be piped to the app on STDIN -# rest: program and args -# returns: STDOUT of program as string -sub pipe_through_program($@) { - my $in = shift; - my @args = @_; - - my ($CO, $CI); - my $pid = open2($CO, $CI, @args); - - my $out = ""; - my $len = length($in); - my $first = 1; - while (1) { - my $rin = ""; - my $win = ""; - # Output of prog is FD that we read - vec($rin,fileno($CO),1) = 1; - # Input of prog is FD that we write - # check for $first is needed because we can have NULL input - # that is to be written to the app - if ( $len > 0 || $first) { - (vec($win,fileno($CI),1) = 1); - $first=0; - } - # Let us wait for 100ms - my $nfound = select(my $rout=$rin, my $wout=$win, undef, 0.1); - if ( $wout ) { - my $written = syswrite($CI, $in, $len); - die "broken pipe" if !defined $written; - $len -= $written; - substr($in, 0, $written) = ""; - if ($len <= 0) { - close $CI or die "broken pipe: $!"; - } - } - if ( $rout ) { - my $tmp_out = ""; - my $bytes_read = sysread($CO, $tmp_out, 4096); - $out .= $tmp_out; - last if ($bytes_read == 0); - } - } - close $CO or die "broken pipe: $!"; - waitpid $pid, 0; - - return $out; -} - -# -# convert ASCII hex to binary input -# $1 ASCII hex -# return binary representation -sub hex2bin($) { - my $in = shift; - my $len = length($in); - $len = 0 if ($in eq "00"); - return pack("H$len", "$in"); -} - -# -# convert binary input to ASCII hex -# $1 binary value -# return ASCII hex representation -sub bin2hex($) { - my $in = shift; - my $len = length($in)*2; - return unpack("H$len", "$in"); -} - -# $1: binary byte (character) -# returns: binary byte with odd parity using low bit as parity bit -sub odd_par($) { - my $in = ord(shift); - my $odd_count=0; - for(my $i=1; $i<8; $i++) { - $odd_count++ if ($in & (1<<$i)); - } - - my $out = $in; - if ($odd_count & 1) { # check if parity is already odd - $out &= ~1; # clear the low bit - } else { - $out |= 1; # set the low bit - } - - return chr($out); -} - -# DES keys uses only the 7 high bits of a byte, the 8th low bit -# is the parity bit -# as the new key is calculated from oldkey XOR cipher in the MCT test, -# the parity is not really checked and needs to be set to match -# expectation (OpenSSL does not really care, but the FIPS -# test result is expected that the key has the appropriate parity) -# $1: arbitrary binary string -# returns: string with odd parity set in low bit of each byte -sub fix_key_parity($) { - my $in = shift; - my $out = ""; - for (my $i = 0; $i < length($in); $i++) { - $out .= odd_par(substr($in, $i, 1)); - } - - return $out; -} - -#################################################### -# DER/PEM utility functions -# Cf. http://www.columbia.edu/~ariel/ssleay/layman.html - -# Convert unsigned integer to base256 bigint bytes -# $1 integer -# returns base256 octet string -sub int_base256_unsigned($) { - my $n = shift; - - my $out = chr($n & 255); - while ($n>>=8) { - $out = chr($n & 255) . $out; - } - - return $out; -} - -# Convert signed integer to base256 bigint bytes -# $1 integer -# returns base256 octet string -sub int_base256_signed($) { - my $n = shift; - my $negative = ($n < 0); - - if ($negative) { - $n = -$n-1; - } - - my $out = int_base256_unsigned($n); - - if (ord(substr($out, 0, 1)) & 128) { - # it's supposed to be positive but has sign bit set, - # add a leading zero - $out = chr(0) . $out; - } - - if ($negative) { - my $neg = chr(255) x length($out); - $out ^= $neg; - } - - return $out; -} - -# Length header for specified DER object length -# $1 length as integer -# return octet encoding for length -sub der_len($) { - my $len = shift; - - if ($len <= 127) { - return chr($len); - } else { - my $blen = int_base256_unsigned($len); - - return chr(128 | length($blen)) . $blen; - } -} - -# Prepend length header to object -# $1 object as octet sequence -# return length header for object followed by object as octets -sub der_len_obj($) { - my $x = shift; - - return der_len(length($x)) . $x; -} - -# DER sequence -# $* objects -# returns DER sequence consisting of the objects passed as arguments -sub der_seq { - my $seq = join("", @_); - return chr(0x30) . der_len_obj($seq); -} - -# DER bitstring -# $1 input octets (must be full octets, fractional octets not supported) -# returns input encapsulated as bitstring -sub der_bitstring($) { - my $x = shift; - - $x = chr(0) . $x; - - return chr(0x03) . der_len_obj($x); -} - -# base-128-encoded integer, used for object numbers. -# $1 integer -# returns octet sequence -sub der_base128($) { - my $n = shift; - - my $out = chr($n & 127); - - while ($n>>=7) { - $out = chr(128 | ($n & 127)) . $out; - } - - return $out; -} - -# Generating the PEM certificate string -# (base-64-encoded DER string) -# $1 DER string -# returns octet sequence -sub pem_cert($) { - my $n = shift; - - my $out = "-----BEGIN PUBLIC KEY-----\n"; - $out .= encode_base64($n); - $out .= "-----END PUBLIC KEY-----\n"; - - return $out; -} - -# DER object identifier -# $* sequence of id numbers -# returns octets -sub der_objectid { - my $v1 = shift; - my $v2 = shift; - - my $out = chr(40*$v1 + $v2) . join("", map { der_base128($_) } @_); - - return chr(0x06) . der_len_obj($out); -} - -# DER signed integer -# $1 number as octet string (base 256 representation, high byte first) -# returns number in DER integer encoding -sub der_bigint($) { - my $x = shift; - - return chr(0x02) . der_len_obj($x); -} - -# DER positive integer with leading zeroes stripped -# $1 number as octet string (base 256 representation, high byte first) -# returns number in DER integer encoding -sub der_pos_bigint($) { - my $x = shift; - - # strip leading zero digits - $x =~ s/^[\0]+//; - - # need to prepend a zero if high bit set, since it would otherwise be - # interpreted as a negative number. Also needed for number 0. - if (!length($x) || ord(substr($x, 0, 1)) >= 128) { - $x = chr(0) . $x; - } - - return der_bigint($x); -} - -# $1 number as signed integer -# returns number as signed DER integer encoding -sub der_int($) { - my $n = shift; - - return der_bigint(int_base256_signed($n)); -} - -# the NULL object constant -sub der_null() { - return chr(0x05) . chr(0x00); -} - -# Unit test helper -# $1 calculated result -# $2 expected result -# no return value, dies if results differ, showing caller's line number -sub der_test($$) { - my $actual = bin2hex(shift); - my $expected = shift; - - my @caller = caller; - $actual eq $expected or die "Error:line $caller[2]:assertion failed: " - ."$actual != $expected\n"; -} - -# Unit testing for the DER encoding functions -# Examples from http://www.columbia.edu/~ariel/ssleay/layman.html -# No input, no output. Dies if unit tests fail. -sub der_unit_test { - ## uncomment these if you want to test the test framework - #print STDERR "Unit test running\n"; - #der_test chr(0), "42"; - - der_test der_null, "0500"; - - # length bytes - der_test der_len(1), "01"; - der_test der_len(127), "7f"; - der_test der_len(128), "8180"; - der_test der_len(256), "820100"; - der_test der_len(65536), "83010000"; - - # bigint - der_test der_bigint(chr(0)), "020100"; - der_test der_bigint(chr(128)), "020180"; # -128 - der_test der_pos_bigint(chr(128)), "02020080"; # +128 - der_test der_pos_bigint(chr(0).chr(0).chr(1)), "020101"; - der_test der_pos_bigint(chr(0)), "020100"; - - # integers (tests base256 conversion) - der_test der_int( 0), "020100"; - der_test der_int( 127), "02017f"; - der_test der_int( 128), "02020080"; - der_test der_int( 256), "02020100"; - der_test der_int( -1), "0201ff"; - der_test der_int( -128), "020180"; - der_test der_int( -129), "0202ff7f"; - der_test der_int(-65536), "0203ff0000"; - der_test der_int(-65537), "0203feffff"; - - # object encoding, "RSA Security" - der_test der_base128(840), "8648"; - der_test der_objectid(1, 2, 840, 113549), "06062a864886f70d"; - - # Combinations - der_test der_bitstring("ABCD"), "03050041424344"; - der_test der_bitstring(der_null), "0303000500"; - der_test der_seq(der_int(0), der_null), "30050201000500"; - - # The big picture - der_test der_seq(der_seq(der_objectid(1, 2, 840, 113549), der_null), - der_bitstring(der_seq(der_pos_bigint(chr(5)), - der_pos_bigint(chr(3))))), - "3017300a06062a864886f70d05000309003006020105020103"; -} - -#################################################### -# OpenSSL missing functionality workarounds - -## Format of an RSA public key: -# 0:d=0 hl=3 l= 159 cons: SEQUENCE -# 3:d=1 hl=2 l= 13 cons: SEQUENCE -# 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption -# 16:d=2 hl=2 l= 0 prim: NULL -# 18:d=1 hl=3 l= 141 prim: BIT STRING -# [ sequence: INTEGER (n), INTEGER (e) ] - -# generate RSA pub key in PEM format -# $1: filename where PEM key is to be stored -# $2: n of the RSA key in hex -# $3: e of the RSA key in hex -# return: nothing, but file created -sub gen_pubrsakey($$$) { - my $filename=shift; - my $n = shift; - my $e = shift; - - # make sure the DER encoder works ;-) - der_unit_test(); - - # generate DER encoding of the public key - - my $rsaEncryption = der_objectid(1, 2, 840, 113549, 1, 1, 1); - - my $der = der_seq(der_seq($rsaEncryption, der_null), - der_bitstring(der_seq(der_pos_bigint(hex2bin($n)), - der_pos_bigint(hex2bin($e))))); - - open(FH, ">", $filename) or die; - print FH pem_cert($der); - close FH; - -} - -# generate RSA pub key in PEM format -# -# This implementation uses "openssl asn1parse -genconf" which was added -# in openssl 0.9.8. It is not available in older openssl versions. -# -# $1: filename where PEM key is to be stored -# $2: n of the RSA key in hex -# $3: e of the RSA key in hex -# return: nothing, but file created -sub gen_pubrsakey_using_openssl($$$) { - my $filename=shift; - my $n = shift; - my $e = shift; - - my $asn1 = "asn1=SEQUENCE:pubkeyinfo - -[pubkeyinfo] -algorithm=SEQUENCE:rsa_alg -pubkey=BITWRAP,SEQUENCE:rsapubkey - -[rsa_alg] -algorithm=OID:rsaEncryption -parameter=NULL - -[rsapubkey] -n=INTEGER:0x$n - -e=INTEGER:0x$e"; - - open(FH, ">$filename.cnf") or die "Cannot create file $filename.cnf: $?"; - print FH $asn1; - close FH; - my @args = ("openssl", "asn1parse", "-genconf", "$filename.cnf", "-noout", "-out", "$filename.der"); - system(@args) == 0 or die "system @args failed: $?"; - @args = ("openssl", "rsa", "-inform", "DER", "-in", "$filename.der", - "-outform", "PEM", "-pubin", "-pubout", "-out", "$filename"); - system(@args) == 0 or die "system @args failed: $?"; - die "RSA PEM formatted key file $filename was not created" - if (! -f $filename); - - unlink("$filename.cnf"); - unlink("$filename.der"); -} - -############################################ -# Test cases - -# This is the Known Answer Test -# $1: the string that we have to put in front of the key -# when printing the key -# $2: crypto key1 in hex form -# $3: crypto key2 in hex form (TDES, undef otherwise) -# $4: crypto key3 in hex form (TDES, undef otherwise) -# $5: IV in hex form -# $6: Plaintext (enc=1) or Ciphertext (enc=0) in hex form -# $7: cipher -# $8: encrypt=1/decrypt=0 -# return: string formatted as expected by CAVS -sub kat($$$$$$$$) { - my $keytype = shift; - my $key1 = shift; - my $key2 = shift; - my $key3 = shift; - my $iv = shift; - my $pt = shift; - my $cipher = shift; - my $enc = shift; - - my $out = ""; - - $out .= "$keytype = $key1\n"; - - # this is the concardination of the keys for 3DES - if (defined($key2)) { - $out .= "KEY2 = $key2\n"; - $key1 = $key1 . $key2; - } - if (defined($key3)) { - $out .= "KEY3 = $key3\n"; - $key1= $key1 . $key3; - } - - $out .= "IV = $iv\n" if (defined($iv) && $iv ne ""); - if ($enc) { - $out .= "PLAINTEXT = $pt\n"; - $out .= "CIPHERTEXT = " . &$encdec($key1, $iv, $cipher, 1, $pt) . "\n"; - } else { - $out .= "CIPHERTEXT = $pt\n"; - $out .= "PLAINTEXT = " . &$encdec($key1, $iv, $cipher, 0, $pt) . "\n"; - } - - return $out; -} - -# This is the Known Answer Test for Hashes -# $1: Plaintext in hex form -# $2: hash -# $3: hash length (undef if not applicable) -# return: string formatted as expected by CAVS -sub hash_kat($$$) { - my $pt = shift; - my $cipher = shift; - my $len = shift; - - my $out = ""; - $out .= "Len = $len\n" if (defined($len)); - $out .= "Msg = $pt\n"; - - $pt = "" if(!$len); - $out .= "MD = " . &$hash($pt, $cipher) . "\n"; - return $out; -} - -# Known Answer Test for HMAC hash -# $1: key length in bytes -# $2: MAC length in bytes -# $3: key for HMAC in hex form -# $4: message to be hashed -# return: string formatted as expected by CAVS -sub hmac_kat($$$$) { - my $klen = shift; - my $tlen = shift; - my $key = shift; - my $msg = shift; - - # XXX this is a hack - we need to decipher the HMAC REQ files in a more - # sane way - # - # This is a conversion table from the expected hash output size - # to the assumed hash type - we only define here the block size of - # the underlying hashes and do not allow any truncation - my %hashtype = ( - 20 => 1, - 28 => 224, - 32 => 256, - 48 => 384, - 64 => 512 - ); - - die "Hash output size $tlen is not supported!" - if(!defined($hashtype{$tlen})); - - my $out = ""; - $out .= "Klen = $klen\n"; - $out .= "Tlen = $tlen\n"; - $out .= "Key = $key\n"; - $out .= "Msg = $msg\n"; - $out .= "Mac = " . &$hmac($key, $tlen, $msg, $hashtype{$tlen}) . "\n"; - - return $out; -} - - -# Cipher Monte Carlo Testing -# $1: the string that we have to put in front of the key -# when printing the key -# $2: crypto key1 in hex form -# $3: crypto key2 in hex form (TDES, undef otherwise) -# $4: crypto key3 in hex form (TDES, undef otherwise) -# $5: IV in hex form -# $6: Plaintext (enc=1) or Ciphertext (enc=0) in hex form -# $7: cipher -# $8: encrypt=1/decrypt=0 -# return: string formatted as expected by CAVS -sub crypto_mct($$$$$$$$) { - my $keytype = shift; - my $key1 = hex2bin(shift); - my $key2 = shift; - my $key3 = shift; - my $iv = hex2bin(shift); - my $source_data = hex2bin(shift); - my $cipher = shift; - my $enc = shift; - - my $out = ""; - - $key2 = hex2bin($key2) if (defined($key2)); - $key3 = hex2bin($key3) if (defined($key3)); - my $bufsize = length($source_data); - - # for AES: outer loop 0-99, inner 0-999 based on FIPS compliance tests - # for RC4: outer loop 0-99, inner 0-999 based on atsec compliance tests - # for DES: outer loop 0-399, inner 0-9999 based on FIPS compliance tests - my $ciph = substr($cipher,0,3); - my $oloop=100; - my $iloop=1000; - if ($ciph =~ /des/) {$oloop=400;$iloop=10000;} - - for (my $i=0; $i<$oloop; ++$i) { - $out .= "COUNT = $i\n"; - if (defined($key2)) { - $out .= "$keytype = ". bin2hex($key1). "\n"; - $out .= "KEY2 = ". bin2hex($key2). "\n"; - $key1 = $key1 . $key2; - } else { - $out .= "$keytype = ". bin2hex($key1). "\n"; - } - if(defined($key3)) { - $out .= "KEY3 = ". bin2hex($key3). "\n"; - $key1 = $key1 . $key3; - } - my $keylen = length($key1); - - $out .= "IV = ". bin2hex($iv) . "\n" - if (defined($iv) && $iv ne ""); - - if ($enc) { - $out .= "PLAINTEXT = ". bin2hex($source_data). "\n"; - } else { - $out .= "CIPHERTEXT = ". bin2hex($source_data). "\n"; - } - my ($CO, $CI); - my $cipher_imp = &$state_cipher($cipher, $enc, $bufsize, $key1, $iv); - $cipher_imp = &$state_cipher_des($cipher, $enc, $bufsize, $key1, $iv) if($cipher =~ /des/); - my $pid = open2($CO, $CI, $cipher_imp); - - my $calc_data = $iv; # CT[j] - my $old_calc_data; # CT[j-1] - my $old_old_calc_data; # CT[j-2] - my $next_source; - - # TDES inner loop implements logic within driver - if ($cipher =~ /des/) { - # Need to provide a dummy IV in case of ECB mode. - my $iv_arg = (defined($iv) && $iv ne "") - ? bin2hex($iv) - : "00"x(length($source_data)); - print $CI "1\n" - .$iloop."\n" - .bin2hex($key1)."\n" - .$iv_arg."\n" - .bin2hex($source_data)."\n\n" or die; - chomp(my $line = <$CO>); - $calc_data = hex2bin($line); - chomp($line = <$CO>); - $old_calc_data = hex2bin($line); - chomp($line = <$CO>); - $old_old_calc_data = hex2bin($line); - chomp($line = <$CO>); - $iv = hex2bin($line) if (defined($iv) && $iv ne ""); - chomp($line = <$CO>); - $next_source = hex2bin($line); - # Skip over empty line. - $line = <$CO>; - } else { - for (my $j = 0; $j < $iloop; ++$j) { - $old_old_calc_data = $old_calc_data; - $old_calc_data = $calc_data; - - #print STDERR "source_data=", bin2hex($source_data), "\n"; - syswrite $CI, $source_data or die $!; - my $len = sysread $CO, $calc_data, $bufsize; - - #print STDERR "len=$len, bufsize=$bufsize\n"; - die if $len ne $bufsize; - #print STDERR "calc_data=", bin2hex($calc_data), "\n"; - - if ( (!$enc && $ciph =~ /des/) || - $ciph =~ /rc4/ || - $cipher =~ /ecb/ ) { - #TDES in decryption mode, RC4 and ECB mode - #have a special rule - $source_data = $calc_data; - } else { - $source_data = $old_calc_data; - } - } - } - close $CO; - close $CI; - waitpid $pid, 0; - - if ($enc) { - $out .= "CIPHERTEXT = ". bin2hex($calc_data). "\n\n"; - } else { - $out .= "PLAINTEXT = ". bin2hex($calc_data). "\n\n"; - } - - if ( $ciph =~ /aes/ ) { - $key1 ^= substr($old_calc_data . $calc_data, -$keylen); - #print STDERR bin2hex($key1)."\n"; - } elsif ( $ciph =~ /des/ ) { - die "Wrong keylen $keylen" if ($keylen != 24); - - # $nkey needed as $key holds the concatenation of the - # old key atm - my $nkey = fix_key_parity(substr($key1,0,8) ^ $calc_data); - #print STDERR "KEY1 = ". bin2hex($nkey)."\n"; - if (substr($key1,0,8) ne substr($key1,8,8)) { - #print STDERR "KEY2 recalc: KEY1==KEY3, KEY2 indep. or all KEYs are indep.\n"; - $key2 = fix_key_parity((substr($key1,8,8) ^ $old_calc_data)); - } else { - #print STDERR "KEY2 recalc: KEY1==KEY2==KEY3\n"; - $key2 = fix_key_parity((substr($key1,8,8) ^ $calc_data)); - } - #print STDERR "KEY2 = ". bin2hex($key2)."\n"; - if ( substr($key1,0,8) eq substr($key1,16)) { - #print STDERR "KEY3 recalc: KEY1==KEY2==KEY3 or KEY1==KEY3, KEY2 indep.\n"; - $key3 = fix_key_parity((substr($key1,16) ^ $calc_data)); - } else { - #print STDERR "KEY3 recalc: all KEYs are independent\n"; - $key3 = fix_key_parity((substr($key1,16) ^ $old_old_calc_data)); - } - #print STDERR "KEY3 = ". bin2hex($key3)."\n"; - - # reset the first key - concardination happens at - # beginning of loop - $key1=$nkey; - } elsif ($ciph =~ /rc4/ ) { - $key1 ^= substr($calc_data, 0, 16); - #print STDERR bin2hex($key1)."\n"; - } else { - die "Test limitation: cipher '$cipher' not supported in Monte Carlo testing"; - } - - if ($cipher =~ /des-ede3-ofb/) { - $source_data = $source_data ^ $next_source; - } elsif (!$enc && $cipher =~ /des-ede3-cfb/) { - #TDES decryption CFB has a special rule - $source_data = $next_source; - } elsif ( $ciph =~ /rc4/ || $cipher eq "des-ede3" || $cipher =~ /ecb/) { - #No resetting of IV as the IV is all zero set initially (i.e. no IV) - $source_data = $calc_data; - } elsif (! $enc && $ciph =~ /des/ ) { - #TDES in decryption mode has a special rule - $iv = $old_calc_data; - $source_data = $calc_data; - } else { - $iv = $calc_data; - $source_data = $old_calc_data; - } - } - - return $out; -} - -# Hash Monte Carlo Testing -# $1: Plaintext in hex form -# $2: hash -# return: string formatted as expected by CAVS -sub hash_mct($$) { - my $pt = shift; - my $cipher = shift; - - my $out = ""; - - $out .= "Seed = $pt\n\n"; - - for (my $j=0; $j<100; ++$j) { - $out .= "COUNT = $j\n"; - my $md0=$pt; - my $md1=$pt; - my $md2=$pt; - for (my $i=0; $i<1000; ++$i) { - #print STDERR "outer loop $j; inner loop $i\n"; - my $mi= $md0 . $md1 . $md2; - $md0=$md1; - $md1=$md2; - $md2 = &$hash($mi, $cipher); - $md2 =~ s/\n//; - } - $out .= "MD = $md2\n\n"; - $pt=$md2; - } - - return $out; -} - -# RSA SigGen test -# $1: Message to be signed in hex form -# $2: Hash algorithm -# $3: file name with RSA key in PEM form -# return: string formatted as expected by CAVS -sub rsa_siggen($$$) { - my $data = shift; - my $cipher = shift; - my $keyfile = shift; - - my $out = ""; - - $out .= "SHAAlg = $cipher\n"; - $out .= "Msg = $data\n"; - $out .= "S = " . &$rsa_sign($data, lc($cipher), $keyfile) . "\n"; - - return $out; -} - -# RSA SigVer test -# $1: Message to be verified in hex form -# $2: Hash algoritm -# $3: Signature of message in hex form -# $4: n of the RSA key in hex in hex form -# $5: e of the RSA key in hex in hex form -# return: string formatted as expected by CAVS -sub rsa_sigver($$$$$) { - my $data = shift; - my $cipher = shift; - my $signature = shift; - my $n = shift; - my $e = shift; - - my $out = ""; - - $out .= "SHAAlg = $cipher\n"; - $out .= "e = $e\n"; - $out .= "Msg = $data\n"; - $out .= "S = $signature\n"; - - # XXX maybe a secure temp file name is better here - # but since it is not run on a security sensitive - # system, I hope that this is fine - my $keyfile = "rsa_sigver.tmp.$$"; - gen_pubrsakey($keyfile, $n, $e); - - my $sigfile = "$keyfile.sig"; - open(FH, ">$sigfile") or die "Cannot create file $sigfile: $?"; - print FH hex2bin($signature); - close FH; - - $out .= "Result = " . (&$rsa_verify($data, lc($cipher), $keyfile, $sigfile) ? "P\n" : "F\n"); - - unlink($keyfile); - unlink($sigfile); - - return $out; -} - -# RSA X9.31 key generation test -# $1 modulus size -# $2 e -# $3 xp1 -# $4 xp2 -# $5 Xp -# $6 xq1 -# $7 xq2 -# $8 Xq -# return: string formatted as expected by CAVS -sub rsa_keygen($$$$$$$$) { - my $modulus = shift; - my $e = shift; - my $xp1 = shift; - my $xp2 = shift; - my $Xp = shift; - my $xq1 = shift; - my $xq2 = shift; - my $Xq = shift; - - my $out = ""; - - my $ret = &$rsa_derive($modulus, $e, $xp1, $xp2, $Xp, $xq1, $xq2, $Xq); - - my ($P, $Q, $N, $D) = split(/\n/, $ret); - - $out .= "e = $e\n"; - $out .= "xp1 = $xp1\n"; - $out .= "xp2 = $xp2\n"; - $out .= "Xp = $Xp\n"; - $out .= "p = $P\n"; - $out .= "xq1 = $xq1\n"; - $out .= "xq2 = $xq2\n"; - $out .= "Xq = $Xq\n"; - $out .= "q = $Q\n"; - $out .= "n = $N\n"; - $out .= "d = $D\n\n"; - - return $out; - -} - -# X9.31 RNG test -# $1 key for the AES cipher -# $2 DT value -# $3 V value -# $4 type ("VST", "MCT") -# return: string formatted as expected by CAVS -sub rngx931($$$$) { - my $key=shift; - my $dt=shift; - my $v=shift; - my $type=shift; - - my $out = "Key = $key\n"; - $out .= "DT = $dt\n"; - $out .= "V = $v\n"; - - my $count = 1; - $count = 10000 if ($type eq "MCT"); - - my $rnd_val = ""; - - # we read 16 bytes from RNG - my $bufsize = 16; - - my ($CO, $CI); - my $rng_imp = &$state_rng($key, $dt, $v); - my $pid = open2($CO, $CI, $rng_imp); - for (my $i = 0; $i < $count; ++$i) { - my $len = sysread $CO, $rnd_val, $bufsize; - #print STDERR "len=$len, bufsize=$bufsize\n"; - die "len=$len != bufsize=$bufsize" if $len ne $bufsize; - #print STDERR "calc_data=", bin2hex($rnd_val), "\n"; - } - close $CO; - close $CI; - waitpid $pid, 0; - - $out .= "R = " . bin2hex($rnd_val) . "\n\n"; - - return $out; -} - -# DSA PQGGen test -# $1 modulus size -# $2 number of rounds to perform the test -# return: string formatted as expected by CAVS -sub dsa_pqggen_driver($$) { - my $mod = shift; - my $rounds = shift; - - my $out = ""; - for(my $i=0; $i<$rounds; $i++) { - my $ret = &$dsa_pqggen($mod); - my ($P, $Q, $G, $Seed, $c, $H) = split(/\n/, $ret); - die "Return value does not contain all expected values of P, Q, G, Seed, c, H for dsa_pqggen" - if (!defined($P) || !defined($Q) || !defined($G) || - !defined($Seed) || !defined($c) || !defined($H)); - - # now change the counter to decimal as CAVS wants decimal - # counter value although all other is HEX - $c = hex($c); - - $out .= "P = $P\n"; - $out .= "Q = $Q\n"; - $out .= "G = $G\n"; - $out .= "Seed = $Seed\n"; - $out .= "c = $c\n"; - $out .= "H = $H\n\n"; - } - - return $out; -} - - -# DSA SigGen test -# $1: Message to be signed in hex form -# $2: file name with DSA key in PEM form -# return: string formatted as expected by CAVS -sub dsa_siggen($$) { - my $data = shift; - my $keyfile = shift; - - my $out = ""; - - my %ret = &$dsa_sign($data, $keyfile); - - $out .= "Msg = $data\n"; - $out .= "Y = " . $ret{'Y'} . "\n"; - $out .= "R = " . $ret{'R'} . "\n"; - $out .= "S = " . $ret{'S'} . "\n"; - - return $out; -} - - -# DSA signature verification -# $1 modulus -# $2 P -# $3 Q -# $4 G -# $5 Y - public key -# $6 r -# $7 s -# $8 message to be verified -# return: string formatted as expected by CAVS -sub dsa_sigver($$$$$$$$) { - my $modulus = shift; - my $p = shift; - my $q = shift; - my $g = shift; - my $y = shift; - my $r = shift; - my $s = shift; - my $msg = shift; - - my $out = ""; - - #PQG are already printed - do not print them here - - $out .= "Msg = $msg\n"; - $out .= "Y = $y\n"; - $out .= "R = $r\n"; - $out .= "S = $s\n"; - - # XXX maybe a secure temp file name is better here - # but since it is not run on a security sensitive - # system, I hope that this is fine - my $keyfile = "dsa_sigver.tmp.$$"; - &$dsa_genpubkey($keyfile, $p, $q, $g, $y); - - $out .= "Result = " . (&$dsa_verify($msg, $keyfile, $r, $s) ? "P\n" : "F\n"); - - unlink($keyfile); - - return $out; -} - -############################################################## -# Parser of input file and generator of result file -# - -sub usage() { - - print STDERR "Usage: -$0 [-R] [-D] [-I name] <CAVS-test vector file> - --R execution of ARCFOUR instead of OpenSSL --I NAME Use interface style NAME: - openssl OpenSSL (default) - libgcrypt Libgcrypt --D SigGen and SigVer are executed with DSA - Please note that the DSA CAVS vectors do not allow distinguishing - them from the RSA vectors. As the RSA test is the default, you have - to supply this option to apply the DSA logic"; -} - -# Parser of CAVS test vector file -# $1: Test vector file -# $2: Output file for test results -# return: nothing -sub parse($$) { - my $infile = shift; - my $outfile = shift; - - my $out = ""; - - # this is my cipher/hash type - my $cipher = ""; - - # Test type - # 1 - cipher known answer test - # 2 - cipher Monte Carlo test - # 3 - hash known answer test - # 4 - hash Monte Carlo test - # 5 - RSA signature generation - # 6 - RSA signature verification - my $tt = 0; - - # Variables for tests - my $keytype = ""; # we can have "KEY", "KEYs", "KEY1" - my $key1 = ""; - my $key2 = undef; #undef needed for allowing - my $key3 = undef; #the use of them as input variables - my $pt = ""; - my $enc = 1; - my $iv = ""; - my $len = undef; #see key2|3 - my $n = ""; - my $e = ""; - my $signature = ""; - my $rsa_keyfile = ""; - my $dsa_keyfile = ""; - my $dt = ""; - my $v = ""; - my $klen = ""; - my $tlen = ""; - my $modulus = ""; - my $capital_n = 0; - my $capital_p = ""; - my $capital_q = ""; - my $capital_g = ""; - my $capital_y = ""; - my $capital_r = ""; - my $xp1 = ""; - my $xp2 = ""; - my $Xp = ""; - my $xq1 = ""; - my $xq2 = ""; - my $Xq = ""; - - my $mode = ""; - - open(IN, "<$infile"); - while(<IN>) { - - my $line = $_; - chomp($line); - $line =~ s/\r//; - - my $keylen = ""; - - # Mode and type check - # consider the following parsed line - # '# AESVS MCT test data for CBC' - # '# TDES Multi block Message Test for CBC' - # '# INVERSE PERMUTATION - KAT for CBC' - # '# SUBSTITUTION TABLE - KAT for CBC' - # '# TDES Monte Carlo (Modes) Test for CBC' - # '# "SHA-1 Monte" information for "IBMRHEL5"' - # '# "SigVer PKCS#1 Ver 1.5" information for "IBMRHEL5"' - # '# "SigGen PKCS#1 Ver 1.5" information for "IBMRHEL5"' - # '#RC4VS MCT test data' - - # avoid false positives from user specified 'for "PRODUCT"' strings - my $tmpline = $line; - $tmpline =~ s/ for ".*"//; - - ##### Extract cipher - # XXX there may be more - to be added - if ($tmpline =~ /^#.*(CBC|ECB|OFB|CFB|SHA-|SigGen|SigVer|RC4VS|ANSI X9\.31|Hash sizes tested|PQGGen|KeyGen RSA)/) { - if ($tmpline =~ /CBC/) { $mode="cbc"; } - elsif ($tmpline =~ /ECB/) { $mode="ecb"; } - elsif ($tmpline =~ /OFB/) { $mode="ofb"; } - elsif ($tmpline =~ /CFB/) { $mode="cfb"; } - #we do not need mode as the cipher is already clear - elsif ($tmpline =~ /SHA-1/) { $cipher="sha1"; } - elsif ($tmpline =~ /SHA-224/) { $cipher="sha224"; } - elsif ($tmpline =~ /SHA-256/) { $cipher="sha256"; } - elsif ($tmpline =~ /SHA-384/) { $cipher="sha384"; } - elsif ($tmpline =~ /SHA-512/) { $cipher="sha512"; } - #we do not need mode as the cipher is already clear - elsif ($tmpline =~ /RC4VS/) { $cipher="rc4"; } - elsif ($tmpline =~ /SigGen|SigVer/) { - die "Error: X9.31 is not supported" - if ($tmpline =~ /X9/); - $cipher="sha1"; #place holder - might be overwritten later - } - - if ($tmpline =~ /^#.*AESVS/) { - # AES cipher (part of it) - $cipher="aes"; - } - if ($tmpline =~ /^#.*(TDES|KAT)/) { - # TDES cipher (full definition) - # the FIPS-140 test generator tool does not produce - # machine readable output! - if ($mode eq "cbc") { $cipher="des-ede3-cbc"; } - if ($mode eq "ecb") { $cipher="des-ede3"; } - if ($mode eq "ofb") { $cipher="des-ede3-ofb"; } - if ($mode eq "cfb") { $cipher="des-ede3-cfb"; } - } - - # check for RNG - if ($tmpline =~ /ANSI X9\.31/) { - # change the tmpline to add the type of the - # test which is ONLY visible from the file - # name :-( - if ($infile =~ /MCT\.req/) { - $tmpline .= " MCT"; - } elsif ($infile =~ /VST\.req/) { - $tmpline .= " VST"; - } else { - die "Unexpected cipher type with $infile"; - } - } - - if ($tt == 0) { - ##### Identify the test type - if ($tmpline =~ /KeyGen RSA \(X9\.31\)/) { - $tt = 13; - die "Interface function rsa_derive for RSA key generation not defined for tested library" - if (!defined($rsa_derive)); - } elsif ($tmpline =~ /SigVer/ && $opt{'D'} ) { - $tt = 12; - die "Interface function dsa_verify or dsa_genpubkey for DSA verification not defined for tested library" - if (!defined($dsa_verify) || !defined($dsa_genpubkey)); - } elsif ($tmpline =~ /SigGen/ && $opt{'D'}) { - $tt = 11; - die "Interface function dsa_sign or gen_dsakey for DSA sign not defined for tested library" - if (!defined($dsa_sign) || !defined($gen_rsakey)); - } elsif ($tmpline =~ /PQGGen/) { - $tt = 10; - die "Interface function for DSA PQGGen testing not defined for tested library" - if (!defined($dsa_pqggen)); - } elsif ($tmpline =~ /Hash sizes tested/) { - $tt = 9; - die "Interface function hmac for HMAC testing not defined for tested library" - if (!defined($hmac)); - } elsif ($tmpline =~ /ANSI X9\.31/ && $tmpline =~ /MCT/) { - $tt = 8; - die "Interface function state_rng for RNG MCT not defined for tested library" - if (!defined($state_rng)); - } elsif ($tmpline =~ /ANSI X9\.31/ && $tmpline =~ /VST/) { - $tt = 7; - die "Interface function state_rng for RNG KAT not defined for tested library" - if (!defined($state_rng)); - } elsif ($tmpline =~ /SigVer/ ) { - $tt = 6; - die "Interface function rsa_verify or gen_rsakey for RSA verification not defined for tested library" - if (!defined($rsa_verify) || !defined($gen_rsakey)); - } elsif ($tmpline =~ /SigGen/ ) { - $tt = 5; - die "Interface function rsa_sign or gen_rsakey for RSA sign not defined for tested library" - if (!defined($rsa_sign) || !defined($gen_rsakey)); - } elsif ($tmpline =~ /Monte|MCT|Carlo/ && $cipher =~ /^sha/) { - $tt = 4; - die "Interface function hash for Hashing not defined for tested library" - if (!defined($hash)); - } elsif ($tmpline =~ /Monte|MCT|Carlo/) { - $tt = 2; - die "Interface function state_cipher for Stateful Cipher operation defined for tested library" - if (!defined($state_cipher) || !defined($state_cipher_des)); - } elsif ($cipher =~ /^sha/) { - $tt = 3; - die "Interface function hash for Hashing not defined for tested library" - if (!defined($hash)); - } else { - $tt = 1; - die "Interface function encdec for Encryption/Decryption not defined for tested library" - if (!defined($encdec)); - } - } - } - - # This is needed as ARCFOUR does not operate with an IV - $iv = "00000000000000000000000000000000" if ($cipher eq "rc4" - && $iv eq "" ); - - # we are now looking for the string - # '# Key Length : 256' - # found in AES - if ($tmpline =~ /^# Key Length.*?(128|192|256)/) { - if ($cipher eq "aes") { - $cipher="$cipher-$1-$mode"; - } else { - die "Error: Key length $1 given for cipher $cipher which is unexpected"; - } - } - - # Get the test data - if ($line =~ /^(KEY|KEY1|Key)\s*=\s*(.*)/) { # found in ciphers and RNG - die "KEY seen twice - input file crap" if ($key1 ne ""); - $keytype=$1; - $key1=$2; - $key1 =~ s/\s//g; #replace potential white spaces - } - elsif ($line =~ /^(KEYs)\s*=\s*(.*)/) { # found in ciphers and RNG - die "KEY seen twice - input file crap" if ($key1 ne ""); - $keytype=$1; - $key1=$2; - $key1 =~ s/\s//g; #replace potential white spaces - $key2 = $key1; - $key3 = $key1; - } - elsif ($line =~ /^KEY2\s*=\s*(.*)/) { # found in TDES - die "First key not set, but got already second key - input file crap" if ($key1 eq ""); - die "KEY2 seen twice - input file crap" if (defined($key2)); - $key2=$1; - $key2 =~ s/\s//g; #replace potential white spaces - } - elsif ($line =~ /^KEY3\s*=\s*(.*)/) { # found in TDES - die "Second key not set, but got already third key - input file crap" if ($key2 eq ""); - die "KEY3 seen twice - input file crap" if (defined($key3)); - $key3=$1; - $key3 =~ s/\s//g; #replace potential white spaces - } - elsif ($line =~ /^IV\s*=\s*(.*)/) { # found in ciphers - die "IV seen twice - input file crap" if ($iv ne ""); - $iv=$1; - $iv =~ s/\s//g; #replace potential white spaces - } - elsif ($line =~ /^PLAINTEXT\s*=\s*(.*)/) { # found in ciphers - if ( $1 !~ /\?/ ) { #only use it if there is valid hex data - die "PLAINTEXT/CIPHERTEXT seen twice - input file crap" if ($pt ne ""); - $pt=$1; - $pt =~ s/\s//g; #replace potential white spaces - $enc=1; - } - } - elsif ($line =~ /^CIPHERTEXT\s*=\s*(.*)/) { # found in ciphers - if ( $1 !~ /\?/ ) { #only use it if there is valid hex data - die "PLAINTEXT/CIPHERTEXT seen twice - input file crap" if ($pt ne ""); - $pt=$1; - $pt =~ s/\s//g; #replace potential white spaces - $enc=0; - } - } - elsif ($line =~ /^Len\s*=\s*(.*)/) { # found in hashs - $len=$1; - } - elsif ($line =~ /^(Msg|Seed)\s*=\s*(.*)/) { # found in hashs - die "Msg/Seed seen twice - input file crap" if ($pt ne ""); - $pt=$2; - } - elsif ($line =~ /^\[mod\s*=\s*(.*)\]$/) { # found in RSA requests - $modulus = $1; - $out .= $line . "\n\n"; # print it - # generate the private key with given bit length now - # as we have the required key length in bit - if ($tt == 11) { - $dsa_keyfile = "dsa_siggen.tmp.$$"; - my %pqg = &$gen_dsakey($dsa_keyfile); - $out .= "P = " . $pqg{'P'} . "\n"; - $out .= "Q = " . $pqg{'Q'} . "\n"; - $out .= "G = " . $pqg{'G'} . "\n"; - } elsif ( $tt == 5 ) { - # XXX maybe a secure temp file name is better here - # but since it is not run on a security sensitive - # system, I hope that this is fine - $rsa_keyfile = "rsa_siggen.tmp.$$"; - &$gen_rsakey($modulus, $rsa_keyfile); - my $modulus = pipe_through_program("", "openssl rsa -pubout -modulus -in $rsa_keyfile"); - $modulus =~ s/Modulus=(.*?)\s(.|\s)*/$1/; - $out .= "n = $modulus\n"; - $out .= "\ne = 10001\n" - } - } - elsif ($line =~ /^SHAAlg\s*=\s*(.*)/) { #found in RSA requests - $cipher=$1; - } - elsif($line =~ /^n\s*=\s*(.*)/) { # found in RSA requests - $out .= $line . "\n"; - $n=$1; - } - elsif ($line =~ /^e\s*=\s*(.*)/) { # found in RSA requests - $e=$1; - } - elsif ($line =~ /^S\s*=\s*(.*)/) { # found in RSA requests - die "S seen twice - input file crap" if ($signature ne ""); - $signature=$1; - } - elsif ($line =~ /^DT\s*=\s*(.*)/) { # X9.31 RNG requests - die "DT seen twice - check input file" - if ($dt ne ""); - $dt=$1; - } - elsif ($line =~ /^V\s*=\s*(.*)/) { # X9.31 RNG requests - die "V seen twice - check input file" - if ($v ne ""); - $v=$1; - } - elsif ($line =~ /^Klen\s*=\s*(.*)/) { # HMAC requests - die "Klen seen twice - check input file" - if ($klen ne ""); - $klen=$1; - } - elsif ($line =~ /^Tlen\s*=\s*(.*)/) { # HMAC RNG requests - die "Tlen seen twice - check input file" - if ($tlen ne ""); - $tlen=$1; - } - elsif ($line =~ /^N\s*=\s*(.*)/) { #DSA PQGGen - die "N seen twice - check input file" - if ($capital_n); - $capital_n = $1; - } - elsif ($line =~ /^P\s*=\s*(.*)/) { #DSA SigVer - die "P seen twice - check input file" - if ($capital_p); - $capital_p = $1; - $out .= $line . "\n"; # print it - } - elsif ($line =~ /^Q\s*=\s*(.*)/) { #DSA SigVer - die "Q seen twice - check input file" - if ($capital_q); - $capital_q = $1; - $out .= $line . "\n"; # print it - } - elsif ($line =~ /^G\s*=\s*(.*)/) { #DSA SigVer - die "G seen twice - check input file" - if ($capital_g); - $capital_g = $1; - $out .= $line . "\n"; # print it - } - elsif ($line =~ /^Y\s*=\s*(.*)/) { #DSA SigVer - die "Y seen twice - check input file" - if ($capital_y); - $capital_y = $1; - } - elsif ($line =~ /^R\s*=\s*(.*)/) { #DSA SigVer - die "R seen twice - check input file" - if ($capital_r); - $capital_r = $1; - } - elsif ($line =~ /^xp1\s*=\s*(.*)/) { #RSA key gen - die "xp1 seen twice - check input file" - if ($xp1); - $xp1 = $1; - } - elsif ($line =~ /^xp2\s*=\s*(.*)/) { #RSA key gen - die "xp2 seen twice - check input file" - if ($xp2); - $xp2 = $1; - } - elsif ($line =~ /^Xp\s*=\s*(.*)/) { #RSA key gen - die "Xp seen twice - check input file" - if ($Xp); - $Xp = $1; - } - elsif ($line =~ /^xq1\s*=\s*(.*)/) { #RSA key gen - die "xq1 seen twice - check input file" - if ($xq1); - $xq1 = $1; - } - elsif ($line =~ /^xq2\s*=\s*(.*)/) { #RSA key gen - die "xq2 seen twice - check input file" - if ($xq2); - $xq2 = $1; - } - elsif ($line =~ /^Xq\s*=\s*(.*)/) { #RSA key gen - die "Xq seen twice - check input file" - if ($Xq); - $Xq = $1; - } - else { - $out .= $line . "\n"; - } - - # call tests if all input data is there - if ($tt == 1) { - if ($key1 ne "" && $pt ne "" && $cipher ne "") { - $out .= kat($keytype, $key1, $key2, $key3, $iv, $pt, $cipher, $enc); - $keytype = ""; - $key1 = ""; - $key2 = undef; - $key3 = undef; - $iv = ""; - $pt = ""; - } - } - elsif ($tt == 2) { - if ($key1 ne "" && $pt ne "" && $cipher ne "") { - $out .= crypto_mct($keytype, $key1, $key2, $key3, $iv, $pt, $cipher, $enc); - $keytype = ""; - $key1 = ""; - $key2 = undef; - $key3 = undef; - $iv = ""; - $pt = ""; - } - } - elsif ($tt == 3) { - if ($pt ne "" && $cipher ne "") { - $out .= hash_kat($pt, $cipher, $len); - $pt = ""; - $len = undef; - } - } - elsif ($tt == 4) { - if ($pt ne "" && $cipher ne "") { - $out .= hash_mct($pt, $cipher); - $pt = ""; - } - } - elsif ($tt == 5) { - if ($pt ne "" && $cipher ne "" && $rsa_keyfile ne "") { - $out .= rsa_siggen($pt, $cipher, $rsa_keyfile); - $pt = ""; - } - } - elsif ($tt == 6) { - if ($pt ne "" && $cipher ne "" && $signature ne "" && $n ne "" && $e ne "") { - $out .= rsa_sigver($pt, $cipher, $signature, $n, $e); - $pt = ""; - $signature = ""; - } - } - elsif ($tt == 7 ) { - if ($key1 ne "" && $dt ne "" && $v ne "") { - $out .= rngx931($key1, $dt, $v, "VST"); - $key1 = ""; - $dt = ""; - $v = ""; - } - } - elsif ($tt == 8 ) { - if ($key1 ne "" && $dt ne "" && $v ne "") { - $out .= rngx931($key1, $dt, $v, "MCT"); - $key1 = ""; - $dt = ""; - $v = ""; - } - } - elsif ($tt == 9) { - if ($klen ne "" && $tlen ne "" && $key1 ne "" && $pt ne "") { - $out .= hmac_kat($klen, $tlen, $key1, $pt); - $key1 = ""; - $tlen = ""; - $klen = ""; - $pt = ""; - } - } - elsif ($tt == 10) { - if ($modulus ne "" && $capital_n > 0) { - $out .= dsa_pqggen_driver($modulus, $capital_n); - #$mod is not resetted - $capital_n = 0; - } - } - elsif ($tt == 11) { - if ($pt ne "" && $dsa_keyfile ne "") { - $out .= dsa_siggen($pt, $dsa_keyfile); - $pt = ""; - } - } - elsif ($tt == 12) { - if ($modulus ne "" && - $capital_p ne "" && - $capital_q ne "" && - $capital_g ne "" && - $capital_y ne "" && - $capital_r ne "" && - $signature ne "" && - $pt ne "") { - $out .= dsa_sigver($modulus, - $capital_p, - $capital_q, - $capital_g, - $capital_y, - $capital_r, - $signature, - $pt); - - # We do not clear the domain values PQG and - # the modulus value as they - # are specified only once in a file - # and we do not need to print them as they - # are already printed above - $capital_y = ""; - $capital_r = ""; - $signature = ""; - $pt = ""; - } - } - elsif ($tt == 13) { - if($modulus ne "" && - $e ne "" && - $xp1 ne "" && - $xp2 ne "" && - $Xp ne "" && - $xq1 ne "" && - $xq2 ne "" && - $Xq ne "") { - $out .= rsa_keygen($modulus, - $e, - $xp1, - $xp2, - $Xp, - $xq1, - $xq2, - $Xq); - $e = ""; - $xp1 = ""; - $xp2 = ""; - $Xp = ""; - $xq1 = ""; - $xq2 = ""; - $Xq = ""; - } - } - elsif ($tt > 0) { - die "Test case $tt not defined"; - } - } - - close IN; - $out =~ s/\n/\r\n/g; # make it a dos file - open(OUT, ">$outfile") or die "Cannot create output file $outfile: $?"; - print OUT $out; - close OUT; - -} - -# Signalhandler -sub cleanup() { - unlink("rsa_siggen.tmp.$$"); - unlink("rsa_sigver.tmp.$$"); - unlink("rsa_sigver.tmp.$$.sig"); - unlink("rsa_sigver.tmp.$$.der"); - unlink("rsa_sigver.tmp.$$.cnf"); - unlink("dsa_siggen.tmp.$$"); - unlink("dsa_sigver.tmp.$$"); - unlink("dsa_sigver.tmp.$$.sig"); - exit; -} - -############################################################ -# -# let us pretend to be C :-) -sub main() { - - usage() unless @ARGV; - - getopts("DRI:", \%opt) or die "bad option"; - - ##### Set library - - if ( ! defined $opt{'I'} || $opt{'I'} eq 'openssl' ) { - print STDERR "Using OpenSSL interface functions\n"; - $encdec = \&openssl_encdec; - $rsa_sign = \&openssl_rsa_sign; - $rsa_verify = \&openssl_rsa_verify; - $gen_rsakey = \&openssl_gen_rsakey; - $hash = \&openssl_hash; - $state_cipher = \&openssl_state_cipher; - } elsif ( $opt{'I'} eq 'libgcrypt' ) { - print STDERR "Using libgcrypt interface functions\n"; - $encdec = \&libgcrypt_encdec; - $rsa_sign = \&libgcrypt_rsa_sign; - $rsa_verify = \&libgcrypt_rsa_verify; - $gen_rsakey = \&libgcrypt_gen_rsakey; - $rsa_derive = \&libgcrypt_rsa_derive; - $hash = \&libgcrypt_hash; - $state_cipher = \&libgcrypt_state_cipher; - $state_cipher_des = \&libgcrypt_state_cipher_des; - $state_rng = \&libgcrypt_state_rng; - $hmac = \&libgcrypt_hmac; - $dsa_pqggen = \&libgcrypt_dsa_pqggen; - $gen_dsakey = \&libgcrypt_gen_dsakey; - $dsa_sign = \&libgcrypt_dsa_sign; - $dsa_verify = \&libgcrypt_dsa_verify; - $dsa_genpubkey = \&libgcrypt_dsa_genpubkey; - } else { - die "Invalid interface option given"; - } - - my $infile=$ARGV[0]; - die "Error: Test vector file $infile not found" if (! -f $infile); - - my $outfile = $infile; - # let us add .rsp regardless whether we could strip .req - $outfile =~ s/\.req$//; - if ($opt{'R'}) { - $outfile .= ".rc4"; - } else { - $outfile .= ".rsp"; - } - if (-f $outfile) { - die "Output file $outfile could not be removed: $?" - unless unlink($outfile); - } - print STDERR "Performing tests from source file $infile with results stored in destination file $outfile\n"; - - #Signal handler - $SIG{HUP} = \&cleanup; - $SIG{INT} = \&cleanup; - $SIG{QUIT} = \&cleanup; - $SIG{TERM} = \&cleanup; - - # Do the job - parse($infile, $outfile); - - cleanup(); - -} - -########################################### -# Call it -main(); -1; diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/cavs_tests.sh b/plugins/MirOTR/libgcrypt-1.4.6/tests/cavs_tests.sh deleted file mode 100644 index b9aa62168c..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/cavs_tests.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/sh -# Run FIPS CAVS tests -# Copyright 2008 Free Software Foundation, Inc. -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This file 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. -# -# Instructions: -# -# 1. Cd to the libgcrypt/tests directory -# -# 2. Unpack the test vector tarball into subdirectory named "cavs". -# An example directory layout after unpacking might be: -# libgcrypt/tests/cavs/AES/req/CBCGFSbox128.req -# libgcrypt/tests/cavs/AES/req/CFB128MCT128.req -# -# Note that below the "cavs" directory there should only be one -# directory part named "req". Further avoid directory part -# names "resp". -# -# 3. Run this script from the libgcrypt/tests directory: -# ./cavs_tests.sh -# -# 4. Send the result file cavs/CAVS_results-*.zip to the testing lab. -# - -# Stop script if something unexpected happens. -set -e - -# A global flag to keep track of errors. -errors_seen_file="$(pwd)/.#cavs_test.errors_seen.tmp" -[ -f "$errors_seen_file" ] && rm "$errors_seen_file" -continue_mode=no -[ "$1" = "--continue" ] && continue_mode=yes - - -# Function to run one test. -# The argument is the request file name. -function run_one_test () { - local reqfile="$1" - local rspfile - local tmprspfile - local respdir - local dflag="" - - tmprspfile=$(echo "$reqfile" | sed 's,.req$,.rsp,') - rspfile=$(echo "$tmprspfile" | sed 's,/req/,/resp/,' ) - respdir=$(dirname "$rspfile") - [ -f "$tmprspfile" ] && rm "$tmprspfile" - [ -d "$respdir" ] || mkdir "$respdir" - [ -f "$rspfile" ] && rm "$rspfile" - - if echo "$reqfile" | grep '/DSA/req/' >/dev/null 2>/dev/null; then - dflag="-D" - fi - - if ./cavs_driver.pl -I libgcrypt $dflag "$reqfile"; then - if [ -f "$tmprspfile" ]; then - mv "$tmprspfile" "$rspfile" - else - echo "failed test: $reqfile" >&2 - : >"$errors_seen_file" - fi - else - echo "failed test: $reqfile rc=$?" >&2 - : >"$errors_seen_file" - fi -} - - - -# Save date and system architecure to construct the output archive name -DATE=$(date +%Y%m%d) -ARCH=$(arch || echo unknown) -result_file="CAVS_results-$ARCH-$DATE.zip" - -for f in fipsdrv cavs_driver.pl; do - if [ ! -f "./$f" ]; then - echo "required program \"$f\" missing in current directory" >&2 - exit 2 - fi -done -if [ ! -d cavs ]; then - echo "required directory \"cavs\" missing below current directory" >&2 - exit 2 -fi -if [ ! zip -h >/dev/null 2>&1 ]; then - echo "required program \"zip\" is not installed on this system" >&2 - exit 2 -fi - -# Set the PATH to this directory so that the perl script is able to -# find the test drivers. -PATH=.:$PATH - -# Check whether there are any stale response files -find cavs -type f -name "*.rsp" | ( while read f ; do - echo "Stale response file: $f" >&2 - any=yes -done -if [ "$any" = "yes" ]; then - echo "Stale response files found" >&2 - if [ "$continue_mode" != "yes" ]; then - echo "use option --continue if that is not a problem" >&2 - exit 1 - fi -fi -) || exit 1 - - -# Find all test files and run the tests. -find cavs -type f -name "*.req" | while read f ; do - echo "Running test file $f" >&2 - run_one_test "$f" - if [ -f "$errors_seen_file" ]; then - break; - fi -done - -if [ -f "$errors_seen_file" ]; then - rm "$errors_seen_file" - echo "Error encountered - not packing up response file" >&2 - exit 1 -fi - -echo "Packing up all response files" >&2 -cd cavs -find . -type f -name "*rsp" -print | zip -@ "$result_file" - -echo "Result file is: cavs/$result_file" >&2 diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/fips186-dsa.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/fips186-dsa.c deleted file mode 100644 index cdb507b666..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/fips186-dsa.c +++ /dev/null @@ -1,465 +0,0 @@ -/* fips186-dsa.c - FIPS 186 DSA tests - * Copyright (C) 2008 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> - -#ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" -#else -# include <gcrypt.h> -#endif - - -#define my_isascii(c) (!((c) & 0x80)) -#define digitp(p) (*(p) >= '0' && *(p) <= '9') -#define hexdigitp(a) (digitp (a) \ - || (*(a) >= 'A' && *(a) <= 'F') \ - || (*(a) >= 'a' && *(a) <= 'f')) -#define xtoi_1(p) (*(p) <= '9'? (*(p)- '0'): \ - *(p) <= 'F'? (*(p)-'A'+10):(*(p)-'a'+10)) -#define xtoi_2(p) ((xtoi_1(p) * 16) + xtoi_1((p)+1)) -#define DIM(v) (sizeof(v)/sizeof((v)[0])) -#define DIMof(type,member) DIM(((type *)0)->member) - -static int verbose; -static int error_count; - -static void -info (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); -} - -static void -fail (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - error_count++; -} - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - -static void -show_sexp (const char *prefix, gcry_sexp_t a) -{ - char *buf; - size_t size; - - if (prefix) - fputs (prefix, stderr); - size = gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, NULL, 0); - buf = gcry_xmalloc (size); - - gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, buf, size); - fprintf (stderr, "%.*s", (int)size, buf); - gcry_free (buf); -} - -static gcry_mpi_t -mpi_from_string (const char *string) -{ - gpg_error_t err; - gcry_mpi_t a; - - err = gcry_mpi_scan (&a, GCRYMPI_FMT_HEX, string, 0, NULL); - if (err) - die ("error converting string to mpi: %s\n", gpg_strerror (err)); - return a; -} - -/* Convert STRING consisting of hex characters into its binary - representation and return it as an allocated buffer. The valid - length of the buffer is returned at R_LENGTH. The string is - delimited by end of string. The function returns NULL on - error. */ -static void * -data_from_hex (const char *string, size_t *r_length) -{ - const char *s; - unsigned char *buffer; - size_t length; - - buffer = gcry_xmalloc (strlen(string)/2+1); - length = 0; - for (s=string; *s; s +=2 ) - { - if (!hexdigitp (s) || !hexdigitp (s+1)) - die ("error parsing hex string `%s'\n", string); - ((unsigned char*)buffer)[length++] = xtoi_2 (s); - } - *r_length = length; - return buffer; -} - - -static void -extract_cmp_mpi (gcry_sexp_t sexp, const char *name, const char *expected) -{ - gcry_sexp_t l1; - gcry_mpi_t a, b; - - l1 = gcry_sexp_find_token (sexp, name, 0); - a = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG); - b = mpi_from_string (expected); - if (!a) - fail ("parameter \"%s\" missing in key\n", name); - else if ( gcry_mpi_cmp (a, b) ) - fail ("parameter \"%s\" does not match expected value\n", name); - gcry_mpi_release (b); - gcry_mpi_release (a); - gcry_sexp_release (l1); -} - - -static void -extract_cmp_data (gcry_sexp_t sexp, const char *name, const char *expected) -{ - gcry_sexp_t l1; - const void *a; - size_t alen; - void *b; - size_t blen; - - l1 = gcry_sexp_find_token (sexp, name, 0); - a = gcry_sexp_nth_data (l1, 1, &alen); - b = data_from_hex (expected, &blen); - if (!a) - fail ("parameter \"%s\" missing in key\n", name); - else if ( alen != blen || memcmp (a, b, alen) ) - fail ("parameter \"%s\" does not match expected value\n", name); - gcry_free (b); - gcry_sexp_release (l1); -} - -static void -extract_cmp_int (gcry_sexp_t sexp, const char *name, int expected) -{ - gcry_sexp_t l1; - char *a; - - l1 = gcry_sexp_find_token (sexp, name, 0); - a = gcry_sexp_nth_string (l1, 1); - if (!a) - fail ("parameter \"%s\" missing in key\n", name); - else if ( strtoul (a, NULL, 10) != expected ) - fail ("parameter \"%s\" does not match expected value\n", name); - gcry_free (a); - gcry_sexp_release (l1); -} - - -static void -check_dsa_gen_186_2 (void) -{ - static struct { - int nbits; - const char *p, *q, *g; - const char *seed; - int counter; - const char *h; - } tbl[] = { - /* These tests are from FIPS 186-2, B.3.1. */ - { - 1024, - "d3aed1876054db831d0c1348fbb1ada72507e5fbf9a62cbd47a63aeb7859d6921" - "4adeb9146a6ec3f43520f0fd8e3125dd8bbc5d87405d1ac5f82073cd762a3f8d7" - "74322657c9da88a7d2f0e1a9ceb84a39cb40876179e6a76e400498de4bb9379b0" - "5f5feb7b91eb8fea97ee17a955a0a8a37587a272c4719d6feb6b54ba4ab69", - "9c916d121de9a03f71fb21bc2e1c0d116f065a4f", - "8157c5f68ca40b3ded11c353327ab9b8af3e186dd2e8dade98761a0996dda99ab" - "0250d3409063ad99efae48b10c6ab2bba3ea9a67b12b911a372a2bba260176fad" - "b4b93247d9712aad13aa70216c55da9858f7a298deb670a403eb1e7c91b847f1e" - "ccfbd14bd806fd42cf45dbb69cd6d6b43add2a78f7d16928eaa04458dea44", - "0cb1990c1fd3626055d7a0096f8fa99807399871", - 98, - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000002" - }, - { - 1024, - "f5c73304080353357de1b5967597c27d65f70aa2fe9b6aed1d0afc2b499adf22f" - "8e37937096d88548ac36c4a067f8353c7fed73f96f0d688b19b0624aedbae5dbb" - "0ee8835a4c269288c0e1d69479e701ee266bb767af39d748fe7d6afc73fdf44be" - "3eb6e661e599670061203e75fc8b3dbd59e40b54f358d0097013a0f3867f9", - "f8751166cf4f6f3b07c081fd2a9071f23ca1988d", - "1e288a442e02461c418ed67a66d24cacbeb8936fbde62ff995f5fd569dee6be62" - "4e4f0f9f8c8093f5d192ab3b3f9ae3f2665d95d27fb10e382f45cd356e7f4eb7a" - "665db432113ed06478f93b7cf188ec7a1ee97aec8f91ea7bfceaf8b6e7e5a349c" - "4ad3225362ef440c57cbc6e69df15b6699caac85f733555075f04781b2b33", - "34b3520d45d240a8861b82c8b61ffa16e67b5cce", - 622, - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000002", - }, - { - 1024, - "c6c6f4f4eed927fb1c3b0c81010967e530658e6f9698ebe058b4f47b2dc8fcbc7" - "b69296b9e8b6cf55681181fe72492668061b262b0046a0d409902e269b0cb69a4" - "55ed1a086caf41927f5912bf0e0cbc45ee81a4f98bf6146f6168a228aec80e9cc" - "1162d6f6aa412efe82d4f18b95e34ab790daac5bd7aef0b22fa08ba5dbaad", - "d32b29f065c1394a30490b6fcbf812a32a8634ab", - "06f973c879e2e89345d0ac04f9c34ad69b9eff1680f18d1c8f3e1596c2e8fa8e1" - "ecef6830409e9012d4788bef6ec7414d09c981b47c941b77f39dfc49caff5e714" - "c97abe25a7a8b5d1fe88700bb96eff91cca64d53700a28b1146d81bad1212d231" - "80154c95a01f5aeebb553a8365c38a5ebe05539b51734233776ce9aff98b2", - "b6ec750da2f824cb42c5f7e28c81350d97f75125", - 185, - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000002", - }, - { - 1024, - "b827a9dc9221a6ed1bec7b64d61232aacb2812f888b0a0b3a95033d7a22e77d0b" - "ff23bfeed0fb1281b21b8ff7421f0c727d1fb8aa2b843d6885f067e763f83d41f" - "d800ab15a7e2b12f71ec2058ee7bd62cd72c26989b272e519785da57bfa1f974b" - "c652e1a2d6cfb68477de5635fd019b37add656cff0b802558b31b6d2851e5", - "de822c03445b77cec4ad3a6fb0ca39ff97059ddf", - "65a9e2d43a378d7063813104586868cacf2fccd51aec1e0b6af8ba3e66dee6371" - "681254c3fb5e3929d65e3c4bcd20abd4ddc7cf815623e17b9fc92f02b8d44278b" - "848480ffd193104cf5612639511e45bd247708ff6028bd3824f8844c263b46c69" - "1f2076f8cd13c5d0be95f1f2a1a17ab1f7e5bc73500bac27d57b473ba9748", - "cd2221dd73815a75224e9fde7faf52829b81ac7a", - 62, - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000002", - }, - { - 1024, - "898a8d93e295c8ef2ffd46976225a1543640640d155a576fafa0be32136165803" - "ba2eff2782a2be75cc9ec65db6bd3238cca695b3a5a14726a2a314775c377d891" - "354b3de6c89e714a05599ca04132c987f889f72c4fe298ccb31f711c03b07e1d9" - "8d72af590754cf3847398b60cecd55a4611692b308809560a83880404c227", - "c6d786643d2acfc6b8d576863fda8cfbfbd5e03f", - "2fd38b8d21c58e8fb5315a177b8d5dc4c450d574e69348b7b9da367c26e72438d" - "af8372e7f0bee84ef5dcbbc3727194a2228431192f1779be24837f22a0e14d10d" - "5344da1b8b403df9f9b2655095b3d0f67418ed6cd989f35aa4232e4b7001764fb" - "e85d6b2c716980f13272fc4271ac1e234f7e24c023cfc2d2dc0aa1e9af2fb", - "73483e697599871af983a281e3afa22e0ed86b68", - 272, - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000002", - }, - - /* These tests are generated by the OpenSSL FIPS version. */ - { - 1024, - "A404363903FDCE86839BCFD953AAD2DA2B0E70CAED3B5FF5D68F15A1C4BB0A793C" - "A9D58FC956804C5901DE0AF99F345ED1A8617C687864BAC044B7C3C3E732A2B255" - "EC986AA76EA8CB0E0815B3E0E605650AF7D8058EE7E8EBCDEFFDAB8100D3FC1033" - "11BA3AB232EF06BB74BA9A949EC0C7ED324C19B202F4AB725BBB4080C9", - "C643946CEA8748E12D430C48DB038F9165814389", - "59B7E7BA0033CCE8E6837173420FBB382A784D4154A3C166043F5A68CB92945D16" - "892D4CC5585F2D28C780E75A6C20A379E2B58304C1E5FC0D8C15E4E89C4498C8BC" - "B90FB36ED8DC0489B9D0BC09EC4411FB0BFADF25485EEAB6700BE0ACF5C44A6ED7" - "44A015382FF9B8DA7EAA00DEA135FADC59212DBBFFC1537336FA4B7225", - "02708ab36e3f0bfd67ec3b8bd8829d03b84f56bd", - 50, - "02" - }, - { - 1024, - "9C664033DB8B203D826F896D2293C62EF9351D5CFD0F4C0AD7EFDA4DDC7F15987" - "6A3C68CAB2586B44FD1BD4DEF7A17905D88D321DD77C4E1720D848CA21D79F9B3" - "D8F537338E09B44E9F481E8DA3C56569F63146596A050EF8FAEE8ACA32C666450" - "04F675C8806EB4025B0A5ECC39CE89983EA40A183A7CF5208BA958045ABD5", - "AD0D8CBA369AF6CD0D2BAC0B4CFCAF0A1F9BCDF7", - "74D717F7092A2AF725FDD6C2561D1DBE5AEE40203C638BA8B9F49003857873701" - "95A44E515C4E8B344F5CDC7F4A6D38097CD57675E7643AB9700692C69F0A99B0E" - "039FDDDFCA8CEB607BDB4ADF2834DE1690F5823FC8199FB8F6F29E5A583B6786A" - "C14C7E67106C3B30568CBB9383F89287D578159778EB18216799D16D46498", - "6481a12a50384888ee84b61024f7c9c685d6ac96", - 289, - "02" - }, - { - 1024, - - "B0DFB602EB8462B1DC8C2214A52B587D3E6842CCF1C38D0F7C7F967ED30CF6828" - "1E2675B3BAB594755FB1634E66B4C23936F0725A358F8DFF3C307E2601FD66D63" - "5B17270450C50BD2BEC29E0E9A471DF1C15B0191517952268A2763D4BD28B8503" - "B3399686272B76B11227F693D7833105EF70C2289C3194CF4527024B272DF", - "EA649C04911FAB5A41440287A517EF752A40354B", - "88C5A4563ECB949763E0B696CD04B21321360F54C0EE7B23E2CEDC30E9E486162" - "01BFB1619E7C54B653D1F890C50E04B29205F5E3E2F93A13B0751AF25491C5194" - "93C09DDF6B9C173B3846DFB0E7A5C870BBFC78419260C90E20315410691C8326C" - "858D7063E7921F3F601158E912C7EE487FF259202BEEB10F6D9E99190F696", - "5bf9d17bc62fbbf3d569c92bd4505586b2e5ef1a", - 626, - "02" - }, - { - 1024, - "F783C08D7F9463E48BA87893805C4B34B63C85DF7EBDD9EBEE94DB4AF4E4A415C" - "F0F3793AE55096BA1199598798FA8403B28DED7F7C7AFD54FD535861A0150EF4D" - "5871465B13837CCF46BEB0A22F8D38DC7D6AE0E14A3845FD0C027CFA97791B977" - "CE2808BAD9B43CE69390C0F40016056722D82C0D7B1B27413D026A39D7DAD", - "A40D9EE456AED4C8A653FDB47B6629C0B843FE8F", - "DF876263E21F263AE6DA57409BD517DCEADB9216048F066D6B58867F8E59A5EEE" - "700283A946C1455534618979BE6C227673C1B803910262BD93BC94D5089850614" - "F3E29AB64E8C989A7E3E28FE670FFA3EE21DEEEC1AB0B60E1D8E2AA39663BADD7" - "2C9F957D7F3D4F17D9FDAD050EB373A6DEFD09F5DA752EAFE046836E14B67", - "8a9a57706f69f4f566252cdf6d5cbfdf2020150b", - 397, - "02" - }, - { - 1024, - "D40E4F6461E145859CCF60FD57962840BD75FFF12C22F76626F566842252AD068" - "29745F0147056354F6C016CF12762B0E331787925B8128CF5AF81F9B176A51934" - "96D792430FF83C7B79BD595BDA10787B34600787FA552EFE3662F37B99AAD3F3A" - "093732680A01345192A19BECCE6BF5D498E44ED6BED5B0BA72AAD49E8276B", - "D12F1BD0AA78B99247FD9F18EAFEE5C136686EA5", - "468EBD20C99449C1E440E6F8E452C6A6BC7551C555FE5E94996E20CFD4DA3B9CC" - "58499D6CC2374CCF9C392715A537DE10CFCA8A6A37AFBD187CF6B88D26881E5F5" - "7521D9D2C9BBA51E7B87B070BBE73F5C5FE31E752CAF88183516D8503BAAC1159" - "928EF50DEE52D96F396B93FB4138D786464C315401A853E57C9A0F9D25839", - "30b3599944a914a330a3f49d11ec88f555422aef", - 678, - "02" - } - }; - gpg_error_t err; - int tno; - gcry_sexp_t key_spec, key, pub_key, sec_key, seed_values; - gcry_sexp_t l1; - - for (tno = 0; tno < DIM (tbl); tno++) - { - if (verbose) - info ("generating FIPS 186-2 test key %d\n", tno); - - { - void *data; - size_t datalen; - - data = data_from_hex (tbl[tno].seed, &datalen); - err = gcry_sexp_build (&key_spec, NULL, - "(genkey (dsa (nbits %d)(use-fips186-2)" - "(derive-parms(seed %b))))", - tbl[tno].nbits, (int)datalen, data); - gcry_free (data); - } - if (err) - die ("error creating S-expression %d: %s\n", tno, gpg_strerror (err)); - - err = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (err) - { - fail ("error generating key %d: %s\n", tno, gpg_strerror (err)); - continue; - } - - if (verbose > 1) - show_sexp ("generated key:\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - fail ("public part missing in key %d\n", tno); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - fail ("private part missing in key %d\n", tno); - - l1 = gcry_sexp_find_token (key, "misc-key-info", 0); - if (!l1) - fail ("misc_key_info part missing in key %d\n", tno); - seed_values = gcry_sexp_find_token (l1, "seed-values", 0); - if (!seed_values) - fail ("seed-values part missing in key %d\n", tno); - gcry_sexp_release (l1); - - extract_cmp_mpi (sec_key, "p", tbl[tno].p); - extract_cmp_mpi (sec_key, "q", tbl[tno].q); - extract_cmp_mpi (sec_key, "g", tbl[tno].g); - - extract_cmp_data (seed_values, "seed", tbl[tno].seed); - extract_cmp_int (seed_values, "counter", tbl[tno].counter); - extract_cmp_mpi (seed_values, "h", tbl[tno].h); - - gcry_sexp_release (seed_values); - gcry_sexp_release (sec_key); - gcry_sexp_release (pub_key); - gcry_sexp_release (key); - } -} - - - -int -main (int argc, char **argv) -{ - int debug = 0; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - { - verbose = 2; - debug = 1; - } - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (!gcry_check_version ("1.4.4")) - die ("version mismatch\n"); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - /* No valuable keys are create, so we can speed up our RNG. */ - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - - - check_dsa_gen_186_2 (); - - - return error_count ? 1 : 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/fipsdrv.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/fipsdrv.c deleted file mode 100644 index f80e30c844..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/fipsdrv.c +++ /dev/null @@ -1,2526 +0,0 @@ -/* fipsdrv.c - A driver to help with FIPS CAVS tests. - Copyright (C) 2008 Free Software Foundation, Inc. - - This file is part of Libgcrypt. - - Libgcrypt is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of - the License, or (at your option) any later version. - - Libgcrypt 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <errno.h> -#include <ctype.h> -#ifdef HAVE_W32_SYSTEM -# include <fcntl.h> /* We need setmode(). */ -#else -# include <signal.h> -#endif -#include <assert.h> -#include <unistd.h> - -#ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" -#else -# include <gcrypt.h> -# define PACKAGE_BUGREPORT "devnull@example.org" -# define PACKAGE_VERSION "[build on " __DATE__ " " __TIME__ "]" -#endif - - -#define PGM "fipsdrv" - -#define my_isascii(c) (!((c) & 0x80)) -#define digitp(p) (*(p) >= '0' && *(p) <= '9') -#define hexdigitp(a) (digitp (a) \ - || (*(a) >= 'A' && *(a) <= 'F') \ - || (*(a) >= 'a' && *(a) <= 'f')) -#define xtoi_1(p) (*(p) <= '9'? (*(p)- '0'): \ - *(p) <= 'F'? (*(p)-'A'+10):(*(p)-'a'+10)) -#define xtoi_2(p) ((xtoi_1(p) * 16) + xtoi_1((p)+1)) -#define DIM(v) (sizeof(v)/sizeof((v)[0])) -#define DIMof(type,member) DIM(((type *)0)->member) - - -#define PRIV_CTL_INIT_EXTRNG_TEST 58 -#define PRIV_CTL_RUN_EXTRNG_TEST 59 -#define PRIV_CTL_DEINIT_EXTRNG_TEST 60 -#define PRIV_CTL_DISABLE_WEAK_KEY 61 -#define PRIV_CTL_GET_INPUT_VECTOR 62 - - -/* Verbose mode flag. */ -static int verbose; - -/* Binary input flag. */ -static int binary_input; - -/* Binary output flag. */ -static int binary_output; - -/* Base64 output flag. */ -static int base64_output; - -/* We need to know whether we are in loop_mode. */ -static int loop_mode; - -/* If true some functions are modified to print the output in the CAVS - response file format. */ -static int standalone_mode; - - -/* ASN.1 classes. */ -enum -{ - UNIVERSAL = 0, - APPLICATION = 1, - ASNCONTEXT = 2, - PRIVATE = 3 -}; - - -/* ASN.1 tags. */ -enum -{ - TAG_NONE = 0, - TAG_BOOLEAN = 1, - TAG_INTEGER = 2, - TAG_BIT_STRING = 3, - TAG_OCTET_STRING = 4, - TAG_NULL = 5, - TAG_OBJECT_ID = 6, - TAG_OBJECT_DESCRIPTOR = 7, - TAG_EXTERNAL = 8, - TAG_REAL = 9, - TAG_ENUMERATED = 10, - TAG_EMBEDDED_PDV = 11, - TAG_UTF8_STRING = 12, - TAG_REALTIVE_OID = 13, - TAG_SEQUENCE = 16, - TAG_SET = 17, - TAG_NUMERIC_STRING = 18, - TAG_PRINTABLE_STRING = 19, - TAG_TELETEX_STRING = 20, - TAG_VIDEOTEX_STRING = 21, - TAG_IA5_STRING = 22, - TAG_UTC_TIME = 23, - TAG_GENERALIZED_TIME = 24, - TAG_GRAPHIC_STRING = 25, - TAG_VISIBLE_STRING = 26, - TAG_GENERAL_STRING = 27, - TAG_UNIVERSAL_STRING = 28, - TAG_CHARACTER_STRING = 29, - TAG_BMP_STRING = 30 -}; - -/* ASN.1 Parser object. */ -struct tag_info -{ - int class; /* Object class. */ - unsigned long tag; /* The tag of the object. */ - unsigned long length; /* Length of the values. */ - int nhdr; /* Length of the header (TL). */ - unsigned int ndef:1; /* The object has an indefinite length. */ - unsigned int cons:1; /* This is a constructed object. */ -}; - - - -/* Print a error message and exit the process with an error code. */ -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - fputs (PGM ": ", stderr); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - - -static void -showhex (const char *prefix, const void *buffer, size_t length) -{ - const unsigned char *p = buffer; - - if (prefix) - fprintf (stderr, PGM ": %s: ", prefix); - while (length-- ) - fprintf (stderr, "%02X", *p++); - if (prefix) - putc ('\n', stderr); -} - -/* static void */ -/* show_sexp (const char *prefix, gcry_sexp_t a) */ -/* { */ -/* char *buf; */ -/* size_t size; */ - -/* if (prefix) */ -/* fputs (prefix, stderr); */ -/* size = gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, NULL, 0); */ -/* buf = gcry_xmalloc (size); */ - -/* gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, buf, size); */ -/* fprintf (stderr, "%.*s", (int)size, buf); */ -/* gcry_free (buf); */ -/* } */ - - -/* Convert STRING consisting of hex characters into its binary - representation and store that at BUFFER. BUFFER needs to be of - LENGTH bytes. The function checks that the STRING will convert - exactly to LENGTH bytes. The string is delimited by either end of - string or a white space character. The function returns -1 on - error or the length of the parsed string. */ -static int -hex2bin (const char *string, void *buffer, size_t length) -{ - int i; - const char *s = string; - - for (i=0; i < length; ) - { - if (!hexdigitp (s) || !hexdigitp (s+1)) - return -1; /* Invalid hex digits. */ - ((unsigned char*)buffer)[i++] = xtoi_2 (s); - s += 2; - } - if (*s && (!my_isascii (*s) || !isspace (*s)) ) - return -1; /* Not followed by Nul or white space. */ - if (i != length) - return -1; /* Not of expected length. */ - if (*s) - s++; /* Skip the delimiter. */ - return s - string; -} - - -/* Convert STRING consisting of hex characters into its binary - representation and return it as an allocated buffer. The valid - length of the buffer is returned at R_LENGTH. The string is - delimited by end of string. The function returns NULL on - error. */ -static void * -hex2buffer (const char *string, size_t *r_length) -{ - const char *s; - unsigned char *buffer; - size_t length; - - buffer = gcry_xmalloc (strlen(string)/2+1); - length = 0; - for (s=string; *s; s +=2 ) - { - if (!hexdigitp (s) || !hexdigitp (s+1)) - return NULL; /* Invalid hex digits. */ - ((unsigned char*)buffer)[length++] = xtoi_2 (s); - } - *r_length = length; - return buffer; -} - - -static char * -read_textline (FILE *fp) -{ - char line[256]; - char *p; - int any = 0; - - /* Read line but skip over initial empty lines. */ - do - { - do - { - if (!fgets (line, sizeof line, fp)) - { - if (feof (fp)) - return NULL; - die ("error reading input line: %s\n", strerror (errno)); - } - p = strchr (line, '\n'); - if (p) - *p = 0; - p = line + (*line? (strlen (line)-1):0); - for ( ;p > line; p--) - if (my_isascii (*p) && isspace (*p)) - *p = 0; - } - while (!any && !*line); - any = 1; - } - while (*line == '#'); /* Always skip comment lines. */ - if (verbose > 1) - fprintf (stderr, PGM ": received line: %s\n", line); - return gcry_xstrdup (line); -} - -static char * -read_hexline (FILE *fp, size_t *retlen) -{ - char *line, *p; - - line = read_textline (fp); - if (!line) - return NULL; - p = hex2buffer (line, retlen); - if (!p) - die ("error decoding hex string on input\n"); - gcry_free (line); - return p; -} - -static void -skip_to_empty_line (FILE *fp) -{ - char line[256]; - char *p; - - do - { - if (!fgets (line, sizeof line, fp)) - { - if (feof (fp)) - return; - die ("error reading input line: %s\n", strerror (errno)); - } - p = strchr (line, '\n'); - if (p) - *p =0; - } - while (*line); -} - - - -/* Read a file from stream FP into a newly allocated buffer and return - that buffer. The valid length of the buffer is stored at R_LENGTH. - Returns NULL on failure. If decode is set, the file is assumed to - be hex encoded and the decoded content is returned. */ -static void * -read_file (FILE *fp, int decode, size_t *r_length) -{ - char *buffer; - size_t buflen; - size_t nread, bufsize = 0; - - *r_length = 0; -#define NCHUNK 8192 -#ifdef HAVE_DOSISH_SYSTEM - setmode (fileno(fp), O_BINARY); -#endif - buffer = NULL; - buflen = 0; - do - { - bufsize += NCHUNK; - if (!buffer) - buffer = gcry_xmalloc (bufsize); - else - buffer = gcry_xrealloc (buffer, bufsize); - - nread = fread (buffer + buflen, 1, NCHUNK, fp); - if (nread < NCHUNK && ferror (fp)) - { - gcry_free (buffer); - return NULL; - } - buflen += nread; - } - while (nread == NCHUNK); -#undef NCHUNK - if (decode) - { - const char *s; - char *p; - - for (s=buffer,p=buffer,nread=0; nread+1 < buflen; s += 2, nread +=2 ) - { - if (!hexdigitp (s) || !hexdigitp (s+1)) - { - gcry_free (buffer); - return NULL; /* Invalid hex digits. */ - } - *(unsigned char*)p++ = xtoi_2 (s); - } - if (nread != buflen) - { - gcry_free (buffer); - return NULL; /* Odd number of hex digits. */ - } - buflen = p - buffer; - } - - *r_length = buflen; - return buffer; -} - -/* Do in-place decoding of base-64 data of LENGTH in BUFFER. Returns - the new length of the buffer. Dies on error. */ -static size_t -base64_decode (char *buffer, size_t length) -{ - static unsigned char const asctobin[128] = - { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, - 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, - 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, - 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff - }; - - int idx = 0; - unsigned char val = 0; - int c = 0; - char *d, *s; - int lfseen = 1; - - /* Find BEGIN line. */ - for (s=buffer; length; length--, s++) - { - if (lfseen && *s == '-' && length > 11 && !memcmp (s, "-----BEGIN ", 11)) - { - for (; length && *s != '\n'; length--, s++) - ; - break; - } - lfseen = (*s == '\n'); - } - - /* Decode until pad character or END line. */ - for (d=buffer; length; length--, s++) - { - if (lfseen && *s == '-' && length > 9 && !memcmp (s, "-----END ", 9)) - break; - if ((lfseen = (*s == '\n')) || *s == ' ' || *s == '\r' || *s == '\t') - continue; - if (*s == '=') - { - /* Pad character: stop */ - if (idx == 1) - *d++ = val; - break; - } - - if ( (*s & 0x80) || (c = asctobin[*(unsigned char *)s]) == 0xff) - die ("invalid base64 character %02X at pos %d detected\n", - *(unsigned char*)s, (int)(s-buffer)); - - switch (idx) - { - case 0: - val = c << 2; - break; - case 1: - val |= (c>>4)&3; - *d++ = val; - val = (c<<4)&0xf0; - break; - case 2: - val |= (c>>2)&15; - *d++ = val; - val = (c<<6)&0xc0; - break; - case 3: - val |= c&0x3f; - *d++ = val; - break; - } - idx = (idx+1) % 4; - } - - return d - buffer; -} - - -/* Parse the buffer at the address BUFFER which consists of the number - of octets as stored at BUFLEN. Return the tag and the length part - from the TLV triplet. Update BUFFER and BUFLEN on success. Checks - that the encoded length does not exhaust the length of the provided - buffer. */ -static int -parse_tag (unsigned char const **buffer, size_t *buflen, struct tag_info *ti) -{ - int c; - unsigned long tag; - const unsigned char *buf = *buffer; - size_t length = *buflen; - - ti->length = 0; - ti->ndef = 0; - ti->nhdr = 0; - - /* Get the tag */ - if (!length) - return -1; /* Premature EOF. */ - c = *buf++; length--; - ti->nhdr++; - - ti->class = (c & 0xc0) >> 6; - ti->cons = !!(c & 0x20); - tag = (c & 0x1f); - - if (tag == 0x1f) - { - tag = 0; - do - { - tag <<= 7; - if (!length) - return -1; /* Premature EOF. */ - c = *buf++; length--; - ti->nhdr++; - tag |= (c & 0x7f); - } - while ( (c & 0x80) ); - } - ti->tag = tag; - - /* Get the length */ - if (!length) - return -1; /* Premature EOF. */ - c = *buf++; length--; - ti->nhdr++; - - if ( !(c & 0x80) ) - ti->length = c; - else if (c == 0x80) - ti->ndef = 1; - else if (c == 0xff) - return -1; /* Forbidden length value. */ - else - { - unsigned long len = 0; - int count = c & 0x7f; - - for (; count; count--) - { - len <<= 8; - if (!length) - return -1; /* Premature EOF. */ - c = *buf++; length--; - ti->nhdr++; - len |= (c & 0xff); - } - ti->length = len; - } - - if (ti->class == UNIVERSAL && !ti->tag) - ti->length = 0; - - if (ti->length > length) - return -1; /* Data larger than buffer. */ - - *buffer = buf; - *buflen = length; - return 0; -} - - -/* Read the file FNAME assuming it is a PEM encoded private key file - and return an S-expression. With SHOW set, the key parameters are - printed. */ -static gcry_sexp_t -read_private_key_file (const char *fname, int show) -{ - gcry_error_t err; - FILE *fp; - char *buffer; - size_t buflen; - const unsigned char *der; - size_t derlen; - struct tag_info ti; - gcry_mpi_t keyparms[8]; - int n_keyparms = 8; - int idx; - gcry_sexp_t s_key; - - fp = fopen (fname, binary_input?"rb":"r"); - if (!fp) - die ("can't open `%s': %s\n", fname, strerror (errno)); - buffer = read_file (fp, 0, &buflen); - if (!buffer) - die ("error reading `%s'\n", fname); - fclose (fp); - - buflen = base64_decode (buffer, buflen); - - /* Parse the ASN.1 structure. */ - der = (const unsigned char*)buffer; - derlen = buflen; - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_SEQUENCE || ti.class || !ti.cons || ti.ndef) - goto bad_asn1; - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_INTEGER || ti.class || ti.cons || ti.ndef) - goto bad_asn1; - if (ti.length != 1 || *der) - goto bad_asn1; /* The value of the first integer is no 0. */ - der += ti.length; derlen -= ti.length; - - for (idx=0; idx < n_keyparms; idx++) - { - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_INTEGER || ti.class || ti.cons || ti.ndef) - goto bad_asn1; - if (show) - { - char prefix[2]; - - prefix[0] = idx < 8? "nedpq12u"[idx] : '?'; - prefix[1] = 0; - showhex (prefix, der, ti.length); - } - err = gcry_mpi_scan (keyparms+idx, GCRYMPI_FMT_USG, der, ti.length,NULL); - if (err) - die ("error scanning RSA parameter %d: %s\n", idx, gpg_strerror (err)); - der += ti.length; derlen -= ti.length; - } - if (idx != n_keyparms) - die ("not enough RSA key parameters\n"); - - gcry_free (buffer); - - /* Convert from OpenSSL parameter ordering to the OpenPGP order. */ - /* First check that p < q; if not swap p and q and recompute u. */ - if (gcry_mpi_cmp (keyparms[3], keyparms[4]) > 0) - { - gcry_mpi_swap (keyparms[3], keyparms[4]); - gcry_mpi_invm (keyparms[7], keyparms[3], keyparms[4]); - } - - /* Build the S-expression. */ - err = gcry_sexp_build (&s_key, NULL, - "(private-key(rsa(n%m)(e%m)" - /**/ "(d%m)(p%m)(q%m)(u%m)))", - keyparms[0], keyparms[1], keyparms[2], - keyparms[3], keyparms[4], keyparms[7] ); - if (err) - die ("error building S-expression: %s\n", gpg_strerror (err)); - - for (idx=0; idx < n_keyparms; idx++) - gcry_mpi_release (keyparms[idx]); - - return s_key; - - bad_asn1: - die ("invalid ASN.1 structure in `%s'\n", fname); - return NULL; /*NOTREACHED*/ -} - - -/* Read the file FNAME assuming it is a PEM encoded public key file - and return an S-expression. With SHOW set, the key parameters are - printed. */ -static gcry_sexp_t -read_public_key_file (const char *fname, int show) -{ - gcry_error_t err; - FILE *fp; - char *buffer; - size_t buflen; - const unsigned char *der; - size_t derlen; - struct tag_info ti; - gcry_mpi_t keyparms[2]; - int n_keyparms = 2; - int idx; - gcry_sexp_t s_key; - - fp = fopen (fname, binary_input?"rb":"r"); - if (!fp) - die ("can't open `%s': %s\n", fname, strerror (errno)); - buffer = read_file (fp, 0, &buflen); - if (!buffer) - die ("error reading `%s'\n", fname); - fclose (fp); - - buflen = base64_decode (buffer, buflen); - - /* Parse the ASN.1 structure. */ - der = (const unsigned char*)buffer; - derlen = buflen; - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_SEQUENCE || ti.class || !ti.cons || ti.ndef) - goto bad_asn1; - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_SEQUENCE || ti.class || !ti.cons || ti.ndef) - goto bad_asn1; - /* We skip the description of the key parameters and assume it is RSA. */ - der += ti.length; derlen -= ti.length; - - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_BIT_STRING || ti.class || ti.cons || ti.ndef) - goto bad_asn1; - if (ti.length < 1 || *der) - goto bad_asn1; /* The number of unused bits needs to be 0. */ - der += 1; derlen -= 1; - - /* Parse the BIT string. */ - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_SEQUENCE || ti.class || !ti.cons || ti.ndef) - goto bad_asn1; - - for (idx=0; idx < n_keyparms; idx++) - { - if ( parse_tag (&der, &derlen, &ti) - || ti.tag != TAG_INTEGER || ti.class || ti.cons || ti.ndef) - goto bad_asn1; - if (show) - { - char prefix[2]; - - prefix[0] = idx < 2? "ne"[idx] : '?'; - prefix[1] = 0; - showhex (prefix, der, ti.length); - } - err = gcry_mpi_scan (keyparms+idx, GCRYMPI_FMT_USG, der, ti.length,NULL); - if (err) - die ("error scanning RSA parameter %d: %s\n", idx, gpg_strerror (err)); - der += ti.length; derlen -= ti.length; - } - if (idx != n_keyparms) - die ("not enough RSA key parameters\n"); - - gcry_free (buffer); - - /* Build the S-expression. */ - err = gcry_sexp_build (&s_key, NULL, - "(public-key(rsa(n%m)(e%m)))", - keyparms[0], keyparms[1] ); - if (err) - die ("error building S-expression: %s\n", gpg_strerror (err)); - - for (idx=0; idx < n_keyparms; idx++) - gcry_mpi_release (keyparms[idx]); - - return s_key; - - bad_asn1: - die ("invalid ASN.1 structure in `%s'\n", fname); - return NULL; /*NOTREACHED*/ -} - - - -/* Read the file FNAME assuming it is a binary signature result and - return an an S-expression suitable for gcry_pk_verify. */ -static gcry_sexp_t -read_sig_file (const char *fname) -{ - gcry_error_t err; - FILE *fp; - char *buffer; - size_t buflen; - gcry_mpi_t tmpmpi; - gcry_sexp_t s_sig; - - fp = fopen (fname, "rb"); - if (!fp) - die ("can't open `%s': %s\n", fname, strerror (errno)); - buffer = read_file (fp, 0, &buflen); - if (!buffer) - die ("error reading `%s'\n", fname); - fclose (fp); - - err = gcry_mpi_scan (&tmpmpi, GCRYMPI_FMT_USG, buffer, buflen, NULL); - if (!err) - err = gcry_sexp_build (&s_sig, NULL, - "(sig-val(rsa(s %m)))", tmpmpi); - if (err) - die ("error building S-expression: %s\n", gpg_strerror (err)); - gcry_mpi_release (tmpmpi); - gcry_free (buffer); - - return s_sig; -} - - -/* Read an S-expression from FNAME. */ -static gcry_sexp_t -read_sexp_from_file (const char *fname) -{ - gcry_error_t err; - FILE *fp; - char *buffer; - size_t buflen; - gcry_sexp_t sexp; - - fp = fopen (fname, "rb"); - if (!fp) - die ("can't open `%s': %s\n", fname, strerror (errno)); - buffer = read_file (fp, 0, &buflen); - if (!buffer) - die ("error reading `%s'\n", fname); - fclose (fp); - if (!buflen) - die ("error: file `%s' is empty\n", fname); - - err = gcry_sexp_create (&sexp, buffer, buflen, 1, gcry_free); - if (err) - die ("error parsing `%s': %s\n", fname, gpg_strerror (err)); - - return sexp; -} - - -static void -print_buffer (const void *buffer, size_t length) -{ - int writerr = 0; - - if (base64_output) - { - static const unsigned char bintoasc[64+1] = - ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"); - const unsigned char *p; - unsigned char inbuf[4]; - char outbuf[4]; - int idx, quads; - - idx = quads = 0; - for (p = buffer; length; p++, length--) - { - inbuf[idx++] = *p; - if (idx > 2) - { - outbuf[0] = bintoasc[(*inbuf>>2)&077]; - outbuf[1] = bintoasc[(((*inbuf<<4)&060) - |((inbuf[1] >> 4)&017))&077]; - outbuf[2] = bintoasc[(((inbuf[1]<<2)&074) - |((inbuf[2]>>6)&03))&077]; - outbuf[3] = bintoasc[inbuf[2]&077]; - if (fwrite (outbuf, 4, 1, stdout) != 1) - writerr = 1; - idx = 0; - if (++quads >= (64/4)) - { - if (fwrite ("\n", 1, 1, stdout) != 1) - writerr = 1; - quads = 0; - } - } - } - if (idx) - { - outbuf[0] = bintoasc[(*inbuf>>2)&077]; - if (idx == 1) - { - outbuf[1] = bintoasc[((*inbuf<<4)&060)&077]; - outbuf[2] = outbuf[3] = '='; - } - else - { - outbuf[1] = bintoasc[(((*inbuf<<4)&060) - |((inbuf[1]>>4)&017))&077]; - outbuf[2] = bintoasc[((inbuf[1]<<2)&074)&077]; - outbuf[3] = '='; - } - if (fwrite (outbuf, 4, 1, stdout) != 1) - writerr = 1; - quads++; - } - if (quads && fwrite ("\n", 1, 1, stdout) != 1) - writerr = 1; - } - else if (binary_output) - { - if (fwrite (buffer, length, 1, stdout) != 1) - writerr++; - } - else - { - const unsigned char *p = buffer; - - if (verbose > 1) - showhex ("sent line", buffer, length); - while (length-- && !ferror (stdout) ) - printf ("%02X", *p++); - if (ferror (stdout)) - writerr++; - } - if (!writerr && fflush (stdout) == EOF) - writerr++; - if (writerr) - { -#ifndef HAVE_W32_SYSTEM - if (loop_mode && errno == EPIPE) - loop_mode = 0; - else -#endif - die ("writing output failed: %s\n", strerror (errno)); - } -} - - -/* Print an MPI on a line. */ -static void -print_mpi_line (gcry_mpi_t a, int no_lz) -{ - unsigned char *buf, *p; - gcry_error_t err; - int writerr = 0; - - err = gcry_mpi_aprint (GCRYMPI_FMT_HEX, &buf, NULL, a); - if (err) - die ("gcry_mpi_aprint failed: %s\n", gpg_strerror (err)); - - p = buf; - if (no_lz && p[0] == '0' && p[1] == '0' && p[2]) - p += 2; - - printf ("%s\n", p); - if (ferror (stdout)) - writerr++; - if (!writerr && fflush (stdout) == EOF) - writerr++; - if (writerr) - die ("writing output failed: %s\n", strerror (errno)); - gcry_free (buf); -} - - -/* Print some data on hex format on a line. */ -static void -print_data_line (const void *data, size_t datalen) -{ - const unsigned char *p = data; - int writerr = 0; - - while (data && datalen-- && !ferror (stdout) ) - printf ("%02X", *p++); - putchar ('\n'); - if (ferror (stdout)) - writerr++; - if (!writerr && fflush (stdout) == EOF) - writerr++; - if (writerr) - die ("writing output failed: %s\n", strerror (errno)); -} - -/* Print the S-expression A to the stream FP. */ -static void -print_sexp (gcry_sexp_t a, FILE *fp) -{ - char *buf; - size_t size; - - size = gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, NULL, 0); - buf = gcry_xmalloc (size); - gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, buf, size); - if (fwrite (buf, size, 1, fp) != 1) - die ("error writing to stream: %s\n", strerror (errno)); - gcry_free (buf); -} - - - - -static gcry_error_t -init_external_rng_test (void **r_context, - unsigned int flags, - const void *key, size_t keylen, - const void *seed, size_t seedlen, - const void *dt, size_t dtlen) -{ - return gcry_control (PRIV_CTL_INIT_EXTRNG_TEST, - r_context, flags, - key, keylen, - seed, seedlen, - dt, dtlen); -} - -static gcry_error_t -run_external_rng_test (void *context, void *buffer, size_t buflen) -{ - return gcry_control (PRIV_CTL_RUN_EXTRNG_TEST, context, buffer, buflen); -} - -static void -deinit_external_rng_test (void *context) -{ - gcry_control (PRIV_CTL_DEINIT_EXTRNG_TEST, context); -} - - -/* Given an OpenSSL cipher name NAME, return the Libgcrypt algirithm - identified and store the libgcrypt mode at R_MODE. Returns 0 on - error. */ -static int -map_openssl_cipher_name (const char *name, int *r_mode) -{ - static struct { - const char *name; - int algo; - int mode; - } table[] = - { - { "bf-cbc", GCRY_CIPHER_BLOWFISH, GCRY_CIPHER_MODE_CBC }, - { "bf", GCRY_CIPHER_BLOWFISH, GCRY_CIPHER_MODE_CBC }, - { "bf-cfb", GCRY_CIPHER_BLOWFISH, GCRY_CIPHER_MODE_CFB }, - { "bf-ecb", GCRY_CIPHER_BLOWFISH, GCRY_CIPHER_MODE_ECB }, - { "bf-ofb", GCRY_CIPHER_BLOWFISH, GCRY_CIPHER_MODE_OFB }, - - { "cast-cbc", GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_CBC }, - { "cast", GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_CBC }, - { "cast5-cbc", GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_CBC }, - { "cast5-cfb", GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_CFB }, - { "cast5-ecb", GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_ECB }, - { "cast5-ofb", GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_OFB }, - - { "des-cbc", GCRY_CIPHER_DES, GCRY_CIPHER_MODE_CBC }, - { "des", GCRY_CIPHER_DES, GCRY_CIPHER_MODE_CBC }, - { "des-cfb", GCRY_CIPHER_DES, GCRY_CIPHER_MODE_CFB }, - { "des-ofb", GCRY_CIPHER_DES, GCRY_CIPHER_MODE_OFB }, - { "des-ecb", GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB }, - - { "des-ede3-cbc", GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_CBC }, - { "des-ede3", GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_ECB }, - { "des3", GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_CBC }, - { "des-ede3-cfb", GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_CFB }, - { "des-ede3-ofb", GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_OFB }, - - { "rc4", GCRY_CIPHER_ARCFOUR, GCRY_CIPHER_MODE_STREAM }, - - { "aes-128-cbc", GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC }, - { "aes-128", GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC }, - { "aes-128-cfb", GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CFB }, - { "aes-128-ecb", GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_ECB }, - { "aes-128-ofb", GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_OFB }, - - { "aes-192-cbc", GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_CBC }, - { "aes-192", GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_CBC }, - { "aes-192-cfb", GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_CFB }, - { "aes-192-ecb", GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_ECB }, - { "aes-192-ofb", GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_OFB }, - - { "aes-256-cbc", GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CBC }, - { "aes-256", GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CBC }, - { "aes-256-cfb", GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CFB }, - { "aes-256-ecb", GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_ECB }, - { "aes-256-ofb", GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_OFB }, - - { NULL, 0 , 0 } - }; - int idx; - - for (idx=0; table[idx].name; idx++) - if (!strcmp (name, table[idx].name)) - { - *r_mode = table[idx].mode; - return table[idx].algo; - } - *r_mode = 0; - return 0; -} - - - -/* Run an encrypt or decryption operations. If DATA is NULL the - function reads its input in chunks of size DATALEN from fp and - processes it and writes it out until EOF. */ -static void -run_encrypt_decrypt (int encrypt_mode, - int cipher_algo, int cipher_mode, - const void *iv_buffer, size_t iv_buflen, - const void *key_buffer, size_t key_buflen, - const void *data, size_t datalen, FILE *fp) -{ - gpg_error_t err; - gcry_cipher_hd_t hd; - void *outbuf; - size_t outbuflen; - void *inbuf; - size_t inbuflen; - size_t blocklen; - - err = gcry_cipher_open (&hd, cipher_algo, cipher_mode, 0); - if (err) - die ("gcry_cipher_open failed for algo %d, mode %d: %s\n", - cipher_algo, cipher_mode, gpg_strerror (err)); - - blocklen = gcry_cipher_get_algo_blklen (cipher_algo); - assert (blocklen); - - gcry_cipher_ctl (hd, PRIV_CTL_DISABLE_WEAK_KEY, NULL, 0); - - err = gcry_cipher_setkey (hd, key_buffer, key_buflen); - if (err) - die ("gcry_cipher_setkey failed with keylen %u: %s\n", - (unsigned int)key_buflen, gpg_strerror (err)); - - if (iv_buffer) - { - err = gcry_cipher_setiv (hd, iv_buffer, iv_buflen); - if (err) - die ("gcry_cipher_setiv failed with ivlen %u: %s\n", - (unsigned int)iv_buflen, gpg_strerror (err)); - } - - inbuf = data? NULL : gcry_xmalloc (datalen); - outbuflen = datalen; - outbuf = gcry_xmalloc (outbuflen < blocklen? blocklen:outbuflen); - - do - { - if (inbuf) - { - int nread = fread (inbuf, 1, datalen, fp); - if (nread < (int)datalen && ferror (fp)) - die ("error reading input\n"); - data = inbuf; - inbuflen = nread; - } - else - inbuflen = datalen; - - if (encrypt_mode) - err = gcry_cipher_encrypt (hd, outbuf, outbuflen, data, inbuflen); - else - err = gcry_cipher_decrypt (hd, outbuf, outbuflen, data, inbuflen); - if (err) - die ("gcry_cipher_%scrypt failed: %s\n", - encrypt_mode? "en":"de", gpg_strerror (err)); - - print_buffer (outbuf, outbuflen); - } - while (inbuf); - - gcry_cipher_close (hd); - gcry_free (outbuf); - gcry_free (inbuf); -} - - -static void -get_current_iv (gcry_cipher_hd_t hd, void *buffer, size_t buflen) -{ - unsigned char tmp[17]; - - if (gcry_cipher_ctl (hd, PRIV_CTL_GET_INPUT_VECTOR, tmp, sizeof tmp)) - die ("error getting current input vector\n"); - if (buflen > *tmp) - die ("buffer too short to store the current input vector\n"); - memcpy (buffer, tmp+1, *tmp); -} - -/* Run the inner loop of the CAVS monte carlo test. */ -static void -run_cipher_mct_loop (int encrypt_mode, int cipher_algo, int cipher_mode, - const void *iv_buffer, size_t iv_buflen, - const void *key_buffer, size_t key_buflen, - const void *data, size_t datalen, int iterations) -{ - gpg_error_t err; - gcry_cipher_hd_t hd; - size_t blocklen; - int count; - char input[16]; - char output[16]; - char last_output[16]; - char last_last_output[16]; - char last_iv[16]; - - - err = gcry_cipher_open (&hd, cipher_algo, cipher_mode, 0); - if (err) - die ("gcry_cipher_open failed for algo %d, mode %d: %s\n", - cipher_algo, cipher_mode, gpg_strerror (err)); - - blocklen = gcry_cipher_get_algo_blklen (cipher_algo); - if (!blocklen || blocklen > sizeof output) - die ("invalid block length %d\n", blocklen); - - - gcry_cipher_ctl (hd, PRIV_CTL_DISABLE_WEAK_KEY, NULL, 0); - - err = gcry_cipher_setkey (hd, key_buffer, key_buflen); - if (err) - die ("gcry_cipher_setkey failed with keylen %u: %s\n", - (unsigned int)key_buflen, gpg_strerror (err)); - - if (iv_buffer) - { - err = gcry_cipher_setiv (hd, iv_buffer, iv_buflen); - if (err) - die ("gcry_cipher_setiv failed with ivlen %u: %s\n", - (unsigned int)iv_buflen, gpg_strerror (err)); - } - - if (datalen != blocklen) - die ("length of input (%u) does not match block length (%u)\n", - (unsigned int)datalen, (unsigned int)blocklen); - memcpy (input, data, datalen); - memset (output, 0, sizeof output); - for (count=0; count < iterations; count++) - { - memcpy (last_last_output, last_output, sizeof last_output); - memcpy (last_output, output, sizeof output); - - get_current_iv (hd, last_iv, blocklen); - - if (encrypt_mode) - err = gcry_cipher_encrypt (hd, output, blocklen, input, blocklen); - else - err = gcry_cipher_decrypt (hd, output, blocklen, input, blocklen); - if (err) - die ("gcry_cipher_%scrypt failed: %s\n", - encrypt_mode? "en":"de", gpg_strerror (err)); - - - if (encrypt_mode && (cipher_mode == GCRY_CIPHER_MODE_CFB - || cipher_mode == GCRY_CIPHER_MODE_CBC)) - memcpy (input, last_iv, blocklen); - else if (cipher_mode == GCRY_CIPHER_MODE_OFB) - memcpy (input, last_iv, blocklen); - else if (!encrypt_mode && cipher_mode == GCRY_CIPHER_MODE_CFB) - { - /* Reconstruct the output vector. */ - int i; - for (i=0; i < blocklen; i++) - input[i] ^= output[i]; - } - else - memcpy (input, output, blocklen); - } - - print_buffer (output, blocklen); - putchar ('\n'); - print_buffer (last_output, blocklen); - putchar ('\n'); - print_buffer (last_last_output, blocklen); - putchar ('\n'); - get_current_iv (hd, last_iv, blocklen); - print_buffer (last_iv, blocklen); /* Last output vector. */ - putchar ('\n'); - print_buffer (input, blocklen); /* Next input text. */ - putchar ('\n'); - if (verbose > 1) - showhex ("sent line", "", 0); - putchar ('\n'); - fflush (stdout); - - gcry_cipher_close (hd); -} - - - -/* Run a digest operation. */ -static void -run_digest (int digest_algo, const void *data, size_t datalen) -{ - gpg_error_t err; - gcry_md_hd_t hd; - const unsigned char *digest; - unsigned int digestlen; - - err = gcry_md_open (&hd, digest_algo, 0); - if (err) - die ("gcry_md_open failed for algo %d: %s\n", - digest_algo, gpg_strerror (err)); - - gcry_md_write (hd, data, datalen); - digest = gcry_md_read (hd, digest_algo); - digestlen = gcry_md_get_algo_dlen (digest_algo); - print_buffer (digest, digestlen); - gcry_md_close (hd); -} - - -/* Run a HMAC operation. */ -static void -run_hmac (int digest_algo, const void *key, size_t keylen, - const void *data, size_t datalen) -{ - gpg_error_t err; - gcry_md_hd_t hd; - const unsigned char *digest; - unsigned int digestlen; - - err = gcry_md_open (&hd, digest_algo, GCRY_MD_FLAG_HMAC); - if (err) - die ("gcry_md_open failed for HMAC algo %d: %s\n", - digest_algo, gpg_strerror (err)); - - gcry_md_setkey (hd, key, keylen); - if (err) - die ("gcry_md_setkey failed for HMAC algo %d: %s\n", - digest_algo, gpg_strerror (err)); - - gcry_md_write (hd, data, datalen); - digest = gcry_md_read (hd, digest_algo); - digestlen = gcry_md_get_algo_dlen (digest_algo); - print_buffer (digest, digestlen); - gcry_md_close (hd); -} - - - -/* Derive an RSA key using the S-expression in (DATA,DATALEN). This - S-expression is used directly as input to gcry_pk_genkey. The - result is printed to stdout with one parameter per line in hex - format and in this order: p, q, n, d. */ -static void -run_rsa_derive (const void *data, size_t datalen) -{ - gpg_error_t err; - gcry_sexp_t s_keyspec, s_key, s_top, l1; - gcry_mpi_t mpi; - const char *parmlist; - int idx; - - if (!datalen) - err = gpg_error (GPG_ERR_NO_DATA); - else - err = gcry_sexp_new (&s_keyspec, data, datalen, 1); - if (err) - die ("gcry_sexp_new failed for RSA key derive: %s\n", - gpg_strerror (err)); - - err = gcry_pk_genkey (&s_key, s_keyspec); - if (err) - die ("gcry_pk_genkey failed for RSA: %s\n", gpg_strerror (err)); - - gcry_sexp_release (s_keyspec); - - /* P and Q might have been swapped but we need to to return them in - the proper order. Build the parameter list accordingly. */ - parmlist = "pqnd"; - s_top = gcry_sexp_find_token (s_key, "misc-key-info", 0); - if (s_top) - { - l1 = gcry_sexp_find_token (s_top, "p-q-swapped", 0); - if (l1) - parmlist = "qpnd"; - gcry_sexp_release (l1); - gcry_sexp_release (s_top); - } - - /* Parse and print the parameters. */ - l1 = gcry_sexp_find_token (s_key, "private-key", 0); - s_top = gcry_sexp_find_token (l1, "rsa", 0); - gcry_sexp_release (l1); - if (!s_top) - die ("private-key part not found in result\n"); - - for (idx=0; parmlist[idx]; idx++) - { - l1 = gcry_sexp_find_token (s_top, parmlist+idx, 1); - mpi = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG); - gcry_sexp_release (l1); - if (!mpi) - die ("parameter %c missing in private-key\n", parmlist[idx]); - print_mpi_line (mpi, 1); - gcry_mpi_release (mpi); - } - - gcry_sexp_release (s_top); - gcry_sexp_release (s_key); -} - - - -static size_t -compute_tag_length (size_t n) -{ - int needed = 0; - - if (n < 128) - needed += 2; /* Tag and one length byte. */ - else if (n < 256) - needed += 3; /* Tag, number of length bytes, 1 length byte. */ - else if (n < 65536) - needed += 4; /* Tag, number of length bytes, 2 length bytes. */ - else - die ("DER object too long to encode\n"); - - return needed; -} - -static unsigned char * -store_tag_length (unsigned char *p, int tag, size_t n) -{ - if (tag == TAG_SEQUENCE) - tag |= 0x20; /* constructed */ - - *p++ = tag; - if (n < 128) - *p++ = n; - else if (n < 256) - { - *p++ = 0x81; - *p++ = n; - } - else if (n < 65536) - { - *p++ = 0x82; - *p++ = n >> 8; - *p++ = n; - } - - return p; -} - - -/* Generate an RSA key of size KEYSIZE using the public exponent - PUBEXP and print it to stdout in the OpenSSL format. The format - is: - - SEQUENCE { - INTEGER (0) -- Unknown constant. - INTEGER -- n - INTEGER -- e - INTEGER -- d - INTEGER -- p - INTEGER -- q (with p < q) - INTEGER -- dmp1 = d mod (p-1) - INTEGER -- dmq1 = d mod (q-1) - INTEGER -- u = p^{-1} mod q - } - -*/ -static void -run_rsa_gen (int keysize, int pubexp) -{ - gpg_error_t err; - gcry_sexp_t keyspec, key, l1; - const char keyelems[] = "nedpq..u"; - gcry_mpi_t keyparms[8]; - size_t keyparmslen[8]; - int idx; - size_t derlen, needed, n; - unsigned char *derbuf, *der; - - err = gcry_sexp_build (&keyspec, NULL, - "(genkey (rsa (nbits %d)(rsa-use-e %d)))", - keysize, pubexp); - if (err) - die ("gcry_sexp_build failed for RSA key generation: %s\n", - gpg_strerror (err)); - - err = gcry_pk_genkey (&key, keyspec); - if (err) - die ("gcry_pk_genkey failed for RSA: %s\n", gpg_strerror (err)); - - gcry_sexp_release (keyspec); - - l1 = gcry_sexp_find_token (key, "private-key", 0); - if (!l1) - die ("private key not found in genkey result\n"); - gcry_sexp_release (key); - key = l1; - - l1 = gcry_sexp_find_token (key, "rsa", 0); - if (!l1) - die ("returned private key not formed as expected\n"); - gcry_sexp_release (key); - key = l1; - - /* Extract the parameters from the S-expression and store them in a - well defined order in KEYPARMS. */ - for (idx=0; idx < DIM(keyparms); idx++) - { - if (keyelems[idx] == '.') - { - keyparms[idx] = gcry_mpi_new (0); - continue; - } - l1 = gcry_sexp_find_token (key, keyelems+idx, 1); - if (!l1) - die ("no %c parameter in returned private key\n", keyelems[idx]); - keyparms[idx] = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG); - if (!keyparms[idx]) - die ("no value for %c parameter in returned private key\n", - keyelems[idx]); - gcry_sexp_release (l1); - } - - gcry_sexp_release (key); - - /* Check that p < q; if not swap p and q and recompute u. */ - if (gcry_mpi_cmp (keyparms[3], keyparms[4]) > 0) - { - gcry_mpi_swap (keyparms[3], keyparms[4]); - gcry_mpi_invm (keyparms[7], keyparms[3], keyparms[4]); - } - - /* Compute the additional parameters. */ - gcry_mpi_sub_ui (keyparms[5], keyparms[3], 1); - gcry_mpi_mod (keyparms[5], keyparms[2], keyparms[5]); - gcry_mpi_sub_ui (keyparms[6], keyparms[4], 1); - gcry_mpi_mod (keyparms[6], keyparms[2], keyparms[6]); - - /* Compute the length of the DER encoding. */ - needed = compute_tag_length (1) + 1; - for (idx=0; idx < DIM(keyparms); idx++) - { - err = gcry_mpi_print (GCRYMPI_FMT_STD, NULL, 0, &n, keyparms[idx]); - if (err) - die ("error formatting parameter: %s\n", gpg_strerror (err)); - keyparmslen[idx] = n; - needed += compute_tag_length (n) + n; - } - - /* Store the key parameters. */ - derlen = compute_tag_length (needed) + needed; - der = derbuf = gcry_xmalloc (derlen); - - der = store_tag_length (der, TAG_SEQUENCE, needed); - der = store_tag_length (der, TAG_INTEGER, 1); - *der++ = 0; - for (idx=0; idx < DIM(keyparms); idx++) - { - der = store_tag_length (der, TAG_INTEGER, keyparmslen[idx]); - err = gcry_mpi_print (GCRYMPI_FMT_STD, der, - keyparmslen[idx], NULL, keyparms[idx]); - if (err) - die ("error formatting parameter: %s\n", gpg_strerror (err)); - der += keyparmslen[idx]; - } - - /* Print the stuff. */ - for (idx=0; idx < DIM(keyparms); idx++) - gcry_mpi_release (keyparms[idx]); - - assert (der - derbuf == derlen); - - if (base64_output) - puts ("-----BEGIN RSA PRIVATE KEY-----"); - print_buffer (derbuf, derlen); - if (base64_output) - puts ("-----END RSA PRIVATE KEY-----"); - - gcry_free (derbuf); -} - - - -/* Sign DATA of length DATALEN using the key taken from the PEM - encoded KEYFILE and the hash algorithm HASHALGO. */ -static void -run_rsa_sign (const void *data, size_t datalen, - int hashalgo, int pkcs1, const char *keyfile) - -{ - gpg_error_t err; - gcry_sexp_t s_data, s_key, s_sig, s_tmp; - gcry_mpi_t sig_mpi = NULL; - unsigned char *outbuf; - size_t outlen; - -/* showhex ("D", data, datalen); */ - if (pkcs1) - { - unsigned char hash[64]; - unsigned int hashsize; - - hashsize = gcry_md_get_algo_dlen (hashalgo); - if (!hashsize || hashsize > sizeof hash) - die ("digest too long for buffer or unknown hash algorithm\n"); - gcry_md_hash_buffer (hashalgo, hash, data, datalen); - err = gcry_sexp_build (&s_data, NULL, - "(data (flags pkcs1)(hash %s %b))", - gcry_md_algo_name (hashalgo), - (int)hashsize, hash); - } - else - { - gcry_mpi_t tmp; - - err = gcry_mpi_scan (&tmp, GCRYMPI_FMT_USG, data, datalen,NULL); - if (!err) - { - err = gcry_sexp_build (&s_data, NULL, - "(data (flags raw)(value %m))", tmp); - gcry_mpi_release (tmp); - } - } - if (err) - die ("gcry_sexp_build failed for RSA data input: %s\n", - gpg_strerror (err)); - - s_key = read_private_key_file (keyfile, 0); - - err = gcry_pk_sign (&s_sig, s_data, s_key); - if (err) - { - gcry_sexp_release (read_private_key_file (keyfile, 1)); - die ("gcry_pk_signed failed (datalen=%d,keyfile=%s): %s\n", - (int)datalen, keyfile, gpg_strerror (err)); - } - gcry_sexp_release (s_key); - gcry_sexp_release (s_data); - - s_tmp = gcry_sexp_find_token (s_sig, "sig-val", 0); - if (s_tmp) - { - gcry_sexp_release (s_sig); - s_sig = s_tmp; - s_tmp = gcry_sexp_find_token (s_sig, "rsa", 0); - if (s_tmp) - { - gcry_sexp_release (s_sig); - s_sig = s_tmp; - s_tmp = gcry_sexp_find_token (s_sig, "s", 0); - if (s_tmp) - { - gcry_sexp_release (s_sig); - s_sig = s_tmp; - sig_mpi = gcry_sexp_nth_mpi (s_sig, 1, GCRYMPI_FMT_USG); - } - } - } - gcry_sexp_release (s_sig); - - if (!sig_mpi) - die ("no value in returned S-expression\n"); - err = gcry_mpi_aprint (GCRYMPI_FMT_STD, &outbuf, &outlen, sig_mpi); - if (err) - die ("gcry_mpi_aprint failed: %s\n", gpg_strerror (err)); - gcry_mpi_release (sig_mpi); - - print_buffer (outbuf, outlen); - gcry_free (outbuf); -} - - - -/* Verify DATA of length DATALEN using the public key taken from the - PEM encoded KEYFILE and the hash algorithm HASHALGO against the - binary signature in SIGFILE. */ -static void -run_rsa_verify (const void *data, size_t datalen, int hashalgo, int pkcs1, - const char *keyfile, const char *sigfile) - -{ - gpg_error_t err; - gcry_sexp_t s_data, s_key, s_sig; - - if (pkcs1) - { - unsigned char hash[64]; - unsigned int hashsize; - - hashsize = gcry_md_get_algo_dlen (hashalgo); - if (!hashsize || hashsize > sizeof hash) - die ("digest too long for buffer or unknown hash algorithm\n"); - gcry_md_hash_buffer (hashalgo, hash, data, datalen); - err = gcry_sexp_build (&s_data, NULL, - "(data (flags pkcs1)(hash %s %b))", - gcry_md_algo_name (hashalgo), - (int)hashsize, hash); - } - else - { - gcry_mpi_t tmp; - - err = gcry_mpi_scan (&tmp, GCRYMPI_FMT_USG, data, datalen,NULL); - if (!err) - { - err = gcry_sexp_build (&s_data, NULL, - "(data (flags raw)(value %m))", tmp); - gcry_mpi_release (tmp); - } - } - if (err) - die ("gcry_sexp_build failed for RSA data input: %s\n", - gpg_strerror (err)); - - s_key = read_public_key_file (keyfile, 0); - - s_sig = read_sig_file (sigfile); - - err = gcry_pk_verify (s_sig, s_data, s_key); - if (!err) - puts ("GOOD signature"); - else if (gpg_err_code (err) == GPG_ERR_BAD_SIGNATURE) - puts ("BAD signature"); - else - printf ("ERROR (%s)\n", gpg_strerror (err)); - - gcry_sexp_release (s_sig); - gcry_sexp_release (s_key); - gcry_sexp_release (s_data); -} - - - -/* Generate a DSA key of size KEYSIZE and return the complete - S-expression. */ -static gcry_sexp_t -dsa_gen (int keysize) -{ - gpg_error_t err; - gcry_sexp_t keyspec, key; - - err = gcry_sexp_build (&keyspec, NULL, - "(genkey (dsa (nbits %d)(use-fips186-2)))", - keysize); - if (err) - die ("gcry_sexp_build failed for DSA key generation: %s\n", - gpg_strerror (err)); - - err = gcry_pk_genkey (&key, keyspec); - if (err) - die ("gcry_pk_genkey failed for DSA: %s\n", gpg_strerror (err)); - - gcry_sexp_release (keyspec); - - return key; -} - - -/* Generate a DSA key of size KEYSIZE and return the complete - S-expression. */ -static gcry_sexp_t -dsa_gen_with_seed (int keysize, const void *seed, size_t seedlen) -{ - gpg_error_t err; - gcry_sexp_t keyspec, key; - - err = gcry_sexp_build (&keyspec, NULL, - "(genkey" - " (dsa" - " (nbits %d)" - " (use-fips186-2)" - " (derive-parms" - " (seed %b))))", - keysize, (int)seedlen, seed); - if (err) - die ("gcry_sexp_build failed for DSA key generation: %s\n", - gpg_strerror (err)); - - err = gcry_pk_genkey (&key, keyspec); - if (err) - die ("gcry_pk_genkey failed for DSA: %s\n", gpg_strerror (err)); - - gcry_sexp_release (keyspec); - - return key; -} - - -/* Print the domain parameter as well as the derive information. KEY - is the complete key as returned by dsa_gen. We print to stdout - with one parameter per line in hex format using this order: p, q, - g, seed, counter, h. */ -static void -print_dsa_domain_parameters (gcry_sexp_t key) -{ - gcry_sexp_t l1, l2; - gcry_mpi_t mpi; - int idx; - const void *data; - size_t datalen; - char *string; - - l1 = gcry_sexp_find_token (key, "public-key", 0); - if (!l1) - die ("public key not found in genkey result\n"); - - l2 = gcry_sexp_find_token (l1, "dsa", 0); - if (!l2) - die ("returned public key not formed as expected\n"); - gcry_sexp_release (l1); - l1 = l2; - - /* Extract the parameters from the S-expression and print them to stdout. */ - for (idx=0; "pqg"[idx]; idx++) - { - l2 = gcry_sexp_find_token (l1, "pqg"+idx, 1); - if (!l2) - die ("no %c parameter in returned public key\n", "pqg"[idx]); - mpi = gcry_sexp_nth_mpi (l2, 1, GCRYMPI_FMT_USG); - if (!mpi) - die ("no value for %c parameter in returned public key\n","pqg"[idx]); - gcry_sexp_release (l2); - if (standalone_mode) - printf ("%c = ", "PQG"[idx]); - print_mpi_line (mpi, 1); - gcry_mpi_release (mpi); - } - gcry_sexp_release (l1); - - /* Extract the seed values. */ - l1 = gcry_sexp_find_token (key, "misc-key-info", 0); - if (!l1) - die ("misc-key-info not found in genkey result\n"); - - l2 = gcry_sexp_find_token (l1, "seed-values", 0); - if (!l2) - die ("no seed-values in returned key\n"); - gcry_sexp_release (l1); - l1 = l2; - - l2 = gcry_sexp_find_token (l1, "seed", 0); - if (!l2) - die ("no seed value in returned key\n"); - data = gcry_sexp_nth_data (l2, 1, &datalen); - if (!data) - die ("no seed value in returned key\n"); - if (standalone_mode) - printf ("Seed = "); - print_data_line (data, datalen); - gcry_sexp_release (l2); - - l2 = gcry_sexp_find_token (l1, "counter", 0); - if (!l2) - die ("no counter value in returned key\n"); - string = gcry_sexp_nth_string (l2, 1); - if (!string) - die ("no counter value in returned key\n"); - if (standalone_mode) - printf ("c = %ld\n", strtoul (string, NULL, 10)); - else - printf ("%lX\n", strtoul (string, NULL, 10)); - gcry_free (string); - gcry_sexp_release (l2); - - l2 = gcry_sexp_find_token (l1, "h", 0); - if (!l2) - die ("no n value in returned key\n"); - mpi = gcry_sexp_nth_mpi (l2, 1, GCRYMPI_FMT_USG); - if (!mpi) - die ("no h value in returned key\n"); - if (standalone_mode) - printf ("H = "); - print_mpi_line (mpi, 1); - gcry_mpi_release (mpi); - gcry_sexp_release (l2); - - gcry_sexp_release (l1); -} - - -/* Generate DSA domain parameters for a modulus size of KEYSIZE. The - result is printed to stdout with one parameter per line in hex - format and in this order: p, q, g, seed, counter, h. If SEED is - not NULL this seed value will be used for the generation. */ -static void -run_dsa_pqg_gen (int keysize, const void *seed, size_t seedlen) -{ - gcry_sexp_t key; - - if (seed) - key = dsa_gen_with_seed (keysize, seed, seedlen); - else - key = dsa_gen (keysize); - print_dsa_domain_parameters (key); - gcry_sexp_release (key); -} - - -/* Generate a DSA key of size of KEYSIZE and write the private key to - FILENAME. Also write the parameters to stdout in the same way as - run_dsa_pqg_gen. */ -static void -run_dsa_gen (int keysize, const char *filename) -{ - gcry_sexp_t key, private_key; - FILE *fp; - - key = dsa_gen (keysize); - private_key = gcry_sexp_find_token (key, "private-key", 0); - if (!private_key) - die ("private key not found in genkey result\n"); - print_dsa_domain_parameters (key); - - fp = fopen (filename, "wb"); - if (!fp) - die ("can't create `%s': %s\n", filename, strerror (errno)); - print_sexp (private_key, fp); - fclose (fp); - - gcry_sexp_release (private_key); - gcry_sexp_release (key); -} - - - -/* Sign DATA of length DATALEN using the key taken from the S-expression - encoded KEYFILE. */ -static void -run_dsa_sign (const void *data, size_t datalen, const char *keyfile) - -{ - gpg_error_t err; - gcry_sexp_t s_data, s_key, s_sig, s_tmp, s_tmp2; - char hash[20]; - gcry_mpi_t tmpmpi; - - gcry_md_hash_buffer (GCRY_MD_SHA1, hash, data, datalen); - err = gcry_mpi_scan (&tmpmpi, GCRYMPI_FMT_USG, hash, 20, NULL); - if (!err) - { - err = gcry_sexp_build (&s_data, NULL, - "(data (flags raw)(value %m))", tmpmpi); - gcry_mpi_release (tmpmpi); - } - if (err) - die ("gcry_sexp_build failed for DSA data input: %s\n", - gpg_strerror (err)); - - s_key = read_sexp_from_file (keyfile); - - err = gcry_pk_sign (&s_sig, s_data, s_key); - if (err) - { - gcry_sexp_release (read_private_key_file (keyfile, 1)); - die ("gcry_pk_signed failed (datalen=%d,keyfile=%s): %s\n", - (int)datalen, keyfile, gpg_strerror (err)); - } - gcry_sexp_release (s_data); - - /* We need to return the Y parameter first. */ - s_tmp = gcry_sexp_find_token (s_key, "private-key", 0); - if (!s_tmp) - die ("private key part not found in provided key\n"); - - s_tmp2 = gcry_sexp_find_token (s_tmp, "dsa", 0); - if (!s_tmp2) - die ("private key part is not a DSA key\n"); - gcry_sexp_release (s_tmp); - - s_tmp = gcry_sexp_find_token (s_tmp2, "y", 0); - tmpmpi = gcry_sexp_nth_mpi (s_tmp, 1, GCRYMPI_FMT_USG); - if (!tmpmpi) - die ("no y parameter in DSA key\n"); - print_mpi_line (tmpmpi, 1); - gcry_mpi_release (tmpmpi); - gcry_sexp_release (s_tmp); - - gcry_sexp_release (s_key); - - - /* Now return the actual signature. */ - s_tmp = gcry_sexp_find_token (s_sig, "sig-val", 0); - if (!s_tmp) - die ("no sig-val element in returned S-expression\n"); - - gcry_sexp_release (s_sig); - s_sig = s_tmp; - s_tmp = gcry_sexp_find_token (s_sig, "dsa", 0); - if (!s_tmp) - die ("no dsa element in returned S-expression\n"); - - gcry_sexp_release (s_sig); - s_sig = s_tmp; - - s_tmp = gcry_sexp_find_token (s_sig, "r", 0); - tmpmpi = gcry_sexp_nth_mpi (s_tmp, 1, GCRYMPI_FMT_USG); - if (!tmpmpi) - die ("no r parameter in returned S-expression\n"); - print_mpi_line (tmpmpi, 1); - gcry_mpi_release (tmpmpi); - gcry_sexp_release (s_tmp); - - s_tmp = gcry_sexp_find_token (s_sig, "s", 0); - tmpmpi = gcry_sexp_nth_mpi (s_tmp, 1, GCRYMPI_FMT_USG); - if (!tmpmpi) - die ("no s parameter in returned S-expression\n"); - print_mpi_line (tmpmpi, 1); - gcry_mpi_release (tmpmpi); - gcry_sexp_release (s_tmp); - - gcry_sexp_release (s_sig); -} - - - -/* Verify DATA of length DATALEN using the public key taken from the - S-expression in KEYFILE against the S-expression formatted - signature in SIGFILE. */ -static void -run_dsa_verify (const void *data, size_t datalen, - const char *keyfile, const char *sigfile) - -{ - gpg_error_t err; - gcry_sexp_t s_data, s_key, s_sig; - char hash[20]; - gcry_mpi_t tmpmpi; - - gcry_md_hash_buffer (GCRY_MD_SHA1, hash, data, datalen); - /* Note that we can't simply use %b with HASH to build the - S-expression, because that might yield a negative value. */ - err = gcry_mpi_scan (&tmpmpi, GCRYMPI_FMT_USG, hash, 20, NULL); - if (!err) - { - err = gcry_sexp_build (&s_data, NULL, - "(data (flags raw)(value %m))", tmpmpi); - gcry_mpi_release (tmpmpi); - } - if (err) - die ("gcry_sexp_build failed for DSA data input: %s\n", - gpg_strerror (err)); - - s_key = read_sexp_from_file (keyfile); - s_sig = read_sexp_from_file (sigfile); - - err = gcry_pk_verify (s_sig, s_data, s_key); - if (!err) - puts ("GOOD signature"); - else if (gpg_err_code (err) == GPG_ERR_BAD_SIGNATURE) - puts ("BAD signature"); - else - printf ("ERROR (%s)\n", gpg_strerror (err)); - - gcry_sexp_release (s_sig); - gcry_sexp_release (s_key); - gcry_sexp_release (s_data); -} - - - - -static void -usage (int show_help) -{ - if (!show_help) - { - fputs ("usage: " PGM - " [OPTION] [FILE] (try --help for more information)\n", stderr); - exit (2); - } - fputs - ("Usage: " PGM " [OPTIONS] MODE [FILE]\n" - "Run a crypto operation using hex encoded input and output.\n" - "MODE:\n" - " encrypt, decrypt, digest, random, hmac-sha,\n" - " rsa-{derive,gen,sign,verify}, dsa-{pqg-gen,gen,sign,verify}\n" - "OPTIONS:\n" - " --verbose Print additional information\n" - " --binary Input and output is in binary form\n" - " --no-fips Do not force FIPS mode\n" - " --key KEY Use the hex encoded KEY\n" - " --iv IV Use the hex encoded IV\n" - " --dt DT Use the hex encoded DT for the RNG\n" - " --algo NAME Use algorithm NAME\n" - " --keysize N Use a keysize of N bits\n" - " --signature NAME Take signature from file NAME\n" - " --chunk N Read in chunks of N bytes (implies --binary)\n" - " --pkcs1 Use PKCS#1 encoding\n" - " --mct-server Run a monte carlo test server\n" - " --loop Enable random loop mode\n" - " --progress Print pogress indicators\n" - " --help Print this text\n" - "With no FILE, or when FILE is -, read standard input.\n" - "Report bugs to " PACKAGE_BUGREPORT ".\n" , stdout); - exit (0); -} - -int -main (int argc, char **argv) -{ - int last_argc = -1; - gpg_error_t err; - int no_fips = 0; - int progress = 0; - int use_pkcs1 = 0; - const char *mode_string; - const char *key_string = NULL; - const char *iv_string = NULL; - const char *dt_string = NULL; - const char *algo_string = NULL; - const char *keysize_string = NULL; - const char *signature_string = NULL; - FILE *input; - void *data; - size_t datalen; - size_t chunksize = 0; - int mct_server = 0; - - - if (argc) - { argc--; argv++; } - - while (argc && last_argc != argc ) - { - last_argc = argc; - if (!strcmp (*argv, "--")) - { - argc--; argv++; - break; - } - else if (!strcmp (*argv, "--help")) - { - usage (1); - } - else if (!strcmp (*argv, "--version")) - { - fputs (PGM " (Libgcrypt) " PACKAGE_VERSION "\n", stdout); - exit (0); - } - else if (!strcmp (*argv, "--verbose")) - { - verbose++; - argc--; argv++; - } - else if (!strcmp (*argv, "--binary")) - { - binary_input = binary_output = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--no-fips")) - { - no_fips++; - argc--; argv++; - } - else if (!strcmp (*argv, "--loop")) - { - loop_mode = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--progress")) - { - progress = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--key")) - { - argc--; argv++; - if (!argc) - usage (0); - key_string = *argv; - argc--; argv++; - } - else if (!strcmp (*argv, "--iv")) - { - argc--; argv++; - if (!argc) - usage (0); - iv_string = *argv; - argc--; argv++; - } - else if (!strcmp (*argv, "--dt")) - { - argc--; argv++; - if (!argc) - usage (0); - dt_string = *argv; - argc--; argv++; - } - else if (!strcmp (*argv, "--algo")) - { - argc--; argv++; - if (!argc) - usage (0); - algo_string = *argv; - argc--; argv++; - } - else if (!strcmp (*argv, "--keysize")) - { - argc--; argv++; - if (!argc) - usage (0); - keysize_string = *argv; - argc--; argv++; - } - else if (!strcmp (*argv, "--signature")) - { - argc--; argv++; - if (!argc) - usage (0); - signature_string = *argv; - argc--; argv++; - } - else if (!strcmp (*argv, "--chunk")) - { - argc--; argv++; - if (!argc) - usage (0); - chunksize = atoi (*argv); - binary_input = binary_output = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--pkcs1")) - { - use_pkcs1 = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--mct-server")) - { - mct_server = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--standalone")) - { - standalone_mode = 1; - argc--; argv++; - } - } - - if (!argc || argc > 2) - usage (0); - mode_string = *argv; - - if (!strcmp (mode_string, "rsa-derive")) - binary_input = 1; - - if (argc == 2 && strcmp (argv[1], "-")) - { - input = fopen (argv[1], binary_input? "rb":"r"); - if (!input) - die ("can't open `%s': %s\n", argv[1], strerror (errno)); - } - else - input = stdin; - -#ifndef HAVE_W32_SYSTEM - if (loop_mode) - signal (SIGPIPE, SIG_IGN); -#endif - - if (verbose) - fprintf (stderr, PGM ": started (mode=%s)\n", mode_string); - - gcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose); - if (!no_fips) - gcry_control (GCRYCTL_FORCE_FIPS_MODE, 0); - if (!gcry_check_version ("1.4.3")) - die ("Libgcrypt is not sufficient enough\n"); - if (verbose) - fprintf (stderr, PGM ": using Libgcrypt %s\n", gcry_check_version (NULL)); - if (no_fips) - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - - /* Most operations need some input data. */ - if (!chunksize - && !mct_server - && strcmp (mode_string, "random") - && strcmp (mode_string, "rsa-gen") - && strcmp (mode_string, "dsa-gen") ) - { - data = read_file (input, !binary_input, &datalen); - if (!data) - die ("error reading%s input\n", binary_input?"":" and decoding"); - if (verbose) - fprintf (stderr, PGM ": %u bytes of input data\n", - (unsigned int)datalen); - } - else - { - data = NULL; - datalen = 0; - } - - - if (!strcmp (mode_string, "encrypt") || !strcmp (mode_string, "decrypt")) - { - int cipher_algo, cipher_mode; - void *iv_buffer = NULL; - void *key_buffer = NULL; - size_t iv_buflen, key_buflen; - - if (!algo_string) - die ("option --algo is required in this mode\n"); - cipher_algo = map_openssl_cipher_name (algo_string, &cipher_mode); - if (!cipher_algo) - die ("cipher algorithm `%s' is not supported\n", algo_string); - if (mct_server) - { - int iterations; - - for (;;) - { - gcry_free (key_buffer); key_buffer = NULL; - gcry_free (iv_buffer); iv_buffer = NULL; - gcry_free (data); data = NULL; - if (!(key_buffer = read_textline (input))) - { - if (feof (input)) - break; - die ("no version info in input\n"); - } - if (atoi (key_buffer) != 1) - die ("unsupported input version %s\n", key_buffer); - gcry_free (key_buffer); - if (!(key_buffer = read_textline (input))) - die ("no iteration count in input\n"); - iterations = atoi (key_buffer); - gcry_free (key_buffer); - if (!(key_buffer = read_hexline (input, &key_buflen))) - die ("no key in input\n"); - if (!(iv_buffer = read_hexline (input, &iv_buflen))) - die ("no IV in input\n"); - if (!(data = read_hexline (input, &datalen))) - die ("no data in input\n"); - skip_to_empty_line (input); - - run_cipher_mct_loop ((*mode_string == 'e'), - cipher_algo, cipher_mode, - iv_buffer, iv_buflen, - key_buffer, key_buflen, - data, datalen, iterations); - } - } - else - { - if (cipher_mode != GCRY_CIPHER_MODE_ECB) - { - if (!iv_string) - die ("option --iv is required in this mode\n"); - iv_buffer = hex2buffer (iv_string, &iv_buflen); - if (!iv_buffer) - die ("invalid value for IV\n"); - } - else - { - iv_buffer = NULL; - iv_buflen = 0; - } - if (!key_string) - die ("option --key is required in this mode\n"); - key_buffer = hex2buffer (key_string, &key_buflen); - if (!key_buffer) - die ("invalid value for KEY\n"); - - run_encrypt_decrypt ((*mode_string == 'e'), - cipher_algo, cipher_mode, - iv_buffer, iv_buflen, - key_buffer, key_buflen, - data, data? datalen:chunksize, input); - } - gcry_free (key_buffer); - gcry_free (iv_buffer); - } - else if (!strcmp (mode_string, "digest")) - { - int algo; - - if (!algo_string) - die ("option --algo is required in this mode\n"); - algo = gcry_md_map_name (algo_string); - if (!algo) - die ("digest algorithm `%s' is not supported\n", algo_string); - if (!data) - die ("no data available (do not use --chunk)\n"); - - run_digest (algo, data, datalen); - } - else if (!strcmp (mode_string, "random")) - { - void *context; - unsigned char key[16]; - unsigned char seed[16]; - unsigned char dt[16]; - unsigned char buffer[16]; - size_t count = 0; - - if (hex2bin (key_string, key, 16) < 0 ) - die ("value for --key are not 32 hex digits\n"); - if (hex2bin (iv_string, seed, 16) < 0 ) - die ("value for --iv are not 32 hex digits\n"); - if (hex2bin (dt_string, dt, 16) < 0 ) - die ("value for --dt are not 32 hex digits\n"); - - /* The flag value 1 disables the dup check, so that the RNG - returns all generated data. */ - err = init_external_rng_test (&context, 1, key, 16, seed, 16, dt, 16); - if (err) - die ("init external RNG test failed: %s\n", gpg_strerror (err)); - - do - { - err = run_external_rng_test (context, buffer, sizeof buffer); - if (err) - die ("running external RNG test failed: %s\n", gpg_strerror (err)); - print_buffer (buffer, sizeof buffer); - if (progress) - { - if (!(++count % 1000)) - fprintf (stderr, PGM ": %lu random bytes so far\n", - (unsigned long int)count * sizeof buffer); - } - } - while (loop_mode); - - if (progress) - fprintf (stderr, PGM ": %lu random bytes\n", - (unsigned long int)count * sizeof buffer); - - deinit_external_rng_test (context); - } - else if (!strcmp (mode_string, "hmac-sha")) - { - int algo; - void *key_buffer; - size_t key_buflen; - - if (!data) - die ("no data available (do not use --chunk)\n"); - if (!algo_string) - die ("option --algo is required in this mode\n"); - switch (atoi (algo_string)) - { - case 1: algo = GCRY_MD_SHA1; break; - case 224: algo = GCRY_MD_SHA224; break; - case 256: algo = GCRY_MD_SHA256; break; - case 384: algo = GCRY_MD_SHA384; break; - case 512: algo = GCRY_MD_SHA512; break; - default: algo = 0; break; - } - if (!algo) - die ("no digest algorithm found for hmac type `%s'\n", algo_string); - if (!key_string) - die ("option --key is required in this mode\n"); - key_buffer = hex2buffer (key_string, &key_buflen); - if (!key_buffer) - die ("invalid value for KEY\n"); - - run_hmac (algo, key_buffer, key_buflen, data, datalen); - - gcry_free (key_buffer); - } - else if (!strcmp (mode_string, "rsa-derive")) - { - if (!data) - die ("no data available (do not use --chunk)\n"); - run_rsa_derive (data, datalen); - } - else if (!strcmp (mode_string, "rsa-gen")) - { - int keysize; - - if (!binary_output) - base64_output = 1; - - keysize = keysize_string? atoi (keysize_string) : 0; - if (keysize < 128 || keysize > 16384) - die ("invalid keysize specified; needs to be 128 .. 16384\n"); - run_rsa_gen (keysize, 65537); - } - else if (!strcmp (mode_string, "rsa-sign")) - { - int algo; - - if (!key_string) - die ("option --key is required in this mode\n"); - if (access (key_string, R_OK)) - die ("option --key needs to specify an existing keyfile\n"); - if (!algo_string) - die ("option --algo is required in this mode\n"); - algo = gcry_md_map_name (algo_string); - if (!algo) - die ("digest algorithm `%s' is not supported\n", algo_string); - if (!data) - die ("no data available (do not use --chunk)\n"); - - run_rsa_sign (data, datalen, algo, use_pkcs1, key_string); - - } - else if (!strcmp (mode_string, "rsa-verify")) - { - int algo; - - if (!key_string) - die ("option --key is required in this mode\n"); - if (access (key_string, R_OK)) - die ("option --key needs to specify an existing keyfile\n"); - if (!algo_string) - die ("option --algo is required in this mode\n"); - algo = gcry_md_map_name (algo_string); - if (!algo) - die ("digest algorithm `%s' is not supported\n", algo_string); - if (!data) - die ("no data available (do not use --chunk)\n"); - if (!signature_string) - die ("option --signature is required in this mode\n"); - if (access (signature_string, R_OK)) - die ("option --signature needs to specify an existing file\n"); - - run_rsa_verify (data, datalen, algo, use_pkcs1, key_string, - signature_string); - - } - else if (!strcmp (mode_string, "dsa-pqg-gen")) - { - int keysize; - - keysize = keysize_string? atoi (keysize_string) : 0; - if (keysize < 1024 || keysize > 3072) - die ("invalid keysize specified; needs to be 1024 .. 3072\n"); - run_dsa_pqg_gen (keysize, datalen? data:NULL, datalen); - } - else if (!strcmp (mode_string, "dsa-gen")) - { - int keysize; - - keysize = keysize_string? atoi (keysize_string) : 0; - if (keysize < 1024 || keysize > 3072) - die ("invalid keysize specified; needs to be 1024 .. 3072\n"); - if (!key_string) - die ("option --key is required in this mode\n"); - run_dsa_gen (keysize, key_string); - } - else if (!strcmp (mode_string, "dsa-sign")) - { - if (!key_string) - die ("option --key is required in this mode\n"); - if (access (key_string, R_OK)) - die ("option --key needs to specify an existing keyfile\n"); - if (!data) - die ("no data available (do not use --chunk)\n"); - - run_dsa_sign (data, datalen, key_string); - } - else if (!strcmp (mode_string, "dsa-verify")) - { - if (!key_string) - die ("option --key is required in this mode\n"); - if (access (key_string, R_OK)) - die ("option --key needs to specify an existing keyfile\n"); - if (!data) - die ("no data available (do not use --chunk)\n"); - if (!signature_string) - die ("option --signature is required in this mode\n"); - if (access (signature_string, R_OK)) - die ("option --signature needs to specify an existing file\n"); - - run_dsa_verify (data, datalen, key_string, signature_string); - } - else - usage (0); - - gcry_free (data); - - /* Because Libgcrypt does not enforce FIPS mode in all cases we let - the process die if Libgcrypt is not anymore in FIPS mode after - the actual operation. */ - if (!no_fips && !gcry_fips_mode_active ()) - die ("FIPS mode is not anymore active\n"); - - if (verbose) - fputs (PGM ": ready\n", stderr); - - return 0; -} - diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/hmac.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/hmac.c deleted file mode 100644 index 9d87dbb5b9..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/hmac.c +++ /dev/null @@ -1,171 +0,0 @@ -/* hmac.c - HMAC regression tests - * Copyright (C) 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> - -#include "../src/gcrypt.h" - -static int verbose; -static int error_count; - -static void -fail (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - error_count++; -} - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - - - -static void -check_one_mac (int algo, - const void *key, size_t keylen, - const void *data, size_t datalen, - const char *expect) -{ - gcry_md_hd_t hd; - unsigned char *p; - int mdlen; - int i; - gcry_error_t err = 0; - - err = gcry_md_open (&hd, algo, GCRY_MD_FLAG_HMAC); - if (err) - { - fail ("algo %d, grcy_md_open failed: %s\n", algo, gpg_strerror (err)); - return; - } - - mdlen = gcry_md_get_algo_dlen (algo); - if (mdlen < 1 || mdlen > 500) - { - fail ("algo %d, grcy_md_get_algo_dlen failed: %d\n", algo, mdlen); - return; - } - - err = gcry_md_setkey (hd, key, keylen); - if (err) - { - fail ("algo %d, grcy_md_setkey failed: %s\n", algo, gpg_strerror (err)); - return; - } - - gcry_md_write (hd, data, datalen); - - p = gcry_md_read (hd, 0); - - if (memcmp (p, expect, mdlen)) - { - printf ("computed: "); - for (i = 0; i < mdlen; i++) - printf ("%02x ", p[i] & 0xFF); - printf ("\nexpected: "); - for (i = 0; i < mdlen; i++) - printf ("%02x ", expect[i] & 0xFF); - printf ("\n"); - - fail ("algo %d, MAC does not match\n", algo); - } - - gcry_md_close (hd); -} - -static void -check_hmac (void) -{ - unsigned char key[128]; - int i, j; - - if (verbose) - fprintf (stderr, "checking FIPS-198a, A.1\n"); - for (i=0; i < 64; i++) - key[i] = i; - check_one_mac (GCRY_MD_SHA1, key, 64, "Sample #1", 9, - "\x4f\x4c\xa3\xd5\xd6\x8b\xa7\xcc\x0a\x12" - "\x08\xc9\xc6\x1e\x9c\x5d\xa0\x40\x3c\x0a"); - - if (verbose) - fprintf (stderr, "checking FIPS-198a, A.2\n"); - for (i=0, j=0x30; i < 20; i++) - key[i] = j++; - check_one_mac (GCRY_MD_SHA1, key, 20, "Sample #2", 9, - "\x09\x22\xd3\x40\x5f\xaa\x3d\x19\x4f\x82" - "\xa4\x58\x30\x73\x7d\x5c\xc6\xc7\x5d\x24"); - - if (verbose) - fprintf (stderr, "checking FIPS-198a, A.3\n"); - for (i=0, j=0x50; i < 100; i++) - key[i] = j++; - check_one_mac (GCRY_MD_SHA1, key, 100, "Sample #3", 9, - "\xbc\xf4\x1e\xab\x8b\xb2\xd8\x02\xf3\xd0" - "\x5c\xaf\x7c\xb0\x92\xec\xf8\xd1\xa3\xaa"); - - if (verbose) - fprintf (stderr, "checking FIPS-198a, A.4\n"); - for (i=0, j=0x70; i < 49; i++) - key[i] = j++; - check_one_mac (GCRY_MD_SHA1, key, 49, "Sample #4", 9, - "\x9e\xa8\x86\xef\xe2\x68\xdb\xec\xce\x42" - "\x0c\x75\x24\xdf\x32\xe0\x75\x1a\x2a\x26"); - -} - -int -main (int argc, char **argv) -{ - int debug = 0; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - check_hmac (); - - return error_count ? 1 : 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/keygen.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/keygen.c deleted file mode 100644 index f5d5610cb0..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/keygen.c +++ /dev/null @@ -1,311 +0,0 @@ -/* keygen.c - key generation regression tests - * Copyright (C) 2003, 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include "../src/gcrypt.h" - - - -static int verbose; -static int debug; -static int error_count; - -static void -fail ( const char *format, ... ) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - error_count++; -} - -static void -die ( const char *format, ... ) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - exit (1); -} - - -static void -print_mpi (const char *text, gcry_mpi_t a) -{ - char *buf; - void *bufaddr = &buf; - gcry_error_t rc; - - rc = gcry_mpi_aprint (GCRYMPI_FMT_HEX, bufaddr, NULL, a); - if (rc) - fprintf (stderr, "%s=[error printing number: %s]\n", - text, gpg_strerror (rc)); - else - { - fprintf (stderr, "%s=0x%s\n", text, buf); - gcry_free (buf); - } -} - - -static void -check_generated_rsa_key (gcry_sexp_t key, unsigned long expected_e) -{ - gcry_sexp_t skey, pkey, list; - - pkey = gcry_sexp_find_token (key, "public-key", 0); - if (!pkey) - fail ("public part missing in return value\n"); - else - { - gcry_mpi_t e = NULL; - - list = gcry_sexp_find_token (pkey, "e", 0); - if (!list || !(e=gcry_sexp_nth_mpi (list, 1, 0)) ) - fail ("public exponent not found\n"); - else if (!expected_e) - { - if (verbose) - print_mpi ("e", e); - } - else if ( gcry_mpi_cmp_ui (e, expected_e)) - { - print_mpi ("e", e); - fail ("public exponent is not %lu\n", expected_e); - } - gcry_sexp_release (list); - gcry_mpi_release (e); - gcry_sexp_release (pkey); - } - - skey = gcry_sexp_find_token (key, "private-key", 0); - if (!skey) - fail ("private part missing in return value\n"); - else - { - int rc = gcry_pk_testkey (skey); - if (rc) - fail ("gcry_pk_testkey failed: %s\n", gpg_strerror (rc)); - gcry_sexp_release (skey); - } - - } - -static void -check_rsa_keys (void) -{ - gcry_sexp_t keyparm, key; - int rc; - int i; - - /* Check that DSA generation works and that it can grok the qbits - argument. */ - if (verbose) - fprintf (stderr, "creating 5 1024 bit DSA keys\n"); - for (i=0; i < 5; i++) - { - rc = gcry_sexp_new (&keyparm, - "(genkey\n" - " (dsa\n" - " (nbits 4:1024)\n" - " ))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gpg_strerror (rc)); - rc = gcry_pk_genkey (&key, keyparm); - gcry_sexp_release (keyparm); - if (rc) - die ("error generating DSA key: %s\n", gpg_strerror (rc)); - gcry_sexp_release (key); - if (verbose) - fprintf (stderr, " done\n"); - } - - if (verbose) - fprintf (stderr, "creating 1536 bit DSA key\n"); - rc = gcry_sexp_new (&keyparm, - "(genkey\n" - " (dsa\n" - " (nbits 4:1536)\n" - " (qbits 3:224)\n" - " ))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gpg_strerror (rc)); - rc = gcry_pk_genkey (&key, keyparm); - gcry_sexp_release (keyparm); - if (rc) - die ("error generating DSA key: %s\n", gpg_strerror (rc)); - if (debug) - { - char buffer[20000]; - gcry_sexp_sprint (key, GCRYSEXP_FMT_ADVANCED, buffer, sizeof buffer); - if (verbose) - printf ("=============================\n%s\n" - "=============================\n", buffer); - } - gcry_sexp_release (key); - - if (verbose) - fprintf (stderr, "creating 1024 bit RSA key\n"); - rc = gcry_sexp_new (&keyparm, - "(genkey\n" - " (rsa\n" - " (nbits 4:1024)\n" - " ))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gpg_strerror (rc)); - rc = gcry_pk_genkey (&key, keyparm); - gcry_sexp_release (keyparm); - if (rc) - die ("error generating RSA key: %s\n", gpg_strerror (rc)); - - check_generated_rsa_key (key, 65537); - gcry_sexp_release (key); - - - if (verbose) - fprintf (stderr, "creating 512 bit RSA key with e=257\n"); - rc = gcry_sexp_new (&keyparm, - "(genkey\n" - " (rsa\n" - " (nbits 3:512)\n" - " (rsa-use-e 3:257)\n" - " ))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gpg_strerror (rc)); - rc = gcry_pk_genkey (&key, keyparm); - gcry_sexp_release (keyparm); - if (rc) - die ("error generating RSA key: %s\n", gpg_strerror (rc)); - - check_generated_rsa_key (key, 257); - gcry_sexp_release (key); - - if (verbose) - fprintf (stderr, "creating 512 bit RSA key with default e\n"); - rc = gcry_sexp_new (&keyparm, - "(genkey\n" - " (rsa\n" - " (nbits 3:512)\n" - " (rsa-use-e 1:0)\n" - " ))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gpg_strerror (rc)); - rc = gcry_pk_genkey (&key, keyparm); - gcry_sexp_release (keyparm); - if (rc) - die ("error generating RSA key: %s\n", gpg_strerror (rc)); - - check_generated_rsa_key (key, 0); /* We don't expect a constant exponent. */ - gcry_sexp_release (key); - -} - - -static void -check_nonce (void) -{ - char a[32], b[32]; - int i,j; - int oops=0; - - if (verbose) - fprintf (stderr, "checking gcry_create_nonce\n"); - - gcry_create_nonce (a, sizeof a); - for (i=0; i < 10; i++) - { - gcry_create_nonce (b, sizeof b); - if (!memcmp (a, b, sizeof a)) - die ("identical nounce found\n"); - } - for (i=0; i < 10; i++) - { - gcry_create_nonce (a, sizeof a); - if (!memcmp (a, b, sizeof a)) - die ("identical nounce found\n"); - } - - again: - for (i=1,j=0; i < sizeof a; i++) - if (a[0] == a[i]) - j++; - if (j+1 == sizeof (a)) - { - if (oops) - die ("impossible nonce found\n"); - oops++; - gcry_create_nonce (a, sizeof a); - goto again; - } -} - - -static void -progress_cb (void *cb_data, const char *what, int printchar, - int current, int total) -{ - (void)cb_data; - (void)what; - (void)current; - (void)total; - - if (printchar == '\n') - fputs ( "<LF>", stdout); - else - putchar (printchar); - fflush (stdout); -} - - -int -main (int argc, char **argv) -{ - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); - /* No valuable keys are create, so we can speed up our RNG. */ - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - if (verbose) - gcry_set_progress_handler ( progress_cb, NULL ); - - check_rsa_keys (); - check_nonce (); - - return error_count? 1:0; -} - diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/keygrip.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/keygrip.c deleted file mode 100644 index e1908ba3e4..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/keygrip.c +++ /dev/null @@ -1,208 +0,0 @@ -/* keygrip.c - verifies that keygrips are calculated as expected - * Copyright (C) 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <assert.h> - -#include "../src/gcrypt.h" - -static int verbose; - - - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - -static void -print_hex (const char *text, const void *buf, size_t n) -{ - const unsigned char *p = buf; - - fputs (text, stdout); - for (; n; n--, p++) - printf ("%02X", *p); - putchar ('\n'); -} - - - - -static struct -{ - int algo; - const char *key; - const unsigned char grip[20]; -} key_grips[] = - { - { - GCRY_PK_RSA, - "(private-key" - " (rsa" - " (n #00B6B509596A9ECABC939212F891E656A626BA07DA8521A9CAD4C08E640C04052FBB87F424EF1A0275A48A9299AC9DB69ABE3D0124E6C756B1F7DFB9B842D6251AEA6EE85390495CADA73D671537FCE5850A932F32BAB60AB1AC1F852C1F83C625E7A7D70CDA9EF16D5C8E47739D77DF59261ABE8454807FF441E143FBD37F8545#)" - " (e #010001#)" - " (d #077AD3DE284245F4806A1B82B79E616FBDE821C82D691A65665E57B5FAD3F34E67F401E7BD2E28699E89D9C496CF821945AE83AC7A1231176A196BA6027E77D85789055D50404A7A2A95B1512F91F190BBAEF730ED550D227D512F89C0CDB31AC06FA9A19503DDF6B66D0B42B9691BFD6140EC1720FFC48AE00C34796DC899E5#)" - " (p #00D586C78E5F1B4BF2E7CD7A04CA091911706F19788B93E44EE20AAF462E8363E98A72253ED845CCBF2481BB351E8557C85BCFFF0DABDBFF8E26A79A0938096F27#)" - " (q #00DB0CDF60F26F2A296C88D6BF9F8E5BE45C0DDD713C96CC73EBCB48B061740943F21D2A93D6E42A7211E7F02A95DCED6C390A67AD21ECF739AE8A0CA46FF2EBB3#)" - " (u #33149195F16912DB20A48D020DBC3B9E3881B39D722BF79378F6340F43148A6E9FC5F53E2853B7387BA4443BA53A52FCA8173DE6E85B42F9783D4A7817D0680B#)))", - "\x32\xCF\xFA\x85\xB1\x79\x1F\xBB\x26\x14\xE9\x1A\xFD\xF3\xAF\xE3\x32\x08\x2E\x25" - }, - { - GCRY_PK_DSA, - " (public-key" - " (dsa" - " (p #0084E4C626E16005770BD9509ABF7354492E85B8C0060EFAAAEC617F725B592FAA59DF5460575F41022776A9718CE62EDD542AB73C7720869EBDBC834D174ADCD7136827DF51E2613545A25CA573BC502A61B809000B6E35F5EB7FD6F18C35678C23EA1C3638FB9CFDBA2800EE1B62F41A4479DE824F2834666FBF8DC5B53C2617#)" - " (q #00B0E6F710051002A9F425D98A677B18E0E5B038AB#)" - " (g #44370CEE0FE8609994183DBFEBA7EEA97D466838BCF65EFF506E35616DA93FA4E572A2F08886B74977BC00CA8CD3DBEA7AEB7DB8CBB180E6975E0D2CA76E023E6DE9F8CCD8826EBA2F72B8516532F6001DEFFAE76AA5E59E0FA33DBA3999B4E92D1703098CDEDCC416CF008801964084CDE1980132B2B78CB4CE9C15A559528B#)" - " (y #3D5DD14AFA2BF24A791E285B90232213D0E3BA74AB1109E768AED19639A322F84BB7D959E2BA92EF73DE4C7F381AA9F4053CFA3CD4527EF9043E304E5B95ED0A3A5A9D590AA641C13DB2B6E32B9B964A6A2C730DD3EA7C8E13F7A140AFF1A91CE375E9B9B960384779DC4EA180FA1F827C52288F366C0770A220F50D6D8FD6F6#)))", - "\x04\xA3\x4F\xA0\x2B\x03\x94\xD7\x32\xAD\xD5\x9B\x50\xAF\xDB\x5D\x57\x22\xA6\x10" - - }, - { - GCRY_PK_DSA, - "(private-key" - " (dsa" - " (p #0084E4C626E16005770BD9509ABF7354492E85B8C0060EFAAAEC617F725B592FAA59DF5460575F41022776A9718CE62EDD542AB73C7720869EBDBC834D174ADCD7136827DF51E2613545A25CA573BC502A61B809000B6E35F5EB7FD6F18C35678C23EA1C3638FB9CFDBA2800EE1B62F41A4479DE824F2834666FBF8DC5B53C2617#)" - " (q #00B0E6F710051002A9F425D98A677B18E0E5B038AB#)" - " (g #44370CEE0FE8609994183DBFEBA7EEA97D466838BCF65EFF506E35616DA93FA4E572A2F08886B74977BC00CA8CD3DBEA7AEB7DB8CBB180E6975E0D2CA76E023E6DE9F8CCD8826EBA2F72B8516532F6001DEFFAE76AA5E59E0FA33DBA3999B4E92D1703098CDEDCC416CF008801964084CDE1980132B2B78CB4CE9C15A559528B#)" - " (y #3D5DD14AFA2BF24A791E285B90232213D0E3BA74AB1109E768AED19639A322F84BB7D959E2BA92EF73DE4C7F381AA9F4053CFA3CD4527EF9043E304E5B95ED0A3A5A9D590AA641C13DB2B6E32B9B964A6A2C730DD3EA7C8E13F7A140AFF1A91CE375E9B9B960384779DC4EA180FA1F827C52288F366C0770A220F50D6D8FD6F6#)" - " (x #0087F9E91BFBCC1163DE71ED86D557708E32F8ADDE#)))", - "\x04\xA3\x4F\xA0\x2B\x03\x94\xD7\x32\xAD\xD5\x9B\x50\xAF\xDB\x5D\x57\x22\xA6\x10" - }, - { - GCRY_PK_ECDSA, - "(public-key" - " (ecdsa" - " (p #00FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF#)" - " (a #00FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC#)" - " (b #5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B#)" - " (g #046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5#)" - " (n #00FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551#)" - " (q #04C8A4CEC2E9A9BC8E173531A67B0840DF345C32E261ADD780E6D83D56EFADFD5DE872F8B854819B59543CE0B7F822330464FBC4E6324DADDCD9D059554F63B344#)))", - "\xE6\xDF\x94\x2D\xBD\x8C\x77\x05\xA3\xDD\x41\x6E\xFC\x04\x01\xDB\x31\x0E\x99\xB6" - }, - { - GCRY_PK_ECDSA, - "(public-key" - " (ecdsa" - " (p #00FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF#)" - " (curve \"NIST P-256\")" - " (b #5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B#)" - " (g #046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5#)" - " (n #00FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551#)" - " (q #04C8A4CEC2E9A9BC8E173531A67B0840DF345C32E261ADD780E6D83D56EFADFD5DE872F8B854819B59543CE0B7F822330464FBC4E6324DADDCD9D059554F63B344#)))", - "\xE6\xDF\x94\x2D\xBD\x8C\x77\x05\xA3\xDD\x41\x6E\xFC\x04\x01\xDB\x31\x0E\x99\xB6" - }, - { - GCRY_PK_ECDSA, - "(public-key" - " (ecdsa" - " (curve secp256r1)" - " (q #04C8A4CEC2E9A9BC8E173531A67B0840DF345C32E261ADD780E6D83D56EFADFD5DE872F8B854819B59543CE0B7F822330464FBC4E6324DADDCD9D059554F63B344#)))", - "\xE6\xDF\x94\x2D\xBD\x8C\x77\x05\xA3\xDD\x41\x6E\xFC\x04\x01\xDB\x31\x0E\x99\xB6" - } - - }; - -static void -check (void) -{ - unsigned char buf[20]; - unsigned char *ret; - gcry_error_t err; - gcry_sexp_t sexp; - unsigned int i; - - for (i = 0; i < (sizeof (key_grips) / sizeof (*key_grips)); i++) - { - if (gcry_pk_test_algo (key_grips[i].algo)) - { - if (verbose) - fprintf (stderr, "algo %d not available; test skipped\n", - key_grips[i].algo); - continue; - } - err = gcry_sexp_sscan (&sexp, NULL, key_grips[i].key, - strlen (key_grips[i].key)); - if (err) - die ("scanning data %d failed: %s\n", i, gpg_strerror (err)); - ret = gcry_pk_get_keygrip (sexp, buf); - if (!ret) - die ("gcry_pk_get_keygrip failed for %d\n", i); - - if ( memcmp (key_grips[i].grip, buf, sizeof (buf)) ) - { - print_hex ("keygrip: ", buf, sizeof buf); - die ("keygrip for %d does not match\n", i); - } - - gcry_sexp_release (sexp); - } -} - - - -static void -progress_handler (void *cb_data, const char *what, int printchar, - int current, int total) -{ - (void)cb_data; - (void)what; - (void)current; - (void)total; - - putchar (printchar); -} - -int -main (int argc, char **argv) -{ - int debug = 0; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - - gcry_set_progress_handler (progress_handler, NULL); - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - - check (); - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/mpitests.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/mpitests.c deleted file mode 100644 index 3ccfae001e..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/mpitests.c +++ /dev/null @@ -1,302 +0,0 @@ -/* mpitests.c - basic mpi tests - * Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> - -#ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" -#else -# include <gcrypt.h> -#endif - -static int verbose; -static int debug; - - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - - - -/* Set up some test patterns */ - -/* 48 bytes with value 1: this results in 8 limbs for 64bit limbs, 16limb for 32 bit limbs */ -unsigned char ones[] = { - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -}; - -/* 48 bytes with value 2: this results in 8 limbs for 64bit limbs, 16limb for 32 bit limbs */ -unsigned char twos[] = { - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 -}; - -/* 48 bytes with value 3: this results in 8 limbs for 64bit limbs, 16limb for 32 bit limbs */ -unsigned char threes[] = { - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 -}; - -/* 48 bytes with value 0x80: this results in 8 limbs for 64bit limbs, 16limb for 32 bit limbs */ -unsigned char eighties[] = { - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 -}; - -/* 48 bytes with value 0xff: this results in 8 limbs for 64bit limbs, 16limb for 32 bit limbs */ -unsigned char manyff[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; - - - -static int -test_add (void) -{ - gcry_mpi_t one; - gcry_mpi_t two; - gcry_mpi_t ff; - gcry_mpi_t result; - unsigned char* pc; - - gcry_mpi_scan(&one, GCRYMPI_FMT_USG, ones, sizeof(ones), NULL); - gcry_mpi_scan(&two, GCRYMPI_FMT_USG, twos, sizeof(twos), NULL); - gcry_mpi_scan(&ff, GCRYMPI_FMT_USG, manyff, sizeof(manyff), NULL); - result = gcry_mpi_new(0); - - gcry_mpi_add(result, one, two); - gcry_mpi_aprint(GCRYMPI_FMT_HEX, &pc, NULL, result); - if (verbose) - printf("Result of one plus two:\n%s\n", pc); - gcry_free(pc); - - gcry_mpi_add(result, ff, one); - gcry_mpi_aprint(GCRYMPI_FMT_HEX, &pc, NULL, result); - if (verbose) - printf("Result of ff plus one:\n%s\n", pc); - gcry_free(pc); - - gcry_mpi_release(one); - gcry_mpi_release(two); - gcry_mpi_release(ff); - gcry_mpi_release(result); - return 1; -} - - -static int -test_sub (void) -{ - gcry_mpi_t one; - gcry_mpi_t two; - gcry_mpi_t result; - unsigned char* pc; - - gcry_mpi_scan(&one, GCRYMPI_FMT_USG, ones, sizeof(ones), NULL); - gcry_mpi_scan(&two, GCRYMPI_FMT_USG, twos, sizeof(twos), NULL); - result = gcry_mpi_new(0); - gcry_mpi_sub(result, two, one); - - gcry_mpi_aprint(GCRYMPI_FMT_HEX, &pc, NULL, result); - if (verbose) - printf("Result of two minus one:\n%s\n", pc); - gcry_free(pc); - - gcry_mpi_release(one); - gcry_mpi_release(two); - gcry_mpi_release(result); - return 1; -} - - -static int -test_mul (void) -{ - gcry_mpi_t two; - gcry_mpi_t three; - gcry_mpi_t result; - unsigned char* pc; - - gcry_mpi_scan(&two, GCRYMPI_FMT_USG, twos, sizeof(twos), NULL); - gcry_mpi_scan(&three, GCRYMPI_FMT_USG, threes, sizeof(threes), NULL); - result = gcry_mpi_new(0); - gcry_mpi_mul(result, two, three); - - gcry_mpi_aprint(GCRYMPI_FMT_HEX, &pc, NULL, result); - if (verbose) - printf("Result of two mul three:\n%s\n", pc); - gcry_free(pc); - - gcry_mpi_release(two); - gcry_mpi_release(three); - gcry_mpi_release(result); - return 1; -} - - -/* What we test here is that we don't overwrite our args and that - using thne same mpi for several args works. */ -static int -test_powm (void) -{ - int b_int = 17; - int e_int = 3; - int m_int = 19; - gcry_mpi_t base = gcry_mpi_set_ui (NULL, b_int); - gcry_mpi_t exp = gcry_mpi_set_ui (NULL, e_int); - gcry_mpi_t mod = gcry_mpi_set_ui (NULL, m_int); - gcry_mpi_t res = gcry_mpi_new (0); - - gcry_mpi_powm (res, base, exp, mod); - if (gcry_mpi_cmp_ui (base, b_int)) - die ("test_powm failed for base at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (exp, e_int)) - die ("test_powm_ui failed for exp at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (mod, m_int)) - die ("test_powm failed for mod at %d\n", __LINE__); - - /* Check using base for the result. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_set_ui (exp, e_int); - gcry_mpi_set_ui(mod, m_int); - gcry_mpi_powm (base, base, exp, mod); - if (gcry_mpi_cmp (res, base)) - die ("test_powm failed at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (exp, e_int)) - die ("test_powm_ui failed for exp at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (mod, m_int)) - die ("test_powm failed for mod at %d\n", __LINE__); - - /* Check using exp for the result. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_set_ui (exp, e_int); - gcry_mpi_set_ui(mod, m_int); - gcry_mpi_powm (exp, base, exp, mod); - if (gcry_mpi_cmp (res, exp)) - die ("test_powm failed at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (base, b_int)) - die ("test_powm failed for base at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (mod, m_int)) - die ("test_powm failed for mod at %d\n", __LINE__); - - /* Check using mod for the result. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_set_ui (exp, e_int); - gcry_mpi_set_ui(mod, m_int); - gcry_mpi_powm (mod, base, exp, mod); - if (gcry_mpi_cmp (res, mod)) - die ("test_powm failed at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (base, b_int)) - die ("test_powm failed for base at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (exp, e_int)) - die ("test_powm_ui failed for exp at %d\n", __LINE__); - - /* Now check base ^ base mod mod. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_set_ui(mod, m_int); - gcry_mpi_powm (res, base, base, mod); - if (gcry_mpi_cmp_ui (base, b_int)) - die ("test_powm failed for base at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (mod, m_int)) - die ("test_powm failed for mod at %d\n", __LINE__); - - /* Check base ^ base mod mod with base as result. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_set_ui(mod, m_int); - gcry_mpi_powm (base, base, base, mod); - if (gcry_mpi_cmp (res, base)) - die ("test_powm failed at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (mod, m_int)) - die ("test_powm failed for mod at %d\n", __LINE__); - - /* Check base ^ base mod mod with mod as result. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_set_ui(mod, m_int); - gcry_mpi_powm (mod, base, base, mod); - if (gcry_mpi_cmp (res, mod)) - die ("test_powm failed at %d\n", __LINE__); - if (gcry_mpi_cmp_ui (base, b_int)) - die ("test_powm failed for base at %d\n", __LINE__); - - /* Now check base ^ base mod base. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_powm (res, base, base, base); - if (gcry_mpi_cmp_ui (base, b_int)) - die ("test_powm failed for base at %d\n", __LINE__); - - /* Check base ^ base mod base with base as result. */ - gcry_mpi_set_ui (base, b_int); - gcry_mpi_powm (base, base, base, base); - if (gcry_mpi_cmp (res, base)) - die ("test_powm failed at %d\n", __LINE__); - - /* Fixme: We should add the rest of the cases of course. */ - - - - return 1; -} - - -int -main (int argc, char* argv[]) -{ - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - if (!gcry_check_version (GCRYPT_VERSION)) - { - fputs ("version mismatch\n", stderr); - exit (1); - } - gcry_control(GCRYCTL_DISABLE_SECMEM); - - test_add (); - test_sub (); - test_mul (); - test_powm (); - - return 0; -} - diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/pkbench.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/pkbench.c deleted file mode 100644 index 67b94dc9a6..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/pkbench.c +++ /dev/null @@ -1,514 +0,0 @@ -/* pkbench.c - Pubkey menchmarking - * Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <gcrypt.h> -#include <assert.h> -#include <stdlib.h> -#include <ctype.h> -#include <sys/stat.h> -#ifndef HAVE_W32_SYSTEM -# include <sys/times.h> -#endif /*HAVE_W32_SYSTEM*/ -#include <unistd.h> -#include <fcntl.h> -#include <time.h> -#include <errno.h> - -#define PGM "pkbench" - - -static int verbose; -static int debug; -static int error_count; - - -typedef struct context -{ - gcry_sexp_t key_secret; - gcry_sexp_t key_public; - gcry_sexp_t data; - gcry_sexp_t data_encrypted; - gcry_sexp_t data_signed; -} *context_t; - -typedef int (*work_t) (context_t context, unsigned int final); - - -static void -fail (const char *format, ...) -{ - va_list arg_ptr; - - fputs ( PGM ": ", stderr); - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - error_count++; -} - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - putchar ('\n'); - fputs ( PGM ": ", stderr); - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - -static void -show_sexp (const char *prefix, gcry_sexp_t a) -{ - char *buf; - size_t size; - - fputs (prefix, stderr); - size = gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, NULL, 0); - buf = gcry_xmalloc (size); - - gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, buf, size); - fprintf (stderr, "%.*s", (int)size, buf); - gcry_free (buf); -} - - -static void * -read_file (const char *fname, size_t *r_length) -{ - FILE *fp; - struct stat st; - char *buf; - size_t buflen; - - fp = fopen (fname, "rb"); - if (!fp) - { - fail ("can't open `%s': %s\n", fname, strerror (errno)); - return NULL; - } - - if (fstat (fileno(fp), &st)) - { - fail ("can't stat `%s': %s\n", fname, strerror (errno)); - fclose (fp); - return NULL; - } - - buflen = st.st_size; - buf = gcry_xmalloc (buflen+1); - if (fread (buf, buflen, 1, fp) != 1) - { - fail ("error reading `%s': %s\n", fname, strerror (errno)); - fclose (fp); - gcry_free (buf); - return NULL; - } - fclose (fp); - - if (r_length) - *r_length = buflen; - return buf; -} - - - -static void -benchmark (work_t worker, context_t context) -{ - clock_t timer_start, timer_stop; - unsigned int loop = 10; - unsigned int i = 0; - struct tms timer; - int ret = 0; - -#ifdef HAVE_W32_SYSTEM - timer_start = clock (); -#else - times (&timer); - timer_start = timer.tms_utime; -#endif - for (i = 0; i < loop; i++) - { - ret = (*worker) (context, (i + 1) == loop); - if (! ret) - break; - } -#ifdef HAVE_W32_SYSTEM - timer_stop = clock (); -#else - times (&timer); - timer_stop = timer.tms_utime; -#endif - - if (ret) - printf ("%.0f ms\n", - (((double) ((timer_stop - timer_start) / loop)) / CLOCKS_PER_SEC) - * 10000000); - else - printf ("[skipped]\n"); -} - -static int -work_encrypt (context_t context, unsigned int final) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - gcry_sexp_t data_encrypted = NULL; - int ret = 1; - - err = gcry_pk_encrypt (&data_encrypted, - context->data, context->key_public); - if (gpg_err_code (err) == GPG_ERR_NOT_IMPLEMENTED) - { - err = GPG_ERR_NO_ERROR; - ret = 0; - } - else - { - assert (! err); - - if (final) - context->data_encrypted = data_encrypted; - else - gcry_sexp_release (data_encrypted); - } - - return ret; -} - -static int -work_decrypt (context_t context, unsigned int final) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - int ret = 1; - - if (! context->data_encrypted) - ret = 0; - else - { - gcry_sexp_t data_decrypted = NULL; - - err = gcry_pk_decrypt (&data_decrypted, - context->data_encrypted, - context->key_secret); - assert (! err); - if (final) - { - gcry_sexp_release (context->data_encrypted); - context->data_encrypted = NULL; - } - gcry_sexp_release (data_decrypted); - } - - return ret; -} - -static int -work_sign (context_t context, unsigned int final) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - gcry_sexp_t data_signed = NULL; - int ret = 1; - - err = gcry_pk_sign (&data_signed, - context->data, context->key_secret); - if (gpg_err_code (err) == GPG_ERR_NOT_IMPLEMENTED) - { - err = GPG_ERR_NO_ERROR; - ret = 0; - } - else if (err) - { - fail ("pk_sign failed: %s\n", gpg_strerror (err)); - ret = 0; - } - else - { - if (final) - context->data_signed = data_signed; - else - gcry_sexp_release (data_signed); - } - - return ret; -} - -static int -work_verify (context_t context, unsigned int final) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - int ret = 1; - - if (!context->data_signed) - return 0; - - err = gcry_pk_verify (context->data_signed, - context->data, - context->key_public); - if (err) - { - show_sexp ("data_signed:\n", context->data_signed); - show_sexp ("data:\n", context->data); - fail ("pk_verify failed: %s\n", gpg_strerror (err)); - ret = 0; - } - else if (final) - { - gcry_sexp_release (context->data_signed); - context->data_signed = NULL; - } - - return ret; -} - -static void -process_key_pair (context_t context) -{ - struct - { - work_t worker; - const char *identifier; - } worker_functions[] = { { work_encrypt, "encrypt" }, - { work_decrypt, "decrypt" }, - { work_sign, "sign" }, - { work_verify, "verify" } }; - unsigned int i = 0; - - for (i = 0; i < (sizeof (worker_functions) / sizeof (*worker_functions)); i++) - { - printf ("%s: ", worker_functions[i].identifier); - benchmark (worker_functions[i].worker, context); - } -} - -static void -context_init (context_t context, gcry_sexp_t key_secret, gcry_sexp_t key_public) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - unsigned int key_size = 0; - gcry_mpi_t data = NULL; - gcry_sexp_t data_sexp = NULL; - - key_size = gcry_pk_get_nbits (key_secret); - assert (key_size); - - data = gcry_mpi_new (key_size); - assert (data); - - gcry_mpi_randomize (data, key_size, GCRY_STRONG_RANDOM); - gcry_mpi_clear_bit (data, key_size - 1); - err = gcry_sexp_build (&data_sexp, NULL, - "(data (flags raw) (value %m))", - data); - assert (! err); - gcry_mpi_release (data); - - context->key_secret = key_secret; - context->key_public = key_public; - context->data = data_sexp; - context->data_encrypted = NULL; - context->data_signed = NULL; -} - -static void -context_destroy (context_t context) -{ - gcry_sexp_release (context->key_secret); - gcry_sexp_release (context->key_public); - gcry_sexp_release (context->data); -} - -static void -process_key_pair_file (const char *key_pair_file) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - void *key_pair_buffer = NULL; - gcry_sexp_t key_pair_sexp = NULL; - gcry_sexp_t key_secret_sexp = NULL; - gcry_sexp_t key_public_sexp = NULL; - struct context context = { NULL }; - size_t file_length; - - key_pair_buffer = read_file (key_pair_file, &file_length); - if (!key_pair_buffer) - die ("failed to open `%s'\n", key_pair_file); - - err = gcry_sexp_sscan (&key_pair_sexp, NULL, - key_pair_buffer, file_length); - if (err) - die ("gcry_sexp_sscan failed\n"); - - key_secret_sexp = gcry_sexp_find_token (key_pair_sexp, "private-key", 0); - assert (key_secret_sexp); - key_public_sexp = gcry_sexp_find_token (key_pair_sexp, "public-key", 0); - assert (key_public_sexp); - - gcry_sexp_release (key_pair_sexp); - - context_init (&context, key_secret_sexp, key_public_sexp); - - printf ("Key file: %s\n", key_pair_file); - process_key_pair (&context); - printf ("\n"); - - context_destroy (&context); - gcry_free (key_pair_buffer); -} - - -static void -generate_key (const char *algorithm, const char *key_size) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - size_t key_pair_buffer_size = 0; - char *key_pair_buffer = NULL; - gcry_sexp_t key_spec = NULL; - gcry_sexp_t key_pair = NULL; - - if (isdigit ((unsigned int)*key_size)) - err = gcry_sexp_build (&key_spec, NULL, - "(genkey (%s (nbits %s)))", - algorithm, key_size); - else - err = gcry_sexp_build (&key_spec, NULL, - "(genkey (%s (curve %s)))", - algorithm, key_size); - if (err) - die ("sexp_build failed: %s\n", gpg_strerror (err)); - - err = gcry_pk_genkey (&key_pair, key_spec); - if (err) - { - show_sexp ("request:\n", key_spec); - die ("pk_genkey failed: %s\n", gpg_strerror (err)); - } - - key_pair_buffer_size = gcry_sexp_sprint (key_pair, GCRYSEXP_FMT_ADVANCED, - NULL, 0); - key_pair_buffer = gcry_xmalloc (key_pair_buffer_size); - - gcry_sexp_sprint (key_pair, GCRYSEXP_FMT_ADVANCED, - key_pair_buffer, key_pair_buffer_size); - - printf ("%.*s", (int)key_pair_buffer_size, key_pair_buffer); - gcry_free (key_pair_buffer); -} - - - -int -main (int argc, char **argv) -{ - int last_argc = -1; - int genkey_mode = 0; - int fips_mode = 0; - - if (argc) - { argc--; argv++; } - - while (argc && last_argc != argc ) - { - last_argc = argc; - if (!strcmp (*argv, "--")) - { - argc--; argv++; - break; - } - else if (!strcmp (*argv, "--help")) - { - puts ("Usage: " PGM " [OPTIONS] [FILES]\n" - "Various public key tests:\n\n" - " Default is to process all given key files\n\n" - " --genkey ALGONAME SIZE Generate a public key\n" - "\n" - " --verbose enable extra informational output\n" - " --debug enable additional debug output\n" - " --help display this help and exit\n\n"); - exit (0); - } - else if (!strcmp (*argv, "--verbose")) - { - verbose++; - argc--; argv++; - } - else if (!strcmp (*argv, "--debug")) - { - verbose = debug = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--genkey")) - { - genkey_mode = 1; - argc--; argv++; - } - else if (!strcmp (*argv, "--fips")) - { - fips_mode = 1; - argc--; argv++; - } - } - - gcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose); - - if (fips_mode) - gcry_control (GCRYCTL_FORCE_FIPS_MODE, 0); - - gcry_control (GCRYCTL_DISABLE_SECMEM); - if (!gcry_check_version (GCRYPT_VERSION)) - { - fprintf (stderr, PGM ": version mismatch\n"); - exit (1); - } - - if (genkey_mode) - { - /* No valuable keys are create, so we can speed up our RNG. */ - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - } - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - - - if (genkey_mode && argc == 2) - { - generate_key (argv[0], argv[1]); - } - else if (!genkey_mode && argc) - { - int i; - - for (i = 0; i < argc; i++) - process_key_pair_file (argv[i]); - } - else - { - fprintf (stderr, "usage: " PGM - " [OPTIONS] [FILES] (try --help for more information)\n"); - exit (1); - } - - return error_count ? 1 : 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/prime.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/prime.c deleted file mode 100644 index 12bcc89439..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/prime.c +++ /dev/null @@ -1,122 +0,0 @@ -/* prime.c - part of the Libgcrypt test suite. - Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <assert.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - -#include "../src/gcrypt.h" - -static int verbose; - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - -static void -check_primes (void) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - gcry_mpi_t *factors = NULL; - gcry_mpi_t prime = NULL; - gcry_mpi_t g; - unsigned int i = 0; - struct prime_spec - { - unsigned int prime_bits; - unsigned int factor_bits; - unsigned int flags; - } prime_specs[] = - { - { 1024, 100, GCRY_PRIME_FLAG_SPECIAL_FACTOR }, - { 128, 0, 0 }, - { 0 }, - }; - - for (i = 0; prime_specs[i].prime_bits; i++) - { - err = gcry_prime_generate (&prime, - prime_specs[i].prime_bits, - prime_specs[i].factor_bits, - &factors, - NULL, NULL, - GCRY_WEAK_RANDOM, - prime_specs[i].flags); - assert (! err); - if (verbose) - { - fprintf (stderr, "test %d: p = ", i); - gcry_mpi_dump (prime); - putc ('\n', stderr); - } - - err = gcry_prime_check (prime, 0); - assert (! err); - - err = gcry_prime_group_generator (&g, prime, factors, NULL); - assert (!err); - gcry_prime_release_factors (factors); factors = NULL; - - if (verbose) - { - fprintf (stderr, " %d: g = ", i); - gcry_mpi_dump (g); - putc ('\n', stderr); - } - gcry_mpi_release (g); - - - gcry_mpi_add_ui (prime, prime, 1); - err = gcry_prime_check (prime, 0); - assert (err); - } -} - -int -main (int argc, char **argv) -{ - int debug = 0; - - if ((argc > 1) && (! strcmp (argv[1], "--verbose"))) - verbose = 1; - else if ((argc > 1) && (! strcmp (argv[1], "--debug"))) - verbose = debug = 1; - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (! gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - - check_primes (); - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/pubkey.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/pubkey.c deleted file mode 100644 index e5ec464acd..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/pubkey.c +++ /dev/null @@ -1,890 +0,0 @@ -/* pubkey.c - Public key encryption/decryption tests - * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - - -#include "../src/gcrypt.h" - -/* Sample RSA keys, taken from basic.c. */ - -static const char sample_private_key_1[] = -"(private-key\n" -" (openpgp-rsa\n" -" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa" - "2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291" - "ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7" - "891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)\n" -" (e #010001#)\n" -" (d #046129F2489D71579BE0A75FE029BD6CDB574EBF57EA8A5B0FDA942CAB943B11" - "7D7BB95E5D28875E0F9FC5FCC06A72F6D502464DABDED78EF6B716177B83D5BD" - "C543DC5D3FED932E59F5897E92E6F58A0F33424106A3B6FA2CBF877510E4AC21" - "C3EE47851E97D12996222AC3566D4CCB0B83D164074ABF7DE655FC2446DA1781#)\n" -" (p #00e861b700e17e8afe6837e7512e35b6ca11d0ae47d8b85161c67baf64377213" - "fe52d772f2035b3ca830af41d8a4120e1c1c70d12cc22f00d28d31dd48a8d424f1#)\n" -" (q #00f7a7ca5367c661f8e62df34f0d05c10c88e5492348dd7bddc942c9a8f369f9" - "35a07785d2db805215ed786e4285df1658eed3ce84f469b81b50d358407b4ad361#)\n" -" (u #304559a9ead56d2309d203811a641bb1a09626bc8eb36fffa23c968ec5bd891e" - "ebbafc73ae666e01ba7c8990bae06cc2bbe10b75e69fcacb353a6473079d8e9b#)\n" -" )\n" -")\n"; - -/* The same key as above but without p, q and u to test the non CRT case. */ -static const char sample_private_key_1_1[] = -"(private-key\n" -" (openpgp-rsa\n" -" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa" - "2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291" - "ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7" - "891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)\n" -" (e #010001#)\n" -" (d #046129F2489D71579BE0A75FE029BD6CDB574EBF57EA8A5B0FDA942CAB943B11" - "7D7BB95E5D28875E0F9FC5FCC06A72F6D502464DABDED78EF6B716177B83D5BD" - "C543DC5D3FED932E59F5897E92E6F58A0F33424106A3B6FA2CBF877510E4AC21" - "C3EE47851E97D12996222AC3566D4CCB0B83D164074ABF7DE655FC2446DA1781#)\n" -" )\n" -")\n"; - -/* The same key as above but just without q to test the non CRT case. This - should fail. */ -static const char sample_private_key_1_2[] = -"(private-key\n" -" (openpgp-rsa\n" -" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa" - "2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291" - "ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7" - "891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)\n" -" (e #010001#)\n" -" (d #046129F2489D71579BE0A75FE029BD6CDB574EBF57EA8A5B0FDA942CAB943B11" - "7D7BB95E5D28875E0F9FC5FCC06A72F6D502464DABDED78EF6B716177B83D5BD" - "C543DC5D3FED932E59F5897E92E6F58A0F33424106A3B6FA2CBF877510E4AC21" - "C3EE47851E97D12996222AC3566D4CCB0B83D164074ABF7DE655FC2446DA1781#)\n" -" (p #00e861b700e17e8afe6837e7512e35b6ca11d0ae47d8b85161c67baf64377213" - "fe52d772f2035b3ca830af41d8a4120e1c1c70d12cc22f00d28d31dd48a8d424f1#)\n" -" (u #304559a9ead56d2309d203811a641bb1a09626bc8eb36fffa23c968ec5bd891e" - "ebbafc73ae666e01ba7c8990bae06cc2bbe10b75e69fcacb353a6473079d8e9b#)\n" -" )\n" -")\n"; - -static const char sample_public_key_1[] = -"(public-key\n" -" (rsa\n" -" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa" - "2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291" - "ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7" - "891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)\n" -" (e #010001#)\n" -" )\n" -")\n"; - - -static int verbose; - -static void -die (const char *format, ...) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - exit (1); -} - -static void -show_sexp (const char *prefix, gcry_sexp_t a) -{ - char *buf; - size_t size; - - if (prefix) - fputs (prefix, stderr); - size = gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, NULL, 0); - buf = gcry_xmalloc (size); - - gcry_sexp_sprint (a, GCRYSEXP_FMT_ADVANCED, buf, size); - fprintf (stderr, "%.*s", (int)size, buf); - gcry_free (buf); -} - - -static void -check_keys_crypt (gcry_sexp_t pkey, gcry_sexp_t skey, - gcry_sexp_t plain0, gpg_err_code_t decrypt_fail_code) -{ - gcry_sexp_t plain1, cipher, l; - gcry_mpi_t x0, x1; - int rc; - int have_flags; - - /* Extract data from plaintext. */ - l = gcry_sexp_find_token (plain0, "value", 0); - x0 = gcry_sexp_nth_mpi (l, 1, GCRYMPI_FMT_USG); - - /* Encrypt data. */ - rc = gcry_pk_encrypt (&cipher, plain0, pkey); - if (rc) - die ("encryption failed: %s\n", gcry_strerror (rc)); - - l = gcry_sexp_find_token (cipher, "flags", 0); - have_flags = !!l; - gcry_sexp_release (l); - - /* Decrypt data. */ - rc = gcry_pk_decrypt (&plain1, cipher, skey); - gcry_sexp_release (cipher); - if (rc) - { - if (decrypt_fail_code && gpg_err_code (rc) == decrypt_fail_code) - return; /* This is the expected failure code. */ - die ("decryption failed: %s\n", gcry_strerror (rc)); - } - - /* Extract decrypted data. Note that for compatibility reasons, the - output of gcry_pk_decrypt depends on whether a flags lists (even - if empty) occurs in its input data. Because we passed the output - of encrypt directly to decrypt, such a flag value won't be there - as of today. We check it anyway. */ - l = gcry_sexp_find_token (plain1, "value", 0); - if (l) - { - if (!have_flags) - die ("compatibility mode of pk_decrypt broken\n"); - gcry_sexp_release (plain1); - x1 = gcry_sexp_nth_mpi (l, 1, GCRYMPI_FMT_USG); - gcry_sexp_release (l); - } - else - { - if (have_flags) - die ("compatibility mode of pk_decrypt broken\n"); - x1 = gcry_sexp_nth_mpi (plain1, 0, GCRYMPI_FMT_USG); - gcry_sexp_release (plain1); - } - - /* Compare. */ - if (gcry_mpi_cmp (x0, x1)) - die ("data corrupted\n"); -} - -static void -check_keys (gcry_sexp_t pkey, gcry_sexp_t skey, unsigned int nbits_data, - gpg_err_code_t decrypt_fail_code) -{ - gcry_sexp_t plain; - gcry_mpi_t x; - int rc; - - /* Create plain text. */ - x = gcry_mpi_new (nbits_data); - gcry_mpi_randomize (x, nbits_data, GCRY_WEAK_RANDOM); - - rc = gcry_sexp_build (&plain, NULL, "(data (flags raw) (value %m))", x); - if (rc) - die ("converting data for encryption failed: %s\n", - gcry_strerror (rc)); - - check_keys_crypt (pkey, skey, plain, decrypt_fail_code); - gcry_sexp_release (plain); - gcry_mpi_release (x); - - /* Create plain text. */ - x = gcry_mpi_new (nbits_data); - gcry_mpi_randomize (x, nbits_data, GCRY_WEAK_RANDOM); - - rc = gcry_sexp_build (&plain, NULL, - "(data (flags raw no-blinding) (value %m))", x); - if (rc) - die ("converting data for encryption failed: %s\n", - gcry_strerror (rc)); - - check_keys_crypt (pkey, skey, plain, decrypt_fail_code); - gcry_sexp_release (plain); -} - -static void -get_keys_sample (gcry_sexp_t *pkey, gcry_sexp_t *skey, int secret_variant) -{ - gcry_sexp_t pub_key, sec_key; - int rc; - static const char *secret; - - - switch (secret_variant) - { - case 0: secret = sample_private_key_1; break; - case 1: secret = sample_private_key_1_1; break; - case 2: secret = sample_private_key_1_2; break; - default: die ("BUG\n"); - } - - rc = gcry_sexp_sscan (&pub_key, NULL, sample_public_key_1, - strlen (sample_public_key_1)); - if (!rc) - rc = gcry_sexp_sscan (&sec_key, NULL, secret, strlen (secret)); - if (rc) - die ("converting sample keys failed: %s\n", gcry_strerror (rc)); - - *pkey = pub_key; - *skey = sec_key; -} - -static void -get_keys_new (gcry_sexp_t *pkey, gcry_sexp_t *skey) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new (&key_spec, - "(genkey (rsa (nbits 4:1024)))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating RSA key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated RSA key:\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (! pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (! sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - - -static void -get_keys_x931_new (gcry_sexp_t *pkey, gcry_sexp_t *skey) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new (&key_spec, - "(genkey (rsa (nbits 4:1024)(use-x931)))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating RSA key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated RSA (X9.31) key:\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - - -static void -get_elg_key_new (gcry_sexp_t *pkey, gcry_sexp_t *skey, int fixed_x) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new - (&key_spec, - (fixed_x - ? "(genkey (elg (nbits 4:1024)(xvalue my.not-so-secret.key)))" - : "(genkey (elg (nbits 3:512)))"), - 0, 1); - - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating Elgamal key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated ELG key:\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - - -static void -get_dsa_key_new (gcry_sexp_t *pkey, gcry_sexp_t *skey, int transient_key) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new (&key_spec, - transient_key - ? "(genkey (dsa (nbits 4:1024)(transient-key)))" - : "(genkey (dsa (nbits 4:1024)))", - 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating DSA key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated DSA key:\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - - -static void -get_dsa_key_fips186_new (gcry_sexp_t *pkey, gcry_sexp_t *skey) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new - (&key_spec, "(genkey (dsa (nbits 4:1024)(use-fips186)))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating DSA key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated DSA key (fips 186):\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - - -static void -get_dsa_key_with_domain_new (gcry_sexp_t *pkey, gcry_sexp_t *skey) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new - (&key_spec, - "(genkey (dsa (transient-key)(domain" - "(p #d3aed1876054db831d0c1348fbb1ada72507e5fbf9a62cbd47a63aeb7859d6921" - "4adeb9146a6ec3f43520f0fd8e3125dd8bbc5d87405d1ac5f82073cd762a3f8d7" - "74322657c9da88a7d2f0e1a9ceb84a39cb40876179e6a76e400498de4bb9379b0" - "5f5feb7b91eb8fea97ee17a955a0a8a37587a272c4719d6feb6b54ba4ab69#)" - "(q #9c916d121de9a03f71fb21bc2e1c0d116f065a4f#)" - "(g #8157c5f68ca40b3ded11c353327ab9b8af3e186dd2e8dade98761a0996dda99ab" - "0250d3409063ad99efae48b10c6ab2bba3ea9a67b12b911a372a2bba260176fad" - "b4b93247d9712aad13aa70216c55da9858f7a298deb670a403eb1e7c91b847f1e" - "ccfbd14bd806fd42cf45dbb69cd6d6b43add2a78f7d16928eaa04458dea44#)" - ")))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating DSA key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated DSA key:\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - -static void -get_dsa_key_fips186_with_domain_new (gcry_sexp_t *pkey, gcry_sexp_t *skey) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new - (&key_spec, - "(genkey (dsa (transient-key)(use-fips186)(domain" - "(p #d3aed1876054db831d0c1348fbb1ada72507e5fbf9a62cbd47a63aeb7859d6921" - "4adeb9146a6ec3f43520f0fd8e3125dd8bbc5d87405d1ac5f82073cd762a3f8d7" - "74322657c9da88a7d2f0e1a9ceb84a39cb40876179e6a76e400498de4bb9379b0" - "5f5feb7b91eb8fea97ee17a955a0a8a37587a272c4719d6feb6b54ba4ab69#)" - "(q #9c916d121de9a03f71fb21bc2e1c0d116f065a4f#)" - "(g #8157c5f68ca40b3ded11c353327ab9b8af3e186dd2e8dade98761a0996dda99ab" - "0250d3409063ad99efae48b10c6ab2bba3ea9a67b12b911a372a2bba260176fad" - "b4b93247d9712aad13aa70216c55da9858f7a298deb670a403eb1e7c91b847f1e" - "ccfbd14bd806fd42cf45dbb69cd6d6b43add2a78f7d16928eaa04458dea44#)" - ")))", 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating DSA key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated DSA key:\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - - -static void -get_dsa_key_fips186_with_seed_new (gcry_sexp_t *pkey, gcry_sexp_t *skey) -{ - gcry_sexp_t key_spec, key, pub_key, sec_key; - int rc; - - rc = gcry_sexp_new - (&key_spec, - "(genkey" - " (dsa" - " (nbits 4:1024)" - " (use-fips186)" - " (transient-key)" - " (derive-parms" - " (seed #0cb1990c1fd3626055d7a0096f8fa99807399871#))))", - 0, 1); - if (rc) - die ("error creating S-expression: %s\n", gcry_strerror (rc)); - rc = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (rc) - die ("error generating DSA key: %s\n", gcry_strerror (rc)); - - if (verbose > 1) - show_sexp ("generated DSA key (fips 186 with seed):\n", key); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key\n"); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key\n"); - - gcry_sexp_release (key); - *pkey = pub_key; - *skey = sec_key; -} - - -static void -check_run (void) -{ - gpg_error_t err; - gcry_sexp_t pkey, skey; - int variant; - - for (variant=0; variant < 3; variant++) - { - if (verbose) - fprintf (stderr, "Checking sample key (%d).\n", variant); - get_keys_sample (&pkey, &skey, variant); - /* Check gcry_pk_testkey which requires all elements. */ - err = gcry_pk_testkey (skey); - if ((variant == 0 && err) - || (variant > 0 && gpg_err_code (err) != GPG_ERR_NO_OBJ)) - die ("gcry_pk_testkey failed: %s\n", gpg_strerror (err)); - /* Run the usual check but expect an error from variant 2. */ - check_keys (pkey, skey, 800, variant == 2? GPG_ERR_NO_OBJ : 0); - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - } - - if (verbose) - fprintf (stderr, "Checking generated RSA key.\n"); - get_keys_new (&pkey, &skey); - check_keys (pkey, skey, 800, 0); - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (verbose) - fprintf (stderr, "Checking generated RSA key (X9.31).\n"); - get_keys_x931_new (&pkey, &skey); - check_keys (pkey, skey, 800, 0); - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (verbose) - fprintf (stderr, "Checking generated Elgamal key.\n"); - get_elg_key_new (&pkey, &skey, 0); - check_keys (pkey, skey, 400, 0); - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (verbose) - fprintf (stderr, "Checking passphrase generated Elgamal key.\n"); - get_elg_key_new (&pkey, &skey, 1); - check_keys (pkey, skey, 800, 0); - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (verbose) - fprintf (stderr, "Generating DSA key.\n"); - get_dsa_key_new (&pkey, &skey, 0); - /* Fixme: Add a check function for DSA keys. */ - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (!gcry_fips_mode_active ()) - { - if (verbose) - fprintf (stderr, "Generating transient DSA key.\n"); - get_dsa_key_new (&pkey, &skey, 1); - /* Fixme: Add a check function for DSA keys. */ - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - } - - if (verbose) - fprintf (stderr, "Generating DSA key (FIPS 186).\n"); - get_dsa_key_fips186_new (&pkey, &skey); - /* Fixme: Add a check function for DSA keys. */ - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (verbose) - fprintf (stderr, "Generating DSA key with given domain.\n"); - get_dsa_key_with_domain_new (&pkey, &skey); - /* Fixme: Add a check function for DSA keys. */ - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (verbose) - fprintf (stderr, "Generating DSA key with given domain (FIPS 186).\n"); - get_dsa_key_fips186_with_domain_new (&pkey, &skey); - /* Fixme: Add a check function for DSA keys. */ - gcry_sexp_release (pkey); - gcry_sexp_release (skey); - - if (verbose) - fprintf (stderr, "Generating DSA key with given seed (FIPS 186).\n"); - get_dsa_key_fips186_with_seed_new (&pkey, &skey); - /* Fixme: Add a check function for DSA keys. */ - gcry_sexp_release (pkey); - gcry_sexp_release (skey); -} - - - -static gcry_mpi_t -key_param_from_sexp (gcry_sexp_t sexp, const char *topname, const char *name) -{ - gcry_sexp_t l1, l2; - gcry_mpi_t result; - - l1 = gcry_sexp_find_token (sexp, topname, 0); - if (!l1) - return NULL; - - l2 = gcry_sexp_find_token (l1, name, 0); - if (!l2) - { - gcry_sexp_release (l1); - return NULL; - } - - result = gcry_sexp_nth_mpi (l2, 1, GCRYMPI_FMT_USG); - gcry_sexp_release (l2); - gcry_sexp_release (l1); - return result; -} - - -static void -check_x931_derived_key (int what) -{ - static struct { - const char *param; - const char *expected_d; - } testtable[] = { - { /* First example from X9.31 (D.1.1). */ - "(genkey\n" - " (rsa\n" - " (nbits 4:1024)\n" - " (rsa-use-e 1:3)\n" - " (derive-parms\n" - " (Xp1 #1A1916DDB29B4EB7EB6732E128#)\n" - " (Xp2 #192E8AAC41C576C822D93EA433#)\n" - " (Xp #D8CD81F035EC57EFE822955149D3BFF70C53520D\n" - " 769D6D76646C7A792E16EBD89FE6FC5B605A6493\n" - " 39DFC925A86A4C6D150B71B9EEA02D68885F5009\n" - " B98BD984#)\n" - " (Xq1 #1A5CF72EE770DE50CB09ACCEA9#)\n" - " (Xq2 #134E4CAA16D2350A21D775C404#)\n" - " (Xq #CC1092495D867E64065DEE3E7955F2EBC7D47A2D\n" - " 7C9953388F97DDDC3E1CA19C35CA659EDC2FC325\n" - " 6D29C2627479C086A699A49C4C9CEE7EF7BD1B34\n" - " 321DE34A#))))\n", - "1CCDA20BCFFB8D517EE9666866621B11822C7950D55F4BB5BEE37989A7D173" - "12E326718BE0D79546EAAE87A56623B919B1715FFBD7F16028FC4007741961" - "C88C5D7B4DAAAC8D36A98C9EFBB26C8A4A0E6BC15B358E528A1AC9D0F042BE" - "B93BCA16B541B33F80C933A3B769285C462ED5677BFE89DF07BED5C127FD13" - "241D3C4B" - }, - - { /* Second example from X9.31 (D.2.1). */ - "(genkey\n" - " (rsa\n" - " (nbits 4:1536)\n" - " (rsa-use-e 1:3)\n" - " (derive-parms\n" - " (Xp1 #18272558B61316348297EACA74#)\n" - " (Xp2 #1E970E8C6C97CEF91F05B0FA80#)\n" - " (Xp #F7E943C7EF2169E930DCF23FE389EF7507EE8265\n" - " 0D42F4A0D3A3CEFABE367999BB30EE680B2FE064\n" - " 60F707F46005F8AA7CBFCDDC4814BBE7F0F8BC09\n" - " 318C8E51A48D134296E40D0BBDD282DCCBDDEE1D\n" - " EC86F0B1C96EAFF5CDA70F9AEB6EE31E#)\n" - " (Xq1 #11FDDA6E8128DC1629F75192BA#)\n" - " (Xq2 #18AB178ECA907D72472F65E480#)\n" - " (Xq #C47560011412D6E13E3E7D007B5C05DBF5FF0D0F\n" - " CFF1FA2070D16C7ABA93EDFB35D8700567E5913D\n" - " B734E3FBD15862EBC59FA0425DFA131E549136E8\n" - " E52397A8ABE4705EC4877D4F82C4AAC651B33DA6\n" - " EA14B9D5F2A263DC65626E4D6CEAC767#))))\n", - "1FB56069985F18C4519694FB71055721A01F14422DC901C35B03A64D4A5BD1" - "259D573305F5B056AC931B82EDB084E39A0FD1D1A86CC5B147A264F7EF4EB2" - "0ED1E7FAAE5CAE4C30D5328B7F74C3CAA72C88B70DED8EDE207B8629DA2383" - "B78C3CE1CA3F9F218D78C938B35763AF2A8714664CC57F5CECE2413841F5E9" - "EDEC43B728E25A41BF3E1EF8D9EEE163286C9F8BF0F219D3B322C3E4B0389C" - "2E8BB28DC04C47DA2BF38823731266D2CF6CC3FC181738157624EF051874D0" - "BBCCB9F65C83" - /* Note that this example in X9.31 gives this value for D: - - "7ED581A6617C6311465A53EDC4155C86807C5108B724070D6C0E9935296F44" - "96755CCC17D6C15AB24C6E0BB6C2138E683F4746A1B316C51E8993DFBD3AC8" - "3B479FEAB972B930C354CA2DFDD30F2A9CB222DC37B63B7881EE18A7688E0E" - "DE30F38728FE7C8635E324E2CD5D8EBCAA1C51993315FD73B38904E107D7A7" - "B7B10EDCA3896906FCF87BE367BB858CA1B27E2FC3C8674ECC8B0F92C0E270" - "BA2ECA3701311F68AFCE208DCC499B4B3DB30FF0605CE055D893BC1461D342" - "EF32E7D9720B" - - This is a bug in X9.31, obviously introduced by using - - d = e^{-1} mod (p-1)(q-1) - - instead of using the universal exponent as required by 4.1.3: - - d = e^{-1} mod lcm(p-1,q-1) - - The examples in X9.31 seem to be pretty buggy, see - cipher/primegen.c for another bug. Not only that I had to - spend 100 USD for the 66 pages of the document, it also took - me several hours to figure out that the bugs are in the - document and not in my code. - */ - }, - - { /* First example from NIST RSAVS (B.1.1). */ - "(genkey\n" - " (rsa\n" - " (nbits 4:1024)\n" - " (rsa-use-e 1:3)\n" - " (derive-parms\n" - " (Xp1 #1ed3d6368e101dab9124c92ac8#)\n" - " (Xp2 #16e5457b8844967ce83cab8c11#)\n" - " (Xp #b79f2c2493b4b76f329903d7555b7f5f06aaa5ea\n" - " ab262da1dcda8194720672a4e02229a0c71f60ae\n" - " c4f0d2ed8d49ef583ca7d5eeea907c10801c302a\n" - " cab44595#)\n" - " (Xq1 #1a5d9e3fa34fb479bedea412f6#)\n" - " (Xq2 #1f9cca85f185341516d92e82fd#)\n" - " (Xq #c8387fd38fa33ddcea6a9de1b2d55410663502db\n" - " c225655a9310cceac9f4cf1bce653ec916d45788\n" - " f8113c46bc0fa42bf5e8d0c41120c1612e2ea8bb\n" - " 2f389eda#))))\n", - "17ef7ad4fd96011b62d76dfb2261b4b3270ca8e07bc501be954f8719ef586b" - "f237e8f693dd16c23e7adecc40279dc6877c62ab541df5849883a5254fccfd" - "4072a657b7f4663953930346febd6bbd82f9a499038402cbf97fd5f068083a" - "c81ad0335c4aab0da19cfebe060a1bac7482738efafea078e21df785e56ea0" - "dc7e8feb" - }, - - { /* Second example from NIST RSAVS (B.1.1). */ - "(genkey\n" - " (rsa\n" - " (nbits 4:1536)\n" - " (rsa-use-e 1:3)\n" - " (derive-parms\n" - " (Xp1 #1e64c1af460dff8842c22b64d0#)\n" - " (Xp2 #1e948edcedba84039c81f2ac0c#)\n" - " (Xp #c8c67df894c882045ede26a9008ab09ea0672077\n" - " d7bc71d412511cd93981ddde8f91b967da404056\n" - " c39f105f7f239abdaff92923859920f6299e82b9\n" - " 5bd5b8c959948f4a034d81613d6235a3953b49ce\n" - " 26974eb7bb1f14843841281b363b9cdb#)\n" - " (Xq1 #1f3df0f017ddd05611a97b6adb#)\n" - " (Xq2 #143edd7b22d828913abf24ca4d#)\n" - " (Xq #f15147d0e7c04a1e3f37adde802cdc610999bf7a\n" - " b0088434aaeda0c0ab3910b14d2ce56cb66bffd9\n" - " 7552195fae8b061077e03920814d8b9cfb5a3958\n" - " b3a82c2a7fc97e55db543948d3396289245336ec\n" - " 9e3cb308cc655aebd766340da8921383#))))\n", - "1f8b19f3f5f2ac9fc599f110cad403dcd9bdf5f7f00fb2790e78e820398184" - "1f3fb3dd230fb223d898f45719d9b2d3525587ff2b8bcc7425e40550a5b536" - "1c8e9c1d26e83fbd9c33c64029c0e878b829d55def12912b73d94fd758c461" - "0f473e230c41b5e4c86e27c5a5029d82c811c88525d0269b95bd2ff272994a" - "dbd80f2c2ecf69065feb8abd8b445b9c6d306b1585d7d3d7576d49842bc7e2" - "8b4a2f88f4a47e71c3edd35fdf83f547ea5c2b532975c551ed5268f748b2c4" - "2ccf8a84835b" - } - }; - gpg_error_t err; - gcry_sexp_t key_spec, key, pub_key, sec_key; - gcry_mpi_t d_expected, d_have; - - if (what < 0 && what >= sizeof testtable) - die ("invalid WHAT value\n"); - - err = gcry_sexp_new (&key_spec, testtable[what].param, 0, 1); - if (err) - die ("error creating S-expression [%d]: %s\n", what, gpg_strerror (err)); - - err = gcry_pk_genkey (&key, key_spec); - gcry_sexp_release (key_spec); - if (err) - die ("error generating RSA key [%d]: %s\n", what, gpg_strerror (err)); - - pub_key = gcry_sexp_find_token (key, "public-key", 0); - if (!pub_key) - die ("public part missing in key [%d]\n", what); - - sec_key = gcry_sexp_find_token (key, "private-key", 0); - if (!sec_key) - die ("private part missing in key [%d]\n", what); - - err = gcry_mpi_scan - (&d_expected, GCRYMPI_FMT_HEX, testtable[what].expected_d, 0, NULL); - if (err) - die ("error converting string [%d]\n", what); - - if (verbose > 1) - show_sexp ("generated key:\n", key); - - d_have = key_param_from_sexp (sec_key, "rsa", "d"); - if (!d_have) - die ("parameter d not found in RSA secret key [%d]\n", what); - if (gcry_mpi_cmp (d_expected, d_have)) - { - show_sexp (NULL, sec_key); - die ("parameter d does match expected value [%d]\n", what); - } - gcry_mpi_release (d_expected); - gcry_mpi_release (d_have); - - gcry_sexp_release (key); - gcry_sexp_release (pub_key); - gcry_sexp_release (sec_key); -} - - - - -int -main (int argc, char **argv) -{ - int debug = 0; - int i; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - { - verbose = 2; - debug = 1; - } - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); - /* No valuable keys are create, so we can speed up our RNG. */ - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - - for (i=0; i < 2; i++) - check_run (); - - for (i=0; i < 4; i++) - check_x931_derived_key (i); - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/random.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/random.c deleted file mode 100644 index 502a37582a..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/random.c +++ /dev/null @@ -1,255 +0,0 @@ -/* random.c - part of the Libgcrypt test suite. - Copyright (C) 2005 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <assert.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <errno.h> -#include <signal.h> -#include <unistd.h> -#include <sys/wait.h> - -#include "../src/gcrypt.h" - -static int verbose; - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - - -static void -print_hex (const char *text, const void *buf, size_t n) -{ - const unsigned char *p = buf; - - fputs (text, stdout); - for (; n; n--, p++) - printf ("%02X", *p); - putchar ('\n'); -} - - -static int -writen (int fd, const void *buf, size_t nbytes) -{ - size_t nleft = nbytes; - int nwritten; - - while (nleft > 0) - { - nwritten = write (fd, buf, nleft); - if (nwritten < 0) - { - if (errno == EINTR) - nwritten = 0; - else - return -1; - } - nleft -= nwritten; - buf = (const char*)buf + nwritten; - } - - return 0; -} - -static int -readn (int fd, void *buf, size_t buflen, size_t *ret_nread) -{ - size_t nleft = buflen; - int nread; - char *p; - - p = buf; - while ( nleft > 0 ) - { - nread = read ( fd, buf, nleft ); - if (nread < 0) - { - if (nread == EINTR) - nread = 0; - else - return -1; - } - else if (!nread) - break; /* EOF */ - nleft -= nread; - buf = (char*)buf + nread; - } - if (ret_nread) - *ret_nread = buflen - nleft; - return 0; -} - - - -/* Check that forking won't return the same random. */ -static void -check_forking (void) -{ - pid_t pid; - int rp[2]; - int i, status; - size_t nread; - char tmp1[16], tmp1c[16], tmp1p[16]; - - /* We better make sure that the RNG has been initialzied. */ - gcry_randomize (tmp1, sizeof tmp1, GCRY_STRONG_RANDOM); - if (verbose) - print_hex ("initial random: ", tmp1, sizeof tmp1); - - if (pipe (rp) == -1) - die ("pipe failed: %s\n", strerror (errno)); - - pid = fork (); - if (pid == (pid_t)(-1)) - die ("fork failed: %s\n", strerror (errno)); - if (!pid) - { - gcry_randomize (tmp1c, sizeof tmp1c, GCRY_STRONG_RANDOM); - if (writen (rp[1], tmp1c, sizeof tmp1c)) - die ("write failed: %s\n", strerror (errno)); - if (verbose) - { - print_hex (" child random: ", tmp1c, sizeof tmp1c); - fflush (stdout); - } - _exit (0); - } - gcry_randomize (tmp1p, sizeof tmp1p, GCRY_STRONG_RANDOM); - if (verbose) - print_hex (" parent random: ", tmp1p, sizeof tmp1p); - - close (rp[1]); - if (readn (rp[0], tmp1c, sizeof tmp1c, &nread)) - die ("read failed: %s\n", strerror (errno)); - if (nread != sizeof tmp1c) - die ("read too short\n"); - - while ( (i=waitpid (pid, &status, 0)) == -1 && errno == EINTR) - ; - if (i != (pid_t)(-1) - && WIFEXITED (status) && !WEXITSTATUS (status)) - ; - else - die ("child failed\n"); - - if (!memcmp (tmp1p, tmp1c, sizeof tmp1c)) - die ("parent and child got the same random number\n"); -} - - - -/* Check that forking won't return the same nonce. */ -static void -check_nonce_forking (void) -{ - pid_t pid; - int rp[2]; - int i, status; - size_t nread; - char nonce1[10], nonce1c[10], nonce1p[10]; - - /* We won't get the same nonce back if we never initialized the - nonce subsystem, thus we get one nonce here and forget about - it. */ - gcry_create_nonce (nonce1, sizeof nonce1); - if (verbose) - print_hex ("initial nonce: ", nonce1, sizeof nonce1); - - if (pipe (rp) == -1) - die ("pipe failed: %s\n", strerror (errno)); - - pid = fork (); - if (pid == (pid_t)(-1)) - die ("fork failed: %s\n", strerror (errno)); - if (!pid) - { - gcry_create_nonce (nonce1c, sizeof nonce1c); - if (writen (rp[1], nonce1c, sizeof nonce1c)) - die ("write failed: %s\n", strerror (errno)); - if (verbose) - { - print_hex (" child nonce: ", nonce1c, sizeof nonce1c); - fflush (stdout); - } - _exit (0); - } - gcry_create_nonce (nonce1p, sizeof nonce1p); - if (verbose) - print_hex (" parent nonce: ", nonce1p, sizeof nonce1p); - - close (rp[1]); - if (readn (rp[0], nonce1c, sizeof nonce1c, &nread)) - die ("read failed: %s\n", strerror (errno)); - if (nread != sizeof nonce1c) - die ("read too short\n"); - - while ( (i=waitpid (pid, &status, 0)) == -1 && errno == EINTR) - ; - if (i != (pid_t)(-1) - && WIFEXITED (status) && !WEXITSTATUS (status)) - ; - else - die ("child failed\n"); - - if (!memcmp (nonce1p, nonce1c, sizeof nonce1c)) - die ("parent and child got the same nonce\n"); -} - - - - - - -int -main (int argc, char **argv) -{ - int debug = 0; - - if ((argc > 1) && (! strcmp (argv[1], "--verbose"))) - verbose = 1; - else if ((argc > 1) && (! strcmp (argv[1], "--debug"))) - verbose = debug = 1; - - signal (SIGPIPE, SIG_IGN); - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - - check_forking (); - check_nonce_forking (); - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/register.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/register.c deleted file mode 100644 index df90fe094c..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/register.c +++ /dev/null @@ -1,187 +0,0 @@ -/* register.c - Test for registering of additional cipher modules. - * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> - -#include "../src/gcrypt.h" - -static int verbose; -static int in_fips_mode; - -static void -die (const char *format, ...) -{ - va_list arg_ptr ; - - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - exit (1); -} - -gcry_err_code_t -foo_setkey (void *c, const unsigned char *key, unsigned keylen) -{ - (void)c; - (void)key; - (void)keylen; - - return 0; -} - -#define FOO_BLOCKSIZE 16 - -void -foo_encrypt (void *c, unsigned char *outbuf, const unsigned char *inbuf) -{ - int i; - - (void)c; - - for (i = 0; i < FOO_BLOCKSIZE; i++) - outbuf[i] = inbuf[i] ^ 0x42; -} - -void -foo_decrypt (void *c, unsigned char *outbuf, const unsigned char *inbuf) -{ - int i; - - (void)c; - - for (i = 0; i < FOO_BLOCKSIZE; i++) - outbuf[i] = inbuf[i] ^ 0x42; -} - -gcry_cipher_spec_t cipher_spec_foo = - { - "FOO", NULL, NULL, 16, 0, 0, - foo_setkey, foo_encrypt, foo_decrypt, - NULL, NULL, - }; - -int -check_list (int algorithm) -{ - gcry_error_t err = GPG_ERR_NO_ERROR; - int *list, list_length; - int i, ret = 0; - - err = gcry_cipher_list (NULL, &list_length); - assert (! err); - list = malloc (sizeof (int) * list_length); - assert (list); - err = gcry_cipher_list (list, &list_length); - - for (i = 0; i < list_length && (! ret); i++) - if (list[i] == algorithm) - ret = 1; - - return ret; -} - -void -check_run (void) -{ - int err, algorithm; - gcry_cipher_hd_t h; - char plain[16] = "Heil Discordia!"; - char encrypted[16], decrypted[16]; - gcry_module_t module; - int ret; - - err = gcry_cipher_register (&cipher_spec_foo, &algorithm, &module); - if (in_fips_mode) - { - if (gpg_err_code (err) != GPG_ERR_NOT_SUPPORTED) - die ("register cipher failed in fips mode: %s\n", gpg_strerror (err)); - return; - } - else - { - if (err) - die ("register cipher failed: %s\n", gpg_strerror (err)); - } - - err = gcry_cipher_open (&h, algorithm, GCRY_CIPHER_MODE_CBC, 0); - if (err) - die ("gcry_cipher_open failed: %s\n", gpg_strerror (err)); - - err = gcry_cipher_encrypt (h, - (unsigned char *) encrypted, sizeof (encrypted), - (unsigned char *) plain, sizeof (plain)); - assert (! err); - assert (memcmp ((void *) plain, (void *) encrypted, sizeof (plain))); - - err = gcry_cipher_reset (h); - assert (! err); - - err = gcry_cipher_decrypt (h, - (unsigned char *) decrypted, sizeof (decrypted), - (unsigned char *) encrypted, sizeof (encrypted)); - assert (! err); - assert (! memcmp ((void *) plain, (void *) decrypted, sizeof (plain))); - - ret = check_list (algorithm); - assert (ret); - - gcry_cipher_close (h); - - gcry_cipher_unregister (module); - - ret = check_list (algorithm); - assert (! ret); -} - -int -main (int argc, char **argv) -{ - int debug = 0; - int i = 1; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); - - if ( gcry_control (GCRYCTL_FIPS_MODE_P, 0) ) - in_fips_mode = 1; - - for (; i > 0; i--) - check_run (); - - /* In fips mode we let the Makefile skip this test because a PASS - would not make much sense with all egistering disabled. */ - return in_fips_mode? 77:0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/rsa-16k.key b/plugins/MirOTR/libgcrypt-1.4.6/tests/rsa-16k.key deleted file mode 100644 index 017915a239..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/rsa-16k.key +++ /dev/null @@ -1,18 +0,0 @@ -(key-data - (public-key - (rsa - (n #00D6007A7AD47BB8D6B356E4F24DFAEE3A722FEE77F7E9547F866CB369C233E6CB3916D416973E3157B4DC1837E6D4C907D1063855735EAA857176A7DA3CA9F378FF7AE9EF227C193965F106F35DB2A833D2760CF9F2D041938CD310D9CE38EDD179C33EBC4963A02221D8000FDBF4BEB592CAB1ED1EEEC9D6916F27263C76DE70184F5399DE3B3862227346B1B3FBA306174D08BEC3675E2593CFD42159655B0BE1A2B69C2BA9F4F03B8C6BA505F6BFDFC6163D74F42A6D4908284D6879CECCF6512F9225612E3030ACF3663DFB77B41AFFCFC70BC11B224E14B397D25AC15E4E342B34B363056EA76CB0265DBD41F733C7FDE98B7C2340289E338CD31F993ABFACA6E83B54BCB50DD1DD11165C188C80EBDA190A11B6D8982CDA1B6B9D1631AA3EACC93040237831A52D15826A0D3E92C833D0234975C92A7236F902FA6703C89C7779765020C11F714B4C9D33B76CD466DC2BE9A102488B0635F31E6FBB9282E5139D32623E10ED9C295DA3B39F68227218EDF8C6FE9372F174AE1DE5BBE7B0AF09A869CAEDBEFE05458BFD43CF32F10F5C345A2E3D588C8C16B4DA8B44FA9539C679B81133A35498696F5D866E3B6A89811AEA7BFD1BF690EC329D87989CDADA7EAB106785D2D6661BD400D76C113E28F13FD883027E1CAC848B13750C7CCD530273C165BDFDA93E6F72897E97F003308704B95801F223EE89160786B1DE440BA9C1F371CBA37E5B09650CDB3AA1ABAA237AD15B89DCD03390A28308643E219490BEC83403F6A09B94F81D7BB391C121FC9028A6908E5B287AC79209B905B33724B1869A679CB347BF192D80D2D66CF1DAEFEBBF22CEDB8CEC010D6F8D86CD055ED71425DA72DF1C07A573E6F070235C378DAB5404ED004B4946CCDA4786ACBBF379A47CC36A049C50651CA4B1CEF03EE87DB6D2484C3D10AF71798A6AD1E20780814F79348D45BD1004880D2DEDEBD152694C80B9F93DF32F5930911DB379B4CBB9230CFC5FC126B9B77F074B9C82BDB4F12471B3FE92079525FD276293B63B978B55E039024EE688180D7C7C6C094B754AB9B652AC31812F2F7E45EF2B6D4478D7C6E5C8F3CB0A4D04A3E693D1DD4D8F894E910D9A999DDABE0427A1AB0C715C5A695A69140B20B9DA1195E6C9536B5DF24B4D45ED24D0F2C276E3CF48066EFB977C2B7096B02EB52309D916BD432347D72799BF9D76A03D54DE211460017C0E268BC9E23B415ABF46EB8B939B5A413EBD3F20E95F704E1F2CDCDF974A8743923DBC6D8363DC8948BE85EF1D368CD3EABDBE5B82648D2F676EB310D7B77465D3A14B86050463E43AC745F3781E7A6F582BD7B8AB22BC4EEECD2CB155E6E0B2604843E3906D47EBDA2C10B6D8BFCBB5722CE5394EB50721E90EFD28C63A62269C8C14593D69076D0F198D2BDCCB6D753CB81C4BED56A90E2DDBFFC0B9076C65F973B5EA3242E71E3CBBFE0976CFE22475F56726058D2D0CE3BD52AA940A0F559DD055BE9A6F50846902E02B70DB4FF5BED33762E10409D25ABDACF661BD9BA2A22212E02893A1625CA44850887B4B3A00D0AF63645E2EC42333035062090E8E7E63037C692FBA0B3FC7F3686FC2831F4DE2D4D82CF6FD6321D6621C8227715E3772EE8805911AA9E67083C511F17863C4D6F2C29E19CF329200024E539A7C5BF1A9D601AFF8DB7CFD75C6532488469E44BAC7266A3C127720E640328F9970B75509E292CCEC0B55A1F729456CB2804BE50451185F8CDA313C7D4DF6C1C67D6C411025A2BFFF06C5062470F97B17E75B4F81CD1FEC777465D684849809B4281B690D2A8FE5C4FA87DB00328630FC31BFDDA4641B29CB434147806A614E450E3E2B50317E3B4EE6262A2D4D0A8FE7530CEDFBCB5016C4D6E61C34E61AFA324871A9C75F9BC6BF6C92B95910C9D0FE049AEEF2E96E4C9E69E1FCE1F6CC687D533668F55367E2695197BE392A7FE66C4F88C0B1A9DEC6DFF682675855979DEA2A5644748DD882CE1F0D8FDA8530617BAA130AD9C16ABF8D76B5853104AD2E0C54C9639C3F6E1343AC94139621245EE8E12CA4366A6EC752BD9D1A0948CCC3626CEDB882BA4638115BBF55444DD4544EEC561F0E762C9989A9306D4749ABD47C31F40AD3F735FEEE6E1FDCEB626073CD5F76730B348103B041B9EEB941EFA61581DD9278802A2934C33FF0668C25CEF2546C44263A68919ECBB540B4A18E1867EA15C9F7A2853F55EFBB01C3D27D28579E030D0A771B754680FCD46B56EBD3431C24F202A343E20294076E56A09FA5F6C3E844DAF5BDCFBFF55CCC3FDDDB060FBC680BA520153098E57FC7741D77DFA8932F9028D8E0E66600974A41DAC5BBA4690407AC36EC206655ADCECC8AA0471601F67C3DF48B830585FA15C52061C4FF958453B1E75626120CDC0ADCE44743027FA4C59C1931E90726CD2BE240D0DC6D61CDE5165350D86FFF17260A823C0AE3467A597D774A67BE843951975E17BC1CB69DC8A0C7BFF799FB8FD2BDB37853D2EB28C9B7B8A2212FC73FDF2F21FF3FBCD798533FC4867739E48BA061B174BAC224064F3E867A1CF52E091FDD36871955FBEA90CD3D23B1BF0039930E0636080E6A36206ED5DD1CE4546EC0B0802BBEE2869DCCAEA01B8FC3A6392820180AA4D99AB67C57E8FD0874E7C54BBC7B9A2AA4D1EA4ADC1A2802DF908AF74F915AF98EEEBF822AC958CD0D9AF5A754AB2F4790225F18864A94734E526BDE497FF21F3392472D4F0E3B7E2EE97DDCA15060BF35A05E2593418809D3C9738C328EB4D44F35E6C913069096B0742809F55F01D06D40EB0476C34950FDAEF9BD2CC1F7653B4BCF1AA304963530C8F0C39697EAD32ADF464E3CAC931D33992B357A3A231FB978A56C3592A61411A5428C3549A991D811#) - (e #010001#) - ) - ) - (private-key - (rsa - (n #00D6007A7AD47BB8D6B356E4F24DFAEE3A722FEE77F7E9547F866CB369C233E6CB3916D416973E3157B4DC1837E6D4C907D1063855735EAA857176A7DA3CA9F378FF7AE9EF227C193965F106F35DB2A833D2760CF9F2D041938CD310D9CE38EDD179C33EBC4963A02221D8000FDBF4BEB592CAB1ED1EEEC9D6916F27263C76DE70184F5399DE3B3862227346B1B3FBA306174D08BEC3675E2593CFD42159655B0BE1A2B69C2BA9F4F03B8C6BA505F6BFDFC6163D74F42A6D4908284D6879CECCF6512F9225612E3030ACF3663DFB77B41AFFCFC70BC11B224E14B397D25AC15E4E342B34B363056EA76CB0265DBD41F733C7FDE98B7C2340289E338CD31F993ABFACA6E83B54BCB50DD1DD11165C188C80EBDA190A11B6D8982CDA1B6B9D1631AA3EACC93040237831A52D15826A0D3E92C833D0234975C92A7236F902FA6703C89C7779765020C11F714B4C9D33B76CD466DC2BE9A102488B0635F31E6FBB9282E5139D32623E10ED9C295DA3B39F68227218EDF8C6FE9372F174AE1DE5BBE7B0AF09A869CAEDBEFE05458BFD43CF32F10F5C345A2E3D588C8C16B4DA8B44FA9539C679B81133A35498696F5D866E3B6A89811AEA7BFD1BF690EC329D87989CDADA7EAB106785D2D6661BD400D76C113E28F13FD883027E1CAC848B13750C7CCD530273C165BDFDA93E6F72897E97F003308704B95801F223EE89160786B1DE440BA9C1F371CBA37E5B09650CDB3AA1ABAA237AD15B89DCD03390A28308643E219490BEC83403F6A09B94F81D7BB391C121FC9028A6908E5B287AC79209B905B33724B1869A679CB347BF192D80D2D66CF1DAEFEBBF22CEDB8CEC010D6F8D86CD055ED71425DA72DF1C07A573E6F070235C378DAB5404ED004B4946CCDA4786ACBBF379A47CC36A049C50651CA4B1CEF03EE87DB6D2484C3D10AF71798A6AD1E20780814F79348D45BD1004880D2DEDEBD152694C80B9F93DF32F5930911DB379B4CBB9230CFC5FC126B9B77F074B9C82BDB4F12471B3FE92079525FD276293B63B978B55E039024EE688180D7C7C6C094B754AB9B652AC31812F2F7E45EF2B6D4478D7C6E5C8F3CB0A4D04A3E693D1DD4D8F894E910D9A999DDABE0427A1AB0C715C5A695A69140B20B9DA1195E6C9536B5DF24B4D45ED24D0F2C276E3CF48066EFB977C2B7096B02EB52309D916BD432347D72799BF9D76A03D54DE211460017C0E268BC9E23B415ABF46EB8B939B5A413EBD3F20E95F704E1F2CDCDF974A8743923DBC6D8363DC8948BE85EF1D368CD3EABDBE5B82648D2F676EB310D7B77465D3A14B86050463E43AC745F3781E7A6F582BD7B8AB22BC4EEECD2CB155E6E0B2604843E3906D47EBDA2C10B6D8BFCBB5722CE5394EB50721E90EFD28C63A62269C8C14593D69076D0F198D2BDCCB6D753CB81C4BED56A90E2DDBFFC0B9076C65F973B5EA3242E71E3CBBFE0976CFE22475F56726058D2D0CE3BD52AA940A0F559DD055BE9A6F50846902E02B70DB4FF5BED33762E10409D25ABDACF661BD9BA2A22212E02893A1625CA44850887B4B3A00D0AF63645E2EC42333035062090E8E7E63037C692FBA0B3FC7F3686FC2831F4DE2D4D82CF6FD6321D6621C8227715E3772EE8805911AA9E67083C511F17863C4D6F2C29E19CF329200024E539A7C5BF1A9D601AFF8DB7CFD75C6532488469E44BAC7266A3C127720E640328F9970B75509E292CCEC0B55A1F729456CB2804BE50451185F8CDA313C7D4DF6C1C67D6C411025A2BFFF06C5062470F97B17E75B4F81CD1FEC777465D684849809B4281B690D2A8FE5C4FA87DB00328630FC31BFDDA4641B29CB434147806A614E450E3E2B50317E3B4EE6262A2D4D0A8FE7530CEDFBCB5016C4D6E61C34E61AFA324871A9C75F9BC6BF6C92B95910C9D0FE049AEEF2E96E4C9E69E1FCE1F6CC687D533668F55367E2695197BE392A7FE66C4F88C0B1A9DEC6DFF682675855979DEA2A5644748DD882CE1F0D8FDA8530617BAA130AD9C16ABF8D76B5853104AD2E0C54C9639C3F6E1343AC94139621245EE8E12CA4366A6EC752BD9D1A0948CCC3626CEDB882BA4638115BBF55444DD4544EEC561F0E762C9989A9306D4749ABD47C31F40AD3F735FEEE6E1FDCEB626073CD5F76730B348103B041B9EEB941EFA61581DD9278802A2934C33FF0668C25CEF2546C44263A68919ECBB540B4A18E1867EA15C9F7A2853F55EFBB01C3D27D28579E030D0A771B754680FCD46B56EBD3431C24F202A343E20294076E56A09FA5F6C3E844DAF5BDCFBFF55CCC3FDDDB060FBC680BA520153098E57FC7741D77DFA8932F9028D8E0E66600974A41DAC5BBA4690407AC36EC206655ADCECC8AA0471601F67C3DF48B830585FA15C52061C4FF958453B1E75626120CDC0ADCE44743027FA4C59C1931E90726CD2BE240D0DC6D61CDE5165350D86FFF17260A823C0AE3467A597D774A67BE843951975E17BC1CB69DC8A0C7BFF799FB8FD2BDB37853D2EB28C9B7B8A2212FC73FDF2F21FF3FBCD798533FC4867739E48BA061B174BAC224064F3E867A1CF52E091FDD36871955FBEA90CD3D23B1BF0039930E0636080E6A36206ED5DD1CE4546EC0B0802BBEE2869DCCAEA01B8FC3A6392820180AA4D99AB67C57E8FD0874E7C54BBC7B9A2AA4D1EA4ADC1A2802DF908AF74F915AF98EEEBF822AC958CD0D9AF5A754AB2F4790225F18864A94734E526BDE497FF21F3392472D4F0E3B7E2EE97DDCA15060BF35A05E2593418809D3C9738C328EB4D44F35E6C913069096B0742809F55F01D06D40EB0476C34950FDAEF9BD2CC1F7653B4BCF1AA304963530C8F0C39697EAD32ADF464E3CAC931D33992B357A3A231FB978A56C3592A61411A5428C3549A991D811#) - (e #010001#) - (d #0125A7ED14E014111AE2BD8FD81A69B0BDED886DBE477D9CC08C6B07F1F82BD5BD73797FF9FFFB0D2542BE97FD1DCE9FE30F516F117DB449B513C85EF779DC91DD57B6B2E1BDD077A1EBE148486C2ADC8FEAC7FE1BD40BDD45E6833B26FB75388D05293177EE12678B197B42EFD59A38985B4BB471A3761E41F1BA8AB3A2AFA5A241B999096B8A9809BC7C5DBB3BDF476049AE7671A47213C9922B7E4C1A5545BA92C555100DB00AB77254C8E1DFC283F3EDE901819B611CD5E551133D14E8FD18840F6331D29E2EED47118E7094C1E36E53DA2AA90133856A351367224B51F80C184A5C3C4CDA5CC822126B3DF696AE96BFB8B836FA56E4E8D7D8A545E5F668F23203AC6968BE0A8A0C3BEEAC0AC9CFAE994B8EA5E293A5B9817D49B89761528595BB99D83C2B1AA4054FA2FF1D1D4F8ADBC3E863D8F4BD8C76C38E057D81740FB4FB12BC3CF80AB510223934FE8D3FD461D17E9B4EA07380A7E5202DD93A40B1F2E6C2048160949A247AC9A3F962A4E2F4EE809F00C76AF8DA4737D1398E6A95BE4637C949A33492C9691B254EB239EA7B1EC0E2D4261A27183F90577F04B356FD10FDB5E23A4471068952930EAFF4EDC757ACE25781DBA807A0C153FEDDCCB55A08B774AB44AD2CC75BD319D4822BFC6AF24C9F837C72D1A615109882906ADC2B2C679630A6FAE363144B77A134F2856DF1D8E9A77AAEC08A72FD67C122BD280D591A6C4045D0497362FB91C8C38C00A457A0BBE8D625210E4BF55FC4041FBE0A1515B70EA98C4F4284B3C96C15DD21C8CC15305DB5BFA2C21EB9520C9ACD823F5E7ABCDA3993D89A7B561C101FEC08A8AE6621245CAA1406D7536FBC6E835692D2B1BB540B8F2B2EAB7A1406B2FE83873CDEDFB0A0E717A037CD3A6322AE0B6F5E36187646866A0D406F7F54007FEC9711311BCE87FC6B4F44C5D1F7BEDD2DED081F1439F38312FA27CB65665B1595F88713378797AB624C728CA6632653EC8E762A76E3E597AAD4C3C3FE41648AEB07FCB8BFE9C70A1818E4F1B19124BECD320E4CDA6A9FD02B0A422114B5DE31376549C3B5FE1A896F8FCB256B814BD100FFBF5359510D8FD243DB014DBCFA3036C857A41DCBAE29ECE25012AF0B88827A1B3F3FA6E75EDF1790B0CCD794D0E733315743EF50FA18E5E1A93DC5D1EB28F555C0A8541B729954EA1865C6FDBE810D153CB50C024E8E7A59D324C22B626A30F4AAA0FA46EDCA4CC42F4B2D033B147DA54A67D103633A88EBFFF0EFFB61AA98DD2B057700FAC0986A9FB27C2CC29EE30B699DE063C76A1E2863D13951C35C5ABD357555781D2A5E68B0BFACF2E11747006E0810DD0CF97D585318A3B0DF7A67465EC3761004AA9B7C141B4E5444D9EB649BBD94F983FCFAEC982D994C7A620DE2D8AEE012BFD22AA9322F3DD3BD5CE90C17660D18F8CB679B02BDABC0D4D0F876B0DD6D258E08DC50B35544A4BDBE5F75604493D5FDF98B7FB812475C7B7122DDEC512322E1855C31105397AF284B7C2B4DC315D2E8D5017BBD2400885D5EB6C321B5093EF98A14EB4C29DC2B7DF9565D9E23A2BE6A2E334CE3485A8677E463DD86F49E3B56D2974F7D930FFDD60BA54AB49AE9DCDC588A4FC7AFCDB89A7713C51FA97BFA8868EE207C3C0032FDB302E45DFA0DFD8A2DE4D50A959A424626CC92CE74F8A2627C3B20406D714BB64825FBAE1B44A2F7569E32A8CBB41DBA3D9115691B07C3951A2D1394BF06BB0690B710D438CCC4E5B92B0CF302109A60C836E3AB40E4D3579C2E1C77F432C62925A751D92A564440A563B3C373D9A46FFCB0EB478962450C11192FDE187718F9AEDFF61DFE39AE98714B1DD49C356593F23F2BADE0E753B25BDCB3D618E3CDC5C5D8F37974A449E6E2D21B46FA90435F399AFF98988DEA9048B8031E1AE2E4B2B7C3FBB7CA775B6058500DB8852FF7358251CBF12A3CA233719760D251939A29778D7B4BDE15B5244B8AB47555C18925222331443DD6B227282A101443F14851734796FF4E323B66ED8304E594973EDBCA57B9413BB83574673623CB9BA282F92FBE49BFC7D6D18644C1741DAFEE86B58A174AA1B576F2599CAA8F15C9AC513CCC3778EAB81D6EF90557E73E207E96BC2D83BD3FED3717B0E8E527AE27BD05B28962280099AD1AF8C8D0B0E668EDC73AB3BD7E21C9C9134BFBC837BBC8E68FE8DF48365491371D378CB768A24A956F0D625D47EDBBAB051E4B4EE5D59574A4F2C4371D491ED182CD945DDAF11EB17382A58F2AFB6B79DE3EA1636C67449340F77A1CF14DFEDCB42B18BFFB866DD007B9A606C7BAEA70F9C5EAC98CBB52ECE5932F2925ACEAAE412E6114090CB54145A751E430EF1CA3A418C4D76EA7D797FF882401FD21984F4FBC347C4BFBB5B2B946B65F4FE0C7B9E5E16CBC1B6612325A0C83A8740D5D885C443EB8D02289BFC72E3BD2925E599B863F117C8A32E81F4B6F2C0C5D8CEA6E75C03E564E3F8D1663B5F3D21D844B6F80FB982484809303019670115FF5CC5FF6681E1C9B9AB01EA719AECAB7A4C4F1044017449741C726A4D1D97D0FB0D390F37DE0F838038270AEDD5E058113252D4F8E91B1377FD24F528EEDF58AE575327BE17F4A9D68E24B39DDF1187C8ABCEB1A84AB6BAB0735F3756E512641E62D3B51DF0316D065949379DD06C07606A82126A129A2A70F91EF54096CFCBC3447B49D5DD5F7DC7AA9F3E86E8ECD581F51731DF726194CD3143CC1E608AE882EA8848CDFD9F3FF6282AC6D722C2D5F51F2652724FEB601E02E1F078E32B36892ED9E2DE0A637836A005B01CEFDADF90534049565E8B965224B3E7EFF5707F3DEB6BFDB8D8045549168CD1C81910E584978A555DE877CFBDCB8D7388D3081F9DD8067198562521FEE99C57E3401#) - (p #00E6BBCBEBFCA813CED7907F5FA73C4C2D3532AF7A7650C4A88563DF805D54D0CEA528347A60F703C8FFE91997505F8C238383E03C53DFD347D0E385A5CFFE4E2A944DD45ACBC481D54D7B22F4C59A2BFC8C686E527B907AD9C5ECE870D102550D8D4A02B404DAE7023CC8F0436DE5F50A7CE1F4E741147F676B5DC9437CB47727B93155AE5C1EBE236E9F436D723FF770104305A1460C21BE9361582CB107CAF036F0600BCC6D78DE73C1F44C25F377B9A65349E9B73C446E5C6281DCB68EC65AF684AB39F6C84CF96E4CD909B61FA2D8BBB69A7994B78865FFEACD3838F851C944039C2422B75AE4F9C2A1702B005641EB41CE9FB042757E86F6E9651428EBA4D908D60A99AD61E5D09E7A05C7E59A9615DE965200CFB75A228B1D5DB8D2C040A65D940D5516C9FC5069B94D2F1903EF6B07F70ECF3E8D720F74139A4647D79131835CF7F15EA839350A00BD9D733359503497BCE39A2497CACCAD41B0AE7A36E6F01FECA1B0B062F9C3232BD6F6734C97DB2EE7DE050370087210F8161B07237E712E29E0BA6B2B661EC22DAD0509D50EF75255D40B954D2B3694C30E5982EB2D15B72A8709BC4F9B6FEFC4E6F01FF04D128311209B4C4353AF43BDE58D631DB7E047D7B469CDE4A9176415F6F7B60BC129E0BA8363D77140DA0FC685DB76FCB968C8C58657DB86FC908E7D11F41D907CA367C17AD3EF81280721FD40E6AEDC118538AFE109B8FA818502982578BB2EAE3ACC3028EF79C4CAB575CC8473E05FF5D911186058BCA7F5269FAA66CBB68CE47EE0748F2A8E52EEB8475030D34E54C365572BA282226730ADA3BEF16D582A409F15AB89188F1737F7CA82EE0D96BD2B3A2153CDF6EE27FD04F4AEF4AA3FC6EB02E92EC21359864507EAD3E09D3117EEDD61AF34265412C362EE01B26B925BC74A2679A1C112C653AE88FD124220742A05DDCB1CDE7DF2342669FDF76E1C3F9BF8FE13633ADF33050FA491FA708A918ECA787FF074E90F9A0AA216ACB1160D22BE7A9817DEF5FA2E27FC906ACF5B5774A5DB069A66F5F1752D7521E1CE49F8888218BA24C97A92C287DAB8B08B4433EC1DDEB5C7A3D96956EBCC46A2DE2B95CACA91BECBCB15DCA20D13C977F50F6DC0D705DB78B597581F850E20E0EEB6EA9A7A9D2708A650A3CD0748EE1DDAEA559C80D2A00F2DBD29C3EF58C13CB0B84AFA30C508BC8AD71A4FC3E14690F16B52943013D7BB09F5627D7D1343DAED88198D5ADA23E0B94484E06A827FE49227540110ECEC9E354F87E27496B7FF5ED31521817C8B5B182129EE0C521C85A996BF5EAF1F87583BDFE69386EDCE63337252F58D37AEC742702D97F3B97CE0FD06EE60EE4380C2E48D7AAD49E26F76CE981237ADB617B0BB6D59DAE31B6335866E7F9670F8A25D9BC44D7C32602BA3D58002BD53473E3F781249AB17C1C78C496611#) - (q #00ED6FA36442A240865581B5C398C93F55AFD5386A801AF1D8BF8A9FF8AB9C578F97DA02AFC44180AB581A1E10A4D65B7D1E9C0B04D57FB1FD13B7ECF1AD7C0296F1F5D52C3223CB117E6C6BED1FDA701A7A4079FBD35B180D2295B216FEAB284F85594EDDDC179C9AAE6E6CA545D2FBCA308B0961B21A1B4A4E9DE27CF8D6922FC902C35313B05F0FFB5CC667E64E0706D5210D3919074B384CA5968359CBA5F4BCA096323AD48E2CDE9D25F08E2EF945A1DD46457F48B4BF8EBEC2DC3737CC09E333E30F17A3ACD19567A5C5D200E7A4303A97A893F0884ED3CD976B41C2BCEEF04D9FCE4F30218CC9AAE26FFC5749B10011B805ADA9C4857B691A7A820F2564DF5979F570F8D524DDE268F702891E9CCDBD9F821C2ECF27F60C795E743AC67CADB07D22D3A7BD322DA9C3E7A35AC6A35333F871FE6DE0162BA2A1F9565E411ADD424FF0727B2280BAFDDF522C272D3A2910EFE27F5590F8E0F6C38BEA1895A0893755F44BDF41FECF3BF3BA27C6D6F036A1AA70736DE71465FA78EA46F34341E05DE7AB37A5074B4E99E0BAB54D658629503E1242ACAFDE08721058F208D3F62FAE742D158CAE521994514CF0BEC580F075046319FBFC8E971F0FF5EED9E2AB7D194CD21ECCCB2E54D239AA3B0254F4AB1641E6E8E1512FF1D1ED579205F1807898828CFA24B80D230FA6C52C6A92348E1A069C239F7B6F2E7CC995BD3CD1B413FC86C626FE962C7EC3CF19FA193B3A732AF17E51E6B57CC263DE82A5C45CB9E37C2BAB44E88E5792FBBC40748F86134D221BF775E2BF57F98A884FCBA494718661A3FF73AAE04A6F5CDFB6F143D680D09BA4CCD6C6F186E92569B8F67A35B5796B9F2ED404F11C54ED290D7D7836501473F06D8A623D53AB586B644F3F5BDF8B0B670CA696A23B7B52319C91D2CA27FCDF421030CEA8A6B079FEC2E467BE0427AFCEA12648F3E12F09745166D20D3D1CD6965EABA2732469C077B3C4E44D3503D882937DA5139076144FAEAB75083BF4E16725BB9625A99DE92F6F226DE343F73E974577F8D6F5B57CFBEB60763627240A28C90A73BC7A9E47D74CBABB6486988C983A5A3DC91A4D8E353AE6C608499D21391E32D8EF3A030925959B52C1BC03F17AAE2FEE4E28B2B51889EC2A5FE587C60139C9CF29AF46555B089B54B5EF0BB3B92BCC0EA0E6E94F944FE8E9741DDA902F185E0D16876A10351AD22FE6ABD4378AD74A13CD2BD9696F0B59A069CD6582F92458A89B15648E833614598D6FDABAC026791CDB3FA87873CA86E3DF7187C9230AFFB1089EF83B8CB54856ADC234D07DF479514A8F47EC9903930E47F9E93AE1F96D7358F4208E19CCED8AEC063AFE8A31E39C921F7D7867D57E8F68B1494793E6DCD06F3DC68809BD455DBB44076D6AB64586E0A09A42CEBA2829A5F81BDEA5EDB23DC251D69C373D2E275201#) - (u #00EA2CBBEFBFFBD4BD3850584AEA315F88ED892F7398E5C4ECD17F8E4588B073DA32AC708DADC0E55417553FB4DC25130F42A9A04E435C63E1091744232D53FF98ABA450E3B91AF512631E28BF453BE4FCB9713112F890F368523FE175B0909385F0B404B3E6370FA6DB33490DC216CE3DE548FDDF68C81FE49BB9683C30FA6D1DE8B019A94683E508B720F2EDA20133325FD4644620D086182F1E8283215D2BCBBC1B302DEA714CE1E59FE8E996489018078F8CCDDAEF086EFDF82BA45DF424E539ABC9D61ABEC14346275AA9256031514AAC59FF40C7D1B4363AC7C74E8CC3854C9E57F6913C2CFC599E9DBB446D553482C9B531563A7CADD562D64151B3961FB52A0D542406D491F8090EBB737C388016F95918313C0EC987F701F2A25AE3F0CEF2B9F3460A9E48AEE382F01CB09B0A9372104FAC2EE692BB2B14E6FE376A29891687E157C40F09FB3283402E4D319C9791E7A06025C542B4411EEA71890D22E34E8038B3002AC7FB75A50ED29AAEAFF36588950A06A8D2139B0420673DCB37087E8196A034D0A5C78A824BCD0A74BBD7E08B04B8F08F473C09F6350508CEB476DEE1E41D0CF960CA3E87AE8489811577F7D49CB1EF885453F7087B8126FB99028B5771EC9E159040109102DEE175DAFA038EE7B62B96797E56E6361C37DFC42398020114765E28C3F3B4B6A4C33A86A995A0D5647068B7147552F4E6130866527D4833949E9F9204406F096735F33BFD1BB57734E15D0B4035A37CCA7C897C18162B12951A684F586F1B7FF041A85B7F44FAC125A80AC782AD3F4D7EC52C318EEA52CFA6AF09EBA50813B5BAC8367B1FF80A99DB8BDEC3E3842455A06D22DA99F0BE5B52330D1D5C0CCACB3661D703BE1D96E7832A159C8858E08CC23101FBC0DE783D3209A80A3ED4EBCF57661B01D84EBCFBE70A0EC921588B8CD9B9BF21918D86C3C97B0F6BBF4037E80C99A349A1A2B78F337CC4029415FF0DB54AC9A3A1DF7E07482DC9F04E638C9D5BBAAD32A627F2EF1DC3E17AEC365E416C703C449AA40104DEC358202F7F78CCF77115ADAD567CDAE6B4B2C81DA4FBE6A97BBF2A704389911E4A5B39C3C1F187101E53B3DF7A0CE05C4B7956F4ED31DD225B46036C5344B3CDB236E5B1A12E159008D106D1CF6C14C5F7335A4A5D80E008F0106F636EF750723B50511F37B3BA6FFBEB27A270828B9CB123D7F59EA0BE956C0D024C77AC06086460998F18610ECB94651DF47AB37DDDCDB9797203A4321CBC1E6E85EC64919EB74AC7E2F3C15FEB5DFCCFC2359D353C8B6B600152D4211A55477FF31026B34C10C5F1FC1A1DD1C1EF6A14B26CFD1AF70D6BAA4461B4387631E4DCFDFFAB118F710A8B8B2D12EEC4924751720B9AA9D94527B9F19E8B352222567F662FC6753AA4BE22C2A851F2378AD5EE5539C1E0F4DD90400DD7DC6F1EA675D9#) - ) - ) - ) diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/t-mpi-bit.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/t-mpi-bit.c deleted file mode 100644 index aaad0f1d66..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/t-mpi-bit.c +++ /dev/null @@ -1,361 +0,0 @@ -/* t-mpi-bit.c - Tests for bit level functions - * Copyright (C) 2006 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <stdarg.h> - -#include "../src/gcrypt.h" - -#define PGM "t-mpi-bit" - -static const char *wherestr; -static int verbose; -static int error_count; - -#define xmalloc(a) gcry_xmalloc ((a)) -#define xcalloc(a,b) gcry_xcalloc ((a),(b)) -#define xfree(a) gcry_free ((a)) -#define pass() do { ; } while (0) - -static void -show (const char *format, ...) -{ - va_list arg_ptr; - - if (!verbose) - return; - fprintf (stderr, "%s: ", PGM); - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); -} - -static void -fail (const char *format, ...) -{ - va_list arg_ptr; - - fflush (stdout); - fprintf (stderr, "%s: ", PGM); - if (wherestr) - fprintf (stderr, "%s: ", wherestr); - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - error_count++; -} - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - fflush (stdout); - fprintf (stderr, "%s: ", PGM); - if (wherestr) - fprintf (stderr, "%s: ", wherestr); - va_start (arg_ptr, format); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - -/* Allocate a bit string consisting of '0' and '1' from the MPI - A. Return the LENGTH least significant bits. Caller needs to xfree - the result. */ -static char * -mpi2bitstr (gcry_mpi_t a, size_t length) -{ - char *p, *buf; - - buf = p = xmalloc (length+1); - while (length--) - *p++ = gcry_mpi_test_bit (a, length) ? '1':'0'; - *p = 0; - - return buf; -} - -/* Allocate a bit string consisting of '0' and '1' from the MPI A. Do - not return any leading zero bits. Caller needs to xfree the - result. */ -static char * -mpi2bitstr_nlz (gcry_mpi_t a) -{ - char *p, *buf; - size_t length = gcry_mpi_get_nbits (a); - - if (!length) - { - buf = p = xmalloc (2); - *p++ = '0'; - } - else - { - buf = p = xmalloc (length + 1); - while (length-- > 1) - *p++ = gcry_mpi_test_bit (a, length) ? '1':'0'; - *p++ = gcry_mpi_test_bit (a, 0) ? '1':'0'; - } - *p = 0; - return buf; -} - -/* Shift a bit string to the right. */ -static void -rshiftbitstring (char *string, size_t n) -{ - size_t len = strlen (string); - - if (n > len) - n = len; - - memmove (string+n, string, len-n); - memset (string, '0', n); -} - -/* Shift a bit string to the left. Caller needs to free the result. */ -static char * -lshiftbitstring (const char *string, size_t n) -{ - size_t len = strlen (string); - char *result; - - if (len+n+1 < len) - die ("internal overflow\n"); - /* Allocate enough space. */ - result = xmalloc (len+n+1); - for (; *string == '0' && string[1]; string++, len--) - ; - memcpy (result, string, len); - if (*string == '0' && !string[1]) - n = 0; /* Avoid extra nulls for an only 0 string. */ - else - memset (result+len, '0', n); - result[len+n] = 0; - return result; -} - - -/* This is to check a bug reported by bpgcrypt at itaparica.org on - 2006-07-31 against libgcrypt 1.2.2. */ -static void -one_bit_only (int highbit) -{ - gcry_mpi_t a; - char *result; - int i; - - wherestr = "one_bit_only"; - show ("checking that set_%sbit does only set one bit\n", highbit?"high":""); - - a = gcry_mpi_new (0); - gcry_mpi_randomize (a, 70, GCRY_WEAK_RANDOM); - gcry_mpi_set_ui (a, 0); - - if (highbit) - gcry_mpi_set_highbit (a, 42); - else - gcry_mpi_set_bit (a, 42); - if (!gcry_mpi_test_bit (a, 42)) - fail ("failed to set a bit\n"); - gcry_mpi_clear_bit (a, 42); - if (gcry_mpi_test_bit (a, 42)) - fail ("failed to clear a bit\n"); - result = mpi2bitstr (a, 70); - assert (strlen (result) == 70); - for (i=0; result[i]; i++) - if ( result[i] != '0' ) - break; - if (result[i]) - fail ("spurious bits detected\n"); - xfree (result); - gcry_mpi_release (a); -} - -/* Check that right shifting actually works for an amount larger than - the number of bits per limb. */ -static void -test_rshift (int pass) -{ - gcry_mpi_t a, b; - char *result, *result2; - int i; - - wherestr = "test_rshift"; - show ("checking that rshift works as expected (pass %d)\n", pass); - - a = gcry_mpi_new (0); - b = gcry_mpi_new (0); - gcry_mpi_randomize (a, 70, GCRY_WEAK_RANDOM); - - for (i=0; i < 75; i++) - { - gcry_mpi_rshift (b, a, i); - - result = mpi2bitstr (b, 72); - result2 = mpi2bitstr (a, 72); - rshiftbitstring (result2, i); - if (strcmp (result, result2)) - { - show ("got =%s\n", result); - show ("want=%s\n", result2); - fail ("rshift by %d failed\n", i); - } - xfree (result); - xfree (result2); - } - - /* Again. This time using in-place operation. */ - gcry_mpi_randomize (a, 70, GCRY_WEAK_RANDOM); - - for (i=0; i < 75; i++) - { - gcry_mpi_release (b); - b = gcry_mpi_copy (a); - gcry_mpi_rshift (b, b, i); - - result = mpi2bitstr (b, 72); - result2 = mpi2bitstr (a, 72); - rshiftbitstring (result2, i); - if (strcmp (result, result2)) - { - show ("got =%s\n", result); - show ("want=%s\n", result2); - fail ("in-place rshift by %d failed\n", i); - } - xfree (result2); - xfree (result); - } - - gcry_mpi_release (b); - gcry_mpi_release (a); -} - -/* Check that left shifting works correctly. */ -static void -test_lshift (int pass) -{ - static int size_list[] = {1, 31, 32, 63, 64, 65, 70, 0}; - int size_idx; - gcry_mpi_t a, b; - char *tmpstr, *result, *result2; - int i; - - wherestr = "test_lshift"; - show ("checking that lshift works as expected (pass %d)\n", pass); - - for (size_idx=0; size_list[size_idx]; size_idx++) - { - a = gcry_mpi_new (0); - b = gcry_mpi_new (0); - - /* gcry_mpi_randomize rounds up to full bytes, thus we need to - use gcry_mpi_clear_highbit to fix that. */ - gcry_mpi_randomize (a, size_list[size_idx], GCRY_WEAK_RANDOM); - gcry_mpi_clear_highbit (a, size_list[size_idx]); - - for (i=0; i < 75; i++) - { - gcry_mpi_lshift (b, a, i); - - result = mpi2bitstr_nlz (b); - tmpstr = mpi2bitstr_nlz (a); - result2 = lshiftbitstring (tmpstr, i); - xfree (tmpstr); - if (strcmp (result, result2)) - { - show ("got =%s\n", result); - show ("want=%s\n", result2); - fail ("lshift by %d failed\n", i); - } - xfree (result); - xfree (result2); - } - - /* Again. This time using in-place operation. */ - gcry_mpi_randomize (a, size_list[size_idx], GCRY_WEAK_RANDOM); - gcry_mpi_clear_highbit (a, size_list[size_idx]); - - for (i=0; i < 75; i++) - { - gcry_mpi_release (b); - b = gcry_mpi_copy (a); - gcry_mpi_lshift (b, b, i); - - result = mpi2bitstr_nlz (b); - tmpstr = mpi2bitstr_nlz (a); - result2 = lshiftbitstring (tmpstr, i); - xfree (tmpstr); - if (strcmp (result, result2)) - { - show ("got =%s\n", result); - show ("want=%s\n", result2); - fail ("in-place lshift by %d failed\n", i); - } - xfree (result2); - xfree (result); - } - - gcry_mpi_release (b); - gcry_mpi_release (a); - } -} - - -int -main (int argc, char **argv) -{ - int debug = 0; - int i; - - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - else if (argc > 1 && !strcmp (argv[1], "--debug")) - verbose = debug = 1; - - if (!gcry_check_version (GCRYPT_VERSION)) - die ("version mismatch\n"); - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); - if (debug) - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); - - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - - one_bit_only (0); - one_bit_only (1); - for (i=0; i < 5; i++) - test_rshift (i); /* Run several times due to random initializations. */ - - for (i=0; i < 5; i++) - test_lshift (i); /* Run several times due to random initializations. */ - - show ("All tests completed. Errors: %d\n", error_count); - return error_count ? 1 : 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/testapi.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/testapi.c deleted file mode 100644 index e14ae7b537..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/testapi.c +++ /dev/null @@ -1,112 +0,0 @@ -/* testapi.c - for libgcrypt - * Copyright (C) 2000, 2002 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser general Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gcrypt.h> - - -#define BUG() do {fprintf ( stderr, "Ooops at %s:%d\n", __FILE__ , __LINE__ );\ - exit(2);} while(0) - -/* an ElGamal public key */ -struct { - const char *p,*g,*y; -} elg_testkey1 = { - "0x9D559F31A6D30492C383213844AEBB7772963A85D3239F3611AAB93A2A985F64FB735B9259EC326BF5720F909980D609D37C288C9223B0350FBE493C3B5AF54CA23031E952E92F8A3DBEDBC5A684993D452CD54F85B85160166FCD25BD7AB6AE9B1EB4FCC9D300DAFF081C4CBA6694906D3E3FF18196A5CCF7F0A6182962166B", - "0x5", - "0x9640024BB2A277205813FF685048AA27E2B192B667163E7C59E381E27003D044C700C531CE8FD4AA781B463BC9FFE74956AF09A38A098322B1CF72FC896F009E3A6BFF053D3B1D1E1994BF9CC07FA12963D782F027B51511DDE8C5F43421FBC12734A9C070F158C729A370BEE5FC51A772219438EDA8202C35FA3F5D8CD1997B" -}; - -void -test_sexp ( int argc, char **argv ) -{ - int rc, nbits; - gcry_sexp_t sexp; - gcry_mpi_t key[3]; - size_t n; - char *buf; - - if ( gcry_mpi_scan( &key[0], GCRYMPI_FMT_HEX, elg_testkey1.p, NULL ) ) - BUG(); - if ( gcry_mpi_scan( &key[1], GCRYMPI_FMT_HEX, elg_testkey1.g, NULL ) ) - BUG(); - if ( gcry_mpi_scan( &key[2], GCRYMPI_FMT_HEX, elg_testkey1.y, NULL ) ) - BUG(); - - /* get nbits from a key */ - rc = gcry_sexp_build ( &sexp, NULL, - "(public-key(elg(p%m)(g%m)(y%m)))", - key[0], key[1], key[2] ); - fputs ( "DUMP of PK:\n", stderr ); - gcry_sexp_dump ( sexp ); - { gcry_sexp_t x; - x = gcry_sexp_cdr ( sexp ); - fputs ( "DUMP of CDR:\n", stderr ); - gcry_sexp_dump ( x ); - gcry_sexp_release ( x ); - } - nbits = gcry_pk_get_nbits( sexp ); - printf ( "elg_testkey1 - nbits=%d\n", nbits ); - n = gcry_sexp_sprint ( sexp, 0, NULL, 0 ); - buf = gcry_xmalloc ( n ); - n = gcry_sexp_sprint ( sexp, 0, buf, n ); - printf ( "sprint length=%u\n", (unsigned int)n ); - gcry_free ( buf ); - gcry_sexp_release( sexp ); -} - - -void -test_genkey ( int argc, char **argv ) -{ - int rc, nbits = 1024; - gcry_sexp_t s_parms, s_key; - - gcry_control( GCRYCTL_INIT_SECMEM, 16384, 0 ); - rc = gcry_sexp_build ( &s_parms, NULL, "(genkey(dsa(nbits %d)))", nbits ); - rc = gcry_pk_genkey( &s_key, s_parms ); - if ( rc ) { - fprintf ( stderr, "genkey failed: %s\n", gpg_strerror (rc) ); - return; - } - gcry_sexp_release( s_parms ); - gcry_sexp_dump ( s_key ); - gcry_sexp_release( s_key ); -} - -int -main( int argc, char **argv ) -{ - if ( argc < 2 ) - printf("%s\n", gcry_check_version ( NULL ) ); - else if ( !strcmp ( argv[1], "version") ) - printf("%s\n", gcry_check_version ( argc > 2 ? argv[2] : NULL ) ); - else if ( !strcmp ( argv[1], "sexp" ) ) - test_sexp ( argc-2, argv+2 ); - else if ( !strcmp ( argv[1], "genkey" ) ) - test_genkey ( argc-2, argv+2 ); - else { - fprintf (stderr, "usage: testapi mode-string [mode-args]\n"); - return 1; - } - - return 0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/tsexp.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/tsexp.c deleted file mode 100644 index 21d54a62f9..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/tsexp.c +++ /dev/null @@ -1,456 +0,0 @@ -/* tsexp.c - S-expression regression tests - * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. - * - * This file is part of Libgcrypt. - * - * Libgcrypt is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * Libgcrypt 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include "../src/gcrypt.h" - -#define PGMNAME "tsexp" - -static int verbose; -static int error_count; - -static void -info (const char *format, ...) -{ - va_list arg_ptr; - - if (verbose) - { - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - } -} - -static void -fail ( const char *format, ... ) -{ - va_list arg_ptr ; - - fputs (PGMNAME ": ", stderr); - va_start( arg_ptr, format ) ; - vfprintf (stderr, format, arg_ptr ); - va_end(arg_ptr); - error_count++; -} - - -/* fixme: we need better tests */ -static void -basic (void) -{ - int pass; - gcry_sexp_t sexp; - int idx; - char *secure_buffer; - size_t secure_buffer_len; - const char *string; - static struct { - const char *token; - const char *parm; - } values[] = { - { "public-key", NULL }, - { "dsa", NULL }, - { "dsa", "p" }, - { "dsa", "y" }, - { "dsa", "q" }, - { "dsa", "g" }, - { NULL } - }; - - info ("doing some pretty pointless tests\n"); - - secure_buffer_len = 99; - secure_buffer = gcry_xmalloc_secure (secure_buffer_len); - memset (secure_buffer, 'G', secure_buffer_len); - - for (pass=0;;pass++) - { - switch (pass) - { - case 0: - string = ("(public-key (dsa (p #41424344#) (y this_is_y) " - "(q #61626364656667#) (g %m)))"); - - if ( gcry_sexp_build (&sexp, NULL, string, - gcry_mpi_set_ui (NULL, 42)) ) - { - fail (" scanning `%s' failed\n", string); - return; - } - break; - - case 1: - string = ("(public-key (dsa (p #41424344#) (y this_is_y) " - "(q %b) (g %m)))"); - - if ( gcry_sexp_build (&sexp, NULL, string, - 15, "foo\0\x01\0x02789012345", - gcry_mpi_set_ui (NULL, 42)) ) - { - fail (" scanning `%s' failed\n", string); - return; - } - break; - - case 2: - string = ("(public-key (dsa (p #41424344#) (y silly_y_value) " - "(q %b) (g %m)))"); - - if ( gcry_sexp_build (&sexp, NULL, string, - secure_buffer_len, secure_buffer, - gcry_mpi_set_ui (NULL, 17)) ) - { - fail (" scanning `%s' failed\n", string); - return; - } - if (!gcry_is_secure (sexp)) - fail ("gcry_sexp_build did not switch to secure memory\n"); - break; - - case 3: - { - gcry_sexp_t help_sexp; - - if (gcry_sexp_new (&help_sexp, - "(foobar-parms (xp #1234#)(xq #03#))", 0, 1)) - { - fail (" scanning fixed string failed\n"); - return; - } - - string = ("(public-key (dsa (p #41424344#) (parm %S) " - "(y dummy)(q %b) (g %m)))"); - if ( gcry_sexp_build (&sexp, NULL, string, help_sexp, - secure_buffer_len, secure_buffer, - gcry_mpi_set_ui (NULL, 17)) ) - { - fail (" scanning `%s' failed\n", string); - return; - } - gcry_sexp_release (help_sexp); - } - break; - - - default: - return; /* Ready. */ - } - - - /* now find something */ - for (idx=0; values[idx].token; idx++) - { - const char *token = values[idx].token; - const char *parm = values[idx].parm; - gcry_sexp_t s1, s2; - gcry_mpi_t a; - const char *p; - size_t n; - - s1 = gcry_sexp_find_token (sexp, token, strlen(token) ); - if (!s1) - { - fail ("didn't found `%s'\n", token); - continue; - } - - p = gcry_sexp_nth_data (s1, 0, &n); - if (!p) - { - fail ("no car for `%s'\n", token); - continue; - } - info ("car=`%.*s'\n", (int)n, p); - - s2 = gcry_sexp_cdr (s1); - if (!s2) - { - fail ("no cdr for `%s'\n", token); - continue; - } - - p = gcry_sexp_nth_data (s2, 0, &n); - if (p) - { - fail ("data at car of `%s'\n", token); - continue; - } - - if (parm) - { - s2 = gcry_sexp_find_token (s1, parm, strlen (parm)); - if (!s2) - { - fail ("didn't found `%s'\n", parm); - continue; - } - p = gcry_sexp_nth_data (s2, 0, &n); - if (!p) - { - fail("no car for `%s'\n", parm ); - continue; - } - info ("car=`%.*s'\n", (int)n, p); - p = gcry_sexp_nth_data (s2, 1, &n); - if (!p) - { - fail("no cdr for `%s'\n", parm ); - continue; - } - info ("cdr=`%.*s'\n", (int)n, p); - - a = gcry_sexp_nth_mpi (s2, 0, GCRYMPI_FMT_USG); - if (!a) - { - fail("failed to cdr the mpi for `%s'\n", parm); - continue; - } - } - } - - gcry_sexp_release (sexp); - sexp = NULL; - } - gcry_free (secure_buffer); -} - - -static void -canon_len (void) -{ - static struct { - size_t textlen; /* length of the buffer */ - size_t expected;/* expected length or 0 on error and then ... */ - size_t erroff; /* ... and at this offset */ - gcry_error_t errcode; /* ... with this error code */ - const char *text; - } values[] = { - { 14, 13, 0, GPG_ERR_NO_ERROR, "(9:abcdefghi) " }, - { 16, 15, 0, GPG_ERR_NO_ERROR, "(10:abcdefghix)" }, - { 14, 0,14, GPG_ERR_SEXP_STRING_TOO_LONG, "(10:abcdefghi)" }, - { 15, 0, 1, GPG_ERR_SEXP_ZERO_PREFIX, "(010:abcdefghi)" }, - { 2, 0, 0, GPG_ERR_SEXP_NOT_CANONICAL, "1:"}, - { 4, 0, 4, GPG_ERR_SEXP_STRING_TOO_LONG, "(1:)"}, - { 5, 5, 0, GPG_ERR_NO_ERROR, "(1:x)"}, - { 2, 2, 0, GPG_ERR_NO_ERROR, "()"}, - { 4, 2, 0, GPG_ERR_NO_ERROR, "()()"}, - { 4, 4, 0, GPG_ERR_NO_ERROR, "(())"}, - { 3, 0, 3, GPG_ERR_SEXP_STRING_TOO_LONG, "(()"}, - { 3, 0, 1, GPG_ERR_SEXP_BAD_CHARACTER, "( )"}, - { 9, 9, 0, GPG_ERR_NO_ERROR, "(3:abc())"}, - { 10, 0, 6, GPG_ERR_SEXP_BAD_CHARACTER, "(3:abc ())"}, - /* fixme: we need much more cases */ - { 0 }, - }; - int idx; - gcry_error_t errcode; - size_t n, erroff; - - info ("checking canoncial length test function\n"); - for (idx=0; values[idx].text; idx++) - { - n = gcry_sexp_canon_len ((const unsigned char*)values[idx].text, - values[idx].textlen, - &erroff, &errcode); - - if (n && n == values[idx].expected) - ; /* success */ - else if (!n && !values[idx].expected) - { /* we expected an error - check that this is the right one */ - if (values[idx].erroff != erroff) - fail ("canonical length test %d - wrong error offset %u\n", - idx, (unsigned int)erroff); - if (gcry_err_code (errcode) != values[idx].errcode) - fail ("canonical length test %d - wrong error code %d\n", - idx, errcode); - } - else - fail ("canonical length test %d failed - n=%u, off=%u, err=%d\n", - idx, (unsigned int)n, (unsigned int)erroff, errcode); - } -} - - -static void -back_and_forth_one (int testno, const char *buffer, size_t length) -{ - gcry_error_t rc; - gcry_sexp_t se, se1; - size_t n, n1; - char *p1; - - rc = gcry_sexp_new (&se, buffer, length, 1); - if (rc) - { - fail ("baf %d: gcry_sexp_new failed: %s\n", testno, gpg_strerror (rc)); - return; - } - n1 = gcry_sexp_sprint (se, GCRYSEXP_FMT_CANON, NULL, 0); - if (!n1) - { - fail ("baf %d: get required length for canon failed\n", testno); - return; - } - p1 = gcry_xmalloc (n1); - n = gcry_sexp_sprint (se, GCRYSEXP_FMT_CANON, p1, n1); - if (n1 != n+1) /* sprints adds an extra 0 but dies not return it */ - { - fail ("baf %d: length mismatch for canon\n", testno); - return; - } - rc = gcry_sexp_create (&se1, p1, n, 0, gcry_free); - if (rc) - { - fail ("baf %d: gcry_sexp_create failed: %s\n", - testno, gpg_strerror (rc)); - return; - } - gcry_sexp_release (se1); - - /* Again but with memory checking. */ - p1 = gcry_xmalloc (n1+2); - *p1 = '\x55'; - p1[n1+1] = '\xaa'; - n = gcry_sexp_sprint (se, GCRYSEXP_FMT_CANON, p1+1, n1); - if (n1 != n+1) /* sprints adds an extra 0 but does not return it */ - { - fail ("baf %d: length mismatch for canon\n", testno); - return; - } - if (*p1 != '\x55' || p1[n1+1] != '\xaa') - fail ("baf %d: memory corrupted (1)\n", testno); - rc = gcry_sexp_create (&se1, p1+1, n, 0, NULL); - if (rc) - { - fail ("baf %d: gcry_sexp_create failed: %s\n", - testno, gpg_strerror (rc)); - return; - } - if (*p1 != '\x55' || p1[n1+1] != '\xaa') - fail ("baf %d: memory corrupted (2)\n", testno); - gcry_sexp_release (se1); - if (*p1 != '\x55' || p1[n1+1] != '\xaa') - fail ("baf %d: memory corrupted (3)\n", testno); - gcry_free (p1); - - /* FIXME: we need a lot more tests */ - - gcry_sexp_release (se); -} - - - -static void -back_and_forth (void) -{ - static struct { const char *buf; int len; } tests[] = { - { "(7:g34:fgh1::2:())", 0 }, - { "(7:g34:fgh1::2:())", 18 }, - { -"(protected-private-key \n" -" (rsa \n" -" (n #00BE8A536204687149A48FF9F1715FF3530AD9A836D62102BF4065E5CF5953236DB94F1DF2FF4D525CD4CE7966DDC3C839968E8BAC2948934DF047CC65287CD79F6C23C93E55D7F9231E3942BD496DE383469977635A51ADF4AF747DB958CA02E9940DFC1DC0FC7FC755E7EB6618FEE6DA54B8A06E0CBF9D9257443F9992261435#)\n" -" (e #010001#)\n" -" (protected openpgp-s2k3-sha1-aes-cbc \n" -" (\n" -" (sha1 #C2A5673BD3882405# \"96\")\n" -" #8D08AAF6A9209ED69D71EB7E64D78715#)\n" -" #F7B0B535F8F8E22F4F3DA031224070303F82F9207D42952F1ACF21A4AB1C50304EBB25527992C7B265A9E9FF702826FB88759BDD55E4759E9FCA6C879538C9D043A9C60A326CB6681090BAA731289BD880A7D5774D9999F026E5E7963BFC8C0BDC9F061393CB734B4F259725C0A0A0B15BA39C39146EF6A1B3DC4DF30A22EBE09FD05AE6CB0C8C6532951A925F354F4E26A51964F5BBA50081690C421C8385C4074E9BAB9297D081B857756607EAE652415275A741C89E815558A50AC638EDC5F5030210B4395E3E1A40FF38DCCCB333A19EA88EFE7E4D51B54128C6DF27395646836679AC21B1B25C1DA6F0A7CE9F9BE078EFC7934FA9AE202CBB0AA06C20DFAF9A66FAB7E9073FBE96B9A7F25C3BA45EC3EECA65796AEE313BA148DE5314F30345B452B50B17C4D841A7F27397126E8C10BD0CE3B50A82C0425AAEE7798031671407B681F52916256F78CAF92A477AC27BCBE26DAFD1BCE386A853E2A036F8314BB2E8E5BB1F196434232EFB0288331C2AB16DBC5457CC295EB966CAC5CE73D5DA5D566E469F0EFA82F9A12B8693E0#)\n" -" )\n" -" )\n", 0 }, - { NULL, 0 } - }; - int idx; - - for (idx=0; tests[idx].buf; idx++) - back_and_forth_one (idx, tests[idx].buf, tests[idx].len); -} - - -static void -check_sscan (void) -{ - static struct { - const char *text; - gcry_error_t expected_err; - } values[] = { - /* Bug reported by Olivier L'Heureux 2003-10-07 */ - { "(7:sig-val(3:dsa" - "(1:r20:\x7e\xff\xd5\xba\xc9\xc9\xa4\x9b\xd4\x26\x8b\x64" - "\x06\x7a\xcf\x42\x7b\x6c\x51\xfb)" - "(1:s21:\x01\x8c\x6c\x6f\x37\x1a\x8d\xfd\x5a\xb3\x2a\x3d" - "\xc5\xae\x23\xed\x32\x62\x30\x62\x3e)))", - GPG_ERR_NO_ERROR }, - { "(7:sig-val(3:dsa" - "(1:r20:\x7e\xff\xd5\xba\xc9\xc9\xa4\x9b\xd4\x26\x8b\x64" - "\x06\x7a\xcf\x42\x7b\x6c\x51\xfb)" - "(1:s21:\x01\x8c\x6c\x6f\x37\x1a\x8d\xfd\x5a\xb3\x2a\x3d" - "\xc5\xae\x23\xed\x32\x62\x30\x62\x3e))", - GPG_ERR_SEXP_UNMATCHED_PAREN }, - { "(7:sig-val(3:dsa" - "(1:r20:\x7e\xff\xd5\xba\xc9\xc9\xa4\x9b\xd4\x26\x8b\x64" - "\x06\x7a\xcf\x42\x7b\x6c\x51\xfb)" - "(1:s21:\x01\x8c\x6c\x6f\x37\x1a\x8d\xfd\x5a\xb3\x2a\x3d" - "\xc5\xae\x23\xed\x32\x62\x30\x62\x3e))))", - GPG_ERR_SEXP_UNMATCHED_PAREN }, - { NULL, 0 } - }; - int idx; - gcry_error_t err; - gcry_sexp_t s; - - info ("checking gcry_sexp_sscan\n"); - for (idx=0; values[idx].text; idx++) - { - err = gcry_sexp_sscan (&s, NULL, - values[idx].text, - strlen (values[idx].text)); - if (gpg_err_code (err) != values[idx].expected_err) - fail ("gcry_sexp_sscan test %d failed: %s\n", idx, gpg_strerror (err)); - gcry_sexp_release (s); - } -} - - - - -int -main (int argc, char **argv) -{ - if (argc > 1 && !strcmp (argv[1], "--verbose")) - verbose = 1; - - gcry_control (GCRYCTL_DISABLE_SECMEM_WARN); - gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0); - - basic (); - canon_len (); - back_and_forth (); - check_sscan (); - - return error_count? 1:0; -} diff --git a/plugins/MirOTR/libgcrypt-1.4.6/tests/version.c b/plugins/MirOTR/libgcrypt-1.4.6/tests/version.c deleted file mode 100644 index 03259af7e7..0000000000 --- a/plugins/MirOTR/libgcrypt-1.4.6/tests/version.c +++ /dev/null @@ -1,58 +0,0 @@ -/* version.c - This version test should be run first. - Copyright (C) 2007 Free Software Foundation, Inc. - - This file is part of Libgcrypt. - - Libgcrypt is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of - the License, or (at your option) any later version. - - Libgcrypt 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ - -/* This test should be run first because due to a failing config.links - script or bad configure parameters the just build libgcrypt may - crash in case MPI function for specific CPU revisions have been - enabled. Running this test first will print out information so to - make it easier to figure out the problem. */ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> - -#include "../src/gcrypt.h" - -#define PGM "version" - - -int -main (int argc, char **argv) -{ - (void)argc; - (void)argv; - - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - if (!gcry_check_version (GCRYPT_VERSION)) - { - fprintf (stderr, PGM ": version mismatch\n"); - exit (1); - } - - gcry_control (GCRYCTL_PRINT_CONFIG, NULL); - - return 0; -} - |