Bug 90105 - security/gnupg fix batch mode
Summary: security/gnupg fix batch mode
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jun Kuriyama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-08 16:10 UTC by thomas
Modified: 2005-12-16 02:17 UTC (History)
0 users

See Also:


Attachments
file.diff (270 bytes, patch)
2005-12-08 16:10 UTC, thomas
no flags Details | Diff
file.diff (523 bytes, patch)
2005-12-08 16:10 UTC, thomas
no flags Details | Diff
file.diff (524 bytes, patch)
2005-12-08 16:10 UTC, thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description thomas 2005-12-08 16:10:03 UTC
	- gnupg 1.4.2 does not work properly with --batch. "Assertion failed: (pkt->pkt.generic), function build_packet, file build-packet.c , line 74.". This problem is fixed in the gnupg cvs and will be in the 1.4.3 release.
	- add sha256 checksum

How-To-Repeat: 	Use BATCH mode
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2005-12-08 16:12:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kuriyama

Over to maintainer
Comment 2 thomas 2005-12-09 11:54:46 UTC
Hi all

Sorry, I sumbitted a wrong fix. Next time I should read the whole cvs  
entry and do a better testing in my enviroment. The correct patch  
looks like. This one is the _correct_ fix in the cvs and generate  
correct keys in the batch mode.

Regards,
Thomas

--- g10/keygen.c.orig   Tue Jun 21 12:22:17 2005
+++ g10/keygen.c        Fri Dec  9 11:31:59 2005
@@ -3243,15 +3243,21 @@
static int
write_keyblock( IOBUF out, KBNODE node )
{
-    for( ; node ; node = node->next ) {
-       int rc = build_packet( out, node->pkt );
-       if( rc ) {
-           log_error("build_packet(%d) failed: %s\n",
+  for( ; node ; node = node->next )
+    {
+      if(!is_deleted_kbnode(node))
+       {
+         int rc = build_packet( out, node->pkt );
+         if( rc )
+           {
+             log_error("build_packet(%d) failed: %s\n",
                         node->pkt->pkttype, g10_errstr(rc) );
-           return G10ERR_WRITE_FILE;
+             return G10ERR_WRITE_FILE;
+           }
         }
      }
-    return 0;
+
+  return 0;
}
Comment 3 Jun Kuriyama 2005-12-15 22:51:16 UTC
At Fri, 9 Dec 2005 12:54:46 +0100,
Thomas Vogt wrote:
> Sorry, I sumbitted a wrong fix. Next time I should read the whole cvs  
> entry and do a better testing in my enviroment. The correct patch  
> looks like. This one is the _correct_ fix in the cvs and generate  
> correct keys in the batch mode.

Thank you for your submission!  Could you point me committed CVS info
in http://cvs.gnupg.org/?  I cannot find this fix in the repository...


-- 
Jun Kuriyama <kuriyama@imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama@FreeBSD.org> // FreeBSD Project
Comment 4 thomas 2005-12-16 01:46:50 UTC
Hi

Jun Kuriyama wrote:
> At Fri, 9 Dec 2005 12:54:46 +0100,
> Thomas Vogt wrote:
>> Sorry, I sumbitted a wrong fix. Next time I should read the whole cvs  
>> entry and do a better testing in my enviroment. The correct patch  
>> looks like. This one is the _correct_ fix in the cvs and generate  
>> correct keys in the batch mode.
> 
> Thank you for your submission!  Could you point me committed CVS info
> in http://cvs.gnupg.org/?  I cannot find this fix in the repository...

Its revision 3853
http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/g10/keygen.c?rev=3853&view=log

diff:
http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/g10/keygen.c?rev=3853&r1=3852&r2=3853 


cheers
Thomas
Comment 5 Jun Kuriyama freebsd_committer freebsd_triage 2005-12-16 02:17:10 UTC
State Changed
From-To: open->closed

Committed, thanks!