Bernhard Reiter | 11 May 23:17
Picon
Favicon

Python bindings for GnuPG

For those of you seeking to use GnuPG from Python, there is an overview at

  http://wiki.python.org/moin/GnuPrivacyGuard

I've just overhauled it.
My recommendation currently is to use James Henstridge's PyGPGME.
As it is actively maintained and even supports Python 3 and 2 since March.

An interesting approach is W. Trevor King's pgp-mime which uses pyassuan 
to speak to gpgme-tool. Haven't tried it. 

Happy Hacking,
Bernhard
Nelson H. F. Beebe | 8 May 16:07
Picon
Favicon

npth-0.90 build report

This morning, I successfully built npth-0.90 on about 80% of the 25 or
so flavors of Unix in our test lab.  There were, however, some
glitches that I could overcome, some machines on which a successful
build has not been possible, and one machine on which the build
succeeds, but the test fails.

When I attempted manual rebuilds after automated procedures failed,
I set PATH to a minimal list, such as /bin:/usr/bin.

Here is a summary of problems:

------------------------------------------------------------------------

Solaris 10 (SPARC, x86, x86_64) and 11 (x86_64):

	Undefined			first referenced
	 symbol  			    in file
	accept                              ../src/.libs/libnpth.so
	recvmsg                             ../src/.libs/libnpth.so
	sendmsg                             ../src/.libs/libnpth.so
	connect                             ../src/.libs/libnpth.so

    Need LIBS=-lsocket to resolve symbols.  With that addition,
    the build completes and the tests pass.

------------------------------------------------------------------------

