gpg --verify detached signature from two file descriptors?

Robert J. Hansen rjh at sixdemonbag.org
Fri Nov 12 05:44:02 CET 2010


On 11/11/2010 11:19 PM, Daniel Kahn Gillmor wrote:
> i'd like to use gpg to verify a detached signature, but for various
> reasons i don't want to put either part (the body or the signature) in
> the filesystem (i have the data queued in two otherwise anonymous file
> descriptors).

This may be more hammer for your task than you really need, but I would
consider making a memory-mapped file object.  Read the data from the two
anonymous FDs, concat them into the memory-mapped file object, and pipe
those contents to GnuPG.

(Note that most people use MMFOs to populate memory blocks with file
contents, but there's no requirement it correspond to a physical file on
disk: anonymous FDs should work.  Also note that I haven't done POSIX
memory mapped files in quite some time: my recollections may be off.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5598 bytes
Desc: S/MIME Cryptographic Signature
URL: </pipermail/attachments/20101111/84ab9f4e/attachment.bin>


More information about the Gnupg-users mailing list