From 539705d58fc39a28388ff18c695dd406f4ffd1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCmann?= Date: Fri, 20 Mar 2015 12:32:29 +0000 Subject: MirOTR: Libgcrypt and Libgpg-error update Libgcrypt 1.4.6 => 1.6.3 Libgpg-error 1.9 => 1.18 git-svn-id: http://svn.miranda-ng.org/main/trunk@12449 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj | 57 +- .../MirOTR/Libgcrypt/Libgcrypt_10.vcxproj.filters | 168 +- plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj | 57 +- .../MirOTR/Libgcrypt/Libgcrypt_12.vcxproj.filters | 168 +- plugins/MirOTR/Libgcrypt/cipher/ac.c | 3301 --- plugins/MirOTR/Libgcrypt/cipher/arcfour.c | 65 +- plugins/MirOTR/Libgcrypt/cipher/bithelp.h | 60 +- plugins/MirOTR/Libgcrypt/cipher/blowfish.c | 551 +- plugins/MirOTR/Libgcrypt/cipher/bufhelp.h | 378 + plugins/MirOTR/Libgcrypt/cipher/camellia-glue.c | 525 +- plugins/MirOTR/Libgcrypt/cipher/camellia.c | 196 +- plugins/MirOTR/Libgcrypt/cipher/camellia.h | 25 +- plugins/MirOTR/Libgcrypt/cipher/cast5.c | 486 +- plugins/MirOTR/Libgcrypt/cipher/cipher-aeswrap.c | 210 + plugins/MirOTR/Libgcrypt/cipher/cipher-cbc.c | 205 + plugins/MirOTR/Libgcrypt/cipher/cipher-ccm.c | 442 + plugins/MirOTR/Libgcrypt/cipher/cipher-cfb.c | 226 + plugins/MirOTR/Libgcrypt/cipher/cipher-cmac.c | 238 + plugins/MirOTR/Libgcrypt/cipher/cipher-ctr.c | 111 + plugins/MirOTR/Libgcrypt/cipher/cipher-gcm.c | 1180 + plugins/MirOTR/Libgcrypt/cipher/cipher-internal.h | 322 + plugins/MirOTR/Libgcrypt/cipher/cipher-ofb.c | 96 + plugins/MirOTR/Libgcrypt/cipher/cipher-selftest.c | 470 + plugins/MirOTR/Libgcrypt/cipher/cipher-selftest.h | 67 + plugins/MirOTR/Libgcrypt/cipher/cipher.c | 2148 +- plugins/MirOTR/Libgcrypt/cipher/crc.c | 22 +- plugins/MirOTR/Libgcrypt/cipher/des.c | 61 +- plugins/MirOTR/Libgcrypt/cipher/dsa-common.c | 394 + plugins/MirOTR/Libgcrypt/cipher/dsa.c | 997 +- plugins/MirOTR/Libgcrypt/cipher/ecc-common.h | 142 + plugins/MirOTR/Libgcrypt/cipher/ecc-curves.c | 1162 + plugins/MirOTR/Libgcrypt/cipher/ecc-ecdsa.c | 234 + plugins/MirOTR/Libgcrypt/cipher/ecc-eddsa.c | 840 + plugins/MirOTR/Libgcrypt/cipher/ecc-gost.c | 233 + plugins/MirOTR/Libgcrypt/cipher/ecc-misc.c | 287 + plugins/MirOTR/Libgcrypt/cipher/ecc.c | 2415 +- plugins/MirOTR/Libgcrypt/cipher/elgamal.c | 809 +- plugins/MirOTR/Libgcrypt/cipher/gost.h | 31 + plugins/MirOTR/Libgcrypt/cipher/gost28147.c | 452 + plugins/MirOTR/Libgcrypt/cipher/gostr3411-94.c | 286 + plugins/MirOTR/Libgcrypt/cipher/hash-common.c | 67 +- plugins/MirOTR/Libgcrypt/cipher/hash-common.h | 31 +- plugins/MirOTR/Libgcrypt/cipher/hmac-tests.c | 38 +- plugins/MirOTR/Libgcrypt/cipher/idea.c | 379 + plugins/MirOTR/Libgcrypt/cipher/kdf-internal.h | 40 + plugins/MirOTR/Libgcrypt/cipher/kdf.c | 300 + plugins/MirOTR/Libgcrypt/cipher/mac-cmac.c | 226 + plugins/MirOTR/Libgcrypt/cipher/mac-gmac.c | 185 + plugins/MirOTR/Libgcrypt/cipher/mac-hmac.c | 272 + plugins/MirOTR/Libgcrypt/cipher/mac-internal.h | 204 + plugins/MirOTR/Libgcrypt/cipher/mac.c | 466 + plugins/MirOTR/Libgcrypt/cipher/md.c | 889 +- plugins/MirOTR/Libgcrypt/cipher/md4.c | 158 +- plugins/MirOTR/Libgcrypt/cipher/md5.c | 159 +- plugins/MirOTR/Libgcrypt/cipher/primegen.c | 515 +- plugins/MirOTR/Libgcrypt/cipher/pubkey-internal.h | 100 + plugins/MirOTR/Libgcrypt/cipher/pubkey-util.c | 1050 + plugins/MirOTR/Libgcrypt/cipher/pubkey.c | 2655 +- plugins/MirOTR/Libgcrypt/cipher/random.c | 323 - plugins/MirOTR/Libgcrypt/cipher/rfc2268.c | 72 +- plugins/MirOTR/Libgcrypt/cipher/rijndael-tables.h | 1817 +- plugins/MirOTR/Libgcrypt/cipher/rijndael.c | 2352 +- plugins/MirOTR/Libgcrypt/cipher/rmd.h | 8 +- plugins/MirOTR/Libgcrypt/cipher/rmd160.c | 167 +- plugins/MirOTR/Libgcrypt/cipher/rndw32.c | 982 - plugins/MirOTR/Libgcrypt/cipher/rsa-common.c | 973 + plugins/MirOTR/Libgcrypt/cipher/rsa.c | 1045 +- plugins/MirOTR/Libgcrypt/cipher/salsa20.c | 577 + plugins/MirOTR/Libgcrypt/cipher/scrypt.c | 324 + plugins/MirOTR/Libgcrypt/cipher/seed.c | 24 +- plugins/MirOTR/Libgcrypt/cipher/serpent.c | 1342 +- plugins/MirOTR/Libgcrypt/cipher/sha1.c | 264 +- plugins/MirOTR/Libgcrypt/cipher/sha256.c | 244 +- plugins/MirOTR/Libgcrypt/cipher/sha512.c | 624 +- plugins/MirOTR/Libgcrypt/cipher/stribog.c | 1323 + plugins/MirOTR/Libgcrypt/cipher/tiger.c | 202 +- plugins/MirOTR/Libgcrypt/cipher/twofish.c | 340 +- plugins/MirOTR/Libgcrypt/cipher/whirlpool.c | 227 +- plugins/MirOTR/Libgcrypt/compat/clock.c | 36 + plugins/MirOTR/Libgcrypt/compat/compat.c | 41 + plugins/MirOTR/Libgcrypt/compat/getpid.c | 29 + plugins/MirOTR/Libgcrypt/compat/libcompat.h | 37 + plugins/MirOTR/Libgcrypt/custom/config.h | 1068 +- plugins/MirOTR/Libgcrypt/custom/config2.h | 428 - .../MirOTR/Libgcrypt/custom/libgcrypt-1.2.2.def | 183 - plugins/MirOTR/Libgcrypt/custom/sys/file.h | 1 + plugins/MirOTR/Libgcrypt/custom/sys/time.h | 1 + plugins/MirOTR/Libgcrypt/custom/unistd.h | 43 + plugins/MirOTR/Libgcrypt/inc/pwd.h | 0 plugins/MirOTR/Libgcrypt/inc/sys/errno.h | 0 plugins/MirOTR/Libgcrypt/inc/sys/ipc.h | 0 plugins/MirOTR/Libgcrypt/inc/sys/socket.h | 0 plugins/MirOTR/Libgcrypt/inc/sys/time.h | 2 - plugins/MirOTR/Libgcrypt/inc/sys/types.h | 49 - plugins/MirOTR/Libgcrypt/inc/sys/un.h | 0 plugins/MirOTR/Libgcrypt/inc/sys/wait.h | 0 plugins/MirOTR/Libgcrypt/inc/unistd.h | 48 - plugins/MirOTR/Libgcrypt/mpi/amd64/mpih-mul2.S | 43 - plugins/MirOTR/Libgcrypt/mpi/asm-syntax.h | 71 + plugins/MirOTR/Libgcrypt/mpi/config.links | 97 +- plugins/MirOTR/Libgcrypt/mpi/ec-ed25519.c | 37 + plugins/MirOTR/Libgcrypt/mpi/ec-internal.h | 25 + plugins/MirOTR/Libgcrypt/mpi/ec.c | 1241 +- .../MirOTR/Libgcrypt/mpi/generic/mpi-asm-defs.h | 16 +- plugins/MirOTR/Libgcrypt/mpi/longlong.h | 251 +- plugins/MirOTR/Libgcrypt/mpi/mod-source-info.h | 12 +- plugins/MirOTR/Libgcrypt/mpi/mpi-add.c | 23 +- plugins/MirOTR/Libgcrypt/mpi/mpi-asm-defs.h | 16 +- plugins/MirOTR/Libgcrypt/mpi/mpi-bit.c | 134 +- plugins/MirOTR/Libgcrypt/mpi/mpi-cmp.c | 63 +- plugins/MirOTR/Libgcrypt/mpi/mpi-div.c | 12 +- plugins/MirOTR/Libgcrypt/mpi/mpi-gcd.c | 14 +- plugins/MirOTR/Libgcrypt/mpi/mpi-inline.c | 3 +- plugins/MirOTR/Libgcrypt/mpi/mpi-inline.h | 9 +- plugins/MirOTR/Libgcrypt/mpi/mpi-internal.h | 6 +- plugins/MirOTR/Libgcrypt/mpi/mpi-inv.c | 7 +- plugins/MirOTR/Libgcrypt/mpi/mpi-mod.c | 31 +- plugins/MirOTR/Libgcrypt/mpi/mpi-mpow.c | 9 +- plugins/MirOTR/Libgcrypt/mpi/mpi-mul.c | 15 +- plugins/MirOTR/Libgcrypt/mpi/mpi-pow.c | 547 +- plugins/MirOTR/Libgcrypt/mpi/mpi-scan.c | 134 +- plugins/MirOTR/Libgcrypt/mpi/mpicoder.c | 511 +- plugins/MirOTR/Libgcrypt/mpi/mpih-add1-asm.S | 63 + plugins/MirOTR/Libgcrypt/mpi/mpih-div.c | 11 +- plugins/MirOTR/Libgcrypt/mpi/mpih-lshift-asm.S | 77 + plugins/MirOTR/Libgcrypt/mpi/mpih-mul.c | 21 +- plugins/MirOTR/Libgcrypt/mpi/mpih-mul1-asm.S | 65 + plugins/MirOTR/Libgcrypt/mpi/mpih-mul2-asm.S | 64 + plugins/MirOTR/Libgcrypt/mpi/mpih-mul3-asm.S | 66 + plugins/MirOTR/Libgcrypt/mpi/mpih-rshift-asm.S | 80 + plugins/MirOTR/Libgcrypt/mpi/mpih-sub1-asm.S | 61 + plugins/MirOTR/Libgcrypt/mpi/mpiutil.c | 363 +- plugins/MirOTR/Libgcrypt/mpi/sysdep.h | 6 + plugins/MirOTR/Libgcrypt/random/rand-internal.h | 33 +- plugins/MirOTR/Libgcrypt/random/random-csprng.c | 1048 +- plugins/MirOTR/Libgcrypt/random/random-daemon.c | 34 +- plugins/MirOTR/Libgcrypt/random/random-fips.c | 175 +- plugins/MirOTR/Libgcrypt/random/random-system.c | 256 + plugins/MirOTR/Libgcrypt/random/random.c | 292 +- plugins/MirOTR/Libgcrypt/random/random.h | 13 +- plugins/MirOTR/Libgcrypt/random/rndegd.c | 22 +- plugins/MirOTR/Libgcrypt/random/rndhw.c | 99 +- plugins/MirOTR/Libgcrypt/random/rndlinux.c | 182 +- plugins/MirOTR/Libgcrypt/random/rndunix.c | 62 +- plugins/MirOTR/Libgcrypt/random/rndw32.c | 166 +- plugins/MirOTR/Libgcrypt/random/rndw32ce.c | 199 + plugins/MirOTR/Libgcrypt/read/AUTHORS | 131 - plugins/MirOTR/Libgcrypt/read/COPYING | 340 - plugins/MirOTR/Libgcrypt/read/COPYING.LIB | 510 - plugins/MirOTR/Libgcrypt/read/ChangeLog | 1358 - plugins/MirOTR/Libgcrypt/read/INSTALL | 234 - plugins/MirOTR/Libgcrypt/read/Makefile.am | 53 - plugins/MirOTR/Libgcrypt/read/Makefile.in | 719 - plugins/MirOTR/Libgcrypt/read/NEWS | 626 - plugins/MirOTR/Libgcrypt/read/README | 270 - plugins/MirOTR/Libgcrypt/read/README.SVN | 51 - plugins/MirOTR/Libgcrypt/read/THANKS | 159 - plugins/MirOTR/Libgcrypt/read/TODO | 61 - plugins/MirOTR/Libgcrypt/read/VERSION | 1 - plugins/MirOTR/Libgcrypt/read/acinclude.m4 | 420 - plugins/MirOTR/Libgcrypt/read/aclocal.m4 | 981 - plugins/MirOTR/Libgcrypt/read/autogen.sh | 200 - plugins/MirOTR/Libgcrypt/read/compile | 142 - plugins/MirOTR/Libgcrypt/read/config.guess | 1516 -- plugins/MirOTR/Libgcrypt/read/config.h.in | 428 - plugins/MirOTR/Libgcrypt/read/config.sub | 1630 -- plugins/MirOTR/Libgcrypt/read/configure | 24847 ------------------- plugins/MirOTR/Libgcrypt/read/configure.ac | 1173 - plugins/MirOTR/Libgcrypt/read/depcomp | 584 - plugins/MirOTR/Libgcrypt/read/install-sh | 507 - plugins/MirOTR/Libgcrypt/read/ltmain.sh | 6871 ----- plugins/MirOTR/Libgcrypt/read/missing | 360 - plugins/MirOTR/Libgcrypt/read/mkinstalldirs | 161 - plugins/MirOTR/Libgcrypt/src/ath.c | 601 +- plugins/MirOTR/Libgcrypt/src/ath.h | 122 +- plugins/MirOTR/Libgcrypt/src/cipher-proto.h | 238 +- plugins/MirOTR/Libgcrypt/src/cipher.h | 188 +- plugins/MirOTR/Libgcrypt/src/context.c | 137 + plugins/MirOTR/Libgcrypt/src/context.h | 32 + plugins/MirOTR/Libgcrypt/src/dumpsexp.c | 253 +- plugins/MirOTR/Libgcrypt/src/ec-context.h | 84 + plugins/MirOTR/Libgcrypt/src/fips.c | 92 +- plugins/MirOTR/Libgcrypt/src/g10lib.h | 211 +- plugins/MirOTR/Libgcrypt/src/gcrypt-int.h | 534 + plugins/MirOTR/Libgcrypt/src/gcrypt-module.h | 233 - plugins/MirOTR/Libgcrypt/src/gcrypt.h | 1066 +- plugins/MirOTR/Libgcrypt/src/gcrypt.h.in | 1839 -- plugins/MirOTR/Libgcrypt/src/gcryptrnd.c | 43 +- plugins/MirOTR/Libgcrypt/src/getrandom.c | 25 +- plugins/MirOTR/Libgcrypt/src/global.c | 509 +- plugins/MirOTR/Libgcrypt/src/hmac256.c | 89 +- plugins/MirOTR/Libgcrypt/src/hwf-arm.c | 166 + plugins/MirOTR/Libgcrypt/src/hwf-common.h | 27 + plugins/MirOTR/Libgcrypt/src/hwf-x86.c | 310 + plugins/MirOTR/Libgcrypt/src/hwfeatures.c | 252 +- plugins/MirOTR/Libgcrypt/src/libgcrypt-config.in | 177 - plugins/MirOTR/Libgcrypt/src/libgcrypt.def | 156 +- plugins/MirOTR/Libgcrypt/src/libgcrypt.m4 | 108 - plugins/MirOTR/Libgcrypt/src/libgcrypt.vers | 109 - plugins/MirOTR/Libgcrypt/src/misc.c | 229 +- plugins/MirOTR/Libgcrypt/src/missing-string.c | 3 +- plugins/MirOTR/Libgcrypt/src/module.c | 212 - plugins/MirOTR/Libgcrypt/src/mpi.h | 201 +- plugins/MirOTR/Libgcrypt/src/mpicalc.c | 609 + plugins/MirOTR/Libgcrypt/src/secmem.c | 110 +- plugins/MirOTR/Libgcrypt/src/secmem.h | 2 + plugins/MirOTR/Libgcrypt/src/sexp.c | 4413 ++-- plugins/MirOTR/Libgcrypt/src/stdmem.c | 45 +- plugins/MirOTR/Libgcrypt/src/types.h | 125 +- plugins/MirOTR/Libgcrypt/src/versioninfo.rc.in | 52 - plugins/MirOTR/Libgcrypt/src/visibility.c | 881 +- plugins/MirOTR/Libgcrypt/src/visibility.h | 1089 +- plugins/MirOTR/Libgpg-error/README | 47 - plugins/MirOTR/Libgpg-error/code-from-errno.c | 10 +- plugins/MirOTR/Libgpg-error/code-from-errno.h | 253 +- plugins/MirOTR/Libgpg-error/code-to-errno.c | 6 +- plugins/MirOTR/Libgpg-error/code-to-errno.h | 6 +- plugins/MirOTR/Libgpg-error/err-codes-sym.h | 232 +- plugins/MirOTR/Libgpg-error/err-codes.h | 234 +- plugins/MirOTR/Libgpg-error/err-codes.h.in | 298 - plugins/MirOTR/Libgpg-error/err-sources-sym.h | 25 +- plugins/MirOTR/Libgpg-error/err-sources.h | 25 +- plugins/MirOTR/Libgpg-error/err-sources.h.in | 58 - plugins/MirOTR/Libgpg-error/errnos-sym.h | 8 +- plugins/MirOTR/Libgpg-error/errnos.in | 172 - plugins/MirOTR/Libgpg-error/estream-printf.c | 1875 ++ plugins/MirOTR/Libgpg-error/estream-printf.h | 151 + plugins/MirOTR/Libgpg-error/estream.c | 4508 ++++ plugins/MirOTR/Libgpg-error/extra-h.in | 41 - plugins/MirOTR/Libgpg-error/gen-posix-lock-obj.c | 131 + plugins/MirOTR/Libgpg-error/gen-w32-lock-obj.c | 55 + plugins/MirOTR/Libgpg-error/gpg-error-config | 26 +- plugins/MirOTR/Libgpg-error/gpg-error-config.in | 84 - plugins/MirOTR/Libgpg-error/gpg-error.c | 45 +- plugins/MirOTR/Libgpg-error/gpg-error.def | 102 +- plugins/MirOTR/Libgpg-error/gpg-error.def.in | 29 - plugins/MirOTR/Libgpg-error/gpg-error.exe | Bin 15872 -> 0 bytes plugins/MirOTR/Libgpg-error/gpg-error.h | 1947 +- plugins/MirOTR/Libgpg-error/gpg-error.h.in | 274 - plugins/MirOTR/Libgpg-error/gpg-error.m4 | 65 - plugins/MirOTR/Libgpg-error/gpgrt-int.h | 205 + plugins/MirOTR/Libgpg-error/init.c | 129 +- plugins/MirOTR/Libgpg-error/init.h | 5 + plugins/MirOTR/Libgpg-error/lock.h | 24 + plugins/MirOTR/Libgpg-error/mkerrcodes.awk | 99 - plugins/MirOTR/Libgpg-error/mkerrcodes.exe | Bin 20570 -> 0 bytes plugins/MirOTR/Libgpg-error/mkerrcodes.h | 115 +- plugins/MirOTR/Libgpg-error/mkerrcodes1.awk | 96 - plugins/MirOTR/Libgpg-error/mkerrcodes2.awk | 134 - plugins/MirOTR/Libgpg-error/mkerrnos.awk | 104 - plugins/MirOTR/Libgpg-error/mkheader.awk | 218 - plugins/MirOTR/Libgpg-error/mkheader.c | 597 + plugins/MirOTR/Libgpg-error/mkstrtable.awk | 189 - plugins/MirOTR/Libgpg-error/posix-lock-obj.h | 35 + plugins/MirOTR/Libgpg-error/posix-lock.c | 249 + plugins/MirOTR/Libgpg-error/posix-thread.c | 63 + plugins/MirOTR/Libgpg-error/strerror.c | 8 +- plugins/MirOTR/Libgpg-error/strsource.c | 8 +- plugins/MirOTR/Libgpg-error/thread.h | 24 + plugins/MirOTR/Libgpg-error/version.c | 121 + plugins/MirOTR/Libgpg-error/versioninfo.rc | 16 +- plugins/MirOTR/Libgpg-error/versioninfo.rc.in | 52 - plugins/MirOTR/Libgpg-error/visibility.c | 689 + plugins/MirOTR/Libgpg-error/visibility.h | 253 + plugins/MirOTR/Libgpg-error/w32-gettext.c | 181 +- plugins/MirOTR/Libgpg-error/w32-lock-obj.h | 38 + plugins/MirOTR/Libgpg-error/w32-lock.c | 158 + plugins/MirOTR/Libgpg-error/w32-thread.c | 44 + plugins/MirOTR/Libgpg-error/w32ce-add.h | 5 +- 269 files changed, 51934 insertions(+), 72369 deletions(-) delete mode 100644 plugins/MirOTR/Libgcrypt/cipher/ac.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/bufhelp.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-aeswrap.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-cbc.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-ccm.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-cfb.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-cmac.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-ctr.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-gcm.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-internal.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-ofb.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-selftest.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/cipher-selftest.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/dsa-common.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/ecc-common.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/ecc-curves.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/ecc-ecdsa.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/ecc-eddsa.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/ecc-gost.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/ecc-misc.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/gost.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/gost28147.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/gostr3411-94.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/idea.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/kdf-internal.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/kdf.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/mac-cmac.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/mac-gmac.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/mac-hmac.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/mac-internal.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/mac.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/pubkey-internal.h create mode 100644 plugins/MirOTR/Libgcrypt/cipher/pubkey-util.c delete mode 100644 plugins/MirOTR/Libgcrypt/cipher/random.c delete mode 100644 plugins/MirOTR/Libgcrypt/cipher/rndw32.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/rsa-common.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/salsa20.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/scrypt.c create mode 100644 plugins/MirOTR/Libgcrypt/cipher/stribog.c create mode 100644 plugins/MirOTR/Libgcrypt/compat/clock.c create mode 100644 plugins/MirOTR/Libgcrypt/compat/compat.c create mode 100644 plugins/MirOTR/Libgcrypt/compat/getpid.c create mode 100644 plugins/MirOTR/Libgcrypt/compat/libcompat.h delete mode 100644 plugins/MirOTR/Libgcrypt/custom/config2.h delete mode 100644 plugins/MirOTR/Libgcrypt/custom/libgcrypt-1.2.2.def create mode 100644 plugins/MirOTR/Libgcrypt/custom/sys/file.h create mode 100644 plugins/MirOTR/Libgcrypt/custom/sys/time.h create mode 100644 plugins/MirOTR/Libgcrypt/custom/unistd.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/pwd.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/sys/errno.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/sys/ipc.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/sys/socket.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/sys/time.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/sys/types.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/sys/un.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/sys/wait.h delete mode 100644 plugins/MirOTR/Libgcrypt/inc/unistd.h create mode 100644 plugins/MirOTR/Libgcrypt/mpi/asm-syntax.h create mode 100644 plugins/MirOTR/Libgcrypt/mpi/ec-ed25519.c create mode 100644 plugins/MirOTR/Libgcrypt/mpi/ec-internal.h create mode 100644 plugins/MirOTR/Libgcrypt/mpi/mpih-add1-asm.S create mode 100644 plugins/MirOTR/Libgcrypt/mpi/mpih-lshift-asm.S create mode 100644 plugins/MirOTR/Libgcrypt/mpi/mpih-mul1-asm.S create mode 100644 plugins/MirOTR/Libgcrypt/mpi/mpih-mul2-asm.S create mode 100644 plugins/MirOTR/Libgcrypt/mpi/mpih-mul3-asm.S create mode 100644 plugins/MirOTR/Libgcrypt/mpi/mpih-rshift-asm.S create mode 100644 plugins/MirOTR/Libgcrypt/mpi/mpih-sub1-asm.S create mode 100644 plugins/MirOTR/Libgcrypt/mpi/sysdep.h create mode 100644 plugins/MirOTR/Libgcrypt/random/random-system.c create mode 100644 plugins/MirOTR/Libgcrypt/random/rndw32ce.c delete mode 100644 plugins/MirOTR/Libgcrypt/read/AUTHORS delete mode 100644 plugins/MirOTR/Libgcrypt/read/COPYING delete mode 100644 plugins/MirOTR/Libgcrypt/read/COPYING.LIB delete mode 100644 plugins/MirOTR/Libgcrypt/read/ChangeLog delete mode 100644 plugins/MirOTR/Libgcrypt/read/INSTALL delete mode 100644 plugins/MirOTR/Libgcrypt/read/Makefile.am delete mode 100644 plugins/MirOTR/Libgcrypt/read/Makefile.in delete mode 100644 plugins/MirOTR/Libgcrypt/read/NEWS delete mode 100644 plugins/MirOTR/Libgcrypt/read/README delete mode 100644 plugins/MirOTR/Libgcrypt/read/README.SVN delete mode 100644 plugins/MirOTR/Libgcrypt/read/THANKS delete mode 100644 plugins/MirOTR/Libgcrypt/read/TODO delete mode 100644 plugins/MirOTR/Libgcrypt/read/VERSION delete mode 100644 plugins/MirOTR/Libgcrypt/read/acinclude.m4 delete mode 100644 plugins/MirOTR/Libgcrypt/read/aclocal.m4 delete mode 100644 plugins/MirOTR/Libgcrypt/read/autogen.sh delete mode 100644 plugins/MirOTR/Libgcrypt/read/compile delete mode 100644 plugins/MirOTR/Libgcrypt/read/config.guess delete mode 100644 plugins/MirOTR/Libgcrypt/read/config.h.in delete mode 100644 plugins/MirOTR/Libgcrypt/read/config.sub delete mode 100644 plugins/MirOTR/Libgcrypt/read/configure delete mode 100644 plugins/MirOTR/Libgcrypt/read/configure.ac delete mode 100644 plugins/MirOTR/Libgcrypt/read/depcomp delete mode 100644 plugins/MirOTR/Libgcrypt/read/install-sh delete mode 100644 plugins/MirOTR/Libgcrypt/read/ltmain.sh delete mode 100644 plugins/MirOTR/Libgcrypt/read/missing delete mode 100644 plugins/MirOTR/Libgcrypt/read/mkinstalldirs create mode 100644 plugins/MirOTR/Libgcrypt/src/context.c create mode 100644 plugins/MirOTR/Libgcrypt/src/context.h create mode 100644 plugins/MirOTR/Libgcrypt/src/ec-context.h create mode 100644 plugins/MirOTR/Libgcrypt/src/gcrypt-int.h delete mode 100644 plugins/MirOTR/Libgcrypt/src/gcrypt-module.h delete mode 100644 plugins/MirOTR/Libgcrypt/src/gcrypt.h.in create mode 100644 plugins/MirOTR/Libgcrypt/src/hwf-arm.c create mode 100644 plugins/MirOTR/Libgcrypt/src/hwf-common.h create mode 100644 plugins/MirOTR/Libgcrypt/src/hwf-x86.c delete mode 100644 plugins/MirOTR/Libgcrypt/src/libgcrypt-config.in delete mode 100644 plugins/MirOTR/Libgcrypt/src/libgcrypt.m4 delete mode 100644 plugins/MirOTR/Libgcrypt/src/libgcrypt.vers delete mode 100644 plugins/MirOTR/Libgcrypt/src/module.c create mode 100644 plugins/MirOTR/Libgcrypt/src/mpicalc.c delete mode 100644 plugins/MirOTR/Libgcrypt/src/versioninfo.rc.in delete mode 100644 plugins/MirOTR/Libgpg-error/README delete mode 100644 plugins/MirOTR/Libgpg-error/err-codes.h.in delete mode 100644 plugins/MirOTR/Libgpg-error/err-sources.h.in delete mode 100644 plugins/MirOTR/Libgpg-error/errnos.in create mode 100644 plugins/MirOTR/Libgpg-error/estream-printf.c create mode 100644 plugins/MirOTR/Libgpg-error/estream-printf.h create mode 100644 plugins/MirOTR/Libgpg-error/estream.c delete mode 100644 plugins/MirOTR/Libgpg-error/extra-h.in create mode 100644 plugins/MirOTR/Libgpg-error/gen-posix-lock-obj.c create mode 100644 plugins/MirOTR/Libgpg-error/gen-w32-lock-obj.c delete mode 100644 plugins/MirOTR/Libgpg-error/gpg-error-config.in delete mode 100644 plugins/MirOTR/Libgpg-error/gpg-error.def.in delete mode 100644 plugins/MirOTR/Libgpg-error/gpg-error.exe delete mode 100644 plugins/MirOTR/Libgpg-error/gpg-error.h.in delete mode 100644 plugins/MirOTR/Libgpg-error/gpg-error.m4 create mode 100644 plugins/MirOTR/Libgpg-error/gpgrt-int.h create mode 100644 plugins/MirOTR/Libgpg-error/lock.h delete mode 100644 plugins/MirOTR/Libgpg-error/mkerrcodes.awk delete mode 100644 plugins/MirOTR/Libgpg-error/mkerrcodes.exe delete mode 100644 plugins/MirOTR/Libgpg-error/mkerrcodes1.awk delete mode 100644 plugins/MirOTR/Libgpg-error/mkerrcodes2.awk delete mode 100644 plugins/MirOTR/Libgpg-error/mkerrnos.awk delete mode 100644 plugins/MirOTR/Libgpg-error/mkheader.awk create mode 100644 plugins/MirOTR/Libgpg-error/mkheader.c delete mode 100644 plugins/MirOTR/Libgpg-error/mkstrtable.awk create mode 100644 plugins/MirOTR/Libgpg-error/posix-lock-obj.h create mode 100644 plugins/MirOTR/Libgpg-error/posix-lock.c create mode 100644 plugins/MirOTR/Libgpg-error/posix-thread.c create mode 100644 plugins/MirOTR/Libgpg-error/thread.h create mode 100644 plugins/MirOTR/Libgpg-error/version.c delete mode 100644 plugins/MirOTR/Libgpg-error/versioninfo.rc.in create mode 100644 plugins/MirOTR/Libgpg-error/visibility.c create mode 100644 plugins/MirOTR/Libgpg-error/visibility.h create mode 100644 plugins/MirOTR/Libgpg-error/w32-lock-obj.h create mode 100644 plugins/MirOTR/Libgpg-error/w32-lock.c create mode 100644 plugins/MirOTR/Libgpg-error/w32-thread.c (limited to 'plugins') diff --git a/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj b/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj index 406b566074..a643e2d827 100644 --- a/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj +++ b/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj @@ -126,36 +126,66 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -182,37 +212,55 @@ + + - + + + + + + + + + + + + + + + + + @@ -222,10 +270,12 @@ + + @@ -241,10 +291,13 @@ + + + diff --git a/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj.filters b/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj.filters index 7315490745..60739541cb 100644 --- a/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj.filters +++ b/plugins/MirOTR/Libgcrypt/Libgcrypt_10.vcxproj.filters @@ -24,9 +24,6 @@ - - cipher - cipher @@ -42,6 +39,33 @@ cipher + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + cipher @@ -51,21 +75,63 @@ cipher + + cipher + cipher + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + cipher cipher + + cipher + + + cipher + cipher cipher + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + cipher @@ -78,6 +144,9 @@ cipher + + cipher + cipher @@ -90,9 +159,18 @@ cipher + + cipher + cipher + + cipher + + + cipher + cipher @@ -108,12 +186,24 @@ cipher + + cipher + + + cipher + cipher cipher + + compat + + + mpi + mpi @@ -192,6 +282,9 @@ src + + src + src @@ -201,6 +294,9 @@ src + + src + src @@ -231,6 +327,9 @@ random + + random + random @@ -246,6 +345,12 @@ error + + error + + + error + error @@ -264,6 +369,21 @@ error + + error + + + error + + + error + + + error + + + error + @@ -272,15 +392,42 @@ cipher + + cipher + + + cipher + + + cipher + + + cipher + cipher + + cipher + + + cipher + + + cipher + cipher cipher + + compat + + + mpi + mpi @@ -308,6 +455,9 @@ src + + src + src @@ -320,6 +470,9 @@ src + + src + src @@ -365,6 +518,9 @@ error + + error + error @@ -377,6 +533,12 @@ error + + error + + + error + diff --git a/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj b/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj index 4e2c023d31..75bf6e1068 100644 --- a/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj +++ b/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj @@ -114,36 +114,66 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -170,37 +200,55 @@ + + - + + + + + + + + + + + + + + + + + @@ -210,10 +258,12 @@ + + @@ -229,10 +279,13 @@ + + + diff --git a/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj.filters b/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj.filters index 7315490745..60739541cb 100644 --- a/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj.filters +++ b/plugins/MirOTR/Libgcrypt/Libgcrypt_12.vcxproj.filters @@ -24,9 +24,6 @@ - - cipher - cipher @@ -42,6 +39,33 @@ cipher + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + cipher @@ -51,21 +75,63 @@ cipher + + cipher + cipher + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + cipher cipher + + cipher + + + cipher + cipher cipher + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + + + cipher + cipher @@ -78,6 +144,9 @@ cipher + + cipher + cipher @@ -90,9 +159,18 @@ cipher + + cipher + cipher + + cipher + + + cipher + cipher @@ -108,12 +186,24 @@ cipher + + cipher + + + cipher + cipher cipher + + compat + + + mpi + mpi @@ -192,6 +282,9 @@ src + + src + src @@ -201,6 +294,9 @@ src + + src + src @@ -231,6 +327,9 @@ random + + random + random @@ -246,6 +345,12 @@ error + + error + + + error + error @@ -264,6 +369,21 @@ error + + error + + + error + + + error + + + error + + + error + @@ -272,15 +392,42 @@ cipher + + cipher + + + cipher + + + cipher + + + cipher + cipher + + cipher + + + cipher + + + cipher + cipher cipher + + compat + + + mpi + mpi @@ -308,6 +455,9 @@ src + + src + src @@ -320,6 +470,9 @@ src + + src + src @@ -365,6 +518,9 @@ error + + error + error @@ -377,6 +533,12 @@ error + + error + + + error + diff --git a/plugins/MirOTR/Libgcrypt/cipher/ac.c b/plugins/MirOTR/Libgcrypt/cipher/ac.c deleted file mode 100644 index ee9498b23d..0000000000 --- a/plugins/MirOTR/Libgcrypt/cipher/ac.c +++ /dev/null @@ -1,3301 +0,0 @@ -/* ac.c - Alternative interface for asymmetric cryptography. - Copyright (C) 2003, 2004, 2005, 2006 - 2007, 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 . - */ - -#include -#include -#include -#include -#include -#include - -#include "g10lib.h" -#include "cipher.h" -#include "mpi.h" - - - -/* At the moment the ac interface is a wrapper around the pk - interface, but this might change somewhen in the future, depending - on how many people prefer the ac interface. */ - -/* Mapping of flag numbers to the according strings as it is expected - for S-expressions. */ -static struct number_string -{ - int number; - const char *string; -} ac_flags[] = - { - { GCRY_AC_FLAG_NO_BLINDING, "no-blinding" }, - }; - -/* The positions in this list correspond to the values contained in - the gcry_ac_key_type_t enumeration list. */ -static const char *ac_key_identifiers[] = - { - "private-key", - "public-key" - }; - -/* These specifications are needed for key-pair generation; the caller - is allowed to pass additional, algorithm-specific `specs' to - gcry_ac_key_pair_generate. This list is used for decoding the - provided values according to the selected algorithm. */ -struct gcry_ac_key_generate_spec -{ - int algorithm; /* Algorithm for which this flag is - relevant. */ - const char *name; /* Name of this flag. */ - size_t offset; /* Offset in the cipher-specific spec - structure at which the MPI value - associated with this flag is to be - found. */ -} ac_key_generate_specs[] = - { - { GCRY_AC_RSA, "rsa-use-e", offsetof (gcry_ac_key_spec_rsa_t, e) }, - { 0 } - }; - -/* Handle structure. */ -struct gcry_ac_handle -{ - int algorithm; /* Algorithm ID associated with this - handle. */ - const char *algorithm_name; /* Name of the algorithm. */ - unsigned int flags; /* Flags, not used yet. */ - gcry_module_t module; /* Reference to the algorithm - module. */ -}; - -/* A named MPI value. */ -typedef struct gcry_ac_mpi -{ - char *name; /* Self-maintained copy of name. */ - gcry_mpi_t mpi; /* MPI value. */ - unsigned int flags; /* Flags. */ -} gcry_ac_mpi_t; - -/* A data set, that is simply a list of named MPI values. */ -struct gcry_ac_data -{ - gcry_ac_mpi_t *data; /* List of named values. */ - unsigned int data_n; /* Number of values in DATA. */ -}; - -/* A single key. */ -struct gcry_ac_key -{ - gcry_ac_data_t data; /* Data in native ac structure. */ - gcry_ac_key_type_t type; /* Type of the key. */ -}; - -/* A key pair. */ -struct gcry_ac_key_pair -{ - gcry_ac_key_t public; - gcry_ac_key_t secret; -}; - - - -/* - * Functions for working with data sets. - */ - -/* Creates a new, empty data set and store it in DATA. */ -gcry_error_t -_gcry_ac_data_new (gcry_ac_data_t *data) -{ - gcry_ac_data_t data_new; - gcry_error_t err; - - if (fips_mode ()) - return gpg_error (GPG_ERR_NOT_SUPPORTED); - - data_new = gcry_malloc (sizeof (*data_new)); - if (! data_new) - { - err = gcry_error_from_errno (errno); - goto out; - } - - data_new->data = NULL; - data_new->data_n = 0; - *data = data_new; - err = 0; - - out: - - return err; -} - -/* Destroys all the entries in DATA, but not DATA itself. */ -static void -ac_data_values_destroy (gcry_ac_data_t data) -{ - unsigned int i; - - for (i = 0; i < data->data_n; i++) - if (data->data[i].flags & GCRY_AC_FLAG_DEALLOC) - { - gcry_mpi_release (data->data[i].mpi); - gcry_free (data->data[i].name); - } -} - -/* Destroys the data set DATA. */ -void -_gcry_ac_data_destroy (gcry_ac_data_t data) -{ - if (data) - { - ac_data_values_destroy (data); - gcry_free (data->data); - gcry_free (data); - } -} - -/* This function creates a copy of the array of named MPIs DATA_MPIS, - which is of length DATA_MPIS_N; the copy is stored in - DATA_MPIS_CP. */ -static gcry_error_t -ac_data_mpi_copy (gcry_ac_mpi_t *data_mpis, unsigned int data_mpis_n, - gcry_ac_mpi_t **data_mpis_cp) -{ - gcry_ac_mpi_t *data_mpis_new; - gcry_error_t err; - unsigned int i; - gcry_mpi_t mpi; - char *label; - - data_mpis_new = gcry_malloc (sizeof (*data_mpis_new) * data_mpis_n); - if (! data_mpis_new) - { - err = gcry_error_from_errno (errno); - goto out; - } - memset (data_mpis_new, 0, sizeof (*data_mpis_new) * data_mpis_n); - - err = 0; - for (i = 0; i < data_mpis_n; i++) - { - /* Copy values. */ - - label = gcry_strdup (data_mpis[i].name); - mpi = gcry_mpi_copy (data_mpis[i].mpi); - if (! (label && mpi)) - { - err = gcry_error_from_errno (errno); - gcry_mpi_release (mpi); - gcry_free (label); - break; - } - - data_mpis_new[i].flags = GCRY_AC_FLAG_DEALLOC; - data_mpis_new[i].name = label; - data_mpis_new[i].mpi = mpi; - } - if (err) - goto out; - - *data_mpis_cp = data_mpis_new; - err = 0; - - out: - - if (err) - if (data_mpis_new) - { - for (i = 0; i < data_mpis_n; i++) - { - gcry_mpi_release (data_mpis_new[i].mpi); - gcry_free (data_mpis_new[i].name); - } - gcry_free (data_mpis_new); - } - - return err; -} - -/* Create a copy of the data set DATA and store it in DATA_CP. */ -gcry_error_t -_gcry_ac_data_copy (gcry_ac_data_t *data_cp, gcry_ac_data_t data) -{ - gcry_ac_mpi_t *data_mpis = NULL; - gcry_ac_data_t data_new; - gcry_error_t err; - - if (fips_mode ()) - return gpg_error (GPG_ERR_NOT_SUPPORTED); - - /* Allocate data set. */ - data_new = gcry_malloc (sizeof (*data_new)); - if (! data_new) - { - err = gcry_error_from_errno (errno); - goto out; - } - - err = ac_data_mpi_copy (data->data, data->data_n, &data_mpis); - if (err) - goto out; - - data_new->data_n = data->data_n; - data_new->data = data_mpis; - *data_cp = data_new; - - out: - - if (err) - gcry_free (data_new); - - return err; -} - -/* Returns the number of named MPI values inside of the data set - DATA. */ -unsigned int -_gcry_ac_data_length (gcry_ac_data_t data) -{ - return data->data_n; -} - - -/* Add the value MPI to DATA with the label NAME. If FLAGS contains - GCRY_AC_FLAG_COPY, the data set will contain copies of NAME - and MPI. If FLAGS contains GCRY_AC_FLAG_DEALLOC or - GCRY_AC_FLAG_COPY, the values contained in the data set will - be deallocated when they are to be removed from the data set. */ -gcry_error_t -_gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t mpi) -{ - gcry_error_t err; - gcry_mpi_t mpi_cp; - char *name_cp; - unsigned int i; - - name_cp = NULL; - mpi_cp = NULL; - - if (fips_mode ()) - return gpg_error (GPG_ERR_NOT_SUPPORTED); - - if (flags & ~(GCRY_AC_FLAG_DEALLOC | GCRY_AC_FLAG_COPY)) - { - err = gcry_error (GPG_ERR_INV_ARG); - goto out; - } - - if (flags & GCRY_AC_FLAG_COPY) - { - /* Create copies. */ - - flags |= GCRY_AC_FLAG_DEALLOC; - name_cp = gcry_strdup (name); - mpi_cp = gcry_mpi_copy (mpi); - if (! (name_cp && mpi_cp)) - { - err = gcry_error_from_errno (errno); - goto out; - } - } - - /* Search for existing entry. */ - for (i = 0; i < data->data_n; i++) - if (! strcmp (name, data->data[i].name)) - break; - if (i < data->data_n) - { - /* An entry for NAME does already exist. */ - if (data->data[i].flags & GCRY_AC_FLAG_DEALLOC) - { - gcry_mpi_release (data->data[i].mpi); - gcry_free (data->data[i].name); - } - } - else - { - /* Create a new entry. */ - - gcry_ac_mpi_t *ac_mpis; - - ac_mpis = gcry_realloc (data->data, - sizeof (*data->data) * (data->data_n + 1)); - if (! ac_mpis) - { - err = gcry_error_from_errno (errno); - goto out; - } - - if (data->data != ac_mpis) - data->data = ac_mpis; - data->data_n++; - } - - data->data[i].name = name_cp ? name_cp : ((char *) name); - data->data[i].mpi = mpi_cp ? mpi_cp : mpi; - data->data[i].flags = flags; - err = 0; - - out: - - if (err) - { - gcry_mpi_release (mpi_cp); - gcry_free (name_cp); - } - - return err; -} - -/* Stores the value labelled with NAME found in the data set DATA in - MPI. The returned MPI value will be released in case - gcry_ac_data_set is used to associate the label NAME with a - different MPI value. */ -gcry_error_t -_gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t *mpi) -{ - gcry_mpi_t mpi_return; - gcry_error_t err; - unsigned int i; - - if (fips_mode ()) - return gpg_error (GPG_ERR_NOT_SUPPORTED); - - if (flags & ~(GCRY_AC_FLAG_COPY)) - { - err = gcry_error (GPG_ERR_INV_ARG); - goto out; - } - - for (i = 0; i < data->data_n; i++) - if (! strcmp (name, data->data[i].name)) - break; - if (i == data->data_n) - { - err = gcry_error (GPG_ERR_NOT_FOUND); - goto out; - } - - if (flags & GCRY_AC_FLAG_COPY) - { - mpi_return = gcry_mpi_copy (data->data[i].mpi); - if (! mpi_return) - { - err = gcry_error_from_errno (errno); /* FIXME? */ - goto out; - } - } - else - mpi_return = data->data[i].mpi; - - *mpi = mpi_return; - err = 0; - - out: - - return err; -} - -/* Stores in NAME and MPI the named MPI value contained in the data - set DATA with the index IDX. NAME or MPI may be NULL. The - returned MPI value will be released in case gcry_ac_data_set is - used to associate the label NAME with a different MPI value. */ -gcry_error_t -_gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags, - unsigned int idx, - const char **name, gcry_mpi_t *mpi) -{ - gcry_error_t err; - gcry_mpi_t mpi_cp; - char *name_cp; - - name_cp = NULL; - mpi_cp = NULL; - - if (fips_mode ()) - return gpg_error (GPG_ERR_NOT_SUPPORTED); - - if (flags & ~(GCRY_AC_FLAG_COPY)) - { - err = gcry_error (GPG_ERR_INV_ARG); - goto out; - } - - if (idx >= data->data_n) - { - err = gcry_error (GPG_ERR_INV_ARG); - goto out; - } - - if (flags & GCRY_AC_FLAG_COPY) - { - /* Return copies to the user. */ - if (name) - { - name_cp = gcry_strdup (data->data[idx].name); - if (! name_cp) - { - err = gcry_error_from_errno (errno); - goto out; - } - } - if (mpi) - { - mpi_cp = gcry_mpi_copy (data->data[idx].mpi); - if (! mpi_cp) - { - err = gcry_error_from_errno (errno); - goto out; - } - } - } - - if (name) - *name = name_cp ? name_cp : data->data[idx].name; - if (mpi) - *mpi = mpi_cp ? mpi_cp : data->data[idx].mpi; - err = 0; - - out: - - if (err) - { - gcry_mpi_release (mpi_cp); - gcry_free (name_cp); - } - - return err; -} - -/* Convert the data set DATA into a new S-Expression, which is to be - stored in SEXP, according to the identifiers contained in - IDENTIFIERS. */ -gcry_error_t -_gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp, - const char **identifiers) -{ - gcry_sexp_t sexp_new; - gcry_error_t err; - char *sexp_buffer; - size_t sexp_buffer_n; - size_t identifiers_n; - const char *label; - gcry_mpi_t mpi; - void **arg_list; - size_t data_n; - unsigned int i; - - sexp_buffer_n = 1; - sexp_buffer = NULL; - arg_list = NULL; - err = 0; - - if (fips_mode ()) - return gpg_error (GPG_ERR_NOT_SUPPORTED); - - /* Calculate size of S-expression representation. */ - - i = 0; - if (identifiers) - while (identifiers[i]) - { - /* For each identifier, we add "()". */ - sexp_buffer_n += 1 + strlen (identifiers[i]) + 1; - i++; - } - identifiers_n = i; - - if (! identifiers_n) - /* If there are NO identifiers, we still add surrounding braces so - that we have a list of named MPI value lists. Otherwise it - wouldn't be too much fun to process these lists. */ - sexp_buffer_n += 2; - - data_n = _gcry_ac_data_length (data); - for (i = 0; i < data_n; i++) - { - err = gcry_ac_data_get_index (data, 0, i, &label, NULL); - if (err) - break; - /* For each MPI we add "(