piping data stream through GPG

R

robert

I played around trying to encrypt/decrypt data through GPG on the
fly (or worse - by using a file) (on Windows first - later to try
on Linux too)

Using os.popen3 like

hangs on o.read or e.read.

So its quite dark. Just a totally non-existing userid (-r) will
result significantly different like
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
IOError: [Errno 22] Invalid argument


GPG asks confirmation stuff (and pwd upon -d or -c) on the command
line.
How to get all this the right way?


Robert
 
R

robert

robert said:
I played around trying to encrypt/decrypt data through GPG on the fly
(or worse - by using a file) (on Windows first - later to try on Linux too)

Using os.popen3 like

hangs on o.read or e.read.

So its quite dark. Just a totally non-existing userid (-r) will result
significantly different like
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
IOError: [Errno 22] Invalid argument


GPG asks confirmation stuff (and pwd upon -d or -c) on the command line.
How to get all this the right way?

now tryed around like


still just hanging... never any output (status or honey)

Robert
 
R

robert

robert said:
I played around trying to encrypt/decrypt data through GPG on the fly
(or worse - by using a file) (on Windows first - later to try on Linux too)

Using os.popen3 like

hangs on o.read or e.read.

So its quite dark. Just a totally non-existing userid (-r) will result
significantly different like
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
IOError: [Errno 22] Invalid argument


GPG asks confirmation stuff (and pwd upon -d or -c) on the command line.
How to get all this the right way?

I basically can handle it now by a os.popen3 cmd like
'gpg -e -r Robert --batch --always-trust',
'gpg -d -r Robert --batch --always-trust --passphrase-fd 0'

and by using a thread for feeding the child_stdin stream
(necessary for files of significant length / more than buffers)


Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top