Re: questions: no input file, and pascal programming

2009-05-03 Thread Philip
So far I have figured out that on windows if I enter the command
gpg -eat -r [recipient key]

I get a prompt on the console
If I then type a message, followed by enter control-Z enter
then gpg will encrypt the message and dump the pgp text to the screen,
or to a file if I used the -o [filename] option.

However on linux control-Z just terminates the program (no pgp text)

Does anyone know the official, correct console way to get pgp to
terminate and output the encrypted text from console?

I'm amazed that it just doesn't seem to be documented anywhere.

thanks, Philip


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: questions: no input file, and pascal programming

2009-05-03 Thread Brad Rogers
On Sun, 03 May 2009 10:22:49 +0100
Philip s...@christiantena.net wrote:

Hello Philip,

 Does anyone know the official, correct console way to get pgp to
 terminate and output the encrypted text from console?
 I'm amazed that it just doesn't seem to be documented anywhere.

Through trial and error, I found CtrlD works.

-- 
 Regards  _
 / )   The blindingly obvious is
/ _)radnever immediately apparent

Life goes quick and it goes without warning
Bombsite Boy - The Adverts


signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: questions: no input file, and pascal programming

2009-05-03 Thread Philipp Schafft
reflum,

On Sun, 2009-05-03 at 10:22 +0100, Philip wrote:
 So far I have figured out that on windows if I enter the command
 gpg -eat -r [recipient key]
 
 I get a prompt on the console
 If I then type a message, followed by enter control-Z enter
 then gpg will encrypt the message and dump the pgp text to the screen,
 or to a file if I used the -o [filename] option.
 
 However on linux control-Z just terminates the program (no pgp text)
 
 Does anyone know the official, correct console way to get pgp to
 terminate and output the encrypted text from console?
 
 I'm amazed that it just doesn't seem to be documented anywhere.

Take a look at the ASCII table (man ascii :). There is ^D (EOT - end of
transmission) for this. This is used by all systems I'm aware of but
window$. Don't know why they use something diffrent, maybe just to be
diffrent and break the standard.


-- 
Philipp.
 (Rah of PH2)


signature.asc
Description: This is a digitally signed message part
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: questions: no input file, and pascal programming

2009-05-03 Thread Philip

I spent a little time coding in windows today (using lazarus).
I have come to the conclusion that you can pipe stuff to gpg from inside 
dos window, but that if you try to pipe stuff directly from the pascal 
program it fails.
I actually got my program to work by piping to cmd.exe with echo Mary 
had a little lamb|gpg inside the stream, which sort of proves that I 
know how to program a pipe.

Example code is at
http://www.christiantena.net/freepascalgpgexample.zip

you can look at this code by installing lazarus, unziping the above file 
into a folder, and then from lazarus do project/open project and point 
it at the lpi file in the folder


hit F9 to compile it

This feels a bit like a bug in gpg to me...

regards, Philip

Philipp Schafft wrote:

reflum,

On Sun, 2009-05-03 at 10:22 +0100, Philip wrote:

So far I have figured out that on windows if I enter the command
gpg -eat -r [recipient key]

I get a prompt on the console
If I then type a message, followed by enter control-Z enter
then gpg will encrypt the message and dump the pgp text to the screen,
or to a file if I used the -o [filename] option.

However on linux control-Z just terminates the program (no pgp text)

Does anyone know the official, correct console way to get pgp to
terminate and output the encrypted text from console?

I'm amazed that it just doesn't seem to be documented anywhere.


Take a look at the ASCII table (man ascii :). There is ^D (EOT - end of
transmission) for this. This is used by all systems I'm aware of but
window$. Don't know why they use something diffrent, maybe just to be
diffrent and break the standard.





___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: questions: no input file, and pascal programming

2009-05-03 Thread James P. Howard, II
Under DOS, redirecting from the standard output of A to the standard
input of B meant the contents were stored in a temporary file somewhere,
due to DOS's inability to multitask.  It's worth checking to be sure
Windows still doesn't do that when running those at the command line.

James

On Sun May  3 11:22:54 2009, Philip s...@christiantena.net wrote:

 I spent a little time coding in windows today (using lazarus).
 I have come to the conclusion that you can pipe stuff to gpg from inside
 dos window, but that if you try to pipe stuff directly from the pascal
 program it fails.
 I actually got my program to work by piping to cmd.exe with echo Mary
 had a little lamb|gpg inside the stream, which sort of proves that I
 know how to program a pipe.
 Example code is at
 http://www.christiantena.net/freepascalgpgexample.zip
 
 you can look at this code by installing lazarus, unziping the above file
 into a folder, and then from lazarus do project/open project and point
 it at the lpi file in the folder
 
 hit F9 to compile it
 
 This feels a bit like a bug in gpg to me...
 
 regards, Philip
 
 Philipp Schafft wrote:
 reflum,

 On Sun, 2009-05-03 at 10:22 +0100, Philip wrote:
 So far I have figured out that on windows if I enter the command
 gpg -eat -r [recipient key]

 I get a prompt on the console
 If I then type a message, followed by enter control-Z enter
 then gpg will encrypt the message and dump the pgp text to the screen,
 or to a file if I used the -o [filename] option.

 However on linux control-Z just terminates the program (no pgp text)

 Does anyone know the official, correct console way to get pgp to
 terminate and output the encrypted text from console?

 I'm amazed that it just doesn't seem to be documented anywhere.

 Take a look at the ASCII table (man ascii :). There is ^D (EOT - end of
 transmission) for this. This is used by all systems I'm aware of but
 window$. Don't know why they use something diffrent, maybe just to be
 diffrent and break the standard.


 
 
 ___
 Gnupg-users mailing list
 Gnupg-users@gnupg.org
 http://lists.gnupg.org/mailman/listinfo/gnupg-users