OpenBSD 4.9 and 5.1 x86:

	../src/.libs/libnpth.so.0.1: undefined reference to `pselect'
(Continue reading)

Werner Koch | 8 May 12:39
Picon
Favicon

[Announce] nPth - The New GNU Portable Threads Library

Hi!

We are pleased to announce the first tarball release of the
New GNU Portable Threads Library: nPth version 0.90.

nPth is a non-preemptive threads implementation using an API very similar
to the one known from GNU Pth.  It has been designed as a replacement of
GNU Pth for non-ancient operating systems.  In contrast to GNU Pth is is
based on the system's standard threads implementation.  Thus nPth allows
the use of libraries which are not compatible to GNU Pth.

GNU Pth is often used to provide a co-routine based framework.  GnuPG-2
makes heavy use of this concept for good audibility, general security
concerns, and ease of implementation.  However, GNU Pth has the drawback
that ugly hacks are required to work with libraries which are not GNU
Pth aware.

The nPth tarball and its signature are available as

  ftp://ftp.gnupg.org/gcrypt/npth/npth-0.90.tar.bz2
  ftp://ftp.gnupg.org/gcrypt/npth/npth-0.90.tar.bz2.sig

and at all GnuPG mirrors.  See the included README file and the npth.h
header for documentation.  Bug reports and requests for help should be
send to the gnupg-devel mailing list at gnupg.org.  nPth is available
under the terms of the LGPLv3+ or the GPLv2+.  The GIT repository is at
git://git.gnupg.org/npth.git .

The current development version of GnuPG (2.1) has already been migrated
to nPth and thus the next beta release will require it.  Obviously we
(Continue reading)

NIIBE Yutaka | 26 Apr 02:55
Favicon

[PATCH] sm/certreqgen-ui.c

Hello, 

While trying to use gpgsm --gen-key, I found two mistakes.

diff --git a/sm/certreqgen-ui.c b/sm/certreqgen-ui.c
index 236d53b..41492f5 100644
--- a/sm/certreqgen-ui.c
+++ b/sm/certreqgen-ui.c
@@ -339,12 +339,12 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream)
   /* DNS names.  */
   tty_printf (_("Enter DNS names"));
   tty_printf (_(" (optional; end with an empty line):\n"));
-  ask_mb_lines (&mb_email, "Name-DNS: ");
+  ask_mb_lines (&mb_dns, "Name-DNS: ");

   /* URIs.  */
   tty_printf (_("Enter URIs"));
   tty_printf (_(" (optional; end with an empty line):\n"));
-  ask_mb_lines (&mb_email, "Name-URI: ");
+  ask_mb_lines (&mb_uri, "Name-URI: ");

 
   /* Want a self-signed certificate?  */
Jim Meyering | 25 Apr 17:44

[PATCH] simplify ldap URL construction


* dirmngr/ldap-url.c (ldap_charray2str): Remove unwarranted uses of
strncpy, and simplify.
---
Looking at the other strncpy uses, I found these two and saw that they
are unnecessary, since we know in each case that the specified length
is also the length of the source string.  Using stpcpy makes it
simpler/clearer.

 dirmngr/ldap-url.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/dirmngr/ldap-url.c b/dirmngr/ldap-url.c
index 7b27a30..47441b1 100644
--- a/dirmngr/ldap-url.c
+++ b/dirmngr/ldap-url.c
@@ -342,16 +342,11 @@ char * ldap_charray2str( char **a, const char *sep )
 	p = s;
 	for ( v = a; *v != NULL; v++ ) {
 		if ( v != a ) {
-			strncpy( p, sep, slen );
-			p += slen;
+			p = stpncpy( p, sep, slen );
 		}
-
-		len = strlen( *v );
-		strncpy( p, *v, len );
-		p += len;
+		p = stpcpy( p, *v );
 	}
(Continue reading)

Jim Meyering | 25 Apr 17:40

[PATCH 1] remove doubled words in a comment


---
 common/gettime.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/gettime.h b/common/gettime.h
index 4199369..bc914ad 100644
--- a/common/gettime.h
+++ b/common/gettime.h
@@ -1,5 +1,5 @@
 /* gettime.h - Wrapper for time functions
- * Copyright (C) 2010 Free Software Foundation, Inc.
+ * Copyright (C) 2010, 2012 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -24,8 +24,8 @@
 #include <gpg-error.h> /* We need gpg_error_t. */

-/* A type to hold the ISO time.  Note that this this is the same as
-   the the KSBA type ksba_isotime_t. */
+/* A type to hold the ISO time.  Note that this is the same as
+   the KSBA type ksba_isotime_t. */
 typedef char gnupg_isotime_t[16];

 time_t gnupg_get_time (void);
--
1.7.10.335.g879d8
Jim Meyering | 25 Apr 17:42

[PATCH] avoid buffer strncpy-induced buffer overrun


* dirmngr/crlcache.c (open_dir): Ensure that both this_update
and next_update member strings are NUL-terminated.
---
this_update and next_update are sometimes expected to
be NUL-terminated strings, we must ensure it here.
Otherwise, the readers may access beyond the end of those buffers.

 dirmngr/crlcache.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c
index edf3837..768d446 100644
--- a/dirmngr/crlcache.c
+++ b/dirmngr/crlcache.c
@@ -587,8 +587,14 @@ open_dir (crl_cache_t *r_cache)
                 case 2: entry->issuer_hash = p; break;
                 case 3: entry->issuer = unpercent_string (p); break;
                 case 4: entry->url = unpercent_string (p); break;
-                case 5: strncpy (entry->this_update, p, 15); break;
-                case 6: strncpy (entry->next_update, p, 15); break;
+                case 5:
+		  strncpy (entry->this_update, p, 15);
+		  entry->this_update[15] = 0;
+		  break;
+                case 6:
+		  strncpy (entry->next_update, p, 15);
+		  entry->next_update[15] = 0;
+		  break;
                 case 7: entry->dbfile_hash = p; break;
(Continue reading)

NIIBE Yutaka | 25 Apr 04:33
Favicon

[PATCH] tools/gpgsm-gencert.sh

Hello,

gpgsm-gencert.sh doesn't work well with dash (version 0.5.7).

When URI_ADDRESSES is null, it exits without emitting
CSR.  It exits after the line:

	[ -n "$URI_ADDRESSES" ] && echo "$URI_ADDRESSES"

When I change it to:

	[ -n "$URI_ADDRESSES" ] && echo "$URI_ADDRESSES" || exit 0

it works.

It seems that dash's subshell with -e behavior is different.

Following is a patch to fix this problem, by not using subshell.

This works with both of dash and bash.

----------------------
diff --git a/tools/gpgsm-gencert.sh b/tools/gpgsm-gencert.sh
index b209c8e..28c3792 100755
--- a/tools/gpgsm-gencert.sh
+++ b/tools/gpgsm-gencert.sh
@@ -171,7 +171,7 @@ file_parameter=$(mktemp "/tmp/gpgsm.XXXXXX")
 outfile=$(mktemp "/tmp/gpgsm.XXXXXX")

-(
(Continue reading)

Ajay Kallur | 24 Apr 18:13
Picon

GnuPG 2.0 decryption of two PGP Message blocks in one Message

Dear Developer,


Here's a peculiar scenario, I have a file which has 2 pgp messages or blocks embedded in a single file one below the other. 

Can GPG 2.0 be able to decrypt both the blocks and concatenate the messages inside same single file?

I have attached the sample PGP file for reference and more clear picture of the scenario.

Any help is greatly appreciated.

Thanks.
--
With Regards,
Ajay Kallur
akallur <at> ftj.com
(816) 756 1060 x1250
Attachment (Sample): application/octet-stream, 8177 bytes
_______________________________________________
Gnupg-users mailing list
Gnupg-users <at> gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
W. Trevor King | 12 Apr 19:51
Picon
Favicon

[PATCH 0/2] gitignore and string.h updates for GPGME

While I'm waiting for the go-ahead for more major socket changes to
GPGME, here are a few more minor cleanups.  I think I got the ChangeLog
commit message format right this time ;).

W. Trevor King (2):
  .gitignore: flesh out rules and add subdirectory-.gitignores.
  status-table.c: include string.h for strcmp.

 .gitignore                |   13 ++++++++-----
 doc/.gitignore            |    5 +++++
 lang/cl/.gitignore        |    1 +
 src/.gitignore            |    7 +++++++
 src/status-table.c        |    1 +
 tests/.gitignore          |   10 ++++++++++
 tests/gpg/.gitignore      |   30 ++++++++++++++++++++++++++++++
 tests/gpgsm/.gitignore    |   17 +++++++++++++++++
 tests/opassuan/.gitignore |    3 +++
 9 files changed, 82 insertions(+), 5 deletions(-)
 create mode 100644 doc/.gitignore
 create mode 100644 lang/cl/.gitignore
 create mode 100644 src/.gitignore
 create mode 100644 tests/.gitignore
 create mode 100644 tests/gpg/.gitignore
 create mode 100644 tests/gpgsm/.gitignore
 create mode 100644 tests/opassuan/.gitignore

--

-- 
1.7.3.4
Mustrum | 12 Apr 11:13

Re: [Gpg4win-devel] Redistributing GPG


Le 12/04/2012 10:08, Werner Koch a écrit :
> On Tue, 27 Mar 2012 19:35, mustrum <at> mustrum.net said:
> 
>> My DNS doesn't know any www.gpgwin.org :-(
> 
> 
> In this case your resolver is severely broken:
> 
> $ host www.gpg4win.org www.gpg4win.org is an alias for
> gpg4win.wald.intevation.org. gpg4win.wald.intevation.org has
> address 78.47.251.62
> 
> 
> Salam-Shalom,
> 
> Werner
> 

I know gpg4win ;-)
Since you forgot the "4", I believed it was another one.

Regards.

Gmane