opencdk: fix verification of clearsigned documents
authorFlorian Fainelli <florian@openwrt.org>
Wed, 9 Feb 2011 20:36:32 +0000 (20:36 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 9 Feb 2011 20:36:32 +0000 (20:36 +0000)
This patch fixes a bug in the upstream library that prevents the verification of
 clearsigned documents with \r\n line endings. Obviously, it should go under
feeds/packages/libs/opencdk/patches/

Signed-off-by: Daniel A. Nagy <nagydani@epointsystem.org>
SVN-Revision: 25437

libs/opencdk/Makefile
libs/opencdk/patches/200-verify-clearsigned.patch [new file with mode: 0644]

index c9f6d9458d98be77481ab3575a9ca183ca2499da..de91fa1d9d733b9c70b0fa76499b7fc2568efe52 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006, 2007 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opencdk
 PKG_VERSION:=0.6.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/opencdk/ \
diff --git a/libs/opencdk/patches/200-verify-clearsigned.patch b/libs/opencdk/patches/200-verify-clearsigned.patch
new file mode 100644 (file)
index 0000000..a222aa8
--- /dev/null
@@ -0,0 +1,13 @@
+--- opencdk-0.6.6/src/stream.c 2007-11-08 19:31:45.000000000 +0100
++++ opencdk-0.6.6-my/src/stream.c      2011-01-17 20:30:19.000000000 +0100
+@@ -1384,7 +1384,9 @@
+   while (!cdk_stream_eof (s) && count > 0)
+     {
+       c = cdk_stream_getc (s);
+-      if (c == EOF || c == '\r' || c == '\n' ) 
++      if (c == '\r')
++        c = cdk_stream_getc (s);
++      if (c == EOF || c == '\n' )
+       {
+         buf[i++] = '\0';
+         break;