1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00
Daniel Kahn Gillmor 07c19981da gpg: add --passphrase-env VARNAME to read passphrase from environment
* g10/keydb.h: declare set_passphrase_from_environment_variable()
* g10/passphrase.c: set_passphrase_from_environment_variable() new
function
* g10/gpg.c: add new --passphrase-env argument, handle it.

--

There are problems or difficulties (to varying degrees) with all of
the techniques available for sending a passphrase directly to the
GnuPG process when --pinentry-mode=loopback:

 * Passphrases on the command line often leak into the process table.

 * Passphrases in a file often leak into the disk.

 * Using an extra file descriptor to send a passphrase works well on
   platforms that make it easy to allocate and use extra file
   descriptors, but is pretty awkward on platforms that don't
   facilitate this.

So this patch adds a new form of passphrase-passing, using an
environment variable.  In POSIX shell, this looks like (for example):

    mypass="IUuKctdEhH8' gpg --batch --pinentry-mode=loopback\
      --passphrase-env=mypass --decrypt < message.txt

Hopefully, this is easier to use than --passphrase-fd on platforms or
language toolkits that don't facilitate file descriptor manipulation.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2018-09-23 14:25:01 -04:00
..
2014-12-14 12:15:21 +01:00
sm/
2006-11-14 10:23:21 +00:00
2016-09-20 09:32:25 +09:00
DCO
2013-04-17 11:26:27 +02:00
2016-12-13 17:30:55 +01:00
2003-01-09 13:24:01 +00:00
2016-09-20 09:56:22 +09:00
2010-06-10 10:39:44 +00:00
2007-07-04 19:49:40 +00:00
2007-03-08 18:31:56 +00:00
2014-07-03 11:03:22 +02:00
2017-10-20 08:56:39 +02:00
2007-05-08 13:59:41 +00:00
2006-08-21 20:20:23 +00:00
2016-09-17 16:00:37 +09:00
2016-09-20 09:56:22 +09:00
2012-11-30 12:47:49 -05:00
2018-06-06 17:25:51 +02:00
2016-09-20 13:02:39 +09:00
2011-08-12 14:40:47 +02:00
2018-06-06 17:25:51 +02:00
2017-02-21 13:11:46 -05:00
2006-12-06 16:38:34 +00:00
2017-08-28 11:18:26 +02:00
2018-02-22 16:19:56 +01:00