Mailing List Archive

Win32 - export keys
Using gnupg win32, I could not create a valid exported key file using redirected
stdout. I found that using the --output option, however, worked fine.

In other words:

gpg --export user1 > user1.key (created a corrupted file)
gpg -o user1.key --export user1 (created a valid file)

I did further analysis on the corrupted files:

When I tried to import an unarmoured file, I'd get:
----
gpg: mpi too large (51968 bits)
gpg: mpi too large (41167 bits)

gpg: Ohhhh jeeee: mpi crosses packet bordersecmem usage: 0/0 bytes in 0/0 blocks
of pool 0/16384

abnormal program termination
----

When I tried to import an armoured file I'd get this:
----
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
----

By examining the armoured exported keyfiles from both a stdout redirect and a
--output specified file, I found that the redirected file had an extra carriage
return at the end of line ( x'0D0D0A') where as the --output file had just
x'0D0A' end of lines.

Just thought you would like to know. I tried searching the mailing lists and
Readme.W32 doc, but couldn't find anything a mention of this.

Thanks, Archie

BTW.

When I tried to search the mail list archives... I got the following:

ht://Dig error
htsearch detected an error. Please report this to the webmaster of this site.
The error message is:

Unable to read word database file '/opt/db/db.words.db'
Did you run htmerge?
Re: Win32 - export keys [ In reply to ]
This seems more of the operating system limitation causing this
problem.

Windows handles text and binary data differently while on most of
Unix based systems, it is handled equally.

When exporting ascii texts (with -a) it doesn't matter, but looks
like Window's doing its own "formatting" on binary files (probably
it's assuming stdout is text) and that's probably why you would get
extra returns...

If you decrypt binary files redirection, same problem happens (you'll
get garbage)

>
>
>Using gnupg win32, I could not create a valid exported key file using
>redirected
>stdout. I found that using the --output option, however, worked fine.
>
>In other words:
>
>gpg --export user1 > user1.key (created a corrupted file)
>gpg -o user1.key --export user1 (created a valid file)
>
>I did further analysis on the corrupted files:
>
>When I tried to import an unarmoured file, I'd get:
>----
>gpg: mpi too large (51968 bits)
>gpg: mpi too large (41167 bits)
>
>gpg: Ohhhh jeeee: mpi crosses packet bordersecmem usage: 0/0 bytes in 0/0
>blocks
> of pool 0/16384
>
>abnormal program termination
>----
>
>When I tried to import an armoured file I'd get this:
>----
>gpg: no valid OpenPGP data found.
>gpg: Total number processed: 0
>----
>
>By examining the armoured exported keyfiles from both a stdout redirect and a
>--output specified file, I found that the redirected file had an extra
>carriage
>return at the end of line ( x'0D0D0A') where as the --output file had just
>x'0D0A' end of lines.
>
>Just thought you would like to know. I tried searching the mailing lists and
>Readme.W32 doc, but couldn't find anything a mention of this.
>

--
Hideki Saito mailto:hideki@allcity.net
PGP Fingerprint(0x82957B66): DE6B 1301 CC7F B915 521B 3736 4716 2919 8295 7B66
Re: Win32 - export keys [ In reply to ]
On Tue, 25 Jul 2000, Archie.Johnson@atl.bluecross.ca wrote:

> By examining the armoured exported keyfiles from both a stdout redirect and a
> --output specified file, I found that the redirected file had an extra carriage
> return at the end of line ( x'0D0D0A') where as the --output file had just
> x'0D0A' end of lines.

I guess that the problem is that I forgot to insert a few setmode()
here and there. If you specify a filename it is not a problem becuase
all files rae opened in binary mode.

Thanks for pointing me on that problem.

Werner

> Unable to read word database file '/opt/db/db.words.db'
> Did you run htmerge?

I have to check the cronjob and the configuration - we have moved the
lists to another machine some time ago.


--
Werner Koch OpenPGP key 621CC013
OpenIT GmbH http://www.OpenIT.de
Re: Win32 - export keys [ In reply to ]
On Tue, 25 Jul 2000, Hideki Saito wrote:

> When exporting ascii texts (with -a) it doesn't matter, but looks
> like Window's doing its own "formatting" on binary files (probably
> it's assuming stdout is text) and that's probably why you would get

And in addtion GnuPG for Windows does it also; this is the reason for
the CR,CR,LF.

--
Werner Koch OpenPGP key 621CC013
OpenIT GmbH http://www.OpenIT.de
AW: Win32 - export keys [ In reply to ]
I hope the problem with standard output on Win 32 is corrected soon, because
I need gpg as a filter application on a system running win98. And I have to
deliver the system in 10 days.

Sometimes it seams the stdout and or in is opened correctly, because I can
encode and decode a string with a pipe, but often it fails.

Hope this is somehow related with the stdout problem with --export-keys. and
therefore not that offtopic

??? Can I compile gnupg under windows or do I have to compile it under linux
with a crosscompiler installed?

Kind regards
Joseph WENNINGER.
Re: Win32 - export keys [ In reply to ]
On Wed, 26 Jul 2000, Joseph WENNINGER wrote:

> I hope the problem with standard output on Win 32 is corrected soon, because
> I need gpg as a filter application on a system running win98. And I have to
> deliver the system in 10 days.

I hope that it is now fixed in the current CVS STABLE-BRANCH-1-0.

> Hope this is somehow related with the stdout problem with --export-keys. and
> therefore not that offtopic

Ditto.

> ??? Can I compile gnupg under windows or do I have to compile it under linux
> with a crosscompiler installed?

No, yes. See doc/README.W32 for instructions on how to build the Windwos
version. If you have problems, my company can do it for you.


Werner


--
Werner Koch OpenPGP key 621CC013
OpenIT GmbH http://www.OpenIT.de