From a9a22550c89fcfcd11acf9c6da672dd593b75f0c Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 9 Feb 2011 20:36:32 +0000 Subject: [PATCH] [package] opencdk: fix verification of clearsigned documents 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 SVN-Revision: 25437 --- libs/opencdk/Makefile | 4 ++-- libs/opencdk/patches/200-verify-clearsigned.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 libs/opencdk/patches/200-verify-clearsigned.patch diff --git a/libs/opencdk/Makefile b/libs/opencdk/Makefile index c9f6d9458d..de91fa1d9d 100644 --- a/libs/opencdk/Makefile +++ b/libs/opencdk/Makefile @@ -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 index 0000000000..a222aa81d4 --- /dev/null +++ b/libs/opencdk/patches/200-verify-clearsigned.patch @@ -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; -- 2.30.2