Stray null butes in output of GnuPG from --edit-key? (was: Re: Stray null bytes in output data object from gpgme_op_edit()?
Marcus Brinkmann
Marcus.Brinkmann at ruhr-uni-bochum.de
Tue Nov 5 14:14:01 CET 2002
On Thu, Oct 24, 2002 at 11:46:52AM +0200, Dr.Stefan.Dalibor at bfa.de wrote:
> Hi,
> this might be a bit premature, as gpgme_op_edit() (even with test
> module) is contained in GPGME 0.3.12, but not yet documented...
gpgme_op_edit was introduced to make porting GPA to GPGME possible without
designing all the abstractions that would be needed to provide all features
GPA needs in a clean way. So it's sort of private to GPA for now. Feel
free to use it, but be aware that it's not in its final form, but
experimental.
> Anyway, if the output in the data object passed as 5th argument
> to gpgme_op_edit() (i.e. the output of the GnuPG process while being
> in key edit mode) is converted into a string by gpgme_data_read(),
> stray null bytes are copied into this string... I suppose these are
> remnants of the I/O buffering when reading from the pipe to the
> GnuPG process.
> I don't know if this qualifies as bug, but if not, IMHO it should
> be documented in bold letters :).
Mmh, this seems to be rather an issue with gpg. I did the following:
=========================
marcus at ulysses[0]:~/projects/aegypten/cvs/gpgme/gpgme$ gpg --with-colons --edit-key Brinkmann > /tmp/out
gpg: Hinweis: Alte voreingestellte Optionendatei
'/mnt/marcus/.gnupg/options' wurde ignoriert
gpg (GnuPG) 1.2.0; Copyright (C) 2002 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Geheimer Schlüssel ist vorhanden.
Befehl> list
Befehl> quit
==========================
Then I looked at the file "/tmp/out":
marcus at ulysses[0]:~/projects/aegypten/cvs/gpgme/gpgme$ less /tmp/out
pub:-:1024:17:C0A4CBB987978569:926611421:0::-:
fpr:::::::::141198894E27D44F7084F098C0A4CBB987978569:
sub:^@:2048:16:B8DD92EDC3AF90C1:926611830:0::^@:
fpr:::::::::0597C53A84F4FC368E462F6FB8DD92EDC3AF90C1:
uid:?::::::::Marcus Brinkmann:::S10 S3 H3 H2 Z2 Z1:1,:
uid:?::::::::Marcus Brinkmann <Marcus.Brinkmann at ruhr-uni-bochum.de>:::S10 S3 H3 H2 Z2 Z1:2,:
uid:?::::::::Marcus Brinkmann <brinkmd at debian.org>:::S10 S3 H3 H2 Z2 Z1:3,:
uid:?::::::::Marcus Brinkmann <mb at g10code.de>:::S7 S10 S3 S4 H3 H2 Z2 Z1:4,:
uid:?::::::::Marcus Brinkmann <mb at g10code.com>:::S7 S10 S3 S4 S2 H3 H2 Z2 Z1,mdc:5,p:
pub:-:1024:17:C0A4CBB987978569:926611421:0::-:
fpr:::::::::141198894E27D44F7084F098C0A4CBB987978569:
sub:^@:2048:16:B8DD92EDC3AF90C1:926611830:0::^@:
fpr:::::::::0597C53A84F4FC368E462F6FB8DD92EDC3AF90C1:
uid:?::::::::Marcus Brinkmann:::S10 S3 H3 H2 Z2 Z1:1,:
uid:?::::::::Marcus Brinkmann <Marcus.Brinkmann at ruhr-uni-bochum.de>:::S10 S3 H3 H2 Z2 Z1:2,:
uid:?::::::::Marcus Brinkmann <brinkmd at debian.org>:::S10 S3 H3 H2 Z2 Z1:3,:
uid:?::::::::Marcus Brinkmann <mb at g10code.de>:::S7 S10 S3 S4 H3 H2 Z2 Z1:4,:
uid:?::::::::Marcus Brinkmann <mb at g10code.com>:::S7 S10 S3 S4 S2 H3 H2 Z2 Z1,mdc:5,p:
The ^@ above are binary zeros as displayed by less.
Are those the binary zeros you are talking about?
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus at gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/
More information about the Gnupg-devel
mailing list