Mailing List Archive

can't import key through stdin
My problem: gpg is unable to import keys from stdin:



~$cat test.txt | gpg --import
gpg: Total number processed: 0



It works fine when given a filename:

~$gpg --import test.txt
gpg: key 88C1BFB7: public key imported
gpg: Total number processed: 1
gpg: imported: 1


but since this script will be used in a CGI environment,
I really rather not have to write a temp file.

Anyone run into this, or hopefully run into it and solve it?

Thanks in advance:

----------------------------------------------
Eric J. Gustafson, Web Developer, Nice Guy
VISI.com, Minneapolis, MN
----------------------------------------------
Re: can't import key through stdin [ In reply to ]
On Wed, 09 Feb 2000, Eric J. Gustafson wrote:

Hi!

> My problem: gpg is unable to import keys from stdin:

Which version of gpg you are using? Im using 1.0.1 and it doesn't work
too. But it works with version 1.0.0:

[tb@ricola /tmp]> pgpk -xa 0xEAE18755 | /usr/local/gpg-1.0.0/bin/gpg --import
| gpg: key EAE18755: not changed
| gpg: Total number processed: 1
| gpg: unchanged: 1
[tb@ricola /tmp]> pgpk -xa 0xEAE18755 | /usr/local/gpg-1.0.1/bin/gpg --import
| gpg: Total number processed: 0
[tb@ricola /tmp]> /usr/local/gpg-1.0.0/bin/gpg --version
| gpg (GnuPG) 1.0.0
| Copyright (C) 1999 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.
|
| Supported algorithms:
| Cipher: 3DES, CAST5, BLOWFISH, TWOFISH
| Pubkey: ELG-E, DSA, ELG
| Hash: MD5, SHA1, RIPEMD160
[tb@ricola /tmp]> /usr/local/gpg-1.0.1/bin/gpg --version
| gpg (GnuPG) 1.0.1
| Copyright (C) 1999 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.
|
| Home: ~/.gnupg
| Supported algorithms:
| Cipher: 3DES, CAST5, BLOWFISH, TWOFISH
| Pubkey: ELG-E, DSA, ELG
| Hash: MD5, SHA1, RIPEMD160
[tb@ricola /tmp]>

Cheers,
Thomas
--
Thomas Bader <thomasb@trash.net>, Powered by LINUX 2.2
Infos und Tipps zu Linux, HOWTOs des DLHP <http://www.t-bader.ch/>
=> ICQ: 46323601
Re: can't import key through stdin [ In reply to ]
On Thu, 10 Feb 2000, Thomas Bader wrote:

> Which version of gpg you are using? Im using 1.0.1 and it doesn't work
> too. But it works with version 1.0.0:

You are right. As a temporary solution use

cat foo | gpg --import -

You can always use a dahs as the input file name to denote stdin.
This is handled a littel bit different but in the case of --import it
doesn't matter.


Werner
RE: can't import key through stdin [ In reply to ]
> -----Original Message-----
> From: Thomas Bader [mailto:thomasb@trash.net]
> Sent: Thursday, February 10, 2000 4:05 AM
> To: gnupg-users@gnupg.org
> Subject: Re: can't import key through stdin
>
>
> On Wed, 09 Feb 2000, Eric J. Gustafson wrote:
>
> Hi!
>
> > My problem: gpg is unable to import keys from stdin:
>
> Which version of gpg you are using? Im using 1.0.1 and it doesn't work
> too. But it works with version 1.0.0:
>
> [tb@ricola /tmp]> pgpk -xa 0xEAE18755 |
> /usr/local/gpg-1.0.0/bin/gpg --import
> | gpg: key EAE18755: not changed
> | gpg: Total number processed: 1
> | gpg: unchanged: 1
> [tb@ricola /tmp]> pgpk -xa 0xEAE18755 |
> /usr/local/gpg-1.0.1/bin/gpg --import
> | gpg: Total number processed: 0
> [tb@ricola /tmp]> /usr/local/gpg-1.0.0/bin/gpg --version
> | gpg (GnuPG) 1.0.0
> | Copyright (C) 1999 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.
> |
> | Supported algorithms:
> | Cipher: 3DES, CAST5, BLOWFISH, TWOFISH
> | Pubkey: ELG-E, DSA, ELG
> | Hash: MD5, SHA1, RIPEMD160
> [tb@ricola /tmp]> /usr/local/gpg-1.0.1/bin/gpg --version
> | gpg (GnuPG) 1.0.1
> | Copyright (C) 1999 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.
> |
> | Home: ~/.gnupg
> | Supported algorithms:
> | Cipher: 3DES, CAST5, BLOWFISH, TWOFISH
> | Pubkey: ELG-E, DSA, ELG
> | Hash: MD5, SHA1, RIPEMD160
> [tb@ricola /tmp]>
>
> Cheers,
> Thomas

gpg 1.0.1

~$gpg --version
gpg (GnuPG) 1.0.1
Copyright (C) 1999 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.

Home: ~/.gnupg
Supported algorithms:
Cipher: 3DES, CAST5, BLOWFISH, TWOFISH
Pubkey: ELG-E, DSA, ELG
Hash: MD5, SHA1, RIPEMD160