-- 
James P. Howard, II, MPA
j...@jameshoward.us



signature.asc
Description: OpenPGP digital signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: questions: no input file, and pascal programming

2009-05-02 Thread Philip
I found that if I just type gpg I get this
gpg: Go ahead and type your message ... which looks promising but I
can't find any documentation on how to use it.

Also this works in linux
echo Mary had a little lamb|gpg --yes -eat -o test.txt.gpg -r [keyid]

but I don't know how to do something similar in dos/windows

thanks, Philip

John Clizbe wrote:
 Philip wrote:
 Hi
 I have some questions about gpg
 1.  using gpg command line, can I pass data to be encrypted to gpg that
 isn't in a file?  For example if I want to encrypt Mary had a little
 lamb to a an asc file but I don't want to put that text onto the hard
 drive unencrypted first.
 
 gpg will behave as a pipe or if given no input, quietly wait for you to
 type something in.
 
 2.  is there something like gpgme that can be used easily for pascal
 programmers?
 Personally I use freepascal and I just want to be able to select a key,
 encrypt and decrypt from within my program.
 If anyone knows of any opensource pascal programs that use gnupg it
 would be appreciated.
 
 Pascal bindings should exist for the current gpgme, I've just not found
 them.
 
 I've worked with one pascal program that used gpgme bindings but it was
 code before gpgme API changed. I'd love to find updated bindings and
 save myself the effort of updating the old ones
 
 
 
 
 
 ___
 Gnupg-users mailing list
 Gnupg-users@gnupg.org
 http://lists.gnupg.org/mailman/listinfo/gnupg-users


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: questions: no input file, and pascal programming

2009-05-02 Thread Philip

I got it to work in Windows.
With a default install of gpg4win gpg is not in the path, but this 
command works
echo Mary had a little lamb|c:\Program Files\GNU\GnuPG\gpg.exe --yes 
-eat -o test.txt.gpg -r [keyid]


I'm thinking that it might be easier for a pascal programmer to 
interface with gpg on command line than to figure out how to compile 
against gpgme c code, even if it isn't probably the right way to do it.


thanks, Philip


Hardeep Singh wrote:

The same can be done in Windows.
Visit http://blog.hardeep.name/computer/20080828/linux-shell-on-windows/
this will give you the shell and the Echo commands that you need.

Hardeep Singh
http://blog.Hardeep.name



On Sat, May 2, 2009 at 1:05 PM, Philip s...@christiantena.net wrote:

I found that if I just type gpg I get this
gpg: Go ahead and type your message ... which looks promising but I
can't find any documentation on how to use it.

Also this works in linux
echo Mary had a little lamb|gpg --yes -eat -o test.txt.gpg -r [keyid]

but I don't know how to do something similar in dos/windows

thanks, Philip

John Clizbe wrote:

Philip wrote:

Hi
I have some questions about gpg
1.  using gpg command line, can I pass data to be encrypted to gpg that
isn't in a file?  For example if I want to encrypt Mary had a little
lamb to a an asc file but I don't want to put that text onto the hard
drive unencrypted first.

gpg will behave as a pipe or if given no input, quietly wait for you to
type something in.


2.  is there something like gpgme that can be used easily for pascal
programmers?
Personally I use freepascal and I just want to be able to select a key,
encrypt and decrypt from within my program.
If anyone knows of any opensource pascal programs that use gnupg it
would be appreciated.

Pascal bindings should exist for the current gpgme, I've just not found
them.

I've worked with one pascal program that used gpgme bindings but it was
code before gpgme API changed. I'd love to find updated bindings and
save myself the effort of updating the old ones





___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users




___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: questions: no input file, and pascal programming

2009-05-02 Thread Faramir
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Philip escribió:
 I got it to work in Windows.
 With a default install of gpg4win gpg is not in the path, but this
 command works
 echo Mary had a little lamb|c:\Program Files\GNU\GnuPG\gpg.exe --yes
 -eat -o test.txt.gpg -r [keyid]

  I disagree, the installer of gpg4win automatically adds gpg to path
global environment variable. It's the installer of gpg 1.4.9 the one
that doesn't do it.

  Best Regards
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBCAAGBQJJ/J7hAAoJEMV4f6PvczxAliYH/0FVS4RhQD9fibosJgpTbnKw
cesj4nVKPbYRgXn5KxoCX6xiUAJ3cZHLaSDh56H8S2Lt7hY2V3/0KEeX1oG5+mXf
t/b9Ze6TfQ+Ke5sXfcAFgkH0j1Jbufr0yGVODAGPI/vqSz7njRkQRhIiZDIW4qkt
1KU7ejoLZIdNVMuwCTbYhnqrt2/JVDtQ0LDQk517gYPI6zsdFyJlDLIdSev3lz/V
7Zi7hbaECCNapp2SjtTz84Ok8jS/WNhYZAeAsufySnCIV8WMRfQLNN7SqWn7vacO
azRfR4jZHLjkhOhTWd5TnU4L1iHk0FJjEhsYdFc+rqlThmtMts2yTSmudru4OKk=
=3Thc
-END PGP SIGNATURE-

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


questions: no input file, and pascal programming

2009-05-01 Thread Philip
Hi
I have some questions about gpg
1.  using gpg command line, can I pass data to be encrypted to gpg that
isn't in a file?  For example if I want to encrypt Mary had a little
lamb to a an asc file but I don't want to put that text onto the hard
drive unencrypted first.
2.  is there something like gpgme that can be used easily for pascal
programmers?
Personally I use freepascal and I just want to be able to select a key,
encrypt and decrypt from within my program.
If anyone knows of any opensource pascal programs that use gnupg it
would be appreciated.
thanks, Philip


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users