From dshaw at jabberwocky.com Wed Feb 1 04:29:51 2012 From: dshaw at jabberwocky.com (David Shaw) Date: Tue, 31 Jan 2012 22:29:51 -0500 Subject: [PATCH] Use preferred hashing algorithm when updating signature packets In-Reply-To: <20120129102729.GA6530@quelltextlich.at> References: <20120128214647.GA20683@quelltextlich.at> <53CCF2A9-0818-4C07-988C-584E52258713@jabberwocky.com> <20120129102729.GA6530@quelltextlich.at> Message-ID: On Jan 29, 2012, at 5:27 AM, Christian Aistleitner wrote: > Hi David, > > on Sat, Jan 28, 2012 at 11:43:19PM -0500, David Shaw wrote: >> [ hash_for() -> opt.cert_digest_algo ] > > Of course, you're right. Find the updated patch below. Applied, thanks. David From hans at guardianproject.info Wed Feb 1 06:02:45 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Wed, 1 Feb 2012 00:02:45 -0500 Subject: FIX ME! implement ttyname() bionic/libc/bionic/stubs.c:360 Message-ID: <8D4BAE08-F570-446B-9DC3-790C08D8FE2A@guardianproject.info> I have a built of gpg-agent for Android, when I run it, it prints out some text but 'gpg-agent --daemon' seems to stay running. Looks like there might be a bit more porting work to do, apparently bionic libc only has a stub for ttyname(): # ./gpg-agent FIX ME! implement ttyname() bionic/libc/bionic/stubs.c:360 gpg-agent[9647]: no gpg-agent running in this session Any pointers as to how to handle this? Or does it matter? I was able to encrypt on Android and decrypt on my laptop :) .hc ---------------------------------------------------------------------------- "[T]he greatest purveyor of violence in the world today [is] my own government." - Martin Luther King, Jr. From wk at gnupg.org Wed Feb 1 14:05:26 2012 From: wk at gnupg.org (Werner Koch) Date: Wed, 01 Feb 2012 14:05:26 +0100 Subject: FIX ME! implement ttyname() bionic/libc/bionic/stubs.c:360 In-Reply-To: <8D4BAE08-F570-446B-9DC3-790C08D8FE2A@guardianproject.info> (Hans-Christoph Steiner's message of "Wed, 1 Feb 2012 00:02:45 -0500") References: <8D4BAE08-F570-446B-9DC3-790C08D8FE2A@guardianproject.info> Message-ID: <87y5smzotl.fsf@vigenere.g10code.de> On Wed, 1 Feb 2012 06:02, hans at guardianproject.info said: > Any pointers as to how to handle this? Or does it matter? I was able to encrypt on Android and decrypt on my laptop :) Configure tests for ttyname and uses a simple replacement if it does not exist (i.e. under Windows). Usually we would change the test to actually runh a test program; however that does not work for cross-compiling. Thus we need to undef the HAVE_TTYNAME if we are building for Android. Shalom-Salam, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. From wk at gnupg.org Wed Feb 1 14:18:52 2012 From: wk at gnupg.org (Werner Koch) Date: Wed, 01 Feb 2012 14:18:52 +0100 Subject: FIX ME! implement ttyname() bionic/libc/bionic/stubs.c:360 In-Reply-To: <8D4BAE08-F570-446B-9DC3-790C08D8FE2A@guardianproject.info> (Hans-Christoph Steiner's message of "Wed, 1 Feb 2012 00:02:45 -0500") References: <8D4BAE08-F570-446B-9DC3-790C08D8FE2A@guardianproject.info> Message-ID: <87ty3azo77.fsf@vigenere.g10code.de> Hi, please try this patch: diff --git a/configure.ac b/configure.ac index f008d23..47c6d12 100644 --- a/configure.ac +++ b/configure.ac @@ -490,6 +490,13 @@ AH_BOTTOM([ # endif #endif +/* Hacks required for Android. */ +#ifdef __ANDROID__ + /* ttyname is a stub in BIONIC, printing a FIXME warning. */ +# define ttyname broken_native_ttyname +# undef HAVE_TTYNAME +#endif /*__ANDROID__*/ + /* Tell libgcrypt not to use its own libgpg-error implementation. */ #define USE_LIBGPG_ERROR 1 Salam-Shalom, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. From wk at gnupg.org Thu Feb 2 17:41:48 2012 From: wk at gnupg.org (Werner Koch) Date: Thu, 02 Feb 2012 17:41:48 +0100 Subject: [gnupg-devel] gnupg-1.4.12 build issue In-Reply-To: (Nelson H. F. Beebe's message of "Tue, 31 Jan 2012 12:00:09 -0700 (MST)") References: Message-ID: <87y5slrxv7.fsf@vigenere.g10code.de> On Tue, 31 Jan 2012 20:00, beebe at math.utah.edu said: > I now have gnupg-1.4.12 successfully built, validated, and installed > on all of our more than 20 flavors of Unix in our test lab, EXCEPT for > one: GNU/Linux Gentoo 2.0.3 on 32-bit SPARC. May I call this a success now? You did quite some testing over all the previous releases and AFAICS, this is the first time that it builds on all platforms. The Gentoo thing might really be a regression in gentoo. The question, is: Shall we fix it in gnupg or wait for a fixed Gentoo? > However, it appears that the mpi tree is incorrectly making an > assumption that udiv_qrnnd is universally available. There is a replacement function made up of an macro and an external module. There is no configure check for it, but selected using a list of CPU/OS strings (mpi/config.links). Salam-Shalom, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. From yao.yushu at gmail.com Fri Feb 3 22:27:55 2012 From: yao.yushu at gmail.com (Yushu Yao) Date: Fri, 3 Feb 2012 13:27:55 -0800 Subject: Parallel Encryption Revisited In-Reply-To: References: Message-ID: On Fri, Feb 3, 2012 at 1:22 PM, Yushu Yao wrote: > Hi Experts, > > 5 years ago there was a post asking about parallel encrypting and got > blasted with a series of concerns: > http://lists.gnupg.org/pipermail/gnupg-devel/2007-February/023654.html > > Now, for both data exchange and backup purposes, many people are trying to > encrypt Terabytes of data (1 big file), on a parallel file system. Clearly > the 1 thread/process sequential encryption is not optimal, and paralleling > can save a lot of time! > > I have very limited knowledge of Cryptography, my question is: from what I > observe, "gpg -e" reads in a file, massages it a bit with the public key, > and output another file. What is the reason why it can't split the input > file to 5 pieces, let 5 processes massage each piece with the same pub key, > and then concatenate the outputs to one big output? > (I guess the question is whether gpg is doing an "all to all" correlation > on the input file?). > > If above can't be done, maybe people can split the file 1st then encrypt. > Just to add that in this case it's very hard to use because I'll need to reconstruct the file 1st before I can look into file. E.g. when I have a tar file that's encrypted, I can simply do " pgp -d myfile.tar.pgp | tar tzvf"; If I split it first then do gpg, I'll need to re create the whole tar file on disk, then do tar tzvf. Which needs time and space. > > Thanks > > -Yushu > > > +-------------------------------------------------+ > | Yushu Yao > | Ph:1-510-486-4690 > | > | Lawrence Berkeley National Lab > | Mailstop 50B-6222 > | 1 Cyclotron Road > | Berkeley CA 94720-8147 - USA > +-------------------------------------------------+ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yao.yushu at gmail.com Fri Feb 3 22:22:02 2012 From: yao.yushu at gmail.com (Yushu Yao) Date: Fri, 3 Feb 2012 13:22:02 -0800 Subject: Parallel Encryption Revisited Message-ID: Hi Experts, 5 years ago there was a post asking about parallel encrypting and got blasted with a series of concerns: http://lists.gnupg.org/pipermail/gnupg-devel/2007-February/023654.html Now, for both data exchange and backup purposes, many people are trying to encrypt Terabytes of data (1 big file), on a parallel file system. Clearly the 1 thread/process sequential encryption is not optimal, and paralleling can save a lot of time! I have very limited knowledge of Cryptography, my question is: from what I observe, "gpg -e" reads in a file, massages it a bit with the public key, and output another file. What is the reason why it can't split the input file to 5 pieces, let 5 processes massage each piece with the same pub key, and then concatenate the outputs to one big output? (I guess the question is whether gpg is doing an "all to all" correlation on the input file?). If above can't be done, maybe people can split the file 1st then encrypt. Thanks -Yushu +-------------------------------------------------+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | Mailstop 50B-6222 | 1 Cyclotron Road | Berkeley CA 94720-8147 - USA +-------------------------------------------------+ -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjh at sixdemonbag.org Sat Feb 4 00:28:05 2012 From: rjh at sixdemonbag.org (Robert J. Hansen) Date: Fri, 03 Feb 2012 18:28:05 -0500 Subject: Parallel Encryption Revisited In-Reply-To: References: Message-ID: <4F2C6D85.3090705@sixdemonbag.org> On 2/3/2012 4:22 PM, Yushu Yao wrote: > http://lists.gnupg.org/pipermail/gnupg-devel/2007-February/023654.html The overriding concern you were presented with five years ago is still valid today: there are almost no opportunities for parallelization in CFB encryption modes, such as the weird CFB64 mode used by OpenPGP. Parallelization works well when the problem is composed of independent subproblems. For instance, the Merge Sort algorithm works by sorting the first half of a list and the second half of a list, then splicing together those two sorted sublists. The individual halves may be processed independently by different threads, but the joining is purely sequential. This is why Merge Sort is so parallelizable (the expensive part is made of independent subproblems) and why it has limits to parallelization (the sequential part cannot be parallelized). In CFB mode, encrypting block N is dependent on the encryption of block N-1. This dependency chain keeps it from being composed of independent subproblems, which makes it hard to find opportunities to exploit parallelization. In short, this is a dog that just won't hunt. If parallelized encryption is important to you, I'd suggest arguing for a change to the OpenPGP RFC. From atolu57 at gmail.com Fri Feb 10 04:18:14 2012 From: atolu57 at gmail.com (Ayo Tolu) Date: Fri, 10 Feb 2012 03:18:14 +0000 Subject: hello Message-ID: l want to generate key but saying Error in accessing Enigmail service, help me, Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at guardianproject.info Fri Feb 10 18:15:31 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Fri, 10 Feb 2012 12:15:31 -0500 Subject: hello In-Reply-To: References: Message-ID: <27DAFB20-AE9B-4679-8456-3EC9068A13DC@guardianproject.info> I think you should try the gnupg-users list, this is for development. http://lists.gnupg.org/mailman/listinfo/gnupg-users Also, include as much info as posslbe in your email, like which OS, versions of Thunderbird, Enigmail, etc. .hc On Feb 9, 2012, at 10:18 PM, Ayo Tolu wrote: > l want to generate key but saying Error in accessing Enigmail service, help me, Thanks > _______________________________________________ > Gnupg-devel mailing list > Gnupg-devel at gnupg.org > http://lists.gnupg.org/mailman/listinfo/gnupg-devel ---------------------------------------------------------------------------- "Making boring techno music is really easy with modern tools, but with live coding, boring techno is much harder." - Chris McCormick From hans at guardianproject.info Wed Feb 15 20:29:56 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Wed, 15 Feb 2012 14:29:56 -0500 Subject: FIX ME! implement ttyname() bionic/libc/bionic/stubs.c:360 In-Reply-To: <87ty3azo77.fsf@vigenere.g10code.de> References: <8D4BAE08-F570-446B-9DC3-790C08D8FE2A@guardianproject.info> <87ty3azo77.fsf@vigenere.g10code.de> Message-ID: <4F3C07B4.90609@guardianproject.info> I applied it and it died with an error. It seems that not all uses of ttyname() are protected with HAVE_TTYNAME: /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -I/data/local/include -I/usr/local/include -I/data/local/include -I/usr/local/include -I/media/share/code/guardianproject/gnupg-for-android/external/data/local/include -I/usr/local/include -DANDROID -I/media/share/code/guardianproject/gnupg-for-android/external/data/local/include -O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -L/media/share/code/guardianproject/gnupg-for-android/external/data/local/lib -Wl,--rpath,/media/share/code/guardianproject/gnupg-for-android/external/data/local/lib -o t-session-env t-session-env.o libcommon.a ../gl/libgnu.a -L/data/local/lib -lgcrypt -L/usr/local/lib -lgpg-error -L/data/local/lib -lassuan -L/usr/local/lib -lgpg-error -L/usr/local/lib -lgpg-error libcommon.a(libcommon_a-session-env.o): In function `session_env_getenv_or_default': session-env.c:(.text+0x5b8): undefined reference to `broken_native_ttyname' session-env.c:(.text+0x5c8): undefined reference to `broken_native_ttyname' config.h had "#define HAVE_TTYNAME 1" in the __ANDROID__ block, so that is also a potential point of failure. Here's the whole chunk from config.h: /* Hacks required for Android. */ #ifdef __ANDROID__ /* ttyname is a stub in BIONIC, printing a FIXME warning. */ # define ttyname broken_native_ttyname # define HAVE_TTYNAME 1 #endif /*__ANDROID__*/ 'make clean' and then manually changing "# define HAVE_TTYNAME 1" to "# undef HAVE_TTYNAME" got me here: /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DHAVE_CONFIG_H -I. -I.. -I../gl -I../intl -DLOCALEDIR=\"/data/local/share/locale\" -DGNUPG_BINDIR="\"/data/local/bin\"" -DGNUPG_LIBEXECDIR="\"/data/local/libexec\"" -DGNUPG_LIBDIR="\"/data/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/data/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/data/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/data/local/var\"" -I/data/local/include -I/usr/local/include -I/data/local/include -I/usr/local/include -I/media/share/code/guardianproject/gnupg-for-android/external/data/local/include -I/usr/local/include -I/data/local/include -I/usr/local/include -DWITHOUT_GNU_PTH=1 -DANDROID -I/media/share/code/guardianproject/gnupg-for-android/external/data/local/include -O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT libcommon_a-estream.o -MD -MP -MF .deps/libcommon_a-estream.Tpo -c -o libcommon_a-estream.o `test -f 'estream.c' || echo './'`estream.c In file included from estream.c:99: ../common/util.h:292: error: static declaration of 'broken_native_ttyname' follows non-static declaration /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/unistd.h:165: note: previous declaration of 'broken_native_ttyname' was here .hc On 02/01/2012 08:18 AM, Werner Koch wrote: > Hi, > > please try this patch: > > diff --git a/configure.ac b/configure.ac > index f008d23..47c6d12 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -490,6 +490,13 @@ AH_BOTTOM([ > # endif > #endif > > +/* Hacks required for Android. */ > +#ifdef __ANDROID__ > + /* ttyname is a stub in BIONIC, printing a FIXME warning. */ > +# define ttyname broken_native_ttyname > +# undef HAVE_TTYNAME > +#endif /*__ANDROID__*/ > + > > /* Tell libgcrypt not to use its own libgpg-error implementation. */ > #define USE_LIBGPG_ERROR 1 > > > > Salam-Shalom, > > Werner > From hans at guardianproject.info Thu Feb 16 01:15:31 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Wed, 15 Feb 2012 19:15:31 -0500 Subject: gpgme on android report Message-ID: <4F3C4AA3.5010307@guardianproject.info> So now that I've gotten some test builds of gpg2 actually doing stuff on Android, I thought it was a good time to test the next step: gpgme. I got close to a complete build, but there were issues with the final linking. Here's what I did to get as far as I did: - cloned and worked out of master - update config.sub and config.guess to latest version to get support for arm-linux-androideabi host - prefix=/data/local LOCAL=$(CWD)$(prefix) ./configure \ --enable-maintainer-mode \ --enable-static \ --host=$(HOST) \ --with-gnu-ld \ --with-gpg-error-prefix=$(LOCAL) \ --with-libassuan-prefix=$(LOCAL) \ --with-gpg=$(prefix)/bin \ --with-gpgsm=$(prefix)/bin \ --with-gpgconf=$(prefix)/bin \ --with-g13=$(prefix)/bin \ --disable-gpg-test \ --disable-gpgsm-test \ --disable-gpgconf-test \ --disable-g13-test \ --prefix=$(prefix) - Android doesn't like SYS_gettid in src/ath.c. I changed the __linux macro to __gnu_linux__ and it built fine, but that's probably not the best solution. It seems SYS_gettid comes from gnu libc and Bionic libc doesn't provide it. Perhaps gettid() is what you want? This thread gives more detail: http://comments.gmane.org/gmane.comp.handhelds.android.ndk/9592 - the build died looking for /usr/local/lib/libgpg-error.la, which is odd since I told it to use $(LOCAL), which does not include /usr/local in it at all. I couldn't find where that was coming from. I've also noticed that in a lot of the gnupg build systems, it automatically includes -L/usr/local/lib, which IMHO, is quite dangerous and mostly unnecessary. Most compilers will do -L/usr/local/lib automatically when it makes sense, and in the case of Android's cross-compiler, having -L/usr/local/lib could cause harm if someone had some gnupg libs there. Here's the full text of the error libtool: link: /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ar cru .libs/libgpgme.a conversion.o get-env.o data.o data-fd.o data-stream.o data-mem.o data-user.o data-compat.o signers.o sig-notation.o wait.o wait-global.o wait-private.o wait-user.o op-support.o encrypt.o encrypt-sign.o decrypt.o decrypt-verify.o verify.o sign.o passphrase.o progress.o key.o keylist.o trust-item.o trustlist.o import.o export.o genkey.o delete.o edit.o getauditlog.o opassuan.o passwd.o engine.o engine-gpg.o status-table.o engine-gpgsm.o assuan-support.o engine-assuan.o engine-gpgconf.o engine-g13.o vfs-mount.o vfs-create.o gpgconf.o posix-util.o posix-sema.o posix-io.o dirinfo.o debug.o gpgme.o version.o error.o ath.o stpcpy.o libtool: link: /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ranlib .libs/libgpgme.a /bin/sed: can't read /usr/local/lib/libgpg-error.la: No such file or directory libtool: link: `/usr/local/lib/libgpg-error.la' is not a valid libtool archive make[3]: *** [libgpgme.la] Error 1 From hans at guardianproject.info Mon Feb 20 21:07:59 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Mon, 20 Feb 2012 15:07:59 -0500 Subject: npth finds pthread_mutex_timedlock() which android does not have Message-ID: <4F42A81F.7080004@guardianproject.info> Apparently, Android's NDK defines pthread_mutex_timedlock() in the headers but then does not implement it. And it seems they aren't close to implementing it: http://code.google.com/p/android/issues/detail?id=2138 This is of course a really crappy situation since it means that you can't do simple things like AC_CHECK_FUNCS([pthread_mutex_timedlock]) because that actually finds the function. I made a quick patch which works for getting a build, and I'm building the whole gnupg suite again with npth now. The patch is attached, its not pretty. Let me know if it should be done in another way. npth build on Android currently dies with: /bin/bash ../libtool --tag=CC --mode=link /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DANDROID -I/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/include -fdata-sections -ffunction-sections -Os -L/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib -Wl,--rpath,/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib -Wl,--gc-sections -o t-mutex t-mutex.o ../src/libnpth.la libtool: link: /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DANDROID -I/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/include -fdata-sections -ffunction-sections -Os -Wl,--rpath -Wl,/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib -Wl,--gc-sections -o .libs/t-mutex t-mutex.o -L/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib ../src/.libs/libnpth.so -Wl,-rpath -Wl,/data/data/info.guardianproject.gpg/app_opt/lib ../src/.libs/libnpth.so: undefined reference to `pthread_mutex_timedlock' collect2: ld returned 1 exit status .hc -------------- next part -------------- A non-text attachment was scrubbed... Name: npth-android-fixes.patch Type: text/x-patch Size: 840 bytes Desc: not available URL: From hans at guardianproject.info Mon Feb 20 23:16:06 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Mon, 20 Feb 2012 17:16:06 -0500 Subject: npth finds pthread_mutex_timedlock() which android does not have In-Reply-To: <4F42A81F.7080004@guardianproject.info> References: <4F42A81F.7080004@guardianproject.info> Message-ID: <4F42C626.4070109@guardianproject.info> On 02/20/2012 03:07 PM, Hans-Christoph Steiner wrote: > > Apparently, Android's NDK defines pthread_mutex_timedlock() in the > headers but then does not implement it. And it seems they aren't close > to implementing it: > http://code.google.com/p/android/issues/detail?id=2138 > > This is of course a really crappy situation since it means that you > can't do simple things like AC_CHECK_FUNCS([pthread_mutex_timedlock]) > because that actually finds the function. I made a quick patch which > works for getting a build, and I'm building the whole gnupg suite again > with npth now. The patch is attached, its not pretty. Let me know if > it should be done in another way. > > npth build on Android currently dies with: > > /bin/bash ../libtool --tag=CC --mode=link > /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc > --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DANDROID > -I/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/include > -fdata-sections -ffunction-sections -Os > -L/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib > -Wl,--rpath,/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib > -Wl,--gc-sections -o t-mutex t-mutex.o ../src/libnpth.la > libtool: link: > /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc > --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DANDROID > -I/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/include > -fdata-sections -ffunction-sections -Os -Wl,--rpath > -Wl,/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib > -Wl,--gc-sections -o .libs/t-mutex t-mutex.o > -L/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib > ../src/.libs/libnpth.so -Wl,-rpath > -Wl,/data/data/info.guardianproject.gpg/app_opt/lib > ../src/.libs/libnpth.so: undefined reference to `pthread_mutex_timedlock' > collect2: ld returned 1 exit status Turns out there is another issue with npth on Android. npth_yield is a macro for pthread_yield, which Android does not seem to have. I cannot find another confirmation of this besides pthread_yield() not being any headers. You can see in this build log that the build says both: ldap-wrapper.c:471: warning: implicit declaration of function 'pthread_yield' ldap-wrapper.c:(.text.ldap_wrapper_wait_connections+0x28): undefined reference to `pthread_yield' https://build.safermobile.org/job/gnupg-for-android/12/console .hc From hans at guardianproject.info Tue Feb 21 21:03:36 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Tue, 21 Feb 2012 15:03:36 -0500 Subject: npth finds pthread_mutex_timedlock() which android does not have In-Reply-To: <4F42C626.4070109@guardianproject.info> References: <4F42A81F.7080004@guardianproject.info> <4F42C626.4070109@guardianproject.info> Message-ID: <4F43F898.2080704@guardianproject.info> On 02/20/2012 05:16 PM, Hans-Christoph Steiner wrote: > > On 02/20/2012 03:07 PM, Hans-Christoph Steiner wrote: >> >> Apparently, Android's NDK defines pthread_mutex_timedlock() in the >> headers but then does not implement it. And it seems they aren't close >> to implementing it: >> http://code.google.com/p/android/issues/detail?id=2138 >> >> This is of course a really crappy situation since it means that you >> can't do simple things like AC_CHECK_FUNCS([pthread_mutex_timedlock]) >> because that actually finds the function. I made a quick patch which >> works for getting a build, and I'm building the whole gnupg suite again >> with npth now. The patch is attached, its not pretty. Let me know if >> it should be done in another way. >> >> npth build on Android currently dies with: >> >> /bin/bash ../libtool --tag=CC --mode=link >> /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc >> --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DANDROID >> -I/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/include >> -fdata-sections -ffunction-sections -Os >> -L/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib >> -Wl,--rpath,/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib >> -Wl,--gc-sections -o t-mutex t-mutex.o ../src/libnpth.la >> libtool: link: >> /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc >> --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DANDROID >> -I/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/include >> -fdata-sections -ffunction-sections -Os -Wl,--rpath >> -Wl,/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib >> -Wl,--gc-sections -o .libs/t-mutex t-mutex.o >> -L/var/lib/jenkins/jobs/gnupg-for-android/workspace/external/data/data/info.guardianproject.gpg/app_opt/lib >> ../src/.libs/libnpth.so -Wl,-rpath >> -Wl,/data/data/info.guardianproject.gpg/app_opt/lib >> ../src/.libs/libnpth.so: undefined reference to `pthread_mutex_timedlock' >> collect2: ld returned 1 exit status > > Turns out there is another issue with npth on Android. npth_yield is a > macro for pthread_yield, which Android does not seem to have. I cannot > find another confirmation of this besides pthread_yield() not being any > headers. > > You can see in this build log that the build says both: > > ldap-wrapper.c:471: warning: implicit declaration of function > 'pthread_yield' > ldap-wrapper.c:(.text.ldap_wrapper_wait_connections+0x28): undefined > reference to `pthread_yield' > > https://build.safermobile.org/job/gnupg-for-android/12/console pthread_yield also does not exist on Mac OS X. sched_yield() seems to be the replacement for Android and Mac OS X. This lets gnupg build on Android for me: --- a/npth/src/npth.h.in +++ b/npth/src/npth.h.in @@ -55,6 +55,7 @@ #@INSERT_SYS_SELECT_H@ #include +#include #ifdef __cplusplus extern "C" { @@ -110,7 +111,7 @@ int npth_create(npth_t *thread, const npth_attr_t *attr, /* No can do! */ /* pth_suspend, pth_resume */ -#define npth_yield pthread_yield +#define npth_yield sched_yield /* Not needed. */ /* pth_nap */ From joanna at invisiblethingslab.com Wed Feb 22 17:18:56 2012 From: joanna at invisiblethingslab.com (Joanna Rutkowska) Date: Wed, 22 Feb 2012 17:18:56 +0100 Subject: Splitting encryption/signing between two gpg processes? Message-ID: <4F451570.2060208@invisiblethingslab.com> Hello, In our Qubes OS (www.qubes-os.org) we have implemented a little proxy for gpg that allows apps running in one VM to transparently use gpg in another VM. So, I can setup Thundrbird/Enigmail, which runs in my 'work' domain, to use this gpg proxy, which would automatically talk to the gpg server running in my 'keys' domain, where my private key(s) are kept (the communication is done over Xen-based shared channel, but could be easily modified to work over network as well, so it's nothing Xen/Qubes specific in principle). This is obviously to prevent the attacker, who might have compromised my 'work' domain, e.g. by exploiting a hypothetical flaw in my Thunderbird, from stealing my private keys. This is equivalent to using a smart card for storing the keys (assuming VM escapes on Qubes are hard(TM)). Additionally, however, because the gpg server (which essentially is a wrapper around /usr/bin/gpg) running in the 'keys' VM can be configured to prompt the user for permission to use the key each time (or every N seconds), this setup goes a step further than a smartcard, as it also attempts to prevent the attacker from selectively decryption/signing (too many) messages. Unfortunately the above setup has the following drawback -- in order to encrypt messages to other people, and/or to verify other people's signatures, one would need to import all those people's keys into the 'keys' domain. This is something we would like to avoid, as it represents some non negligible attack surface on the gpg process running there (processing untrusted input, resolving trust relations, etc). So, ideally, we would like to keep all the public keys in the client VMs (where our gpg proxy runs), and to use a local gpg to encrypt-to-others/verify-signature-from-others, and only use the gpg in the 'keys' domain to perform decryption/signing which requires the use of user's private keys. Do you have any suggestions how to best split such operations? So, e.g. how to best split the following operation: gpg -se -r Bob1 -r Bob2 -r Bob3 msg.txt so that gpg -e executed in one gpg process, while the gpg -s in the other one, and then how to combine the resulting outputs? And similarly for decryption/verification of signature? Thanks, joanna. ps. Here's the Qubes Split GPG code: http://git.qubes-os.org/?p=mainstream/addons.git;a=tree;f=gpg-split;h=eeae4a0c3b245cba852b905184cebdbf537bc49c;hb=HEAD -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: OpenPGP digital signature URL: From wk at gnupg.org Wed Feb 22 17:44:45 2012 From: wk at gnupg.org (Werner Koch) Date: Wed, 22 Feb 2012 17:44:45 +0100 Subject: Splitting encryption/signing between two gpg processes? In-Reply-To: <4F451570.2060208@invisiblethingslab.com> (Joanna Rutkowska's message of "Wed, 22 Feb 2012 17:18:56 +0100") References: <4F451570.2060208@invisiblethingslab.com> Message-ID: <87k43erf5u.fsf@vigenere.g10code.de> On Wed, 22 Feb 2012 17:18, joanna at invisiblethingslab.com said: > Unfortunately the above setup has the following drawback -- in order to > encrypt messages to other people, and/or to verify other people's > signatures, one would need to import all those people's keys into the > 'keys' domain. This is something we would like to avoid, as it Did you consider to use GnuPG-2? You would run gpg-agent in your trusted VM and gpg in the work VM. GnuPG-2 has been designed to separate private key and public key operations. Currently gpg-agent and gpg run on the same machine using a Unix domain socket for IPC. However there is nothing which prevents the use of another communication channel. In fact, when I ported GnuPG-2 to WindowsCE I modified our libassuan IPC library to allow TCP connections for easier testing. The 2.0 branch implements this design only for GPGSM (S/MIME), but the 2.1 development version fully implements the design and keeps the OpenPGP keys solely under the control of the gpg-agent. I am using 2.1 for more than a year now. Salam-Shalom, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. From joanna at invisiblethingslab.com Fri Feb 24 15:27:17 2012 From: joanna at invisiblethingslab.com (Joanna Rutkowska) Date: Fri, 24 Feb 2012 15:27:17 +0100 Subject: Inocrrect(?) verification exit code for revoked certificates Message-ID: <4F479E45.2070907@invisiblethingslab.com> Hello, I've just discovered that gnupg --verify will happily return 0 exit code for signature created with a REVOKED signature. E.g. I have imported the old kernel.org key revocation certificate, and it's clear that gpg realizes the signing key was revoked, but still returns 0: [user at qubes kernel]$ gpg --verify linux-2.6.38.3.tar.bz2.sign gpg: Signature made Thu Apr 14 22:42:05 2011 CEST using DSA key ID 517D0F0E gpg: Good signature from "Linux Kernel Archives Verification Key " gpg: WARNING: This key has been revoked by its owner! gpg: This could mean that the signature is forged. gpg: reason for revocation: Key has been compromised gpg: revocation comment: Key was used to autosigning; autosigning server was compromised. gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E [user at qubes kernel]$ echo $? 0 Wile it seems to me that an error exit code should returned in this case. After all a "good" signature made with a compromised key, should not be considered as "good"... This is especially important for build scripts that make use of gpg in order to verify downloaded tarballs. A similar issue is when we one tries to verify the signature using untrusted key -- shouldn't gpg return an error exit code in this case as well? Perhaps a special options might be introduced, such as '--fail-when-revoked-key', and '--fail-when-untrusted-key' that would add such behavior? joanna. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: OpenPGP digital signature URL: From flameeyes at flameeyes.eu Fri Feb 24 22:06:56 2012 From: flameeyes at flameeyes.eu (Diego Elio =?ISO-8859-1?Q?Petten=F2?=) Date: Fri, 24 Feb 2012 22:06:56 +0100 Subject: Splitting encryption/signing between two gpg processes? In-Reply-To: <87k43erf5u.fsf@vigenere.g10code.de> References: <4F451570.2060208@invisiblethingslab.com> <87k43erf5u.fsf@vigenere.g10code.de> Message-ID: <1330117616.2836.15.camel@titan.home.flameeyes.eu> Il giorno mer, 22/02/2012 alle 17.44 +0100, Werner Koch ha scritto: > > Did you consider to use GnuPG-2? You would run gpg-agent in your > trusted VM and gpg in the work VM. GnuPG-2 has been designed to > separate private key and public key operations. Currently gpg-agent > and > gpg run on the same machine using a Unix domain socket for IPC. Do you think it would be feasible to get ssh to implement a similar forwarding for what they do already for X and SSH Agent? It would be veeeery nice to have. -- Diego Elio Petten? From jerome at jeromebaum.com Sat Feb 25 00:02:14 2012 From: jerome at jeromebaum.com (Jerome Baum) Date: Sat, 25 Feb 2012 00:02:14 +0100 Subject: Splitting encryption/signing between two gpg processes? In-Reply-To: <1330117616.2836.15.camel@titan.home.flameeyes.eu> References: <4F451570.2060208@invisiblethingslab.com> <87k43erf5u.fsf@vigenere.g10code.de> <1330117616.2836.15.camel@titan.home.flameeyes.eu> Message-ID: On Fri, Feb 24, 2012 at 22:06, Diego Elio Petten? wrote: > Do you think it would be feasible to get ssh to implement a similar > forwarding for what they do already for X and SSH Agent? It would be > veeeery nice to have. > See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294148 and the references from there. -- PGP: A0E4 B2D4 94E6 20EE 85BA E45B 63E4 2BD8 C58C 753A PGP: 2C23 EBFF DF1A 840D 2351 F5F5 F25B A03F 2152 36DA -- No situation is so dire that panic cannot make it worse. -- Please encrypt sensitive information before emailing it: https://jeromebaum.com/pgp/encrypt.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at guardianproject.info Sat Feb 25 01:53:11 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Fri, 24 Feb 2012 19:53:11 -0500 Subject: Android does not have pthread_rwlock*, npth wants them Message-ID: <4F4830F7.9040601@guardianproject.info> More Android porting fun! The good news is that I have working builds for the whole thing, but working in a limited way. The build is also repeatable and even automated. Once I get everything working, I'll also add in the gnupg tests to the automated builds: https://build.safermobile.org/job/gnupg-for-android/ So now the problem at hand is more missing pthread symbols: libnpth.so: undefined reference to `pthread_rwlock_rdlock' libnpth.so: undefined reference to `pthread_rwlock_timedwrlock' libnpth.so: undefined reference to `pthread_rwlock_timedrdlock' libnpth.so: undefined reference to `pthread_rwlock_wrlock' libnpth.so: undefined reference to `pthread_rwlock_trywrlock' libnpth.so: undefined reference to `pthread_rwlock_tryrdlock' The attached patch to npth gave me a libnpth.so that made gpg-agent happy enough to run. dirmngr still doesn't run because libldap.so also has the pthread_rwlock_* symbols, but I think I can solve that by using ./configure --without-threads in openldap. .hc -------------- next part -------------- A non-text attachment was scrubbed... Name: npth-android-fixes.patch Type: text/x-patch Size: 2613 bytes Desc: not available URL: From wk at gnupg.org Sat Feb 25 13:04:53 2012 From: wk at gnupg.org (Werner Koch) Date: Sat, 25 Feb 2012 13:04:53 +0100 Subject: Inocrrect(?) verification exit code for revoked certificates In-Reply-To: <4F479E45.2070907@invisiblethingslab.com> (Joanna Rutkowska's message of "Fri, 24 Feb 2012 15:27:17 +0100") References: <4F479E45.2070907@invisiblethingslab.com> Message-ID: <8762evp196.fsf@vigenere.g10code.de> On Fri, 24 Feb 2012 15:27, joanna at invisiblethingslab.com said: > Wile it seems to me that an error exit code should returned in this > case. After all a "good" signature made with a compromised key, should > not be considered as "good"... That is a FAQ and the short answer is that you can't convey enough information in an exit code. Thus GnuPG uses status messages (--status-fd N) to tell you what is going on. A simple AWK script can be used to parse them - or you use gpgme which does everything for you and returns a set of flags describing the result (one of theses flags is a convenient red/green value). I your case, you should not use gpg but gpgv. GPGV has been designed for the purpose of automated signature verification and is what all Linux distros use. Salam-Shalom, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. From wk at gnupg.org Sat Feb 25 13:10:33 2012 From: wk at gnupg.org (Werner Koch) Date: Sat, 25 Feb 2012 13:10:33 +0100 Subject: Splitting encryption/signing between two gpg processes? In-Reply-To: (Jerome Baum's message of "Sat, 25 Feb 2012 00:02:14 +0100") References: <4F451570.2060208@invisiblethingslab.com> <87k43erf5u.fsf@vigenere.g10code.de> <1330117616.2836.15.camel@titan.home.flameeyes.eu> Message-ID: <871upjp0zq.fsf@vigenere.g10code.de> On Sat, 25 Feb 2012 00:02, jerome at jeromebaum.com said: > See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294148 and the > references from there. Forwarding of Unix Domain Sockets is problematic because they assume that sender and receiver are on the same machine. BTW, their modern name is PF_LOCAL and not anymore PF_UNIX. Nevertheless, a transport channel via ssh makes sense. Shalom-Salam, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. From dshaw at jabberwocky.com Sat Feb 25 14:13:43 2012 From: dshaw at jabberwocky.com (David Shaw) Date: Sat, 25 Feb 2012 08:13:43 -0500 Subject: Inocrrect(?) verification exit code for revoked certificates In-Reply-To: <4F479E45.2070907@invisiblethingslab.com> References: <4F479E45.2070907@invisiblethingslab.com> Message-ID: On Feb 24, 2012, at 9:27 AM, Joanna Rutkowska wrote: > Wile it seems to me that an error exit code should returned in this > case. After all a "good" signature made with a compromised key, should > not be considered as "good"... > > This is especially important for build scripts that make use of gpg in > order to verify downloaded tarballs. > > A similar issue is when we one tries to verify the signature using > untrusted key -- shouldn't gpg return an error exit code in this case as > well? Part of the problem here is the sheer number of cases of "the signature was mathematically correct, but you shouldn't accept it because of xxxxxx" (good signature from a revoked key, good signature from an expired key, good signature from an untrusted key, good but expired signature, etc, etc). Because of this, an exit code isn't as useful. Instead, GPG has a rich (and script parseable) way to express the many variants with the --status-fd option. Look in doc/DETAILS for the exact language, but in general, status-fd outputs things like EXPSIG (good but expired signature), EXPKEYSIG (good signature from an expired key), REVKEYSIG (good signature from a revoked key), VALIDSIG (good signature), and so on. Along with that is why GPG feels the key that issued the signature should be considered usable (or not): TRUST_FULLY, TRUST_NEVER, and so on, along with the reason (i.e. which trust model calculated it). David From hans at guardianproject.info Sat Feb 25 18:28:35 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Sat, 25 Feb 2012 12:28:35 -0500 Subject: Android does not have pthread_rwlock*, npth wants them In-Reply-To: <4F4830F7.9040601@guardianproject.info> References: <4F4830F7.9040601@guardianproject.info> Message-ID: <71A0C2D6-B035-4E67-9E3D-52735450348B@guardianproject.info> Here's my update on this: It seems that in 2.1.0-git, dirmngr cannot work without npth's pthread_rwlock_* functionality, so I am skipping dirmngr for now. If I #ifdef out the pthread_rwlock_* stuff in npth, then I can get gpg-agent to build and run. And openldap builds fine using ./configure --without-threads. Next up for me is getting the gnupg/tests running as part of the automated builds. .hc On Feb 24, 2012, at 7:53 PM, Hans-Christoph Steiner wrote: > > More Android porting fun! The good news is that I have working builds > for the whole thing, but working in a limited way. The build is also > repeatable and even automated. Once I get everything working, I'll also > add in the gnupg tests to the automated builds: > > https://build.safermobile.org/job/gnupg-for-android/ > > So now the problem at hand is more missing pthread symbols: > > libnpth.so: undefined reference to `pthread_rwlock_rdlock' > libnpth.so: undefined reference to `pthread_rwlock_timedwrlock' > libnpth.so: undefined reference to `pthread_rwlock_timedrdlock' > libnpth.so: undefined reference to `pthread_rwlock_wrlock' > libnpth.so: undefined reference to `pthread_rwlock_trywrlock' > libnpth.so: undefined reference to `pthread_rwlock_tryrdlock' > > The attached patch to npth gave me a libnpth.so that made gpg-agent > happy enough to run. dirmngr still doesn't run because libldap.so also > has the pthread_rwlock_* symbols, but I think I can solve that by using > ./configure --without-threads in openldap. > > .hc > ---------------------------------------------------------------------------- I hate it when they say, "He gave his life for his country." Nobody gives their life for anything. We steal the lives of these kids. -Admiral Gene LeRocque From marcus.brinkmann at ruhr-uni-bochum.de Tue Feb 28 17:32:16 2012 From: marcus.brinkmann at ruhr-uni-bochum.de (Marcus Brinkmann) Date: 28 Feb 2012 17:32:16 +0100 Subject: npth finds pthread_mutex_timedlock() which android does not have In-Reply-To: <4F42C626.4070109@guardianproject.info> References: <4F42A81F.7080004@guardianproject.info> <4F42C626.4070109@guardianproject.info> Message-ID: <4F4D0190.7030209@ruhr-uni-bochum.de> On 02/20/2012 11:16 PM, Hans-Christoph Steiner wrote: > Turns out there is another issue with npth on Android. npth_yield is a > macro for pthread_yield, which Android does not seem to have. I cannot > find another confirmation of this besides pthread_yield() not being any > headers. While I find the disregard for standard compliance in Android deeply disturbing, in this case the right fix is to remove npth_yield entirely (which should have been a function anyway, as it needs to release the global lock temporarily). yield is considered harmful, and I changed the only place where it is called in gnupg with a sleep (well, there are some more calls in the windows CE port which will eventually be taken care of). npth: c30634abebb287f56a6a2480b4bbd2ffc166dd4d gnupg: 8f8c6594147608b1021c16fc3561feb96da5d55a Thanks, Marcus From hans at guardianproject.info Tue Feb 28 18:29:27 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Tue, 28 Feb 2012 12:29:27 -0500 Subject: please revert "Add replacement hack for Android's broken ttyname." Message-ID: <4F4D0EF7.3000506@guardianproject.info> So the first attempt at the ttyname workaround causes build issues because first, adding "#undef HAVE_TTYNAME" to config.h just gets rewritten to "#define HAVE_TTYNAME 1" later on in the build process. When HAVE_TTYNAME is actually undefined, then the gnupg code uses the Windows ttyname() stub which just returns a 0, but then that conflicts with then Android ttyname() stub, which also just returns a 0. So if a stub ttyname() returning a 0 is all that gnupg needs, Android already provides that, albeit with the "FIXME warning message". .hc From hans at guardianproject.info Tue Feb 28 18:44:16 2012 From: hans at guardianproject.info (Hans-Christoph Steiner) Date: Tue, 28 Feb 2012 12:44:16 -0500 Subject: npth finds pthread_mutex_timedlock() which android does not have In-Reply-To: <4F4D0190.7030209@ruhr-uni-bochum.de> References: <4F42A81F.7080004@guardianproject.info> <4F42C626.4070109@guardianproject.info> <4F4D0190.7030209@ruhr-uni-bochum.de> Message-ID: <4F4D1270.9000405@guardianproject.info> On 02/28/2012 11:32 AM, Marcus Brinkmann wrote: > On 02/20/2012 11:16 PM, Hans-Christoph Steiner wrote: > >> Turns out there is another issue with npth on Android. npth_yield is a >> macro for pthread_yield, which Android does not seem to have. I cannot >> find another confirmation of this besides pthread_yield() not being any >> headers. > > While I find the disregard for standard compliance in Android deeply > disturbing, in this case the right fix is to remove npth_yield entirely > (which should have been a function anyway, as it needs to release the > global lock temporarily). yield is considered harmful, and I changed > the only place where it is called in gnupg with a sleep (well, there are > some more calls in the windows CE port which will eventually be taken > care of). > > npth: c30634abebb287f56a6a2480b4bbd2ffc166dd4d > gnupg: 8f8c6594147608b1021c16fc3561feb96da5d55a That's great, I'll try a build right now. I also noticed that you committing some changes to make pthread_rwlock* optional. Do you think that will ultimately apply to dirmngr as well? As for Android's standard compliant, it is a bummer. I find it useful to understand their view on the native side of things when thinking about this stuff. First off, Android isn't UNIX, its a new thing with a Linux kernel and some UNIXish stuff (for example, most stuff is in /system). Then, the original intention is that developers would only ever work in Java, and they do provide a complete and standards-compliant Java SDK. It is only because of large developer demand have they been convinced to open up the underlying C layers for general development, so now are starting to catch up with standard compliance there. .hc