Subject: pkg/7359: pgp5 can´t clearsign texts with country specific characters (e.g. German)
To: None <gnats-bugs@gnats.netbsd.org>
From: Bjoern Labitzke <hermit@cs.tu-berlin.de>
List: netbsd-bugs
Date: 04/11/1999 14:44:35
>Number: 7359
>Category: pkg
>Synopsis: pgp5 can\xb4t clearsign texts with country specific characters (e.g. German)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 11 05:50:01 1999
>Last-Modified:
>Originator: Bjoern Labitzke
>Organization:
Bjoern Labitzke <hermit@cs.tu-berlin.de>
Use PGP! (Don't you use envelopes for your letters?)
9B00 9D82 A087 DC20 7293 BB27 0174 0C15 78AB A9FE
>Release: current NetBSD and pkgsrc from April 10th <NetBSD-current source date>
>Environment:
System: NetBSD labitzke.isdn.cs.tu-berlin.de 1.4_ALPHA NetBSD 1.4_ALPHA (LABITZKE) #19: Sat Apr 10 12:27:43 CEST 1999 root@labitzke.isdn.cs.tu-berlin.de:/usr/src/sys/arch/i386/compile/LABITZKE i386
>Description:
PGP is trying to discern the type of a mail (whether it is a text or binary)
by checking for characters inside a special interval, but it uses "char" as type
for the characters. Therefor "Umlaute" (or other country specific characters)
appear to have a negative value to the checking routine, thus defining the file
as binary. Therefor those texts are encoded in "ASCII-armor" and not readable anymore,
even when clearsigning was explicitly asked for.
>How-To-Repeat:
Write a simple text like "Björn was here" in a file (test.txt) and
try to clearsign it: pgps -at +Clearsing=on test.txt
Check the result (test.txt.asc) and find the text in ASCII armor.
>Fix:
Either tell the compiler to handle characters as unsigned or change the variable
as is done in the following patch:
This patch allows clearsigning to work on texts which include "Umlaute" or
other country specific characters.
--- lib/pgp/utils/pgpFileType.c.orig Sun Apr 11 14:10:29 1999
+++ lib/pgp/utils/pgpFileType.c Sun Apr 11 14:13:12 1999
@@ -185,7 +185,7 @@
pgpFileTypeBinary(char const *lang, byte const *buf, unsigned len)
{
unsigned highlimit;
- char c;
+ unsigned char c;
if (!len)
return 1; /* empty file or error, not a text file */
>Audit-Trail:
>Unformatted: