1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-08 12:44:23 +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
..
2018-05-29 12:42:52 +02:00
2017-03-07 20:25:54 +09:00
2018-01-21 16:30:53 +01:00
2017-11-22 20:54:47 +01:00
2018-05-29 13:01:12 +02:00
2017-03-07 20:25:54 +09:00
2015-02-04 09:15:34 +01:00
2015-02-04 09:15:34 +01:00
2017-03-07 20:25:54 +09:00
2017-03-07 20:25:54 +09:00
2018-09-07 13:01:52 +09:00
2017-03-07 20:25:54 +09:00
2017-03-07 20:25:54 +09:00
2018-05-29 13:01:12 +02:00
2018-08-29 09:36:09 +02:00
2017-03-07 20:25:54 +09:00
2017-03-07 20:25:54 +09:00
2017-03-07 20:25:54 +09:00
2017-03-07 20:25:54 +09:00
2017-01-23 19:16:55 +01:00
2018-05-29 13:01:12 +02:00
2017-02-21 13:11:46 -05:00
2017-03-07 20:32:09 +09:00
2017-03-07 20:25:54 +09:00
2017-04-28 10:06:33 +09:00
2018-07-03 09:07:03 +09:00
2018-09-14 08:11:45 +09:00
2016-03-08 14:08:49 +01:00
2017-03-07 20:25:54 +09:00
2016-12-06 12:16:56 +01:00
2017-04-28 10:06:33 +09:00